# publicjgm/texmath

### Subversion checkout URL

You can clone with HTTPS or Subversion.

# Fix \stackrel argument order in MathML#10

Merged
merged 2 commits into from over 2 years ago
+66 2

### 2 participants

commented

The latex macro \stackrel shows the first argument above the second one, as a description. For instance

\stackrel{w}{\to}


should display as

w
→


However, the output was incorrect in MathML (since the order must be reversed: <mover> base overscript </mover>). This patch fixes the order and adds a test.

Unfortunately, I cannot check the OMML output, so that one might still need patching.

 rekka add stackrel tests 6914338 rekka reverse stackrel arguments in MathML output b40dad9
merged commit 0cfc25d into from
closed this

Showing 2 unique commits by 1 author.

Apr 12, 2012
add stackrel tests 6914338
reverse stackrel arguments in MathML output b40dad9
2  Text/TeXMath/MathML.hs
 @@ -83,7 +83,7 @@ binaryOps = M.fromList 83 83 , ("\\dfrac", withAttribute "displaystyle" "true" . 84 84 unode "mstyle" . unode "mfrac") 85 85 , ("\\sqrt", unode "mroot") 86 - , ("\\stackrel", unode "mover") 86 + , ("\\stackrel", unode "mover" . reverse) 87 87 , ("\\overset", unode "mover") 88 88 , ("\\underset", unode "munder") 89 89 , ("\\binom", showBinom)
40 tests/stackrel.omml
 ... ... @@ -0,0 +1,40 @@ 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + u 12 + 13 + 14 + 15 + 16 + 17 + n 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + w 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + u 38 + 39 + 40 +
2  tests/stackrel.tex
 ... ... @@ -0,0 +1,2 @@ 1 +u_n \stackrel{w}{\to} u 2 +
21 tests/stackrel.xhtml
 ... ... @@ -0,0 +1,21 @@ 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + u 11 + n 12 + 13 + 14 + 15 + w 16 + 17 + u 18 + 19 + [/itex] 20 + 21 +
3  texmath.cabal
 @@ -60,7 +60,8 @@ Data-Files: cgi/texmath.xhtml, 60 60 tests/unicode.tex, tests/unicode.xhtml, tests/unicode.omml, 61 61 tests/ensuremath.tex, tests/ensuremath.xhtml, tests/ensuremath.omml, 62 62 tests/macros.tex, tests/macros.xhtml, tests/macros.omml, 63 - tests/subsup.tex, tests/subsup.xhtml, tests/subsup.omml 63 + tests/subsup.tex, tests/subsup.xhtml, tests/subsup.omml, 64 + tests/stackrel.tex, tests/stackrel.xhtml, tests/stackrel.omml 64 65 65 66 Source-repository head 66 67 type: git

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.