Month: February 2018

MiniLatex Demo App In this article we discuss the overall design of the MiniLatex parser. Its function is to translate source text into an abstract syntax tree (AST). This is a recursive, tree-like structure that "understands" the grammar of LaTeX. Recursiveness is what makes it possible to have environments nested with environments which may themselves have … Continue reading Building the MiniLatex the Parser→

User defined macros in math mode are totally legit in MiniLatex. One way to insert them is like this: $$ \newcommand{\bra}{\lbracket} \newcommand{\ket|{\rbracket} $$ That is, enclose the definitions in double dollar signs. Do this in the body of the text. You can now use these macros in the usual way, e.g. $\bra a | b … Continue reading Using Macros in MiniLatex→

One of the many things that I admire about Elm as a programming language is the quality of the compiler's error messages. The "hooks" for providing good error messages are provided by the Error data structure in the elm-tools/parser package. The goal, then, is to make MiniLatex producs as informative and helpful as does Elm. This work … Continue reading Handling Latex Errors: Emulating Elm→

Today I posted changes to MiniLatex that allow users to create bibliographies in the customary way using \cite in the body of the document and \bibitem for entries in the bibliography. Whenever the user presses the full-render button, the citations are resolved in the text as live links in the HTML rendered on-screen. Since the syntax used … Continue reading Bibliographies→

The goal of the MiniLatex project is to put a defined subset of LaTeX in the browser. This means being able to "live edit" LaTeX in a web app and to immediately see the result rendered as web page -- well, if not immediately, at least very, very quickly! Another goal is to never, ever … Continue reading Building MiniLatex→