yotamDvir / elm-katex / Katex.Configs.Math

You should use this module only if you need math configurations.

Understand Katex before reading on.

Why is this module necessary?

For example, let's say you are not sure which of \phi and \varphi you prefer. In this case, you can write code with \phi which may be replaced depending on your configuration. See §Katex.Configs.Math in the README for this example in action.

Types


type alias Latex m =
Katex.Configs.Latex m String

A LaTeX instance.

Create LaTeX instance

human : String -> Latex m

Like Katex.human.

inline : (m -> String) -> Latex m

Like Katex.inline, but instead of feeding it a string, you feed it a math-dependent string.

display : (m -> String) -> Latex m

Like Katex.display, but instead of feeding it a string, you feed it a math-dependent string.

Process LaTeX instances

print : m -> Latex m -> String

Like Katex.print, but depends on the math configurations.

generate : (m -> Maybe Basics.Bool -> String -> a) -> m -> Latex m -> a

Like Katex.generate, but depends on the math configurations. The generating function has access to the math configurations, but this is usually unnecessary, in which case simply use a generating function which ignores its first argument.