w3c / w3c/mathml-core

Cramped subscripts

Open
#304 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
56
Forks
20
PR merge metrics
No merged PRs in 30d

Description

MathML Core section 3.4.1.3 specifies cramped superscripts when the element has a computed CSS math-shift property equal to compact. The meaning of "cramped" being that the vertical alignment of a superscript is slightly lower than normal. TeX does the same thing, but it also cramps subscripts.

The lack of cramped subscripts causes MathML <sub> elements to be slightly taller than the TeX cramped equivalents. In most cases, I don't mind, but that size difference causes a visual problem with radicals because the algorithm sometimes picks a radical that is too tall. Example: $\sqrt{f_c'}$.

It seems that font designers have carefully chosen radical sizes to coordinate with commonly cramped (sub|super)script expressions. When the subscript is not cramped, the carefully designed radical does not fit and the algorithm picks the next larger radical size, which can be visually jarring. So I request a modification to section 3.4.1.2 that specifies cramped subscripts.

For clarification, be aware that the example I've chosen, $\sqrt{f_c'}$ contains two issues, not just this one. Naive MathML, such as currently implemented in GitHub threads, displays primes at a vertical alignment that is too high. That is issue #160. My Temml library takes steps to workaround that issue. Hopefully the prime problem will also be fixed someday but that is a separate problem from the lack of cramped subscripts.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with MathML Core section 3.4.1.2 and compare its treatment of subscripts with section 3.4.1.3's cramped superscript rules. Review the $\sqrt{f_c'}$ example while keeping issue #160 separate. Done means the specification clearly defines the requested cramped-subscript behavior without conflating the prime-alignment issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
xml
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.