Parse, render and export MiniLaTeX, a subset of LaTeX. This is the package's only module: everything an app needs goes through it.
See this Hackernoon article for an explanation of the theory behind MiniLaTeX.
The DOM id of the paragraph that was clicked, e.g. "p.0.3". Use it to
highlight the paragraph, or to find its source lines through the paragraph's
data-line / data-lines attributes.
Parse and render a MiniLaTeX source string. Each logical paragraph becomes
one element, carrying data-line / data-lines attributes for editor sync.
A parsed MiniLaTeX document. Create it with parse, keep it in your model,
and refresh it with update when the source changes.
Bring Data up to date with new source text. Only the paragraphs that
changed are re-parsed.
Render parsed Data, with the same output as render.
One numbered heading: level is 1 for \section, 2 for \subsection and
3 for \subsubsection; number is its label, e.g. "2.1"; id is the DOM id
of the rendered heading, for links and scrolling.
The numbered headings of the document, in order.
Map MiniLaTeX source to a complete standard LaTeX document, ready for
xelatex: preamble, \begin{document}, body, \end{document}.
Map MiniLaTeX source to standard LaTeX: the document body only.
The images in MiniLaTeX source: each one's url, and the filename the
output of toLaTeX uses for it, as image/<filename>. Download the images
there before compiling.
Convert MiniLaTeX source to Markdown: sections become headings, math stays
as $...$ / $$...$$, and other macros and environments map to their nearest
Markdown equivalents.
Messages emitted by rendered MiniLaTeX: a paragraph was clicked. Read the paragraph's id with
clickedParagraphId.