Code Monkey home page Code Monkey logo

Comments (2)

dpvc avatar dpvc commented on May 30, 2024

The change to line-height would adversely affect the output of some math contained in the mstyle, particularly vertical stacking, like mfrac and munderover elements. The line-height being set to 0 is important to the rest of the layout. It might be possible to add more CSS to put back the line-height internally for those cases, however.

Also, it's not clear to me what the exact output is that you want. It would be possible to make the characters all have the height and depth of the font (which is how text fonts usually work), but then that would affect the layout of things like powers (the position of the square in x^2 would be too high) and roots (\sqrt{x} would leave too much room above the x, at least according to TeX layout rules). Perhaps you only want this when there is a background color?

To get the positioning correct with full-height characters, the bounding box code would have to keep track of both he TeX bounding box and the HTML bounding box. This would complicate both the bounding-box code and the layout code (especially if the HTML bounding boxes were the ones actually used). The original HTML-CSS renderer worked that way, which made it very complicated, and contributes to its slowness (if I recall correctly, the bounding box computations were about 10% of the run time). One of the v3 goals was to simplify the bounding-box handling in order to reduce that time.

from mathjax-src.

pkra avatar pkra commented on May 30, 2024

Thanks for the detailed reply, Davide. Plenty to think about for me.

from mathjax-src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.