Skip to content
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

Avoid line breaks for inline math in in WebKit. #1982 #2006

Merged
merged 7 commits into from
Jul 9, 2018

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Jun 6, 2018

This PR changes the method of determining the em and ex sizes, and the container width so that display is not set to any block-level values for inline mathematics. This is fine for the em and ex sizes, but the new mechanism has a downside for finding the container width: if the inline math is inside a shrink-wrapped element (like a <td>, or an element with display:inline-block) with no display math, then the container width will be the size of the container without the mathematics, rather than the maximum width available to the shrink-wrapped element, as it is now. Fortunately, in-line math does not use the container width except in unusual situations (e.g., when there is an explicit line break in the math), so it should not affect most uses. For those situations where this is a problem, adding an empty display math should resolve the issue (you could put it in a div with height 0px to avoid the extra space it would introduce).

Resolves issue #1982.

dpvc added 7 commits June 5, 2018 11:38
…r inline math. This will fail to get the cwidth for inline math inside shrinkwrapping elements (like <td> or ones with display:inline-block), but inline elements shouldn't use cwidth anyway unless there are explicit line breaks.
…width (2 less than full size), and if cwidth is 0, use default width
…lock elements when computing cwidth for inline math.
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.

1 participant