Latexify.jl
Latexify.jl copied to clipboard
Issue rendering chemical reaction system in VSCode
MWE (to be run in VSCode):
using Latexify, LaTeXStrings
latex_string = L"\begin{align*}
\require{mhchem}
\ce{ A &->[${\lambda}1$] B}
\end{align*}"
latexify(rn) |> s -> render(s, MIME("juliavscode/html"))
latexify(rn) |> s -> render(s, MIME("image/png"))
Here, latex_string
is the LaTeX output of a Catalyst
chemical reaction: see https://github.com/SciML/Catalyst.jl/issues/566 for further discussion. The PNG output renderes correctly, but the juliavscode/html
option (which is the default in VSCode
) displays an error:
which seems to be due to the
${\lambda}1$
(which is valid LaTeX and accepted by the other mimes).
I don't use VSCode, so I would need more specific instructions for how to test this out.
This is probably an error on MathJax's part.
One needs to open up VSCode, create a file with content equal to that MWE, and run that file by pressing the triangle in the top right.
I agree it's probably a MathJax error. I posted it here because the juliavscode/html
handling logic is in the source code of this repository -- do all the other MIME types not use MathJax? If so, then I guess it's just a bug with MathJax itself.