conf.py 9.78 KB
Newer Older
peastman's avatar
peastman committed
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- coding: utf-8 -*-
#
# OpenMM Developer Guide documentation build configuration file, created by
# sphinx-quickstart on Fri Feb  7 12:42:06 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

14
15
import os
import sys
peastman's avatar
peastman committed
16
17
18
19

# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
20
21
sys.path.insert(0, os.path.abspath("."))
sys.path.append(os.path.abspath("../sphinx"))
peastman's avatar
peastman committed
22
23
24
25

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
26
# needs_sphinx = '1.0'
peastman's avatar
peastman committed
27
28
29

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
extensions = [
    "sphinx.ext.mathjax",
    "sphinxcontrib.bibtex",
    "autonumber",
    "samepage",
    "caption",
    "continuous",
]
bibtex_bibfiles = ["references.bib"]

# :numref: role should just use the number
numfig_format = {
    "figure": "%s",
    "table": "%s",
    "code-block": "%s",
    "section": "%s",
}
peastman's avatar
peastman committed
47
48

# Add any paths that contain templates here, relative to this directory.
49
templates_path = ["_templates"]
peastman's avatar
peastman committed
50
51

# The suffix of source filenames.
52
source_suffix = ".rst"
peastman's avatar
peastman committed
53
54

# The encoding of source files.
55
# source_encoding = 'utf-8-sig'
peastman's avatar
peastman committed
56
57

# The master toctree document.
58
master_doc = "index"
peastman's avatar
peastman committed
59
60

# General information about the project.
61
62
project = u"OpenMM User Guide"
copyright = u"2008-2017, Stanford University"
peastman's avatar
peastman committed
63
64
65
66
67
68

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
69
version = os.getenv("OPENMM_VERSION")
peastman's avatar
peastman committed
70
# The full version, including alpha/beta/rc tags.
71
release = os.getenv("OPENMM_VERSION")
peastman's avatar
peastman committed
72
73
74

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
75
# language = None
peastman's avatar
peastman committed
76
77
78

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
79
# today = ''
peastman's avatar
peastman committed
80
# Else, today_fmt is used as the format for a strftime call.
81
# today_fmt = '%B %d, %Y'
peastman's avatar
peastman committed
82
83
84

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
85
exclude_patterns = ["_build"]
peastman's avatar
peastman committed
86
87

# The reST default role (used for this markup: `text`) to use for all documents.
88
# default_role = None
peastman's avatar
peastman committed
89
90

# If true, '()' will be appended to :func: etc. cross-reference text.
91
# add_function_parentheses = True
peastman's avatar
peastman committed
92
93
94

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
95
# add_module_names = True
peastman's avatar
peastman committed
96
97
98

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
99
# show_authors = False
peastman's avatar
peastman committed
100
101

# The name of the Pygments (syntax highlighting) style to use.
102
pygments_style = "sphinx"
peastman's avatar
peastman committed
103
104

# A list of ignored prefixes for module index sorting.
105
# modindex_common_prefix = []
peastman's avatar
peastman committed
106
107
108
109
110
111


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
112
html_theme = "alabaster"
peastman's avatar
peastman committed
113
114
115
116

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
html_theme_options = {
    "github_button": False,
    "github_user": "openmm",
    "github_repo": "openmm",
    "logo_name": True,
    "logo": "logo.png",
    "extra_nav_links": [
        {
            "title": "OpenMM.org",
            "uri": "https://openmm.org",
            "relative": False,
        },
        {
            "title": "Developer Guide",
            "uri": "../developerguide/",
            "relative": True,
        },
        {
            "title": "Python API reference",
            "uri": "../api-python/",
            "relative": True,
        },
        {
            "title": "C++ API reference",
            "uri": "../api-c++/",
            "relative": True,
        },
        {
            "title": "GitHub",
            "uri": "https://github.com/openmm",
            "relative": False,
        },
    ],
    "show_relbar_bottom": True,
}
# Custom sidebar templates, maps document names to template names.
html_sidebars = {"**": ["about.html", "searchbox.html", "navigation.html"]}
peastman's avatar
peastman committed
154
155

# Add any paths that contain custom themes here, relative to this directory.
156
# html_theme_path = []
peastman's avatar
peastman committed
157
158
159

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
160
# html_title = None
peastman's avatar
peastman committed
161
162

# A shorter title for the navigation bar.  Default is the same as html_title.
163
# html_short_title = None
peastman's avatar
peastman committed
164
165
166

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
167
# html_logo = None
peastman's avatar
peastman committed
168
169
170
171

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
172
# html_favicon = None
peastman's avatar
peastman committed
173
174
175
176

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
177
html_static_path = ["_static"]
peastman's avatar
peastman committed
178
179
180

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
181
# html_last_updated_fmt = '%b %d, %Y'
peastman's avatar
peastman committed
182
183
184

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
185
# html_use_smartypants = True
peastman's avatar
peastman committed
186
187
188

