-
Notifications
You must be signed in to change notification settings - Fork 681
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
[math] "cramped" script style #5388
Comments
So, is the suggestion to add a new property, or to add new values to baseline-shift / vertical align? I'd prefer the second, so it would be a case of But then we might need some magic behavior for the new keyword if it is supposed to work correctly with both manually-sized superscripts and superscript glyphs from the font. |
The CSS Working Group just discussed
The full IRC log of that discussion<astearns> topic: cramped script style<astearns> github: https://github.com//issues/5388 <bkardell_> NeilS: cramped style is a thing specific to math typsetting - it reduces the vertical size in a few situations <bkardell_> NeilS: it's about the positioning and the superscript in a few situations, it's been part of systems like LaTeX and typesettings <bkardell_> NeilS: if you look at the example in the issue, you can see the 2 is 'cramped' down - it's been standard in math typesetting to do this for as long as typesetting has existed, basically <bkardell_> astearns: You're applying it to the entire expression whether or not it has -- just incase it does? <bkardell_> NeilS: It's sort of automatically set for math, and the reason to expose it to authors is really just if the general rules don't fit somehow - so they could override it <bkardell_> fredw: they are just UA stylesheet rules that define things for Math typography, and people could still use this kind of thing similarly if they needed <bkardell_> iank_: I think this kind of makes sense -- to respond to amelia's issue - ... (missed it), but I think this makes sense to me <bkardell_> astearns: you mentioned the default stylesheet would have the thing defined... <bkardell_> iank_: does anyone have opinions on the naming <bkardell_> fredw: the name has always been 'cramped' which comes from tech, but it seems most people in css don't know that so the suggestion from fantasai was this <bkardell_> fredw: we originally called it "math-superscript-shift" but fantasai suggested this was too long... <iank_> "to respond to amelia's issue" -> vertical-align doesn't immediately work as it isn't inherited, this would be set in the UA stylesheet e.g. `msqrt { math-script: cramped; }` which would then apply to the sub-tree. <bkardell_> astearns: and you could turn it into a shorthand if we expanded it.... <dholbert> my mic isn't working, but I have a question about inheritance <dholbert> what if we had x/y inside of the sqrt() operation here? <dholbert> and y had an exponent <dholbert> does it apply to the "y"? <dholbert> (seems a bit odd as the sqrt bar isn't close to the y) <dholbert> yeah <bkardell_> fredw: the normal css inheritcance will apply so it would also have a compact style <bkardell_> astearns: does TeX do this as well <bkardell_> fredw: yes, because that is what it copies from <dholbert> just strange that sqrt(...) changes the rendering of arbitrary stuff inside the sqrt operation <dholbert> (in the screenshot, it looks like we're aiming to dodge the bar of the sqrt) <bkardell_> astearns: we have the cramped style to lay out the line better, so part of that is making the radical get closer to the exponent to make things more compact and kind of line up. Doing the same thing as an exponent in a denominator doesn't seem to have as much of an effect <fredw> https://mathml-refresh.github.io/mathml-core/#the-math-shift <dholbert> (I don't object; I just want to be sure we don't accidentally specify something that doesn't match the intent) <dholbert> cool! ok thanks <bkardell_> NeilS: You can criticize TeX, there are shortcommings... But there are just a couple of places where it shifts to this cramped situation, layout rules want to shrink the vertical height when they can - so this is how TeX has always done it and it's just how people expect it now <bkardell_> RESOLVED we add an inhertied property with two value and the default of normal |
This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e
This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#809259}
This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#809259}
This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#809259}
…ft to match the specification, a=testonly Automatic update from web-platform-tests [mathml] Update CSS math-superscript-shift to match the specification This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#809259} -- wpt-commits: 96be9a34e38bf8d33636516aa7a81f414458589e wpt-pr: 25666
…ft to match the specification, a=testonly Automatic update from web-platform-tests [mathml] Update CSS math-superscript-shift to match the specification This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <rbuisigalia.com> Reviewed-by: Rune Lillesveen <futharkchromium.org> Commit-Queue: Frédéric Wang <fwangigalia.com> Cr-Commit-Position: refs/heads/master{#809259} -- wpt-commits: 96be9a34e38bf8d33636516aa7a81f414458589e wpt-pr: 25666 UltraBlame original commit: eb2e9cc1e0c5a4da0897e121252f817a8bdb82e6
…ft to match the specification, a=testonly Automatic update from web-platform-tests [mathml] Update CSS math-superscript-shift to match the specification This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <rbuisigalia.com> Reviewed-by: Rune Lillesveen <futharkchromium.org> Commit-Queue: Frédéric Wang <fwangigalia.com> Cr-Commit-Position: refs/heads/master{#809259} -- wpt-commits: 96be9a34e38bf8d33636516aa7a81f414458589e wpt-pr: 25666 UltraBlame original commit: eb2e9cc1e0c5a4da0897e121252f817a8bdb82e6
…ft to match the specification, a=testonly Automatic update from web-platform-tests [mathml] Update CSS math-superscript-shift to match the specification This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <rbuisigalia.com> Reviewed-by: Rune Lillesveen <futharkchromium.org> Commit-Queue: Frédéric Wang <fwangigalia.com> Cr-Commit-Position: refs/heads/master{#809259} -- wpt-commits: 96be9a34e38bf8d33636516aa7a81f414458589e wpt-pr: 25666 UltraBlame original commit: eb2e9cc1e0c5a4da0897e121252f817a8bdb82e6
…ft to match the specification, a=testonly Automatic update from web-platform-tests [mathml] Update CSS math-superscript-shift to match the specification This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#809259} -- wpt-commits: 96be9a34e38bf8d33636516aa7a81f414458589e wpt-pr: 25666
This feature was initially implemented in [1] [2]. After discussion with the CSSWG, the property and values have been renamed [3]. This CL performs the following changes: - Rename math-superscript-shift to math-shift - Rename value "display" and "inline" to "normal" and "compact" - Add a MathML test to verify the effect of CSS math-shift (rather than just testing indirectly via UA style sheet rules). - Sort math-style / math-shift alphabetically [1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814 [3] w3c/csswg-drafts#5388 Bug: 6606 Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662 Reviewed-by: Rob Buis <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#809259} GitOrigin-RevId: c82a21d4e24e53d4adf915a6c1f27005db1b5850
(Part of #5384 - MathML Core related CSS)
Mathematical rendering contains lots of 'scripted' concepts - that is, subscripts, superscripts, underscripts, overscripts, tensors and so on. The way that they are positioned is contextually dependent. A (simple) example of this can be seen in the case of exponents within a square root vs normally. The example below, illustrates this, in which the exponent is tighter to the base when inside a square root.
TeXbook (and the spec algorithms) refer to this as "cramped" style. MathML-Core introduces the
math-shift
property to expose these two modes with valuesnormal
(default) andcompact
. Recommended UA styles apply the common rules, but leave authors the ability to tweak and extend.The text was updated successfully, but these errors were encountered: