-
Notifications
You must be signed in to change notification settings - Fork 233
Make mfrac use TeX layout. #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… script, and scriptscript). Still need to handle linethickness (particularly linethickness=0), and beveled fractions, but good enough for now.
d491743 to
7ffb8b1
Compare
zorkow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my email.
| bbox.combine(nbox, pad, a + 1.5 * t + Math.max(nbox.d, .25)); | ||
| bbox.combine(dbox, pad, a - 1.5 * t - Math.max(dbox.h, .75)); | ||
| bbox.w += pad + .2; | ||
| const T = (display ? 3.5 : 1.5) * this.font.params.rule_thickness;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| * @override | ||
| */ | ||
| public toCHTML(parent: HTMLElement) { | ||
| this.chtml = this.standardCHTMLnode(parent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit confused what the difference between chtml and CHTML is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHTML is my shorthand for CommonHTML. toCHTML() is the function that creates the CommonHTML version of the internal MathML nodes (as a tree of HTML elements). this.chtml is a cached pointer to the subtree for this (wrapped) internal MathML node.
|
I've made the requested changes. |
|
Lgtm |
Add support for munder/mover/munderover
Add support for mub/msup/msubsup
Line mathjax#48 had a typo, of {OptionLis} instead of {OptionList}
Make fractions conform to TeX spacing, for all styles (display, text, script, and scriptscript). Also, properly handle
\largeand other sizing macros. Still need to handle linethickness (particularly linethickness=0), and beveled fractions, but good enough for now.This also includes a change to the CHTMLWrapper's
handleScale()which allows you to set the scale on any node (not just the top-level one). This was originally going to be needed for the struts that enforce some spacing rules, but it ended up not being needed. But I left the change in since it might be useful to break out the setting of the scale as a separate function.Some of the constants used in the bounding box computation should be taken from the font parameters, but for now those values are hard-coded into the CSS, so I've hard coded them into the BBox computation as well. Eventually, that will need to be fixed.