Skip to content

Commit

Permalink
Add MathJax workaround for rendering plotly figures in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
aazuspan committed Nov 21, 2021
1 parent f62e198 commit 1dd46f6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,18 @@
html_static_path = ["_static"]

autodoc_mock_imports = ["ee", "rasterio", "tqdm", "joblib", "plotly"]


# Workaround to make Plotly graphs appear in Jupyter notebooks.
# https://github.com/spatialaudio/nbsphinx/issues/572#issuecomment-853389268
mathjax_path = (
"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
)
mathjax2_config = {
"tex2jax": {
"inlineMath": [["$", "$"], ["\\(", "\\)"]],
"processEscapes": True,
"ignoreClass": "document",
"processClass": "math|output_area",
}
}

0 comments on commit 1dd46f6

Please sign in to comment.