Functions for parsing LaTeX macro definitions and applying macros to LateX expressions.
- newtype Macro = Macro {}
- pMacroDefinition :: Parser Macro
- pSkipSpaceComments :: Parser ()
- applyMacros :: [Macro] -> String -> String
Documentation
pMacroDefinition :: Parser MacroSource
Parses a \newcommand
or \renewcommand
macro definition and
returns a Macro
.
pSkipSpaceComments :: Parser ()Source
Skip whitespace and comments.
applyMacros :: [Macro] -> String -> StringSource
Applies a list of macros to a string recursively until a fixed point is reached. If there are several macros in the list with the same name, later ones will shadow earlier ones.