conf.py 9.93 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
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,
        },
144
145
146
147
148
        {
            "title": "Cookbook & Tutorials",
            "uri": "https://openmm.github.io/openmm-cookbook/",
            "relative": False,
        },
149
150
151
152
153
154
155
156
157
158
        {
            "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
159
160

# Add any paths that contain custom themes here, relative to this directory.
161
# html_theme_path = []
peastman's avatar
peastman committed
162
163
164

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

# A shorter title for the navigation bar.  Default is the same as html_title.
168
# html_short_title = None
peastman's avatar
peastman committed
169
170
171

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
172
# html_logo = None
peastman's avatar
peastman committed
173
174
175
176

# 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.
177
# html_favicon = None
peastman's avatar
peastman committed
178
179
180
181

# 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".
182
html_static_path = ["_static"]
peastman's avatar
peastman committed
183
184
185

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

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
190
# html_use_smartypants = True
peastman's avatar
peastman committed
191
192
193

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

# If false, no module index is generated.
197
# html_domain_indices = True
peastman's avatar
peastman committed
198
199

# If false, no index is generated.
200
html_use_index = True
peastman's avatar
peastman committed
201
202

# If true, the index is split into individual pages for each letter.
203
# html_split_index = False
peastman's avatar
peastman committed
204
205

# If true, links to the reST sources are added to the pages.
206
# html_show_sourcelink = True
peastman's avatar
peastman committed
207
208

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

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
212
# html_show_copyright = True
peastman's avatar
peastman committed
213
214
215
216

# 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.
217
# html_use_opensearch = ''
peastman's avatar
peastman committed
218
219

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

# Output file base name for HTML help builder.
223
htmlhelp_basename = "OpenMMUsersGuidedoc"
peastman's avatar
peastman committed
224
225
226
227


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

228
latex_engine = "xelatex"
229
latex_use_xindy = False
peastman's avatar
peastman committed
230
latex_elements = {
231
232
233
234
235
236
    # 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
237
238
239
240
241
242
    \\usepackage[none]{hyphenat}
    \\usepackage{xstring}
    \\usepackage{color}
    \\usepackage{caption}
    \\setcounter{tocdepth}{3}
    \\captionsetup[figure]{labelformat=empty}
Levi Naden's avatar
Levi Naden committed
243
    % Backwards compatibility for sphinx < 1.5
244
    \\let\\DUspan\\null % force DUspan to be defined
245
    \\renewcommand{\\DUspan}[2]{%
peastman's avatar
peastman committed
246
        \\IfEqCase{#1}{%
247
            {code}{\\small{}\\texttt{#2}\\normalsize{}}
peastman's avatar
peastman committed
248
        }[\\PackageError{DUspan}{Unrecognized option passed to DUspan: #1}{}]%
249
    }%
Levi Naden's avatar
Levi Naden committed
250
    % Sphinx > 1.5 compatibility (github.com/sphinx-doc/sphinx/issues/2231)
251
252
    \\newcommand{\\DUrolecode}[1]{%
        \\small{}\\texttt{#1}\\normalsize{}%
peastman's avatar
peastman committed
253
    }%""",
254
255
    # Omit the index.
    "printindex": "",
peastman's avatar
peastman committed
256
257
258
259
260
}

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

# The name of an image file (relative to this directory) to place at the top of
# the title page.
272
# latex_logo = None
peastman's avatar
peastman committed
273
274
275

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

# If true, show page references after internal links.
279
# latex_show_pagerefs = False
peastman's avatar
peastman committed
280
281

# If true, show URL addresses after external links.
282
# latex_show_urls = False
peastman's avatar
peastman committed
283
284

# Documents to append as an appendix to all manuals.
285
# latex_appendices = []
peastman's avatar
peastman committed
286
287

# If false, no module index is generated.
288
# latex_domain_indices = True
peastman's avatar
peastman committed
289
290
291
292
293
294
295


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

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

# If true, show URL addresses after external links.
300
# man_show_urls = False
peastman's avatar
peastman committed
301
302
303
304
305
306
307
308


# -- 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 = [
309
310
311
312
313
314
315
316
317
    (
        "index",
        "OpenMMUsersGuide",
        u"OpenMM Users Guide",
        u"Peter Eastman",
        "OpenMMUsersGuide",
        "One line description of project.",
        "Miscellaneous",
    ),
peastman's avatar
peastman committed
318
319
320
]

# Documents to append as an appendix to all manuals.
321
# texinfo_appendices = []
peastman's avatar
peastman committed
322
323

# If false, no module index is generated.
324
# texinfo_domain_indices = True
peastman's avatar
peastman committed
325
326

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