vertical writing mode support for MathML
Categories
(Core :: MathML, defect)
Tracking
()
People
(Reporter: jfkthame, Unassigned)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
Attachments
(5 files)
It's unclear to me whether there is a need for vertical MathML; if so, a bunch of MathML layout code will need to be logicalized. If not, we may want to explicitly impose horizontal-tb writing mode on all MathML content.
Updated•8 years ago
|
Comment 1•8 years ago
|
||
May be, there is no need for vertical MathML in CJK, but in Mongolian need for it.
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
(In reply to siqinbilige from comment #1) > May be, there is no need for vertical MathML in CJK, but in Mongolian need > for it. Thank you for these helpful examples. That indeed seems an important use case to handle. I'm not really familiar with the writing-mode property. But for the CSS direction our MathML user agent stylesheet sets it to left-to-right (so that it works for LTR languages as well as RTL languages/countries embedding LRT math) but that can be overridden to use right-to-left math too. I wonder if something similar should be done for MathML i.e. keep the writing-mode: horizontal-tb rule added in bug 1095933 but remove !important so that one can explicitly override it. Or should we instead inherit the writing-mode?
Reporter | ||
Comment 7•8 years ago
|
||
We should probably inherit the writing-mode -- bug 1095933 is a stopgap measure just to avoid total chaos! -- so that math within a vertical-writing context behaves sensibly by default, but we can only do that once the MathML frames have been adapted to handle it -- which I think means performing exactly the same math layout as they would in horizontal mode, but rendering with a 90° rotation. (Like a "sideways" mode rather than an "upright vertical" mode; I don't think there's any use case for the latter -- or any real idea what it would look like.) I guess this could almost be done by simply forcing the writing-mode to horizontal and then applying a CSS transform to rotate the result, but the problem with this is that transforms only affect rendering, they don't affect the element's metrics for layout purposes.
Comment 8•8 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #7) > We should probably inherit the writing-mode -- bug 1095933 is a stopgap > measure just to avoid total chaos! -- so that math within a vertical-writing > context behaves sensibly by default, but we can only do that once the MathML > frames have been adapted to handle it -- which I think means performing > exactly the same math layout as they would in horizontal mode, but rendering > with a 90° rotation. (Like a "sideways" mode rather than an "upright > vertical" mode; I don't think there's any use case for the latter -- or any > real idea what it would look like.) > > I guess this could almost be done by simply forcing the writing-mode to > horizontal and then applying a CSS transform to rotate the result, but the > problem with this is that transforms only affect rendering, they don't > affect the element's metrics for layout purposes. Yes, of course amending the code to fix the layout metrics will more tedious part than just the user stylesheet change :-) Indeed, I don't think there could be a "upright vertical" math mode, however it's possible that one embed some vertical text in an <mtext> element (or even more complex HTML) and in that case just applying a rotation to the whole formula won't work... I'm cc'ing Xuan who wrote https://developer.mozilla.org/zh-CN/docs/Mozilla_MathML_Project/Start, maybe he can give more feedback.
(In reply to Frédéric Wang (:fredw) from comment #8) > I'm cc'ing Xuan who wrote > https://developer.mozilla.org/zh-CN/docs/Mozilla_MathML_Project/Start, maybe > he can give more feedback. To my knowledge, vertical math mode is really rare in Chinese. Actually, I have never seen any Chinese documents with math in vertical mode.
Comment 10•8 years ago
|
||
Comment 11•6 years ago
|
||
I am definitely in favour of supporting MathML for vertical-writing CJK. My use case needs this.
Comment 12•6 years ago
|
||
I think it's reasonable to fix bug 1492931 before fixing this bug.
Comment 13•5 years ago
|
||
(In reply to 張俊芝(Zhang Junzhi) from comment #12)
I think it's reasonable to fix bug 1492931 before fixing this bug.
I'm not sure it's going to be the easiest path as there are a lot of things to change. As Jonathan said, we can already take writing-mode into account in the MathML layout code and "logicalized" the layout.
(In reply to 張俊芝(Zhang Junzhi) from comment #11)
I am definitely in favour of supporting MathML for vertical-writing CJK.
My use case needs this.
Out of curiosity, are you able to share what it is? So far I'm only aware of siqinbilige's Mongolian use case (comment 1). Do you know if vertical math is used with other CJK languages? Do you have examples (e.g. screenshots of books). Thanks.
Comment 14•5 years ago
|
||
(In reply to Frédéric Wang (:fredw) from comment #13)
(In reply to 張俊芝(Zhang Junzhi) from comment #11)
I am definitely in favour of supporting MathML for vertical-writing CJK.
My use case needs this.
Out of curiosity, are you able to share what it is? So far I'm only aware of siqinbilige's Mongolian use case (comment 1). Do you know if vertical math is used with other CJK languages? Do you have examples (e.g. screenshots of books). Thanks.
I've been writing writing-mode responsive pages for years, and recently I also started writing user-content-generated pages which may contain Math expressions. So since two features get together on those pages, that means, though I am not sure if the users will possibly encounter a Math expression when viewing vertical-writing pages in real case, those pages at least technically speaking should support vertical MathML.
Comment 15•5 years ago
|
||
(In reply to Frédéric Wang (:fredw) from comment #13)
(In reply to 張俊芝(Zhang Junzhi) from comment #12)
I think it's reasonable to fix bug 1492931 before fixing this bug.
I'm not sure it's going to be the easiest path as there are a lot of things to change. As Jonathan said, we can already take writing-mode into account in the MathML layout code and "logicalized" the layout.
(In reply to 張俊芝(Zhang Junzhi) from comment #11)
I am definitely in favour of supporting MathML for vertical-writing CJK.
My use case needs this.
Do you know if vertical math is used with other CJK languages? Do you have examples (e.g. screenshots of books). Thanks.
Right now, I haven't seen other real-world examples, except mine.
Updated•5 years ago
|
Updated•2 years ago
|
Description
•