Skip to content
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

chore: Update MathJax path for Sphinx documentation #481

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

import os
import sys
from distutils.version import LooseVersion

import sphinx
import sphinx_gallery
import sphinx_rtd_theme

Expand Down Expand Up @@ -42,23 +44,21 @@
"numpydoc",
"sphinx_gallery.gen_gallery",
]
mathjax_path = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"

mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"

# this is needed for some reason...
# see https://github.com/numpy/numpydoc/issues/69
numpydoc_show_class_members = False

from distutils.version import LooseVersion

# pngmath / imgmath compatibility layer for different sphinx versions
import sphinx

if LooseVersion(sphinx.__version__) < LooseVersion("1.4"):
extensions.append("sphinx.ext.pngmath")
else:
extensions.append("sphinx.ext.imgmath")

# Ensure imgmath_latex is correctly set
imgmath_latex = 'latex'

autodoc_default_flags = ["members", "inherited-members"]

# Add any paths that contain templates here, relative to this directory.
Expand Down
Loading