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 math-superscript-shift-style to math-shift #43

Closed
fantasai opened this issue Jun 10, 2020 · 11 comments
Closed

Rename math-superscript-shift-style to math-shift #43

fantasai opened this issue Jun 10, 2020 · 11 comments

Comments

@fantasai
Copy link

Just seems like a shorter name is warranted here. :) Also -style isn't exactly adding any useful information.

@fred-wang
Copy link
Contributor

I provided more context on the name here: https://github.com/mathml-refresh/mathml/issues/170#issuecomment-642549733

To summarize:

  • "-style" is not important, it was just to be consistent with "math-style"
  • I believe "math-shift" loses the information about the fact that it only applies to superscript (and not subscript, overscript or numerator shifts...)
  • There was an alternative shorter name "cramped" used in TeX / OpenType but nobody understood what this meant.

@fantasai
Copy link
Author

@fred-wang There is definitely no need to add "-style" for "consistency" with math-style, and I think it's OK that we're not super explicit that the compacting rules happen to not affect subscripts. If in the future you add another compactness algorithm that happens to affect subscripts, it should probably be another value on this property and not its own independent property; I see no reason why it would need to cascade independently.

@fred-wang
Copy link
Contributor

@fantasai: OK that makes sense. I'm adding this for the MathML Core agenda of next Monday but I don't expect big concern on naming changes.

@NSoiffer
Copy link
Contributor

'math-shift' is a very generic name. I suspect that there is some "law" that says don't use short generic names for specialized things as you will regret it down the road. It also fails to convey what it is used for. Keep in mind MathML already has superscriptshift/subscriptshift. "math-shift" seems like it should be more generic when in fact, it is more specific (applies in only a few situations). It is also basically a boolean, whereas the others are 'length's.

@fantasai: I like the idea of not inventing a new property, but I'm not clear how what your suggestion for adding another value would work. Currently this value is one of normal/compressed. Suppose that a similar thing was desired for 'mover' (overscripts). Would you use 'mover-normal', etc?

Along those lines, what about adding a compressed value to superscriptshift? automatic (and any length value) would mean 'normal'. At the moment, superscriptshift is not part of core and decision has not been resolved (#27). Regardless of whether superscriptshift is part of core with the current values, the proposed values would not conflict with the future addition of the attr into core.

@fred-wang
Copy link
Contributor

The current proposal for "cramped" is what exists in TeX / OpenType so there is a strong argument for this.

superscriptshift/subscriptshift are not in MathML Core and I'm pretty skeptical they would not be added in the future ; the case of munder is even more hypothetic. In any case you could always define list of functions like "math-shift: superscript(2em) subscriptshift(3em)" if necessary so @fantasai 's proposed name is not an obstacle.

@NSoiffer
Copy link
Contributor

I'm not clear about your reason for skepticism about ever supporting subscriptshift since there is an indication a similar ability is used in TeX and that it would be a one line addition (each) to the spec for how they work (just another case to the 'max shift' calculation), but that's neither here nor there.

You basically provided a reason why we need to think ahead about using a generic name like "math-shift". If it is to be extended in the future, we should consider that now so that we don't end up with compatibility weirdness 'math-shift: 'compressed' has some very specific meaning about superscripts in a few cases, but there is a micro syntax for shifting superscripts and/or subscripts in a more general case. If would make more sense to define 'math-shift: superscript(compressed)' off the bat than have legacy issues with a generic name like 'math-shift' for cramped.

@fred-wang
Copy link
Contributor

About @NSoiffer 's comment, this was clarified in yesterday's meeting, basically repeating the discussion we had for these attributes (there is not any official TeX / OpenType thing contrary to "cramped" + from w3c/mathml#55 we didn't demonstrated any significant usage).

@fred-wang
Copy link
Contributor

Consensus from 15 June 2020: change the spec text to use math-shift for now ; explain "cramped" name from TeX/OpenType when sending the proposal to the CSS WG so they can decide a name.

@fred-wang
Copy link
Contributor

I assume "math-style" is still ok, despite using the "-style" suffix (like font-style). If not, we could also propose "math-layout".

@fred-wang
Copy link
Contributor

Closing since math-superscript-shift-style is called math-shift in the current version of the spec.

@fred-wang
Copy link
Contributor

Reference from the CSS tracker: 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