jxxcarlson/meenylatex/7.0.3

NOTE: the latest version is 15.2.0

MiniLatex.Parser

This module is for quickly preparing latex for export.

API

= LXString String
| Comment String
| Item Int LatexExpression
| InlineMath String
| DisplayMath String
| SMacro
String
| Macro String (List LatexExpression) (List LatexExpression)
| Environment String (List LatexExpression) LatexExpression
| LatexList (List LatexExpression)
| NewCommand String Int LatexExpression
| LXError (List DeadEnd)

The type for the Abstract syntax tree

macro : Parser () -> Parser LatexExpression

Parse the macro keyword followed by zero or more optional follwed by zero or more more eventual nominnees.

parse : String -> List LatexExpression

Transform a string into a list of LatexExpressions

A default value of type LatexExpression

Production: $ LatexList &\Rightarrow LatexExpression^+ $

endWord : Parser String

Use to parse begin ... end blocks

envName : Parser String

Capture the name of the environment in a \begin{ENV} ... \end{ENV} pair

word : (Char -> Bool) -> Parser String

Use inWord to parse a word.

Production: $ LatexExpression &\Rightarrow Words\ |\ Comment\ |\ IMath\ |\ DMath\ |\ Macro\ |\ Env $