plotly / Dash.jl

Dash for Julia - A Julia interface to the Dash ecosystem for creating analytic web applications in Julia. No JavaScript required.
MIT License
489 stars 40 forks source link

markdown with latex support #202

Closed baxmittens closed 1 year ago

baxmittens commented 1 year ago

Is it possible to use markdown with latex support? in the javascript version, there is a flag for that. but it seems not to be implemented in the julia version.

Many thanks. Greetz max

etpinard commented 1 year ago

This will be supported in the upcoming Dash.jl v1.3.0 release.

Example:

using Dash

app = dash()

app.layout = html_div() do
    dcc_markdown("\$E=mc^2\$"; mathjax=true),
    dcc_markdown("# An h1 tag with MathJax: \$x=\\int_0^a a^2+1\$", mathjax=true),
    dcc_graph(mathjax=true,
              figure=(data=[(y=[1, 4, 9, 16],)],
                      layout=(xaxis=(title=r"$\sqrt{(n^2(t|T_))}$",),)))
end

run_server(app)

gives

image

Updating the resources in https://github.com/plotly/Dash.jl/pull/212 essentially resolved this issue. Closing