diff --git a/src/backends.jl b/src/backends.jl index a668b3c8..4aec7d9d 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -374,7 +374,6 @@ function _initialize_backend(pkg::PlotlyBackend) catch @info "For saving to png with the Plotly backend ORCA has to be installed." end - push!(_plot_defaults, :include_mathjax => "") end const _plotly_attr = merge_with_base_supported([ @@ -418,7 +417,6 @@ const _plotly_attr = merge_with_base_supported([ :tick_direction, :camera, :contour_labels, - :include_mathjax, ]) const _plotly_seriestype = [ diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 22ddae4e..0d39c424 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -814,9 +814,9 @@ function plotly_html_head(plt::Plot) plotly = use_local_dependencies[] ? local_file : "https://cdn.plot.ly/plotly-latest.min.js" - include_mathjax = get(plt.attr, :include_mathjax, "") + include_mathjax = get(plt[:extra_plot_kwargs], :include_mathjax, "") mathjax_file = include_mathjax != "cdn" ? ("file://" * include_mathjax) : "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML" - mathjax_head = include_mathjax == "" ? "" : "\n\t\t" + mathjax_head = include_mathjax == "" ? "" : "\n\t\t" if isijulia() && !ijulia_initialized[] # using requirejs seems to be key to load a js depency in IJulia!