jxxcarlson/meenylatex/9.0.0

NOTE: the latest version is 15.2.0

MiniLatex

This library exposes functions for rendering MiniLaTeX text into HTML. Most users will need only (1) the functions exposed in the MiniLatex module and (2) EditRecord, which is exposed in the Differ module.

See MiniLatex Live for a no-login demo of the MiniLatex technology. Source code

See this Hackernoon article for an explanation of the theory behind the MiniLatex package.

API

render : MathJaxRenderOption -> String -> String -> Html msg

The function call

render NoDelay macros sourceTest

produces an HTML value corresponding to the given MiniLaTeX source text. The macro definitions in macros are prepended to this string and are used by MathJax to render purely mathematical text. The macros string may be empty. In this example, the first parameter is noDelay, meaning that MathJax will set about typesetting the content passed to it immediately. Use NoDelay for documents with not too many math elements and for editing all documents, since only changed text is re-rendered. Use Delay for loading document containing many math elements.

renderWithSeed : MathJaxRenderOption -> Int -> String -> String -> Html msg

Like render, but used the seed to define the ids for each paragraph:

render NoDelay seed macros sourceTest
type alias LatexState =
LatexState

Auxiliary data compiled during parsing

type alias TocEntry =
TocEntry

Describes an entry in the table of contents

type alias TableOfContents =
TableOfContents

The table of contents

emptyLatexState : LatexState

Used for initialization