Skip to content

Commit 718fcfd

Browse files
committed
[Doc][Sphinx] Use imgmath with sphinx >= 1.4, as pngmath has been removed in 1.8
1 parent a9c93ac commit 718fcfd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/sphinx/conf.py.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ import sys, os
1919
sys.path = [os.path.abspath('@CMAKE_BINARY_DIR@/src')]+sys.path
2020
sys.path = [os.path.abspath('@CMAKE_SOURCE_DIR@/src')]+sys.path
2121

22-
import dynamic_graph.tutorial as dgt
22+
from sphinx import version_info as sphinx_version
2323

2424
# -- General configuration -----------------------------------------------------
2525

2626
# Add any Sphinx extension module names here, as strings. They can be extensions
2727
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.pngmath']
28+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
29+
extensions.append('sphinx.ext.pngmath' if sphinx_version < (1, 4) else 'sphinx.ext.imgmath')
2930

3031
# Add any paths that contain templates here, relative to this directory.
3132
templates_path = ['_templates']

0 commit comments

Comments
 (0)