Liking cljdoc? Tell your friends :D

mathlive.core

Reagent component wrapping the math-field web component from the Mathlive project, along with associated utilities.

Reagent component wrapping the `math-field` web component from
the [Mathlive](https://cortexjs.io/docs/mathlive) project, along with
associated utilities.
raw docstring

->math-jsoncljs

(->math-json mf)

Given a MathfieldElement mf, returns a MathJSON representation (parsed into Clojure) of the currently displayed expression.

NOTE that for this or anything MathJSON related to work you'll need to (require '[@cortex-js/compute-engine]). If this package isn't loaded, returns nil.

Given
a [`MathfieldElement`](https://cortexjs.io/docs/mathlive/#(MathfieldElement%3Aclass))
`mf`, returns a [MathJSON](https://cortexjs.io/math-json/)
representation (parsed into Clojure) of the currently displayed expression.

NOTE that for this or anything MathJSON related to work you'll need
to `(require '[@cortex-js/compute-engine])`. If this package isn't loaded,
returns `nil`.
sourceraw docstring

->placeholderscljs

(->placeholders mf)
(->placeholders mf {:keys [type] :or {type "latex"}})

Given a MathfieldElement mf, returns a map of (string) placeholder name => current value of the placeholder.

NOTE that for {:type "math-json"} to work you'll need to (require '[@cortex-js/compute-engine]). If this option is specified and the package isn't loaded, returns nil for each placeholder value.

Given
a [`MathfieldElement`](https://cortexjs.io/docs/mathlive/#(MathfieldElement%3Aclass))
`mf`, returns a map of (string) placeholder name => current value of the
placeholder.

NOTE that for `{:type "math-json"}` to work you'll need to `(require
'[@cortex-js/compute-engine])`. If this option is specified and the package
isn't loaded, returns `nil` for each placeholder value.
sourceraw docstring

cdn-fontscljs

Location of the fonts directory in the CDN-served package of mathlive.

Location of the `fonts` directory in the CDN-served package
of [mathlive](https://www.npmjs.com/package/mathlive).
sourceraw docstring

cdn-soundscljs

Location of the sounds directory in the CDN-served package of mathlive.

Location of the `sounds` directory in the CDN-served package
of [mathlive](https://www.npmjs.com/package/mathlive).
sourceraw docstring

math-json->texcljs

(math-json->tex expr)

Given a Clojure data structure expr representing a MathJSON expression, returns a string of LaTeX representing expr.

NOTE that for this or anything MathJSON related to work you'll need to (require '[@cortex-js/compute-engine]). If this package isn't loaded, returns nil.

Given a Clojure data structure `expr` representing
a [MathJSON](https://cortexjs.io/math-json/) expression, returns a string of
LaTeX representing `expr`.

NOTE that for this or anything MathJSON related to work you'll need
to `(require '[@cortex-js/compute-engine])`. If this package isn't loaded,
returns `nil`.
sourceraw docstring

Mathfieldcljs

Reagent component around the MathLive equation editor.

NOTE: Following React's convention, :on-change binds a listener to to the input event. See https://reactjs.org/docs/dom-elements.html#onchange

Reagent component around the [MathLive](https://github.com/arnog/mathlive)
equation editor.

NOTE: Following React's convention, `:on-change` binds a listener to to the
`input` event. See https://reactjs.org/docs/dom-elements.html#onchange
sourceraw docstring

mathlive-versioncljs

Currently loaded version of the mathlive npm package.

Currently loaded version of
the [mathlive](https://www.npmjs.com/package/mathlive) npm package.
sourceraw docstring

set-math-json!cljs

(set-math-json! mf expr)

Given

sets the value of mf to the TeX version of expr.

Equivalent to (.setValue mf (math-json->tex expr)).

NOTE that for this or anything MathJSON related to work you'll need to (require '[@cortex-js/compute-engine]). If this package isn't loaded, this command has no effect.

Given

- a [`MathfieldElement`](https://cortexjs.io/docs/mathlive/#(MathfieldElement%3Aclass)) `mf` and
- a Clojure data structure `expr` representing a [MathJSON](https://cortexjs.io/math-json/) expression,

sets the value of `mf` to the TeX version of `expr`.

Equivalent to `(.setValue mf (math-json->tex expr))`.

NOTE that for this or anything MathJSON related to work you'll need
to `(require '[@cortex-js/compute-engine])`. If this package isn't loaded,
this command has no effect.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close