Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Sep 21, 2017

This PR adds preliminary support for munderover, munder and mover. The wrappers for these subclass the ones for msubsup, msub, and msup because when they have the movablelimits attribute, and the displaystyle is 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 scriptbase class 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 padding values).

This implementation doesn't yet take the accent and accentbelow attributes 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.)

@dpvc dpvc force-pushed the munderover-support branch from bb10c51 to ffeb86b Compare October 10, 2017 10:51
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.

}

/*
* Get the separation and offset for undercripts (TeXBoox Appendix G 13, 13a)
Copy link
Member

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);
Copy link
Member

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?

Copy link
Member Author

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() {
Copy link
Member

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.

Copy link
Member Author

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

@dpvc
Copy link
Member Author

dpvc commented Oct 28, 2017

Changes made as per your request.

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

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