w3c / mathml-core

MathML Core draft
https://w3c.github.io/mathml-core
36 stars 14 forks source link

vertical writing mode support #175

Open fred-wang opened 5 years ago

fred-wang commented 5 years ago

See https://bugzilla.mozilla.org/show_bug.cgi?id=1077525 and https://bugs.webkit.org/show_bug.cgi?id=48951

Original report: https://gitlab.com/mathml/MathMLinHTML5/issues/21

davidcarlisle commented 1 year ago

@fred-wang moved

fred-wang commented 5 years ago

This is for MathML Core, but I guess the general MathML 4 spec will have to be reworded to take vertical mode into account too.

fred-wang commented 5 years ago

Quoting @bgeek:

I'm not sure what the best option here, and what use-cases there are, however here are three options.

1. Only horizontal-tb is supported.

2. Setting writing mode is valid on the top level  element, and everything down to the , /etc elements is internall consistent. (This is similar to how tables work, i.e. all boxes from table->td are internally consistent).

3. Setting writing-mode is valid on any element.

Use-cases should guide the decision here. From my weak understanding math is typically only displayed in HTB, however I'm not a domain expert.

(2) May simplify implementations.

Any tests which are created for MathML should test that feature in each writing mode.
fred-wang commented 5 years ago

So far, the only vertical real-world use case I found was Mongolian (see mozilla bug above). They use vertical-lr for text and math: https://bug1077525.bmoattachments.org/attachment.cgi?id=8733228

Speaking to people writing CJK text, the reply I get is that in practice they often use horizontal-tb fo text and so a fortiori the same is true for math. For example the Korea SAT exam: https://semosu.com/data/exam/379/ab001.gif

However, someone else commented on that the Mozilla bug that even if not used in practice, it should be possible to have vertical MathML. Additionally, the CSS spec ( https://drafts.csswg.org/css-writing-modes-4/#block-flow ) says writing mode should be taken into account for MathML if the UA supports it:

"The content of replaced elements do not rotate due to the writing mode: images and external content such as from