MiniLaTeX Demo App

36 views
Skip to first unread message

James Carlson

unread,
Nov 20, 2017, 12:45:43 AM11/20/17
to MathJax Users
Here is a


that you can use to see how MiniLaTeX works.  Many thanks to the
MathJax team for getting me over some rough spots.

MiniLaTeX is a subset of LaTeX that can be rendered in the browser
or in the usual way with tools like pdflatex.  

The MiniLaTeX processor renders MiniLaTeX source text into HTML;
then hands the HTML to MathJax to render mathematical text 
of the form $ ... $ and $$ ... $$.

There are several parts to the MiniLaTeX processor -- a parser, a renderer,
a differ, and an accumulator.  See Towards LaTeX in the Browser for some
technical details on this setup.  The parser, which is written in Elm, is the
key element.  Just over 300 lines long, it is built on the notion of a LaTeX expression

type LatexExpression
    = LXString String
    | Comment String
    | Item Int LatexExpression
    | InlineMath String
    | DisplayMath String
    | Macro String (List LatexExpression)
    | Environment String LatexExpression
    | LatexList (List LatexExpression)



The MiniLaTeX Demo App is suited for small experiments.  For writing documents, 
one can use www.knode.io

MiniLaTeX is still under development -- I would very much appreciate any feedback so
as to get it in good shape for a 1.0 release.  That said, it is in good enough shape to handle


Message has been deleted
Message has been deleted

James Carlson

unread,
Feb 8, 2018, 10:54:32 AM2/8/18
to MathJax Users


 
Am working on better error handling as indicated in the figure.  Added a new type, `LXError String String` to the parser for this.

James Carlson

unread,
Feb 10, 2018, 9:29:09 PM2/10/18
to MathJax Users


On Monday, November 20, 2017 at 12:45:43 AM UTC-5, James Carlson wrote:
Reply all
Reply to author
Forward
0 new messages