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 (closed).