@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2727
2828Conversion of TeX math to a list of 'Pandoc' inline elements.
2929-}
30−module Text.Pandoc.Readers.TeXMath ( readTeXMath, readTeXMath' ) where
30+module Text.Pandoc.Readers.TeXMath ( texMathToInlines ) where
3131
3232import Text.Pandoc.Definition
3333import Text.TeXMath
@@ -35,22 +35,13 @@ import Text.TeXMath
3535-- | Converts a raw TeX math formula to a list of 'Pandoc' inlines.
3636-- Defaults to raw formula between @$@ or @$$@ characters if entire formula
3737-- can't be converted.
38−readTeXMath' :: MathType
38+texMathToInlines :: MathType
3939 -> String -- ^ String to parse (assumes @'\n'@ line endings)
4040 -> [Inline]
41−readTeXMath' mt inp = case texMathToPandoc dt inp of
41+texMathToInlines mt inp = case texMathToPandoc dt inp of
4242 Left _ -> [Str (delim ++ inp ++ delim)]
4343 Right res -> res
4444 where (dt, delim) = case mt of
4545 DisplayMath -> (DisplayBlock, "$$")
4646 InlineMath -> (DisplayInline, "$")
4747
48−{-# DEPRECATED readTeXMath "Use readTeXMath' from Text.Pandoc.JSON instead" #-}
49−-- | Converts a raw TeX math formula to a list of 'Pandoc' inlines.
50−-- Defaults to raw formula between @$@ characters if entire formula
51−-- can't be converted. (This is provided for backwards compatibility;
52−-- it is better to use @readTeXMath'@, which properly distinguishes
53−-- between display and inline math.)
54−readTeXMath :: String -- ^ String to parse (assumes @'\n'@ line endings)
55− -> [Inline]
56−readTeXMath = readTeXMath' InlineMath