| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.TeXMath.Shared
Synopsis
- getMMLType :: TextType -> Text
- getTextType :: Text -> TextType
- getLaTeXTextCommand :: Env -> TextType -> Text
- getScalerCommand :: Rational -> Maybe Text
- getScalerValue :: Text -> Maybe Rational
- scalers :: [(Text, Rational)]
- getSpaceWidth :: Char -> Maybe Rational
- getSpaceChars :: Rational -> Text
- getDiacriticalCommand :: Position -> Text -> Maybe Text
- diacriticals :: [(Text, Text)]
- getOperator :: Exp -> Maybe TeX
- readLength :: Text -> Maybe Rational
- fixTree :: Exp -> Exp
- everywhereExp :: (Exp -> Exp) -> Exp -> Exp
- everywhereExpList :: ([Exp] -> [Exp]) -> [Exp] -> [Exp]
- mapExpChildren :: (Exp -> Exp) -> ([Exp] -> [Exp]) -> Exp -> Exp
- isEmpty :: Exp -> Bool
- empty :: Exp
- handleDownup :: DisplayType -> Exp -> Exp
- isUppercaseGreek :: Text -> Bool
- toPrimes :: Exp -> Maybe Text
- isRLSequence :: [Alignment] -> Bool
Documentation
getMMLType :: TextType -> Text Source #
Maps TextType to the corresponding MathML mathvariant
getTextType :: Text -> TextType Source #
Maps MathML mathvariant to the corresponing TextType
getLaTeXTextCommand :: Env -> TextType -> Text Source #
Maps TextType to corresponding LaTeX command
getScalerCommand :: Rational -> Maybe Text Source #
Maps a LaTeX scaling command to the percentage scaling
getScalerValue :: Text -> Maybe Rational Source #
Gets percentage scaling from LaTeX scaling command
getSpaceWidth :: Char -> Maybe Rational Source #
Returns the space width for a unicode space character, or Nothing.
getSpaceChars :: Rational -> Text Source #
Returns the sequence of unicode space characters closest to the specified width.
getDiacriticalCommand :: Position -> Text -> Maybe Text Source #
Given a diacritical mark, returns the corresponding LaTeX command
diacriticals :: [(Text, Text)] Source #
Mapping between unicode combining character and LaTeX accent command
getOperator :: Exp -> Maybe TeX Source #
readLength :: Text -> Maybe Rational Source #
Attempts to convert a string into
fixTree :: Exp -> Exp Source #
Walks over a tree of expressions, removing empty expressions, and fixing delimited expressions with no delimiters and unnecessarily grouped expressions.
everywhereExp :: (Exp -> Exp) -> Exp -> Exp Source #
Apply a transformation to every subexpression, bottom up
(equivalent to SYB's everywhere (mkT f), but faster, since it
involves no run-time type checks).
everywhereExpList :: ([Exp] -> [Exp]) -> [Exp] -> [Exp] Source #
Apply a transformation to every expression list in an expression
list, bottom up. Like SYB's everywhere (mkT f), this applies the
function to every tail of every list (right to left), since each
tail is itself a [Exp] node; a rewrite can thus consume
already-rewritten material to its right.
mapExpChildren :: (Exp -> Exp) -> ([Exp] -> [Exp]) -> Exp -> Exp Source #
Apply goE to each immediate subexpression of a node and goL
to each immediate subexpression list. A building block for
expression traversals.
handleDownup :: DisplayType -> Exp -> Exp Source #
isUppercaseGreek :: Text -> Bool Source #
isRLSequence :: [Alignment] -> Bool Source #