texmath 0.6.0.4 → 0.6.0.5
raw patch · 5 files changed
+83/−6 lines, 5 files
Files
- Text/TeXMath/Parser.hs +4/−4
- tests/subsup.omml +52/−0
- tests/subsup.tex +1/−0
- tests/subsup.xhtml +23/−0
- texmath.cabal +3/−2
Text/TeXMath/Parser.hs view
@@ -260,10 +260,10 @@ subSup :: Maybe Bool -> Exp -> TP Exp subSup limits a = try $ do- symbol "_"- b <- expr1- symbol "^"- c <- expr+ let sub1 = symbol "_" >> expr1+ let sup1 = symbol "^" >> expr1+ (b,c) <- try (do {m <- sub1; n <- sup1; return (m,n)})+ <|> (do {n <- sup1; m <- sub1; return (m,n)}) return $ case limits of Just True -> EUnderover a b c Nothing | isConvertible a -> EDownup a b c
+ tests/subsup.omml view
@@ -0,0 +1,52 @@+<?xml version='1.0' ?>+<m:oMathPara>+ <m:oMathParaPr>+ <m:jc m:val="center" />+ </m:oMathParaPr>+ <m:oMath>+ <m:sSubSup>+ <m:e>+ <m:r>+ <m:rPr />+ <m:t>x</m:t>+ </m:r>+ </m:e>+ <m:sub>+ <m:r>+ <m:rPr />+ <m:t>a</m:t>+ </m:r>+ </m:sub>+ <m:sup>+ <m:r>+ <m:rPr />+ <m:t>b</m:t>+ </m:r>+ </m:sup>+ </m:sSubSup>+ <m:r>+ <m:rPr />+ <m:t>=</m:t>+ </m:r>+ <m:sSubSup>+ <m:e>+ <m:r>+ <m:rPr />+ <m:t>x</m:t>+ </m:r>+ </m:e>+ <m:sub>+ <m:r>+ <m:rPr />+ <m:t>b</m:t>+ </m:r>+ </m:sub>+ <m:sup>+ <m:r>+ <m:rPr />+ <m:t>a</m:t>+ </m:r>+ </m:sup>+ </m:sSubSup>+ </m:oMath>+</m:oMathPara>
+ tests/subsup.tex view
@@ -0,0 +1,1 @@+x_a^b = x^a_b
+ tests/subsup.xhtml view
@@ -0,0 +1,23 @@+<?xml version='1.0' ?>+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <meta content="application/xhtml+xml; charset=UTF-8" http-equiv="Content-Type" />+ </head>+ <body>+ <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">+ <mrow>+ <msubsup>+ <mi>x</mi>+ <mi>a</mi>+ <mi>b</mi>+ </msubsup>+ <mo>=</mo>+ <msubsup>+ <mi>x</mi>+ <mi>b</mi>+ <mi>a</mi>+ </msubsup>+ </mrow>+ </math>+ </body>+</html>
texmath.cabal view
@@ -1,5 +1,5 @@ Name: texmath-Version: 0.6.0.4+Version: 0.6.0.5 Cabal-Version: >= 1.6 Build-type: Custom Synopsis: Conversion of LaTeX math formulas to MathML or OMML.@@ -59,7 +59,8 @@ tests/sphere_volume.tex, tests/sphere_volume.xhtml, tests/sphere_volume.omml, tests/unicode.tex, tests/unicode.xhtml, tests/unicode.omml, tests/ensuremath.tex, tests/ensuremath.xhtml, tests/ensuremath.omml,- tests/macros.tex, tests/macros.xhtml, tests/macros.omml+ tests/macros.tex, tests/macros.xhtml, tests/macros.omml,+ tests/subsup.tex, tests/subsup.xhtml, tests/subsup.omml Source-repository head type: git