Split lines with many copyright years
[gromacs.git] / docs / conf.py
blob5efb12baa39ae542c592137cd06c7cc050d022ca
2 # This file is part of the GROMACS molecular simulation package.
4 # Copyright (c) 2015,2016,2017,2018,2019 by the GROMACS development team.
5 # Copyright (c) 2020, by the GROMACS development team, led by
6 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
7 # and including many others, as listed in the AUTHORS file in the
8 # top-level source directory and at http://www.gromacs.org.
10 # GROMACS is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public License
12 # as published by the Free Software Foundation; either version 2.1
13 # of the License, or (at your option) any later version.
15 # GROMACS is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Lesser General Public License for more details.
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with GROMACS; if not, see
22 # http://www.gnu.org/licenses, or write to the Free Software Foundation,
23 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 # If you want to redistribute modifications to GROMACS, please
26 # consider that scientific software is very special. Version
27 # control is crucial - bugs must be traceable. We will be happy to
28 # consider code for inclusion in the official distribution, but
29 # derived work must not be called official GROMACS. Details are found
30 # in the README & COPYING files - if they are missing, get the
31 # official version at http://www.gromacs.org.
33 # To help us fund GROMACS development, we humbly ask that you cite
34 # the research papers on the package. Check out http://www.gromacs.org.
36 # -*- coding: utf-8 -*-
38 # GROMACS documentation build configuration file, created by
39 # sphinx-quickstart on Tue Jan 13 14:28:44 2015.
41 # This file is execfile()d with the current directory set to its
42 # containing dir.
44 # Note that not all possible configuration values are present in this
45 # autogenerated file.
47 # All configuration values have a default; values that are commented out
48 # serve to show the default.
50 import datetime
51 import os
52 import sys
54 exec(open('conf-vars.py').read())
55 sys.path.append(gmx_sphinx_extension_path)
56 if releng_path and os.path.isdir(releng_path):
57 sys.path.append(releng_path)
58 if gmxapi_staging_path and os.path.isdir(gmxapi_staging_path):
59 sys.path.append(gmxapi_staging_path)
61 # If extensions (or modules to document with autodoc) are in another directory,
62 # add these directories to sys.path here. If the directory is relative to the
63 # documentation root, use os.path.abspath to make it absolute, like shown here.
64 #sys.path.insert(0, os.path.abspath('.'))
66 # -- General configuration ------------------------------------------------
68 # If your documentation needs a minimal Sphinx version, state it here.
69 # gmx_min_sphinx is set from the expected minimum version of Sphinx
70 # in CMakeLists.txt
71 needs_sphinx = gmx_min_sphinx
73 # Add any Sphinx extension module names here, as strings. They can be
74 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
75 # ones.
76 extensions = [
77 'sphinx.ext.autodoc',
78 'sphinx.ext.graphviz',
79 'sphinx.ext.extlinks',
80 'sphinx.ext.napoleon',
81 'sphinx.ext.doctest',
82 'sphinx.ext.ifconfig',
83 'sphinx.ext.intersphinx',
84 'sphinx.ext.mathjax',
85 'sphinx.ext.napoleon',
86 'sphinx.ext.todo',
87 'gmxsphinx'
89 extlinks = {'issue': ('https://redmine.gromacs.org/issues/%s',
90 'Issue ')}
92 # Add any paths that contain templates here, relative to this directory.
93 # templates_path = ['_templates']
95 # The suffix of source filenames.
96 source_suffix = '.rst'
98 # The encoding of source files.
99 #source_encoding = 'utf-8-sig'
101 # The master toctree document.
102 master_doc = 'index'
104 # General information about the project.
105 project = u'GROMACS'
106 copyright = str(datetime.datetime.now().year) + u', GROMACS development team'
107 thisyear_string = str(datetime.datetime.now().year)
108 # The version info for the project you're documenting, acts as replacement for
109 # |version| and |release|, also used in various other places throughout the
110 # built documents.
112 # The short X.Y version.
113 version = gmx_version_string
114 # The full version, including alpha/beta/rc tags.
115 release = gmx_version_string_full
116 # default file extension for plots
117 plotext = u'.eps'
119 # The language for content autogenerated by Sphinx. Refer to documentation
120 # for a list of supported languages.
121 #language = None
123 # There are two options for replacing |today|: either, you set today to some
124 # non-false value, then it is used:
125 #today = ''
126 # Else, today_fmt is used as the format for a strftime call.
127 #today_fmt = '%B %d, %Y'
129 # List of patterns, relative to source directory, that match files and
130 # directories to ignore when looking for source files.
131 exclude_patterns = ['fragments']
132 if not tags.has('do_man'):
133 exclude_patterns += ['man']
135 # Set variable if documentation build can convert images or not
136 # to selectively include files in reference manual
137 def setup(app):
138 app.add_config_value('gmx_image_convert', 'impossible', 'env')
140 # The reST default role (used for this markup: `text`) to use for all
141 # documents.
142 default_role = 'any'
144 # If true, '()' will be appended to :func: etc. cross-reference text.
145 #add_function_parentheses = True
147 # If true, the current module name will be prepended to all description
148 # unit titles (such as .. function::).
149 #add_module_names = True
151 # If true, sectionauthor and moduleauthor directives will be shown in the
152 # output. They are ignored by default.
153 #show_authors = False
155 # The name of the Pygments (syntax highlighting) style to use.
156 pygments_style = 'sphinx'
158 # A list of ignored prefixes for module index sorting.
159 #modindex_common_prefix = []
161 # If true, keep warnings as "system message" paragraphs in the built documents.
162 #keep_warnings = False
164 # Configure the values for all the variables that might later configure any of the .rst files.
165 substitutions = ['.. |{0}| replace:: {1}'.format(*x) for x in variables if x[1]]
166 substitutions.extend(['.. |{0}| replace:: unknown'.format(x[0]) for x in variables if x[1] == ''])
167 rst_epilog = "\n".join(substitutions)
168 rst_epilog += """
169 .. |Gromacs| replace:: GROMACS
170 .. _gmx-manual: manual-{gmx_version_string}.pdf
171 .. _gmx-manual-parent-dir: ../manual-{gmx_version_string}.pdf
172 .. |gmx-source-package-ftp| replace:: As ftp ftp://ftp.gromacs.org/pub/gromacs/gromacs-{gmx_version_string}.tar.gz
173 .. |gmx-source-package-http| replace:: As http http://ftp.gromacs.org/pub/gromacs/gromacs-{gmx_version_string}.tar.gz
174 .. |gmx-regressiontests-package| replace:: http://gerrit.gromacs.org/download/regressiontests-{regressiontest_version}.tar.gz
175 .. _up-to-date installation instructions: http://manual.gromacs.org/documentation/current/install-guide/index.html
176 .. _CUDA: http://www.nvidia.com/object/cuda_home_new.html
177 .. _OpenCL: https://www.khronos.org/opencl/
178 .. _OpenMPI: http://www.open-mpi.org
179 .. _MPICH: http://www.mpich.org
180 .. _LAM-MPI: http://www.lam-mpi.org
181 .. _OpenMP: http://en.wikipedia.org/wiki/OpenMP
182 .. _CMake installation page: http://www.cmake.org/install/
183 .. _Ubuntu toolchain ppa page: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
184 .. _EPEL page: https://fedoraproject.org/wiki/EPEL
185 .. _running CMake: http://www.cmake.org/runningcmake/
186 .. _CMake environment variables: http://cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables
187 .. _FFTW: http://www.fftw.org
188 .. _FFTW installation guide: http://www.fftw.org/doc/Installation-and-Customization.html#Installation-and-Customization
189 .. _MKL: https://software.intel.com/en-us/intel-mkl
190 .. _VMD: http://www.ks.uiuc.edu/Research/vmd/
191 .. _PyMOL: http://www.pymol.org
192 .. _continuous integration server used by GROMACS: http://jenkins.gromacs.org
193 .. _Jenkins: http://jenkins-ci.org
194 .. _webpage: http://www.gromacs.org
195 .. _ftp site: ftp://ftp.gromacs.org/pub/gromacs/
196 .. _tutorials: http://www.gromacs.org/Documentation/Tutorials
197 .. _redmine: http://redmine.gromacs.org
198 .. _gerrit: http://gerrit.gromacs.org
199 .. _download: ../download.html
200 .. |thisyear| replace:: {thisyear_string}
201 """.format(gmx_version_string=gmx_version_string, regressiontest_version=regressiontest_version, thisyear_string=thisyear_string)
203 # -- Options for HTML output ----------------------------------------------
205 # The theme to use for HTML and HTML Help pages. See the documentation for
206 # a list of builtin themes.
207 html_theme = 'classic'
209 # Theme options are theme-specific and customize the look and feel of a theme
210 # further. For a list of options available for each theme, see the
211 # documentation.
212 #html_theme_options = {}
214 # Add any paths that contain custom themes here, relative to this directory.
215 html_theme_path = ['']
217 # The name for this set of Sphinx documents. If None, it defaults to
218 # "<project> v<release> documentation".
219 html_title = u'GROMACS ' + release + ' documentation'
221 # A shorter title for the navigation bar. Default is the same as html_title.
222 html_short_title = u'GROMACS ' + version
224 # The name of an image file (relative to this directory) to place at the top
225 # of the sidebar.
226 #html_logo = None
228 # The name of an image file (within the static path) to use as favicon of the
229 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
230 # pixels large.
231 #html_favicon = None
233 # Add any paths that contain custom static files (such as style sheets) here,
234 # relative to this directory. They are copied after the builtin static files,
235 # so a file named "default.css" will overwrite the builtin "default.css".
236 html_static_path = ['_static']
238 # Add any extra paths that contain custom files (such as robots.txt or
239 # .htaccess) here, relative to this directory. These files are copied
240 # directly to the root of the documentation.
241 #html_extra_path = []
243 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
244 # using the given strftime format.
245 #html_last_updated_fmt = '%b %d, %Y'
247 # If true, SmartyPants will be used to convert quotes and dashes to
248 # typographically correct entities.
249 #html_use_smartypants = True
251 # Custom sidebar templates, maps document names to template names.
252 #html_sidebars = {}
254 # Additional templates that should be rendered to pages, maps page names to
255 # template names.
256 #html_additional_pages = {}
258 # If false, no module index is generated.
259 #html_domain_indices = True
261 # If false, no index is generated.
262 #html_use_index = True
264 # If true, the index is split into individual pages for each letter.
265 #html_split_index = False
267 # If true, links to the reST sources are added to the pages.
268 #html_show_sourcelink = True
270 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
271 #html_show_sphinx = True
273 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
274 #html_show_copyright = True
276 # If true, an OpenSearch description file will be output, and all pages will
277 # contain a <link> tag referring to it. The value of this option must be the
278 # base URL from which the finished HTML is served.
279 #html_use_opensearch = ''
281 # This is the file name suffix for HTML files (e.g. ".xhtml").
282 #html_file_suffix = None
284 # Output file base name for HTML help builder.
285 htmlhelp_basename = 'Gromacsdoc'
288 # -- Options for LaTeX output ---------------------------------------------
290 latex_elements = {
291 # The paper size ('letterpaper' or 'a4paper').
292 'papersize': 'a4paper',
295 # The font size ('10pt', '11pt' or '12pt').
296 'pointsize': '11',
298 # Additional stuff for the LaTeX preamble.
299 # The tocdepth setting is needed to overwrite the default value set by Sphinx
300 # to get a more detailed toctree in the pdf version of the manual.
301 'preamble': r'''
302 \usepackage{here}
303 \usepackage{picins}
304 \usepackage{underscore}
305 \usepackage{tabularx}
306 \usepackage{multicol}
307 \usepackage{dcolumn}
308 \usepackage{makeidx}
309 \usepackage{times}
310 \usepackage{ifthen}
311 \usepackage{enumitem}
312 \usepackage{longtable}
313 \usepackage{pdflscape}
314 \pagenumbering{roman}
315 \usepackage{array}
316 \setcounter{tocdepth}{2}
317 ''',
318 # Format output to avoid empty pages
319 'classoptions': ',openany,oneside'
322 # Grouping the document tree into LaTeX files. List of tuples
323 # (source start file, target name, title,
324 # author, documentclass [howto, manual, or own class]).
325 latex_documents = [
326 ('index', 'gromacs.tex', u'GROMACS Documentation',
327 u'GROMACS development team', 'manual'),
330 # The name of an image file (relative to this directory) to place at the top of
331 # the title page.
332 latex_logo = 'reference-manual/plots/peregrine.png'
334 # For "manual" documents, if this is true, then toplevel headings are parts,
335 # not chapters.
336 latex_use_parts = True
338 # If true, show page references after internal links.
339 latex_show_pagerefs = True
341 # If true, show URL addresses after external links.
342 #latex_show_urls = False
344 # Documents to append as an appendix to all manuals.
345 #latex_appendices = []
347 # If false, no module index is generated.
348 #latex_domain_indices = True
351 # -- Options for manual page output ---------------------------------------
353 # One entry per manual page. List of tuples
354 # (source start file, name, description, authors, manual section).
355 if tags.has('do_man'):
356 exec(open('conf-man.py').read())
358 # If true, show URL addresses after external links.
359 #man_show_urls = False
362 # -- Options for Texinfo output -------------------------------------------
364 # Grouping the document tree into Texinfo files. List of tuples
365 # (source start file, target name, title, author,
366 # dir menu entry, description, category)
367 texinfo_documents = [
368 ('index', 'GROMACS', u'GROMACS Documentation',
369 u'GROMACS development team', 'GROMACS', 'One line description of project.',
370 'Miscellaneous'),
373 # Documents to append as an appendix to all manuals.
374 #texinfo_appendices = []
376 # If false, no module index is generated.
377 #texinfo_domain_indices = True
379 # How to display URL addresses: 'footnote', 'no', or 'inline'.
380 #texinfo_show_urls = 'footnote'
382 # If true, do not generate a @detailmenu in the "Top" node's menu.
383 #texinfo_no_detailmenu = False
385 # Make it possible to use numbered labels for figures and tables
386 numfig = True
388 # -- Options for intersphinx extension ------------------------------------
390 intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
391 intersphinx_cache_limit = -1
392 intersphinx_timeout = 10