-
Notifications
You must be signed in to change notification settings - Fork 232
Add support for munder/mover/munderover #50
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
bb10c51 to
ffeb86b
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.
| } | ||
|
|
||
| /* | ||
| * Get the separation and offset for undercripts (TeXBoox Appendix G 13, 13a) |
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.
Typo
| this.chtml = this.standardCHTMLnode(parent); | ||
| const base = this.chtml.appendChild(this.html('mjx-row')).appendChild(this.html('mjx-base')); | ||
| const under = this.chtml.appendChild(this.html('mjx-row')).appendChild(this.html('mjx-under')); | ||
| this.base.toCHTML(base); |
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 find the usage of base here very confusing. In subsup/overunder base refers to a position. Here it is actually a node. Can we call it differently?
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 changed base to baseChild
| /* | ||
| * @return{CHTMLWrapper) The wrapped under node | ||
| */ | ||
| public get under() { |
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.
The same comment as above applies to these fields.
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.
Changed to underChild and overChild
|
Changes made as per your request. |
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.
Lgtm
This PR adds preliminary support for
munderover,munderandmover. The wrappers for these subclass the ones formsubsup,msub, andmsupbecause when they have themovablelimitsattribute, and thedisplaystyleis false, we want to set the under-over as sub-sup. This subclassing lets us call the super class in that car etc get sub-sup formatting.This PR modifies
scriptbaseclass to add the needed common functions for under-over (and moves one function in order to group things better).We also fix an issue in the CSS generated for the TeX font (where negative values for height or depth would lead to invalid
paddingvalues).This implementation doesn't yet take the
accentandaccentbelowattributes into account (which change the spacing), and doesn't do the horizontal shift needed to handle italic correction or skew. That means that limits for integrals, in particular, will be misplaced at the moment. (Italic correction still needs to be handled in general.)