support LaTeX titles by adding :include_mathjax option#331
Open
hhaensel wants to merge 3 commits intoJuliaPlots:masterfrom
Open
support LaTeX titles by adding :include_mathjax option#331hhaensel wants to merge 3 commits intoJuliaPlots:masterfrom
hhaensel wants to merge 3 commits intoJuliaPlots:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I recently committed an
:include_mathjaxoption for the plotly() backend in plot and wondered, whether I could reuse my experience for PlotlyJS and its respective Backend in plots.This is, what I ended up with. This probably solves #60 and #325, at least partly.
WebIO currently does not support registering of directories with its
dep2urlroutine and has some missing Windows support, which I addressed in JuliaGizmos/WebIO.jl#417Meanwhile, I used
AssetRegistrydirectly to work around this problem.Usage: add
include_mathjax = <mathjaxpath>to the Layout options.mathjaxpath can be either "cdn", "local" (which looks whether mathjax is installed with IJulia) or a direct link to a mathjax file (local or remote).
Unfortunately, I couldn't find a way to implement this for the plot pane. MathJax only works, if the mathjax source is included in the head tag.
I have experimented with a script that appends MathJax to the header after document was loaded, but that version also only worked for the Blink display, so I chose to use this version, which is somehow cleaner.
Maybe, someone else can help?
Example:
or from the Plots plotlyjs() backend