Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX enable usage #12

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ or simply kill it:
```julia
PlotlyKaleido.kill_kaleido()
```

To enable LaTeX (using MathJax v2) in plots, use the keyword argument `mathjax`:
```julia
PlotlyKaleido.start(mathjax=true) # start Kaleido server with MathJax enabled
```
4 changes: 2 additions & 2 deletions src/PlotlyKaleido.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function start(;plotly_version = missing,
)
end
if !(mathjax === missing)
if mathjax_version > v"2.7.9"
error("The given mathjax version $(mathjax_version) is greater than the last supported version of $(_mathjax_last_version).")
if mathjax_version > _mathjax_last_version
error("The given mathjax version ($(mathjax_version)) is greater than the last supported version ($(_mathjax_last_version)) of Kaleido.")
end
if mathjax isa Bool && mathjax
push!(chromium_flags, "--mathjax=$(_mathjax_url_path)/$(mathjax_version)/MathJax.js")
Expand Down