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

Issue rendering chemical reaction system in VSCode #237

Open
gaurav-arya opened this issue Nov 8, 2022 · 2 comments
Open

Issue rendering chemical reaction system in VSCode #237

gaurav-arya opened this issue Nov 8, 2022 · 2 comments

Comments

@gaurav-arya
Copy link

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 SciML/Catalyst.jl#566 for further discussion. The PNG output renderes correctly, but the juliavscode/html option (which is the default in VSCode) displays an error:
image
which seems to be due to the ${\lambda}1$ (which is valid LaTeX and accepted by the other mimes).

@gustaphe
Copy link
Collaborator

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.

@gaurav-arya
Copy link
Author

gaurav-arya commented Nov 25, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants