-
Notifications
You must be signed in to change notification settings - Fork 233
V2 fixes #53
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
V2 fixes #53
Conversation
…that it becomes just withDelims
…t really shouod have been explicit mrows (e.g., in \frac{ab}c).
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.
| 'autoOP' | ||
| ]; | ||
| var RENAME = { | ||
| texWithDelims: 'withDelims' |
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.
Is there a reason for the name change?
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.
Because it can be used by other than TeX input.
| 'isError', | ||
| 'multiline', | ||
| 'variantForm', | ||
| 'autoOP' |
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.
What about fnOP?
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.
Ok, I'll add it. There are undoubtedly some other ones I've missed as well.
|
Changes made |
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
[I accidentally closed this PR, and don't seem to be able to reopen it, so I'm submitting it again. I don't think Volker had any comment on it yet. Sorry about the problem. Also messed up the table PR where there were comments, but I will fix the problems raised and resubmit that PR as well.]
This fixes a number of small issues with attribute inheritance in MmlNodes, and with the bounding boxes in CHTML.
Although the
mathsizeattribute is only allowed on token elements, we want it to affect things like fractions, roots, tables, etc., so that when\largeand the other sizing macros are used, everything scales appropriately. Similarly,<math mathsize="200%">...</math>should scale everything up, not just the token elements.When inheriting values check for default attribute values only in the actual default list, not the chained global defaults (now that the global defaults are in the chain).
The
<math>element should set thedisplaystyleas an inherited value, since its default value is computed from several other values, when not explicitly given.Fix the handling of
displaystylein<mstyle>In CHTML, the bounding boxes are now computed in place by
computeBBox(), rather than creating new BBox structures each time. But that means that whengetBBox()is called withsave = false, then the box is saved anyway. SocomputeBBox()was changed to accept the BBox to be used, andgetBBox()passes it either the original box (when the value is to be saved), or a new zeroed box (if the box isn't being saved). The CHTMLWrappercomputeBBox()implementations are modified to include the BBox parameter. The return value is no longer needed, since the BBox is passed to it.Finally,
super.computeBBox()is replaced bythis.childNode[0].getBBox(), since that way you get the cached bounding box of the inferred row (the only child), rather than creating a new BBox and appending one BBox to it (extra work for nothing).