Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Oct 10, 2017

[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 mathsize attribute is only allowed on token elements, we want it to affect things like fractions, roots, tables, etc., so that when \large and 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 the displaystyle as an inherited value, since its default value is computed from several other values, when not explicitly given.

  • Fix the handling of displaystyle in <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 when getBBox() is called with save = false, then the box is saved anyway. So computeBBox() was changed to accept the BBox to be used, and getBBox() 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 CHTMLWrapper computeBBox() 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 by this.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).

dpvc added 2 commits October 10, 2017 06:22
…t really shouod have been explicit mrows (e.g., in \frac{ab}c).
Copy link
Member

@zorkow zorkow left a 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'
Copy link
Member

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?

Copy link
Member Author

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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about fnOP?

Copy link
Member Author

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.

@dpvc
Copy link
Member Author

dpvc commented Oct 28, 2017

Changes made

Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@dpvc dpvc merged commit b740a3d into table-support Dec 6, 2017
@dpvc dpvc deleted the v2-fixes branch December 6, 2017 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants