From: rnv Date: Thu, 9 Aug 2018 16:40:02 +0000 (+0300) Subject: 1) Detect sphinx theme directly in conf.py.in file X-Git-Tag: SHAPER_V9_1_0RC1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3b6b6d64e01053a696e1e6fe83823162bc8b3f8f;p=tools%2Fmedcoupling.git 1) Detect sphinx theme directly in conf.py.in file 2) Migration to Sphinx-1.7.6: remove deprecated 'sphinx.ext.pngmath' extension --- diff --git a/doc/tutorial/conf.py.in b/doc/tutorial/conf.py.in index 090d9359e..e4618819b 100644 --- a/doc/tutorial/conf.py.in +++ b/doc/tutorial/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -23,7 +24,7 @@ import sys, os # 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.pngmath'] +extensions = ['sphinx.ext.mathjax'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -87,8 +88,7 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- - -html_theme = '@SPHINX_THEME@' +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths diff --git a/doc/user/conf.py.in b/doc/user/conf.py.in index 0b143134d..41c42c7a1 100644 --- a/doc/user/conf.py.in +++ b/doc/user/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -23,7 +24,7 @@ import sys, os # 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.pngmath', 'sphinx.ext.mathjax'] +extensions = ['sphinx.ext.mathjax'] # Add any paths that contain templates here, relative to this directory. #templates_path = ['_templates'] @@ -88,8 +89,7 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- - -html_theme = '@SPHINX_THEME@' +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths