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

Update minsize/maxsize percentage values to match MathML Core #489

Closed
dginev opened this issue Feb 28, 2024 · 2 comments
Closed

Update minsize/maxsize percentage values to match MathML Core #489

dginev opened this issue Feb 28, 2024 · 2 comments
Labels
MathML 4 Issues affecting the MathML 4 specification

Comments

@dginev
Copy link
Contributor

dginev commented Feb 28, 2024

As discussed in the MathML Core meeting on Feb 27 2024, the MathML 4 Full specification requires an update to match the algorithm specified by MathML Core (tracked at w3c/mathml-core#103 ).

The relevant MathML Core text is currently:
3.2.4.3 Layout of operators; item 2 - second bullet - item 5

Let minsize and maxsize be the minsize and maxsize properties on the operator. Percentage values are interpreted relative to T = T_ascent + T_descent.

Where T_ascent + T_descent - to our understanding in today's discussion - implies taking the percentage from the stretched size, rather than the unstretched size of an operator.


Relevant pieces of text that would need an update are:


The practical consequence of the change is that if one wanted minsize/maxsize relative to the unstretched size of a glyph, it is better to use relative font size units, such as em. And not a percentage value.

Please send corrections if any of these details are inaccurate, as the T_ascent + T_descent computation is not fully understood by all participants. As a reporter here I still struggle fully factoring in the stretchy and symmetric on/off considerations as they (can?) lead to a different T computation, and hence a different base for the minsize/maxsize percentage value.

@dginev dginev added MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes labels Feb 28, 2024
@dginev
Copy link
Contributor Author

dginev commented Mar 11, 2024

Action item, WG meeting 3/7/2024

I was tasked to report how MathJax currently renders the percentage values for minsize/maxsize, illustrated with a small superscript example. Here is a codepen and screenshot of the CHTML rendering:
https://codepen.io/dginev/pen/VwNaOzE

Notes:

  • there appears to be a limitation with both em and % values where MathJax v3 won't scale down proportionately from the normal size (and maybe none at all in script positions). But scaling up appears more accurate.
  • An easy test is commenting out the script tags and comparing to the browser rendering. Today the MathJax rendering matches Firefox, and not Chrome (i.e. it uses the unstretched size as a percentage base, as per MathML 3). The match is partial however, as Firefox will also be more precise with scaling down.
  • aside: by default MathJax will emit em values in minsize/maxsize when converting from LaTeX, I also included those examples for reference.

The original source for the codepen was:
$$\Bigl( x^{\Bigl( y \Bigr)} \Bigr)$$

@dginev
Copy link
Contributor Author

dginev commented Mar 28, 2024

The group agreed on March 28, 2024 that no action will be needed for this issue, thanks to the upgrades landing in MathML Core seen here.

The changes in MathML Core lead to consistent behavior with the current Full spec text.

@dginev dginev closed this as completed Mar 28, 2024
@dginev dginev removed the need specification update Issues requiring specification changes label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MathML 4 Issues affecting the MathML 4 specification
Projects
None yet
Development

No branches or pull requests

1 participant