packages feed

texmath 0.11.2.3 → 0.11.3

raw patch · 18 files changed

+52/−31 lines, 18 files

Files

README.markdown view
@@ -1,6 +1,9 @@ texmath ======= +[![CI+tests](https://github.com/jgm/texmath/workflows/CI%20tests/badge.svg)](https://github.com/jgm/texmath/actions)+ texmath is a Haskell library for converting between formats used to represent mathematics.  Currently it provides functions to read and write TeX math, presentation MathML, and OMML (Office Math Markup
changelog view
@@ -1,3 +1,17 @@+texmath (0.11.3)++  * Use error instead of fail to allow building with ghc 8.8.+  * Test output: remove superfluous spaces after control sequences,+    superfluous groups, and unicode VARIATION SELECTOR 1.+  * renderTeX: add space between control sequence and any non-ASCII+    character.  There are differences in behavior of isAlphaNum between+    different ghc versions that would affect test output otherwise.+  * charToLaTeXString: Ignore 65024 VARIATION SELECTOR 1 to avoid putting+    it literally in the output ; it is used in mathml output and occurs+    in many of the test cases.+  * Add cabal.project.+  * Use actions rather than travis for CI.+ texmath (0.11.2.3)    * OMML reader: properly distinguish normal text from math (#136).
src/Text/TeXMath/TeX.hs view
@@ -4,7 +4,7 @@                          escapeLaTeX) where import Data.List (isPrefixOf)-import Data.Char (isLetter, isAlphaNum)+import Data.Char (isLetter, isAlphaNum, isAscii)  -- | An intermediate representation of TeX math, to be used in rendering. data TeX = ControlSeq String@@ -24,7 +24,8 @@   | otherwise              = s ++ cs renderTeX (ControlSeq s) cs   | s == "\\ "               = s ++ cs-  | startsWith isAlphaNum cs = s ++ (' ':cs)+  | startsWith (\c -> isAlphaNum c || not (isAscii c)) cs+                             = s ++ (' ':cs)   | otherwise                = s ++ cs renderTeX (Grouped [Grouped xs]) cs  = renderTeX (Grouped xs) cs renderTeX (Grouped xs) cs     =
src/Text/TeXMath/Unicode/ToTeX.hs view
@@ -72,6 +72,9 @@  -- Takes a single character and attempts to convert it to a latex string charToLaTeXString :: Env -> Char -> Maybe [TeX]+-- we ignore 65024 VARIATION SELECTOR 1 to avoid putting it+-- literally in the output ; it is used in mathml output.+charToLaTeXString _ '\65024' = Just [] charToLaTeXString environment c = do   v <- M.lookup c recordsMap   -- Required packages for the command
src/Text/TeXMath/Writers/TeX.hs view
@@ -93,7 +93,7 @@            "\\brack"  -> tellGenFrac "[" "]"            "\\brace"  -> tellGenFrac "\\{" "\\}"            "\\bangle" -> tellGenFrac "\\langle" "\\rangle"-           _          -> fail "writeBinom: unknown cmd"+           _          -> error "writeBinom: unknown cmd"        tellGroup $ writeExp x        tellGroup $ writeExp y      else tellGroup $ do
tests/writers/0FE00_Variation_Selectors.tex view
@@ -1,6 +1,6 @@ \begin{matrix}  & \text{FE0} \\-\text{0} & ︀ \\+\text{0} & \\ \text{1} & ︁ \\ \text{2} & ︂ \\ \text{3} & ︃ \\
tests/writers/c.tex view
@@ -9,7 +9,7 @@ \text{capcup} & ⩇ \\ \text{capdot} & ⩀ \\ \text{CapitalDifferentialD} & \mathbb{D} \\-\text{caps} & \operatorname{\cap ︀} \\+\text{caps} & \operatorname{\cap} \\ \text{caret} & ⁁ \\ \text{caron} & ˇ \\ \text{Cayleys} & \mathfrak{C} \\@@ -109,7 +109,7 @@ \text{cupcup} & ⩊ \\ \text{cupdot} & ⊍ \\ \text{cupor} & ⩅ \\-\text{cups} & \operatorname{\cup ︀} \\+\text{cups} & \operatorname{\cup} \\ \text{curarr} & \curvearrowright \\ \text{curarrm} & ⤼ \\ \text{curlyeqprec} & \curlyeqprec \\
tests/writers/complex3.tex view
@@ -516,7 +516,7 @@ \left. ⎱\frac{\frac{1}{2}}{\frac{1}{2}} \right.⎰ & \\ \left. \backslash lgroup\frac{\frac{1}{2}}{\frac{1}{2}} \right.\backslash rgroup & \\ \left. ⌞\frac{\frac{1}{2}}{\frac{1}{2}} \right.⌟ & \\-\left⌜ \frac{\frac{1}{2}}{\frac{1}{2}} \right⌝ & \\+\left ⌜ \frac{\frac{1}{2}}{\frac{1}{2}} \right ⌝ & \\ {A\underset{\mspace{1mu}}{\overset{n + \mu - 1}{\leftarrow}}B\underset{T}{\overset{n \pm i - 1}{\rightarrow}}C} & \\ \frac{1}{\sqrt{2} + \frac{1}{\sqrt{3} + \frac{1}{\sqrt{4} + \frac{1}{\sqrt{5} + \frac{1}{\sqrt{6} + \ldots}}}}} & \\ \frac{1}{\sqrt{2} + \frac{1}{\sqrt{3} + \frac{1}{\sqrt{4} + \frac{1}{\sqrt{5} + \frac{1}{\sqrt{6} + \ldots}}}}} & \\
tests/writers/g.tex view
@@ -26,7 +26,7 @@ \text{gesdot} & ⪀ \\ \text{gesdoto} & ⪂ \\ \text{gesdotol} & ⪄ \\-\text{gesl} & \operatorname{\gtreqless ︀} \\+\text{gesl} & \operatorname{\gtreqless} \\ \text{gesles} & ⪔ \\ \text{gfr} & \mathfrak{g} \\ \text{Gfr} & \mathfrak{G} \\@@ -76,6 +76,6 @@ \text{gtreqqless} & \gtreqqless \\ \text{gtrless} & \gtrless \\ \text{gtrsim} & \gtrsim \\-\text{gvertneqq} & \operatorname{\gneqq ︀} \\-\text{gvnE} & \operatorname{\gneqq ︀} \\+\text{gvertneqq} & \operatorname{\gneqq} \\+\text{gvnE} & \operatorname{\gneqq} \\ \end{matrix}
tests/writers/l.tex view
@@ -28,7 +28,7 @@ \text{latail} & ⤙ \\ \text{lAtail} & ⤛ \\ \text{late} & ⪭ \\-\text{lates} & \operatorname{⪭︀} \\+\text{lates} & \operatorname{⪭} \\ \text{lbarr} & ⤌ \\ \text{lBarr} & ⤎ \\ \text{lbbrk} & ❲ \\@@ -99,7 +99,7 @@ \text{lesdot} & ⩿ \\ \text{lesdoto} & ⪁ \\ \text{lesdotor} & ⪃ \\-\text{lesg} & \operatorname{\lesseqgtr ︀} \\+\text{lesg} & \operatorname{\lesseqgtr} \\ \text{lesges} & ⪓ \\ \text{lessapprox} & \lessapprox \\ \text{lessdot} & \lessdot \\@@ -205,6 +205,6 @@ \text{ltrPar} & ⦖ \\ \text{lurdshar} & ⥊ \\ \text{luruhar} & ⥦ \\-\text{lvertneqq} & \operatorname{\lneqq ︀} \\-\text{lvnE} & \operatorname{\lneqq ︀} \\+\text{lvertneqq} & \operatorname{\lneqq} \\+\text{lvnE} & \operatorname{\lneqq} \\ \end{matrix}
tests/writers/s.tex view
@@ -71,7 +71,7 @@ \text{smile} & \smile \\ \text{smt} & ⪪ \\ \text{smte} & ⪬ \\-\text{smtes} & \operatorname{⪬︀} \\+\text{smtes} & \operatorname{⪬} \\ \text{softcy} & ь \\ \text{SOFTcy} & Ь \\ \text{sol} & / \\@@ -83,9 +83,9 @@ \text{spadesuit} & \spadesuit \\ \text{spar} & \parallel \\ \text{sqcap} & \sqcap \\-\text{sqcaps} & \operatorname{\sqcap ︀} \\+\text{sqcaps} & \operatorname{\sqcap} \\ \text{sqcup} & \sqcup \\-\text{sqcups} & \operatorname{\sqcup ︀} \\+\text{sqcups} & \operatorname{\sqcup} \\ \text{Sqrt} & \sqrt{} \\ \text{sqsub} & ⊏ \\ \text{sqsube} & \sqsubseteq \\
tests/writers/v.tex view
@@ -10,10 +10,10 @@ \text{vArr} & \Updownarrow \\ \text{varrho} & \varrho \\ \text{varsigma} & \varsigma \\-\text{varsubsetneq} & \operatorname{\subsetneq ︀} \\-\text{varsubsetneqq} & \operatorname{\subsetneqq ︀} \\-\text{varsupsetneq} & \operatorname{\supsetneq ︀} \\-\text{varsupsetneqq} & \operatorname{\supsetneqq ︀} \\+\text{varsubsetneq} & \operatorname{\subsetneq} \\+\text{varsubsetneqq} & \operatorname{\subsetneqq} \\+\text{varsupsetneq} & \operatorname{\supsetneq} \\+\text{varsupsetneqq} & \operatorname{\supsetneqq} \\ \text{vartheta} & \vartheta \\ \text{vartriangleleft} & \vartriangleleft \\ \text{vartriangleright} & \vartriangleright \\@@ -52,10 +52,10 @@ \text{vrtri} & \vartriangleright \\ \text{vscr} & \mathcal{v} \\ \text{Vscr} & \mathcal{V} \\-\text{vsubne} & \operatorname{\subsetneq ︀} \\-\text{vsubnE} & \operatorname{\subsetneqq ︀} \\-\text{vsupne} & \operatorname{\supsetneq ︀} \\-\text{vsupnE} & \operatorname{\supsetneqq ︀} \\+\text{vsubne} & \operatorname{\subsetneq} \\+\text{vsubnE} & \operatorname{\subsetneqq} \\+\text{vsupne} & \operatorname{\supsetneq} \\+\text{vsupnE} & \operatorname{\supsetneqq} \\ \text{Vvdash} & \Vvdash \\ \text{vzigzag} & ⦚ \\ \end{matrix}
tests/writers/white10.tex view
@@ -1,1 +1,1 @@-H\,H\, H\: H\:H\operatorname{\,︀}H\operatorname{\, ︀}H\operatorname{\: ︀}H\operatorname{\:︀}H\operatorname{}H+H\,H\, H\: H\:H\operatorname{\,}H\operatorname{\,}H\operatorname{\:}H\operatorname{\:}H\operatorname{}H
tests/writers/white5.tex view
@@ -1,1 +1,1 @@-\alpha{\, ︀}\alpha+\alpha\,\alpha
tests/writers/white6.tex view
@@ -1,1 +1,1 @@-\alpha{\: ︀}\alpha+\alpha\:\alpha
tests/writers/white7.tex view
@@ -1,1 +1,1 @@-\alpha{\,︀}\alpha+\alpha\,\alpha
tests/writers/white8.tex view
@@ -1,1 +1,1 @@-\alpha{\:︀}\alpha+\alpha\:\alpha
texmath.cabal view
@@ -1,5 +1,5 @@ Name:                texmath-Version:             0.11.2.3+Version:             0.11.3 Cabal-Version:       >= 1.10 Build-type:          Simple Synopsis:            Conversion between formats used to represent mathematics.