jxxcarlson/meenylatex/10.0.2

NOTE: the latest version is 15.2.0

MiniLatex.Edit

Data structures and functions for managing interactive edits. The parse tree, rendered text, and other information needed for this is stored in a value of type

MiniLatex.Edit.Data

That data is initialized using

data =
    init version text

where the version is an integer that distinguishes different edits.

API

type alias Data a =
EditRecord a

Data for differential parsing and rendering

emptyData : Data (Html LaTeXMsg)

Used for initialization.

init : MathJaxRenderOption -> Int -> String -> Data (Html LaTeXMsg)

Create Data from a string of MiniLaTeX text and a version number. The version number should be different for each call of init.

-> Int
-> String
-> Data (Html LaTeXMsg)
-> Data (Html LaTeXMsg)

Update Data with modified text, re-parsing and re-rerendering changed elements.

get : Data (Html LaTeXMsg) -> List (Html LaTeXMsg)

Retrieve Html from a Data object.

parse : String -> ( List String, List (List LatexExpression) )

Parse the given text and return an AST representing it.

= IDClicked String

Use this type so that clicks in the rendered text can be detected