-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Conversion of LaTeX math formulas to MathML. -- -- The texmathml library provides functions to convert LaTeX math -- formulas to presentation MathML. It supports basic LaTeX and AMS -- extensions, but not macros. @package texmath @version 0.3 -- | Functions for parsing a LaTeX formula to a Haskell representation. module Text.TeXMath.Parser expr :: GenParser Char st Exp formula :: GenParser Char st [Exp] data Exp ENumber :: String -> Exp EGrouped :: [Exp] -> Exp EIdentifier :: String -> Exp EMathOperator :: String -> Exp ESymbol :: TeXSymbolType -> String -> Exp ESpace :: String -> Exp EBinary :: String -> Exp -> Exp -> Exp ESub :: Exp -> Exp -> Exp ESuper :: Exp -> Exp -> Exp ESubsup :: Exp -> Exp -> Exp -> Exp EOver :: Exp -> Exp -> Exp EUnder :: Exp -> Exp -> Exp EUnderover :: Exp -> Exp -> Exp -> Exp EUp :: Exp -> Exp -> Exp EDown :: Exp -> Exp -> Exp EDownup :: Exp -> Exp -> Exp -> Exp EUnary :: String -> Exp -> Exp EScaled :: String -> Exp -> Exp EStretchy :: Exp -> Exp EArray :: [Alignment] -> [ArrayLine] -> Exp EText :: String -> String -> Exp data TeXSymbolType Ord :: TeXSymbolType Op :: TeXSymbolType Bin :: TeXSymbolType Rel :: TeXSymbolType Open :: TeXSymbolType Close :: TeXSymbolType Pun :: TeXSymbolType Accent :: TeXSymbolType type ArrayLine = [[Exp]] data Alignment AlignLeft :: Alignment AlignCenter :: Alignment AlignRight :: Alignment AlignDefault :: Alignment instance Typeable Exp instance Typeable Alignment instance Typeable TeXSymbolType instance Show Exp instance Read Exp instance Eq Exp instance Data Exp instance Show Alignment instance Read Alignment instance Eq Alignment instance Data Alignment instance Show TeXSymbolType instance Read TeXSymbolType instance Eq TeXSymbolType instance Data TeXSymbolType -- | Functions for writing a parsed formula as MathML. module Text.TeXMath.MathMLWriter toMathML :: DisplayType -> [Exp] -> Element data DisplayType DisplayBlock :: DisplayType DisplayInline :: DisplayType showExp :: Exp -> Element instance Show DisplayType -- | Functions for converting LaTeX math formulas to MathML. module Text.TeXMath texMathToMathML :: DisplayType -> String -> Either String Element data DisplayType DisplayBlock :: DisplayType DisplayInline :: DisplayType