Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion src/Text/TeXMath/Writers/MathML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ showExp tt e =
vnode elname t
= case tt of
Nothing ->
if isUppercaseGreek t -- see #255
if elname == "mn" || isUppercaseGreek t -- see #255
then withAttribute "mathvariant" "normal" $ tunode elname t
else tunode elname t
Just TextNormal -> withAttribute "mathvariant" "normal" $
Expand Down
4 changes: 3 additions & 1 deletion src/Text/TeXMath/Writers/OMML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ handleDownup' _ xs = xs
showExp :: [Element] -> Exp -> [Element]
showExp props e =
case e of
ENumber x -> [str props x]
ENumber x
| null props -> [str [mnodeA "sty" "p" ()] x]
| otherwise -> [str props x]
EGrouped [EUnderover _ (ESymbol Op s) y z, w] ->
[makeNary props "undOvr" s y z w]
EGrouped [ESubsup (ESymbol Op s) y z, w] ->
Expand Down
6 changes: 3 additions & 3 deletions test/writer/mml/01.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
<mrow>
<msup>
<mi>b</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mn mathvariant="normal">4</mn>
<mi>a</mi>
<mi>c</mi>
</mrow>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
<mi>a</mi>
</mrow>
</mfrac>
Expand Down
8 changes: 4 additions & 4 deletions test/writer/mml/02.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
<?xml version='1.0' ?>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
<mo>=</mo>
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<mfrac>
<mrow>
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
<mo>−</mo>
<mi>x</mi>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
<mo>×</mo>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</mrow>
<mrow>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
<mo>−</mo>
<mi>x</mi>
</mrow>
Expand Down
4 changes: 2 additions & 2 deletions test/writer/mml/03.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
<mi>a</mi>
<msup>
<mi>x</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
<mo>=</mo>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</mrow>
</math>
6 changes: 3 additions & 3 deletions test/writer/mml/04.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
<msup>
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<mn>5</mn>
<mn mathvariant="normal">5</mn>
<mo>−</mo>
<mi>T</mi>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</mfrac>
</mrow>
</math>
12 changes: 6 additions & 6 deletions test/writer/mml/06.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<mrow>
<mi>m</mi>
<mo>=</mo>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</mrow>
<mo accent="false">∞</mo>
</munderover>
Expand All @@ -49,37 +49,37 @@
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</mrow>
<mo accent="false">∞</mo>
</munderover>
<mfrac>
<mrow>
<msup>
<mi>m</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
<mspace width="0.167em" />
<mi>n</mi>
</mrow>
<mrow>
<msup>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
<mi>m</mi>
</msup>
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<mi>m</mi>
<mspace width="0.167em" />
<msup>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
<mi>n</mi>
</msup>
<mo>+</mo>
<mi>n</mi>
<mspace width="0.167em" />
<msup>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
<mi>m</mi>
</msup>
<mo stretchy="true" form="postfix">)</mo>
Expand Down
4 changes: 2 additions & 2 deletions test/writer/mml/09.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<mo>→</mo>
<msub>
<mi>z</mi>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</msub>
</mrow>
</munder>
Expand All @@ -41,7 +41,7 @@
<mo stretchy="true" form="prefix">(</mo>
<msub>
<mi>z</mi>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</msub>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
Expand Down
12 changes: 6 additions & 6 deletions test/writer/mml/10.test
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@
</mrow>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
<mrow>
<mn>4</mn>
<mn mathvariant="normal">4</mn>
<msup>
<mi>π</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
<msup>
<mi>κ</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
</mrow>
</mfrac>
<msubsup>
<mo>∫</mo>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
<mi>∞</mi>
</msubsup>
<mfrac>
Expand Down Expand Up @@ -103,7 +103,7 @@
<mo stretchy="true" form="prefix">[</mo>
<msup>
<mi>R</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
<mfrac>
<mrow>
Expand Down
16 changes: 8 additions & 8 deletions test/writer/mml/11.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@
<mo stretchy="true" form="postfix">)</mo>
</mrow>
<mo>=</mo>
<mn>0.033</mn>
<mn mathvariant="normal">0.033</mn>
<msubsup>
<mi>C</mi>
<mi>n</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msubsup>
<msup>
<mi>κ</mi>
<mrow>
<mo>−</mo>
<mn>11</mn>
<mn mathvariant="normal">11</mn>
<mi>/</mi>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
</mrow>
</msup>
<mo>,</mo>
<mspace width="1.0em" />
<mfrac>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
<msub>
<mi>L</mi>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</msub>
</mfrac>
<mo>≪</mo>
<mi>κ</mi>
<mo>≪</mo>
<mfrac>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
<msub>
<mi>l</mi>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</msub>
</mfrac>
</mrow>
Expand Down
16 changes: 8 additions & 8 deletions test/writer/mml/12.test
Original file line number Diff line number Diff line change
Expand Up @@ -45,37 +45,37 @@
<mtable>
<mtr>
<mtd columnalign="left" style="text-align: left">
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</mtd>
<mtd columnalign="left" style="text-align: left">
<mo>−</mo>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
<mo>≤</mo>
<mi>x</mi>
<mo>&lt;</mo>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</mtd>
</mtr>
<mtr>
<mtd columnalign="left" style="text-align: left">
<mfrac>
<mn>1</mn>
<mn>2</mn>
<mn mathvariant="normal">1</mn>
<mn mathvariant="normal">2</mn>
</mfrac>
</mtd>
<mtd columnalign="left" style="text-align: left">
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</mtd>
</mtr>
<mtr>
<mtd columnalign="left" style="text-align: left">
<mn>1</mn>
<mn mathvariant="normal">1</mn>
<mo>−</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</msup>
</mtd>
<mtd columnalign="left" style="text-align: left">
Expand Down
10 changes: 5 additions & 5 deletions test/writer/mml/13.test
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<mo stretchy="true" form="prefix">(</mo>
<msub>
<mi>a</mi>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</msub>
<mo>,</mo>
<mi>…</mi>
Expand All @@ -81,7 +81,7 @@
<mo>;</mo>
<msub>
<mi>c</mi>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</msub>
<mo>,</mo>
<mi>…</mi>
Expand All @@ -100,7 +100,7 @@
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>0</mn>
<mn mathvariant="normal">0</mn>
</mrow>
<mo accent="false">∞</mo>
</munderover>
Expand All @@ -111,7 +111,7 @@
<mo stretchy="true" form="prefix">(</mo>
<msub>
<mi>a</mi>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</msub>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
Expand All @@ -136,7 +136,7 @@
<mo stretchy="true" form="prefix">(</mo>
<msub>
<mi>c</mi>
<mn>1</mn>
<mn mathvariant="normal">1</mn>
</msub>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
Expand Down
2 changes: 1 addition & 1 deletion test/writer/mml/15.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mfrac>
<mi>a</mi>
<mn>2</mn>
<mn mathvariant="normal">2</mn>
</mfrac>
</math>
4 changes: 2 additions & 2 deletions test/writer/mml/16.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<?xml version='1.0' ?>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mn>3</mn>
<mn mathvariant="normal">3</mn>
<mo>×</mo>
<mn>4</mn>
<mn mathvariant="normal">4</mn>
</mrow>
</math>
4 changes: 2 additions & 2 deletions test/writer/mml/17.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<mrow>
<mi>x</mi>
<mo>*</mo>
<mn>4</mn>
<mn mathvariant="normal">4</mn>
<mo>=</mo>
<mn>4</mn>
<mn mathvariant="normal">4</mn>
<mo>*</mo>
<mi>x</mi>
</mrow>
Expand Down
4 changes: 2 additions & 2 deletions test/writer/mml/18.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<?xml version='1.0' ?>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mn>1.3</mn>
<mn mathvariant="normal">1.3</mn>
<mo>×</mo>
<mn>.2</mn>
<mn mathvariant="normal">.2</mn>
</mrow>
</math>
Loading