-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
LaTeX integration #60
Comments
53516aa got this working in Electron. I just realized that it has been working in the notebook all along, with one caveat: it doesn't work in Chrome. For some reason Chrome complains with the following in the console: As I'm not a web-tech guru, I don't really know how to get around this. Otherwise I think we are very close to closing this one |
@DrDrij might be willing to help you on this one. |
cc @DrDrij any idea how to overcome this "can't load a font" issue? |
Sure thing. Are you running this locally or is there a URL I can load for context? |
@spencerlyon2 Sorry for my slow response. I have been away. |
@mmcky no problem -- I hope you've been able to do something fun. tempnb would be great, how can we do it? Do you need anything from me? |
I can confirm that latex still does not work in IJulia on chrome (I tried on Edge but there the plot does not render at all) and works in electron. |
I just want to report that not only IJulia, but also simple REPL sessions and Juno/Atom sessions, LaTeXStrings do not work properly with PlotlyJS (although I am using PlotlyJS backend in Plots.jl). Here is a simple example (using Plots.jl):
Perhaps, one could convert the above to pure PlotlyJS functions, but I doubt those would work properly. It would be really great if LaTeXStrings are fully integrated into PlotlyJS. Note that LaTeXStrings work well with PyPlot. |
Hi @BoundaryValueProblems , what would
look like to you? Right now I do utilize LaTeXStrings in PlotlyJS.jl (see these lines) and re-export the Here's an example of how this currently works in PlotlyJS:
|
Hi, @sglyon . Thank you for your reply! |
So the LaTexStrings.jl package is very small (the entire package is in one file): it simply defines a I think the issues you are seeing are actually with the plotly.js javascript library used to render plots. When I go to this page in the plotly.js docs, the plot doesn't load properly (or takes a very long time to load). If I look at my browser's javascript console I see a bunch of errors: I have verified that LaTeX isn't working in atom/juno. Not sure why, I think @MikeInnes or @pfitzseb would have to chip in here on why MathJAX rendering in the plot pane isn't working |
I see an additional error in Juno:
which is thrown from inside the webview that contains the plot. Not sure what's going on there tbh. When opening the PlotlyJS page linked above I also get
and no latex legend entries. So yeah, kinda strange all in all... |
Has there been any progrees since then? |
Hmm, that's unfortunate. I have not focused specifically on this issue. We are nearly finished with a re-write of the display backend, which may resolve this issue |
I really love, the PlotlyJS.jl package, the only thing i need to solve is the latex integration.
The screenshot is from vscode plot pane but the same a I get from electron window. Should I install MathJax or any other package to get the integration working? |
I am wondering if this https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-support-mathjax can be somehow related to this issue. |
Could the PR above solve this issue? Or are there new developments that would retard the integration of #331 ? |
Thanks @jtschneider for the ping. I don't know much about the |
I think it is a pity that such a remarkable package like PlotlyJS.jl does not support LaTeX code. In the Julia world, PlotlyJS is second to none in terms of display quality and interactivity. There are circumstances in which we can deal without LaTeX when plotting, but others (for example, teaching materials) are difficult to do without it. I am a user, so that I can be of little help. If somehow, allowing LaTeX to be used in the label of axis and variables, that would be enough for most users of PlotlyJS. By the way, I tried the suggestions by #331 , but they did not work. |
If you export your figure to html and then add (after downloading mathjax to local)
to the head section of your html then you should have latex rendering. But how to do it automatically and for other formats? |
There is a section in the documentation on how to add the MathJax header, which doesn't really work at least from my side. |
Just so you have the satisfaction of closing an issue when this is done.
The text was updated successfully, but these errors were encountered: