Htmlfromtexbooks.ParserSourceMain module for parsing string to an AST representing LaTeX Books
type cmd = | NullCommandA nullcommand is nothing
*)| AtomCmd of string * string listAn atomic command just have a name and eventual parameters like \newline
*)| SimpleCmd of string * string list * stringA command with extactly one argument e.g. \chaptername
| MultipleCmd of string * string list * string listA command with multiple arguments e.g. \fracx
Commande type : an internal used in the first phase of the parsing
type structure = | Nul| Line of stringA line of just plain text like "It's the Enterprise!"
*)| Cmd of cmdA command of our internal type used in the parsing
*)| AtomicCmd of string * string listThe final type to represent an atomic command like \newline
*)| OneArgCmd of string * string list * structure listStructure version of SimpleCdm
*)| MultipleArgCmd of string * string list * structure list listStructure version of MultipleCmd
*)| Env of string * structure listAn environment like document,center,equation...
*)| Math of stringA re-latexified math literal to be sent to an online image processing
*)| Subsubsection of string * structure listRepresent the LaTeX subsubsection, a subsubsection have a name and a list of structure children
*)| Subsection of string * structure listSee above
*)| Section of string * structure listSee above
*)| Chapter of string * structure listSee above
*)Structure used to represent in an AST-ish (just one node with a list of structure children) LaTeX
Parses an accolade for the first time (command reading)
Parses arguments of a function colorlinks,12pt to a list of string "colorlinks","12pt"
Parses a command recursively, called when a \ is detected in the parsing of a string
Appends a line to a list if the line is not empty
Parses recursively a string into a list of structure, transforms commands to their final type
Take the list of structure and gives the preamble (everything before the start of the document) and the document itself
Recursively generates the environments (begin...end) statements
Reads the preamble for type,title,author and eventual glossary input