# Additional templates that should be rendered to pages, maps page names to
# template names.
189
# html_additional_pages = {}
peastman's avatar
peastman committed
190
191

# If false, no module index is generated.
192
# html_domain_indices = True
peastman's avatar
peastman committed
193
194

# If false, no index is generated.
195
html_use_index = True
peastman's avatar
peastman committed
196
197

# If true, the index is split into individual pages for each letter.
198
# html_split_index = False
peastman's avatar
peastman committed
199
200

# If true, links to the reST sources are added to the pages.
201
# html_show_sourcelink = True
peastman's avatar
peastman committed
202
203

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
204
# html_show_sphinx = True
peastman's avatar
peastman committed
205
206

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
207
# html_show_copyright = True
peastman's avatar
peastman committed
208
209
210
211

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
212
# html_use_opensearch = ''
peastman's avatar
peastman committed
213
214

# This is the file name suffix for HTML files (e.g. ".xhtml").
215
# html_file_suffix = None
peastman's avatar
peastman committed
216
217

# Output file base name for HTML help builder.
218
htmlhelp_basename = "OpenMMUsersGuidedoc"
peastman's avatar
peastman committed
219
220
221
222


# -- Options for LaTeX output --------------------------------------------------

223
latex_engine = "xelatex"
224
latex_use_xindy = False
peastman's avatar
peastman committed
225
latex_elements = {
226
227
228
229
230
231
    # The paper size ('letterpaper' or 'a4paper').
    "papersize": "letterpaper,openany",
    # The font size ('10pt', '11pt' or '12pt').
    #'pointsize': '10pt',
    # Additional stuff for the LaTeX preamble.
    "preamble": """
peastman's avatar
peastman committed
232
233
234
235
236
237
    \\usepackage[none]{hyphenat}
    \\usepackage{xstring}
    \\usepackage{color}
    \\usepackage{caption}
    \\setcounter{tocdepth}{3}
    \\captionsetup[figure]{labelformat=empty}
Levi Naden's avatar
Levi Naden committed
238
    % Backwards compatibility for sphinx < 1.5
239
    \\let\\DUspan\\null % force DUspan to be defined
peastman's avatar
peastman committed
240
241
    \\renewcommand{\DUspan}[2]{%
        \\IfEqCase{#1}{%
242
            {code}{\\small{}\\texttt{#2}\\normalsize{}}
peastman's avatar
peastman committed
243
        }[\\PackageError{DUspan}{Unrecognized option passed to DUspan: #1}{}]%
244
    }%
Levi Naden's avatar
Levi Naden committed
245
    % Sphinx > 1.5 compatibility (github.com/sphinx-doc/sphinx/issues/2231)
246
247
    \\newcommand{\\DUrolecode}[1]{%
        \\small{}\\texttt{#1}\\normalsize{}%
peastman's avatar
peastman committed
248
    }%""",
249
250
    # Omit the index.
    "printindex": "",
peastman's avatar
peastman committed
251
252
253
254
255
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
256
257
258
259
260
261
262
    (
        "index",
        "OpenMMUsersGuide.tex",
        u"OpenMM Users Guide",
        u"Peter Eastman",
        "manual",
    ),
peastman's avatar
peastman committed
263
264
265
266
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
267
# latex_logo = None
peastman's avatar
peastman committed
268
269
270

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
271
latex_use_parts = True
peastman's avatar
peastman committed
272
273

# If true, show page references after internal links.
274
# latex_show_pagerefs = False
peastman's avatar
peastman committed
275
276

# If true, show URL addresses after external links.
277
# latex_show_urls = False
peastman's avatar
peastman committed
278
279

# Documents to append as an appendix to all manuals.
280
# latex_appendices = []
peastman's avatar
peastman committed
281
282

# If false, no module index is generated.
283
# latex_domain_indices = True
peastman's avatar
peastman committed
284
285
286
287
288
289
290


# -- Options for manual page output --------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
291
    ("index", "openmmusersguide", u"OpenMM Users Guide", [u"Peter Eastman"], 1)
peastman's avatar
peastman committed
292
293
294
]

# If true, show URL addresses after external links.
295
# man_show_urls = False
peastman's avatar
peastman committed
296
297
298
299
300
301
302
303


# -- Options for Texinfo output ------------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
304
305
306
307
308
309
310
311
312
    (
        "index",
        "OpenMMUsersGuide",
        u"OpenMM Users Guide",
        u"Peter Eastman",
        "OpenMMUsersGuide",
        "One line description of project.",
        "Miscellaneous",
    ),
peastman's avatar
peastman committed
313
314
315
]

# Documents to append as an appendix to all manuals.
316
# texinfo_appendices = []
peastman's avatar
peastman committed
317
318

# If false, no module index is generated.
319
# texinfo_domain_indices = True
peastman's avatar
peastman committed
320
321

# How to display URL addresses: 'footnote', 'no', or 'inline'.
322
# texinfo_show_urls = 'footnote'