Portal viewer for rendering strings (and any expression that that responds to [[emmy.expression.render/->TeX]]) as LaTeX via KaTeX.
To use this viewer, first install the katex
npm package:
npm install katex@0.16.7
Then install the viewer:
(emmy.portal/install! "emmy/portal/tex.cljs")
The viewer is automatically installed by the functions in emmy.portal
.
Portal viewer for rendering strings (and any expression that that responds to [[emmy.expression.render/->TeX]]) as LaTeX via [KaTeX](https://katex.org/). To use this viewer, first install the `katex` npm package: ```bash npm install katex@0.16.7 ``` Then install the viewer: ```clojure (emmy.portal/install! "emmy/portal/tex.cljs") ``` The viewer is automatically installed by the functions in [[emmy.portal]].
(expand v)
This component is used for any non-string value, and attempts to convert the value into a string calling [[emmy.expression.render/->TeX]].
There are currently no guards in place, so if you attempt to render something that isn't supported by Emmy you'll see an error.
This component is used for any non-string value, and attempts to convert the value into a string calling [[emmy.expression.render/->TeX]]. There are currently no guards in place, so if you attempt to render something that isn't supported by Emmy you'll see an error.
(get-opts)
Returns a map of KaTeX options generated
by merging default-options
with user-supplied options.
To configure this viewer, supply a map of options to [[portal.api/open]] via
the :emmy.portal/tex
key. See the KaTeX options
documentation for details on what's
allowed.
For example:
(def portal
(portal.api/open
{:emmy.portal/tex
{:macros {"\f" "#1f(#2)"}}}))
Returns a map of [KaTeX options](https://katex.org/docs/options.html) generated by merging [[default-options]] with user-supplied options. To configure this viewer, supply a map of options to [[portal.api/open]] via the `:emmy.portal/tex` key. See the [KaTeX options documentation](https://katex.org/docs/options.html) for details on what's allowed. For example: ```clojure (def portal (portal.api/open {:emmy.portal/tex {:macros {"\f" "#1f(#2)"}}})) ```
(show-expr x)
Render x
directly with katex or via ->TeX
and then via katex.
Render `x` directly with katex or via `->TeX` and then via katex.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close