conf.py 9.7 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
extensions = ["autonumber"]

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

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

# The suffix of source filenames.
44
source_suffix = ".rst"
peastman's avatar
peastman committed
45
46

# The encoding of source files.
47
# source_encoding = 'utf-8-sig'
peastman's avatar
peastman committed
48
49

# The master toctree document.
50
master_doc = "index"
peastman's avatar
peastman committed
51
52

# General information about the project.
53
54
project = u"OpenMM Dev Guide"
copyright = u"2011-2017, Stanford University"
peastman's avatar
peastman committed
55
56
57
58
59
60

# 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.
61
version = os.getenv("OPENMM_VERSION")
peastman's avatar
peastman committed
62
# The full version, including alpha/beta/rc tags.
63
release = os.getenv("OPENMM_VERSION")
peastman's avatar
peastman committed
64
65
66

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
67
# language = None
peastman's avatar
peastman committed
68
69
70

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
71
# today = ''
peastman's avatar
peastman committed
72
# Else, today_fmt is used as the format for a strftime call.
73
# today_fmt = '%B %d, %Y'
peastman's avatar
peastman committed
74
75
76

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

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

# If true, '()' will be appended to :func: etc. cross-reference text.
83
# add_function_parentheses = True
peastman's avatar
peastman committed
84
85
86

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
87
# add_module_names = True
peastman's avatar
peastman committed
88
89
90

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

# The name of the Pygments (syntax highlighting) style to use.
94
pygments_style = "sphinx"
peastman's avatar
peastman committed
95
96

# A list of ignored prefixes for module index sorting.
97
# modindex_common_prefix = []
peastman's avatar
peastman committed
98
99
100
101
102
103


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

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
104
html_theme = "alabaster"
peastman's avatar
peastman committed
105
106
107
108

# 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.
109
110
111
112
113
114
115
116
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
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": "User's Manual",
            "uri": "../userguide/",
            "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
146
147

# Add any paths that contain custom themes here, relative to this directory.
148
# html_theme_path = []
peastman's avatar
peastman committed
149
150
151

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

# A shorter title for the navigation bar.  Default is the same as html_title.
155
# html_short_title = None
peastman's avatar
peastman committed
156
157
158

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
159
# html_logo = None
peastman's avatar
peastman committed
160
161
162
163

# 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.
164
# html_favicon = None
peastman's avatar
peastman committed
165
166
167
168

# 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".
169
html_static_path = ["_static"]
peastman's avatar
peastman committed
170
171
172

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

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
177
# html_use_smartypants = True
peastman's avatar
peastman committed
178
179

# Custom sidebar templates, maps document names to template names.
180
# html_sidebars = {}
peastman's avatar
peastman committed
181
182
183

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

# If false, no module index is generated.
187
# html_domain_indices = True
peastman's avatar
peastman committed
188
189

# If false, no index is generated.
190
html_use_index = False
peastman's avatar
peastman committed
191
192

# If true, the index is split into individual pages for each letter.
193
# html_split_index = False
peastman's avatar
peastman committed
194
195

# If true, links to the reST sources are added to the pages.
196
# html_show_sourcelink = True
peastman's avatar
peastman committed
197
198

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

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
202
# html_show_copyright = True
peastman's avatar
peastman committed
203
204
205
206

# 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.
207
# html_use_opensearch = ''
peastman's avatar
peastman committed
208
209

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

# Output file base name for HTML help builder.
213
htmlhelp_basename = "OpenMMDeveloperGuidedoc"
peastman's avatar
peastman committed
214
215
216
217


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

218
latex_engine = "xelatex"
219
latex_use_xindy = False
peastman's avatar
peastman committed
220
latex_elements = {
221
222
223
224
225
226
    # 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
227
228
229
230
231
232
    \\usepackage[none]{hyphenat}
    \\usepackage{xstring}
    \\usepackage{color}
    \\usepackage{caption}
    \\setcounter{tocdepth}{3}
    \\captionsetup[figure]{labelformat=empty}
Levi Naden's avatar
Levi Naden committed
233
    % Backwards compatibility for sphinx < 1.5
234
    \\let\\DUspan\\null % force DUspan to be defined
peastman's avatar
peastman committed
235
236
    \\renewcommand{\DUspan}[2]{%
        \\IfEqCase{#1}{%
237
            {code}{\\small{}\\texttt{#2}\\normalsize{}}
peastman's avatar
peastman committed
238
        }[\\PackageError{DUspan}{Unrecognized option passed to DUspan: #1}{}]%
239
    }%
Levi Naden's avatar
Levi Naden committed
240
    % Sphinx > 1.5 compatibility (github.com/sphinx-doc/sphinx/issues/2231)
241
242
    \\newcommand{\\DUrolecode}[1]{%
        \\small{}\\texttt{#1}\\normalsize{}%
peastman's avatar
peastman committed
243
244
245
246
247
248
    }%""",
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
249
250
251
252
253
254
255
    (
        "index",
        "OpenMMDeveloperGuide.tex",
        u"OpenMM Developer Guide",
        u"Peter Eastman",
        "manual",
    ),
peastman's avatar
peastman committed
256
257
258
259
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
260
# latex_logo = None
peastman's avatar
peastman committed
261
262
263

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
264
# latex_use_parts = False
peastman's avatar
peastman committed
265
266

# If true, show page references after internal links.
267
# latex_show_pagerefs = False
peastman's avatar
peastman committed
268
269

# If true, show URL addresses after external links.
270
# latex_show_urls = False
peastman's avatar
peastman committed
271
272

# Documents to append as an appendix to all manuals.
273
# latex_appendices = []
peastman's avatar
peastman committed
274
275

# If false, no module index is generated.
276
# latex_domain_indices = True
peastman's avatar
peastman committed
277
278
279
280
281
282
283


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

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
284
    ("index", "openmmdeveloperguide", u"OpenMM Developer Guide", [u"Peter Eastman"], 1)
peastman's avatar
peastman committed
285
286
287
]

# If true, show URL addresses after external links.
288
# man_show_urls = False
peastman's avatar
peastman committed
289
290
291
292
293
294
295
296


# -- 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 = [
297
298
299
300
301
302
303
304
305
    (
        "index",
        "OpenMMDeveloperGuide",
        u"OpenMM Developer Guide",
        u"Peter Eastman",
        "OpenMMDeveloperGuide",
        "One line description of project.",
        "Miscellaneous",
    ),
peastman's avatar
peastman committed
306
307
308
]

# Documents to append as an appendix to all manuals.
309
# texinfo_appendices = []
peastman's avatar
peastman committed
310
311

# If false, no module index is generated.
312
# texinfo_domain_indices = True
peastman's avatar
peastman committed
313
314

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