# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys, os, sphinx
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ["sphinx.ext.imgmath"]
-# extensions = ["sphinx.ext.pngmath"]
+from distutils.version import LooseVersion #, StrictVersion
+if LooseVersion(sphinx.__version__) < LooseVersion("1.4.0"):
+ extensions = ["sphinx.ext.pngmath"]
+else:
+ extensions = ["sphinx.ext.imgmath"]
+#
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys, os, sphinx
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ["sphinx.ext.imgmath"]
-# extensions = ["sphinx.ext.pngmath"]
+from distutils.version import LooseVersion #, StrictVersion
+if LooseVersion(sphinx.__version__) < LooseVersion("1.4.0"):
+ extensions = ["sphinx.ext.pngmath"]
+else:
+ extensions = ["sphinx.ext.imgmath"]
+#
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']