Last Comment Bug 757125 - Make more MathML operators mirrorable
: Make more MathML operators mirrorable
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Frédéric Wang (:fredw)
:
:
Mentors:
http://mxr.mozilla.org/mozilla-centra...
Depends on:
Blocks: translate-math-start
  Show dependency treegraph
 
Reported: 2012-05-21 10:40 PDT by Frédéric Wang (:fredw)
Modified: 2012-09-29 03:31 PDT (History)
5 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Make updateOperatorDictionary.pl read mirrorable property (2.83 KB, patch)
2012-05-27 15:02 PDT, Frédéric Wang (:fredw)
karlt: review+
Details | Diff | Splinter Review
Patch V2 (22.33 KB, patch)
2012-05-27 15:10 PDT, Frédéric Wang (:fredw)
karlt: review+
Details | Diff | Splinter Review

Description Frédéric Wang (:fredw) 2012-05-21 10:40:25 PDT
We should make more MathML operators mirrorable, for example:

operator.\u2308.prefix = lspace:0 rspace:0 stretchy fence symmetric direction:vertical # ⌈
operator.\u2309.postfix = lspace:0 rspace:0 stretchy fence symmetric direction:vertical # ⌉
operator.\u230A.prefix = lspace:0 rspace:0 stretchy fence symmetric direction:vertical # ⌊
operator.\u230B.postfix = lspace:0 rspace:0 stretchy fence symmetric direction:vertical # ⌋

There are certainly other possible candidates among math fences. The unicode.xml file maintained by David Carlisle uses a mirrorable attribute too.
Comment 1 Frédéric Wang (:fredw) 2012-05-21 10:43:24 PDT
Using a scale to mirror operators does not always work (for example for clockwise integral) but hopefully that should work well for most operators.
Comment 2 Frédéric Wang (:fredw) 2012-05-27 15:02:54 PDT
Created attachment 627595 [details] [diff] [review]
Make updateOperatorDictionary.pl read mirrorable property
Comment 3 Frédéric Wang (:fredw) 2012-05-27 15:10:26 PDT
Created attachment 627597 [details] [diff] [review]
Patch V2

Here a patch adding the mirrorable property to the operators marked @mirror="Y" in the unicode.xml file from http://www.w3.org/TR/xml-entity-names/.

I expect that it is correct to change all "left" into "right" and vice versa. For example "integral with leftwards arrow with hook" is changed into "integral with rightwards arrow with hook".

I don't know why "division slash" is the only slash that should be mirrored?

The remaining conflicts are given below. They are for clockwise/anticlockwise integrals.

[conflict][stretching] - operator.\u005F.infix (low line)
-lspace:1 rspace:1 stretchy
+lspace:1 rspace:1

[conflict] - operator.\u2231.prefix (clockwise integral)
-lspace:0 rspace:1 largeop symmetric
+lspace:0 rspace:1 largeop symmetric mirrorable

[conflict] - operator.\u2232.prefix (clockwise contour integral)
-lspace:0 rspace:1 largeop symmetric
+lspace:0 rspace:1 largeop symmetric mirrorable

[conflict] - operator.\u2233.prefix (anticlockwise contour integral)
-lspace:0 rspace:1 largeop symmetric
+lspace:0 rspace:1 largeop symmetric mirrorable

[conflict] - operator.\u2A11.prefix (anticlockwise integration)
-lspace:1 rspace:2 largeop movablelimits symmetric
+lspace:1 rspace:2 largeop movablelimits symmetric mirrorable
Comment 4 Karl Tomlinson (:karlt) 2012-05-27 19:50:43 PDT
Comment on attachment 627595 [details] [diff] [review]
Make updateOperatorDictionary.pl read mirrorable property

I don't claim to know about XSL, but here's my rubber stamp.
Comment 7 Florian Scholz [:fscholz] (MDN) 2012-09-29 03:31:21 PDT
Added a note to
https://developer.mozilla.org/en-US/docs/Firefox_15_for_developers#MathML

I don't think this needs more documentation than that. Feel free to add more if you want to, though.

Note You need to log in before you can comment on or make changes to this bug.