Skip to content

Commit 675a7b8

Browse files
committed
docs: Support pngmath replacement (sphinx >= 1.8)
The pngmath module was removed in favor of the imgmath module in 1.8 Thanks to avsej for drawing attention to this.
1 parent 0b4fe8e commit 675a7b8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/source/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727

2828
# Add any Sphinx extension module names here, as strings. They can be extensions
2929
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
30+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
31+
32+
try:
33+
import sphinx.ext.pngmath
34+
extensions.append('sphinx.ext.pngmath')
35+
except ImportError:
36+
extensions.append('sphinx.ext.imgmath')
3137

3238
# Breathe setup, for integrating doxygen content
3339
extensions.append('breathe')

0 commit comments

Comments
 (0)