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

Rename values of math-style and math-superscript-shift-style to improve understandability #60

Closed
fred-wang opened this issue Nov 12, 2019 · 13 comments

Comments

@fred-wang
Copy link
Contributor

cc @fantasai

@fred-wang
Copy link
Contributor Author

Consensus from 2019/11/11: Rename as normal/compressed

"Cramped" is used for another notion in TeX / OpenType / MathMLCore and maybe we'll expose a CSS property for it, see w3c/mathml#164

@fred-wang
Copy link
Contributor Author

We are reaching consensus for cramped. We should probably renamed it too.

How about something like:

math-style: normal/compressed
math-superscript-shift-style: normal/compressed

@fred-wang fred-wang changed the title Rename values of math-style to improve understandability Rename values of math-style and math-superscript-shift-style to improve understandability May 22, 2020
@fred-wang
Copy link
Contributor Author

Renaming will require updating all the tests and Chromium implementation. I think the CSS WG people are going to bikeshed on the names anyway, so I'd better way their conclusion before proceeding.

@fantasai
Copy link

compact has some history of use in the Web platform, so might suggest that in place of compressed. Also avoids the -ed morpheme.

@fred-wang
Copy link
Contributor Author

Brian was commenting about this the other day, so just to give some context about the names:

TeX has two math modes: display (e.g. $$\sum_I$$) and inline (e.g. $\sum_I$) and MathML1 defined the corresponding mode="display" and mode="inline". Since this corresponds roughly to CSS "display: block" and "display: inline", these attributes were later renamed display="block" and display="inline". The MathML Core UA sheet maps them to display: math and display: inline-math.

TeX's display and inline equations also automatically use a different math layout style, and also changes it when entering subexpressions, but this is can be overriden by authors. For example $$\textstyle \sum_I$$ (display equation in inline style) and $\displaystyle \sum_I$ (inline equation in display style). In MathML this was translated to displaystyle="true" and displaystyle="false" respectively. The math-style property is supposed to correspond to these thus the name "display" and "inline".

TeX has a similar concept called "cramped" (Mozilla's source code also uses "compressed") to automatically minimize the shift of superscripts in some subexpressions and this is the name used in the OpenType MATH table too. Since nobody understands what that name means, I called it math-superscript-shift-style to make that more explicit (and try and keep similarity with math-style) and I also used the same "display" and "inline" values.

Now I agree that using both inline/display values and a "display" attribute is a bit confusing so switching to normal/compact sounds fine.

@davidcarlisle
Copy link
Collaborator

I suspect that in the end using the "cramped" naming will be least confusing. luatex introduces new primitives \crampeddisplaystyle, \crampedtextstyle, ... so this cramped terminology is likely to get better known at least to tex users.

The luatex manual has quite a reasonable description of cramped layout, section 7.3.3 of

http://texdoc.net/texmf-dist/doc/context/documents/general/manuals/luatex.pdf

@fred-wang
Copy link
Contributor Author

@davidcarlisle Maybe for TeX/math users but at least @bkardell was reporting "cramped" does not really mean anything to him. See also @fantasai 's comment at https://github.com/mathml-refresh/mathml/issues/170#issuecomment-642203964

@fred-wang
Copy link
Contributor Author

Adding this for the MathML Core agenda of next Monday

@davidcarlisle
Copy link
Collaborator

@fred-wang sure I certainly have no objection to any name here, and ultimately it needs to be coherent in a css context not a TeX one.

Just mentioned it as if you wanted to go for a shorter name but felt that "cramped" would need some explanation, the luatex manual and its \cramped... commands would be a reasonable place to link to. It seems to me that lots of css terminology is using terms not generally known but referencing traditional typesetting terms, so using TeX terminology for math typesetting features isn't that bad an idea even if that terminology is unfamiliar to people not used to math typesetting.

But I really don't have a preference here: it could be called zzzzz so long as it works. So any name that the implementers and csswg agree to is fine by me.

@fred-wang
Copy link
Contributor Author

@davidcarlisle Yes, I got that. Also, I forgot to say that we could always mention the word "cramped" in the text of the CSS definition if that helps TeX / math users. Currently, in MathML core it's mentioned in the non-normative example https://mathml-refresh.github.io/mathml-core/#the-math-superscript-shift-style

@fred-wang
Copy link
Contributor Author

Consensus from 15 June 2020: change the values to normal/compact for now ; explain the math names https://github.com/mathml-refresh/mathml/issues/170#issuecomment-642549733 when sending the proposal to the CSS WG so they can decide a value name.

@fred-wang
Copy link
Contributor Author

Closing. Values are now compact/normal in the spec and that's how it's implemented in chromium too.

@fred-wang
Copy link
Contributor Author

References from the CSS tracker: w3c/csswg-drafts#5387 w3c/csswg-drafts#5388

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

No branches or pull requests

3 participants