-
Notifications
You must be signed in to change notification settings - Fork 29
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
text/latex
repr
#50
Comments
@zmoon Maybe you could clarify exactly what the suggested change is, and how it affects environments other than Pluto? |
So, in Pluto, the whole In JupyterLab, for example, the math and text are separated before passing the math to MathJax. Presumably, in our example, if |
Maybe Pluto should wrap it in Jupyter also uses MathJax, what does it do for text/latex rendering? |
In Jupyter, the math and normal text of a |
Honestly, Jupyter's handling of |
See the discussion in fonsp/Pluto.jl#488 and JuliaStrings/LaTeXStrings.jl#50 and fonsp/Pluto.jl#1164. IIUC, @stevengj makes the argument that no `MIME"text/latex"` output can be assumed to be a single LaTeX statement, which is reasonable, and the natural consequence of that is that no display environment using `MIME"text/latex"` should assume that the output is a single expression and put `$$ x $$` for you. And if that's the case, it's the job the displayer to output properly formatted TeX with the display environments defined. That is sensible, and we just need to make sure that Symbolics and ModelingToolkit does that everywhere.
Currently, in Pluto, a
LaTeXString
is wrapped with\text{}
before being passed to MathJax. This letsLaTeXString
s with mixed text and math like theL"an equation: $1 + \alpha^2$"
from your readme render properly in Pluto, but causes issues for other packages that use this MIME type targeting MathJax. You can see discussion here: fonsp/Pluto.jl#488.Maybe instead,
Base.show(io::IO, ::MIME"text/latex", s::LaTeXString)
could do this, ensuring thatLaTeXString
s with mixed text and math get rendered properly in Pluto (and others that use MathJax on thetext/latex
MIME type).The text was updated successfully, but these errors were encountered: