1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2001-2020 EDF R&D
5 # This file is part of SALOME EFICAS module
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
25 import sys, os, time, sphinx, logging
27 # -- Module version information --------------------------------------------------
29 if "module_version" not in locals():
30 module_version = lambda : None
31 module_version.name = "EFICAS_NOUVEAU"
32 module_version.year = "%s"%(time.localtime()[0],)
33 module_version.version = ""
34 logging.warning('Using fallback "module_version" because none was found')
36 # -- Project information -------------------------------------------------------
38 project = u'%s'%module_version.name
39 author = u'Pascale NOYRET'
40 copyright = u'2001-%s, EDF R&D, %s'%(module_version.year,author)
41 version = '%s'%module_version.version
42 release = '%s'%module_version.version
43 doctitle = u"%s documentation"%module_version.name
44 docfull = u"Editeur de FIchier de Commandes et Analyseur Sémantique"
46 # -- General configuration -----------------------------------------------------
48 from distutils.version import LooseVersion #, StrictVersion
49 __lv = LooseVersion(sphinx.__version__)
50 if __lv < LooseVersion("1.4.0"):
51 extensions = ['sphinx.ext.pngmath']
53 extensions = ['sphinx.ext.imgmath']
55 import sphinx_rtd_theme
56 extensions += ['sphinx_rtd_theme']
58 logging.debug('Using "sphinx_rtd_theme" that was found')
61 logging.debug('Not using "sphinx_rtd_theme" because none was found')
63 source_suffix = '.rst'
64 source_encoding = 'utf-8'
73 templates_path = ['_templates']
75 # -- Options for HTML output ---------------------------------------------------
78 html_theme = "sphinx_rtd_theme"
80 html_theme = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
83 html_static_path = ['_static']
84 html_show_sourcelink = False
85 html_search_language = language
87 # -- Options for HTMLHelp output -----------------------------------------------
89 htmlhelp_basename = module_version.name+'doc'
91 # -- Options for LaTeX output --------------------------------------------------
94 'papersize': 'a4paper',
96 'figure_align': 'htbp',
99 ('index', '%s.tex'%module_version.name, doctitle,
103 # -- Options for manual page output --------------------------------------------
106 (master_doc, '%s'%module_version.name, doctitle,
110 # -- Options for Texinfo output ------------------------------------------------
112 texinfo_documents = [
113 (master_doc, '%s'%module_version.name, doctitle,
114 author, '%s'%module_version.name, docfull,
118 # -- Options for Epub output ---------------------------------------------------
120 epub_title = doctitle
122 epub_publisher = author
123 epub_copyright = copyright
124 epub_exclude_files = ['search.html']
126 # -- Options for PDF output ----------------------------------------------------
130 u'%s'%module_version.name,
131 u'%s'%module_version.name,
133 dict(pdf_compressed = True),
135 pdf_stylesheets = ['sphinx','kerning','a4']
136 pdf_compressed = True
137 pdf_inline_footnotes = True
139 # -- Extension configuration ---------------------------------------------------