-
Notifications
You must be signed in to change notification settings - Fork 64
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
Better fallback when richest_mime is LaTeX #247
Comments
I don't think that trying to parse out the |
I think we shouldn't try to mess around with LaTeX printing... However I think we should allow using LaTeX-able objects inside a wrapper in CSSUtil (it already has a |
Ah I see you used |
Maybe WebIO (or a low dependency package like KaTeX which I had created just to have a centralized way to load KaTeX javascript from a local file) could overload a |
Could you just add your fix to KaTeX.jl? It seems like something that's specific enough that it doesn't really belong in WebIO itself. Also, you wouldn't need to parse out the |
There are two intertwined issues:
I can open a PR in InteractBase to try this stuff out so we can discuss there (it also looks like I need some help as I'm getting a bit stuck on importing assets). PR opened: JuliaGizmos/InteractBase.jl#132 |
Sure. Maybe a separate |
I'd also like to do #254 (remove |
FWIW, Juno handles this by only allowing LaTeX in Markdown, which makes everything pretty easy because Julia's MD parser already does the right conversions. I feel like this could be a sane policy for WebIO as well. |
Sounds like a good plan. Could you spell it out in more detail? Meaning, what would be an easy way to get the "inner part" of LaTeX equations with no delimiters and information whether it is "display mode" or "inline mode" from the markdown? |
IIRC I basically re-wrote Base's md-to-plaintext (or something) renderer to ouput |
there's already code that can do this. It works too :) https://github.com/JuliaGizmos/CSSUtil.jl/blob/master/src/markdown.jl |
What's the status of this? |
Now there is a package KaTeX.jl which implements a |
Currently, when the richest mime is
MIME"text/latex"()
, the fallback rendering doesn't work very well, e.g.In the specific case of SymPy, one should rather do:
I wonder what should be our policy, whether we should encourage package authors to implement this in their packages or if somehow we should figure out a good fallback when
richest_mime
is LaTeX and implement it here. In particular things are somewhat tricky as different packages use different delimiters, for example LaTeXStrings uses dollars whereas SymPy uses\begin{equation*}
.Ref: JuliaGizmos/Interact.jl#275
The text was updated successfully, but these errors were encountered: