Skip to content

Commit

Permalink
Added support for sphinx_math_dollar
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Oct 14, 2021
1 parent b672a73 commit 6e4280e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spyder/plugins/help/utils/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
# Local imports
from spyder.config.manager import CONF

# Check if sphinx_math_dollar is installed
try:
import sphinx_math_dollar
except:
sphinx_math_dollar = None

#==============================================================================
# General configuration
Expand All @@ -41,6 +46,17 @@
extensions = ['sphinx.ext.jsmath']
else:
extensions = ['sphinx.ext.mathjax']
if sphinx_math_dollar:
extensions.append('sphinx_math_dollar')

# Configure mathjax to not handle $
# See: https://www.sympy.org/sphinx-math-dollar/
mathjax_config = {
'tex2jax': {
'inlineMath': [ ["\\(","\\)"] ],
'displayMath': [["\\[","\\]"] ],
},
}

# For scipy and matplotlib docstrings, which need this extension to
# be rendered correctly. See spyder-ide/spyder#1138.
Expand Down

0 comments on commit 6e4280e

Please sign in to comment.