Salome HOME
Merge remote-tracking branch 'origin/master' into gni/documentation
[modules/smesh.git] / doc / salome / gui / SMESH / conf.py.in
index 91124d948f8633efc95589a5303f2adbb55dbcd8..66efe32d3c7318abd5d6c5c736683895d4b1e8e6 100644 (file)
@@ -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
@@ -29,7 +30,12 @@ try:
   extensions += ['sphinxcontrib.napoleon']
 except:
   pass
-
+try:
+  import sphinx_rtd_theme
+  extensions += ['sphinx_rtd_theme']
+  use_rtd_theme = True
+except:
+  use_rtd_theme = False
 #add pdfbuilder to build a pdf with rst2pdf
 #extensions = ['rst2pdf.pdfbuilder']
 
@@ -105,7 +111,17 @@ pygments_style = 'sphinx'
 
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = '@SPHINX_THEME@'
+if use_rtd_theme:
+  html_theme = 'sphinx_rtd_theme'
+else:
+  html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic'
+
+themes_options = {}
+themes_options['classic'] = {
+  'body_max_width':'none',
+  'body_min_width':0,
+}
+html_theme_options = themes_options.get(html_theme, {})
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
@@ -171,7 +187,7 @@ htmlhelp_basename = 'smeshdoc'
 # ------------------------
 
 # The paper size ('letter' or 'a4').
-latex_paper_size = 'a4'
+#latex_paper_size = 'a4'
 
 # The font size ('10pt', '11pt' or '12pt').
 latex_font_size = '10pt'