diff --git a/README.md b/README.md index bee7de2..1ca5252 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file diff --git a/src/PlotlyKaleido.jl b/src/PlotlyKaleido.jl index 6ac65f7..df603de 100644 --- a/src/PlotlyKaleido.jl +++ b/src/PlotlyKaleido.jl @@ -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")