1# Default settings
2project = 'test-builds'
3extensions = [
4 'sphinx_autorun',
5]
6
7# Include all your settings here
8html_theme = 'sphinx_rtd_theme'
9
10
11
12
13###########################################################################
14# auto-created readthedocs.org specific configuration #
15###########################################################################
16
17
18#
19# The following code was added during an automated build on readthedocs.org
20# It is auto created and injected for every build. The result is based on the
21# conf.py.tmpl file found in the readthedocs.org codebase:
22# https://github.com/rtfd/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
23#
24# Note: this file shouldn't rely on extra dependencies.
25
26import importlib
27import sys
28import os.path
29
30# Borrowed from six.
31PY3 = sys.version_info[0] == 3
32string_types = str if PY3 else basestring
33
34from sphinx import version_info
35
36# Get suffix for proper linking to GitHub
37# This is deprecated in Sphinx 1.3+,
38# as each page can have its own suffix
39if globals().get('source_suffix', False):
40 if isinstance(source_suffix, string_types):
41 SUFFIX = source_suffix
42 elif isinstance(source_suffix, (list, tuple)):
43 # Sphinx >= 1.3 supports list/tuple to define multiple suffixes
44 SUFFIX = source_suffix[0]
45 elif isinstance(source_suffix, dict):
46 # Sphinx >= 1.8 supports a mapping dictionary for multiple suffixes
47 SUFFIX = list(source_suffix.keys())[0] # make a ``list()`` for py2/py3 compatibility
48 else:
49 # default to .rst
50 SUFFIX = '.rst'
51else:
52 SUFFIX = '.rst'
53
54# Add RTD Static Path. Add to the end because it overwrites previous files.
55if not 'html_static_path' in globals():
56 html_static_path = []
57if os.path.exists('_static'):
58 html_static_path.append('_static')
59
60# Add RTD Theme only if they aren't overriding it already
61using_rtd_theme = (
62 (
63 'html_theme' in globals() and
64 html_theme in ['default'] and
65 # Allow people to bail with a hack of having an html_style
66 'html_style' not in globals()
67 ) or 'html_theme' not in globals()
68)
69if using_rtd_theme:
70 theme = importlib.import_module('sphinx_rtd_theme')
71 html_theme = 'sphinx_rtd_theme'
72 html_style = None
73 html_theme_options = {}
74 if 'html_theme_path' in globals():
75 html_theme_path.append(theme.get_html_theme_path())
76 else:
77 html_theme_path = [theme.get_html_theme_path()]
78
79if globals().get('websupport2_base_url', False):
80 websupport2_base_url = 'https://readthedocs.org/websupport'
81 websupport2_static_url = 'https://assets.readthedocs.org/static/'
82
83
84#Add project information to the template context.
85context = {
86 'using_theme': using_rtd_theme,
87 'html_theme': html_theme,
88 'current_version': "sphinx-tectonic-pdf",
89 'version_slug': "sphinx-tectonic-pdf",
90 'MEDIA_URL': "https://media.readthedocs.org/",
91 'STATIC_URL': "https://assets.readthedocs.org/static/",
92 'PRODUCTION_DOMAIN': "readthedocs.org",
93 'proxied_static_path': "/_/static/",
94 'versions': [
95 ("latest", "/en/latest/"),
96 ("4.0", "/en/4.0/"),
97 ("2.0", "/en/2.0/"),
98 ("yaml-v2", "/en/yaml-v2/"),
99 ("wormhole", "/en/wormhole/"),
100 ("use-requirements-from-submodule", "/en/use-requirements-from-submodule/"),
101 ("use-apt", "/en/use-apt/"),
102 ("unicode-filename", "/en/unicode-filename/"),
103 ("d--branch", "/en/d--branch/"),
104 ("ubuntu-22.04", "/en/ubuntu-22.04/"),
105 ("typlog-theme", "/en/typlog-theme/"),
106 ("timetestlarge", "/en/timetestlarge/"),
107 ("timetest", "/en/timetest/"),
108 ("timeout", "/en/timeout/"),
109 ("throw-exception", "/en/throw-exception/"),
110 ("test-paths-with-spaces", "/en/test-paths-with-spaces/"),
111 ("testing-activate-version", "/en/testing-activate-version/"),
112 ("sudo-commands", "/en/sudo-commands/"),
113 ("submodule-not-found", "/en/submodule-not-found/"),
114 ("submodule-https-scheme", "/en/submodule-https-scheme/"),
115 ("submodule-git-scheme", "/en/submodule-git-scheme/"),
116 ("sphinx-tectonic-pdf", "/en/sphinx-tectonic-pdf/"),
117 ("sphinx-tabs", "/en/sphinx-tabs/"),
118 ("sphinx-mkdocstrings", "/en/sphinx-mkdocstrings/"),
119 ("sphinx-latest", "/en/sphinx-latest/"),
120 ("sphinx.ext.duration", "/en/sphinx.ext.duration/"),
121 ("sphinx-es-suggest", "/en/sphinx-es-suggest/"),
122 ("sphinx-docs-zundler", "/en/sphinx-docs-zundler/"),
123 ("sphinx-conf-nonstandard", "/en/sphinx-conf-nonstandard/"),
124 ("sphinx6.x-default", "/en/sphinx6.x-default/"),
125 ("sphinx5.x-default-confpy", "/en/sphinx5.x-default-confpy/"),
126 ("sphinx-5.x", "/en/sphinx-5.x/"),
127 ("skip-build-command", "/en/skip-build-command/"),
128 ("singlehtml", "/en/singlehtml/"),
129 ("shot-scraper", "/en/shot-scraper/"),
130 ("search-with-old-sphinx-and-theme", "/en/search-with-old-sphinx-and-theme/"),
131 ("rust", "/en/rust/"),
132 ("robots-txt", "/en/robots-txt/"),
133 ("requirements-not-found", "/en/requirements-not-found/"),
134 ("regular-404-page", "/en/regular-404-page/"),
135 ("recommonmark", "/en/recommonmark/"),
136 ("pypy3.5", "/en/pypy3.5/"),
137 ("pygments-custom-lexer-apex", "/en/pygments-custom-lexer-apex/"),
138 ("py3.9", "/en/py3.9/"),
139 ("py3.8", "/en/py3.8/"),
140 ("py3.11", "/en/py3.11/"),
141 ("py3.10", "/en/py3.10/"),
142 ("pr-visual-diff", "/en/pr-visual-diff/"),
143 ("pr-homepage-edition", "/en/pr-homepage-edition/"),
144 ("poetry-asdf", "/en/poetry-asdf/"),
145 ("poetry", "/en/poetry/"),
146 ("pelican", "/en/pelican/"),
147 ("path-with-plus", "/en/path-with-plus/"),
148 ("no-conf-py", "/en/no-conf-py/"),
149 ("no-config-file", "/en/no-config-file/"),
150 ("nbsphinx-3d-plot", "/en/nbsphinx-3d-plot/"),
151 ("multiple-source-suffix", "/en/multiple-source-suffix/"),
152 ("mkdocs-python-tags", "/en/mkdocs-python-tags/"),
153 ("mkdocs-pdf", "/en/mkdocs-pdf/"),
154 ("mkdocs-htmlzip", "/en/mkdocs-htmlzip/"),
155 ("mkdocs-config-at-root", "/en/mkdocs-config-at-root/"),
156 ("mkdocs", "/en/mkdocs/"),
157 ("meta-tags", "/en/meta-tags/"),
158 ("mamba", "/en/mamba/"),
159 ("jsdoc-autoapi", "/en/jsdoc-autoapi/"),
160 ("jsdoc", "/en/jsdoc/"),
161 ("japanese-pdf", "/en/japanese-pdf/"),
162 ("invalid-submodules", "/en/invalid-submodules/"),
163 ("install-setuptools", "/en/install-setuptools/"),
164 ("huge-build-output", "/en/huge-build-output/"),
165 ("htmldir", "/en/htmldir/"),
166 ("git-submodules-invalid", "/en/git-submodules-invalid/"),
167 ("git-submodules", "/en/git-submodules/"),
168 ("git-lfs-build-jobs", "/en/git-lfs-build-jobs/"),
169 ("file-with-apostrophe", "/en/file-with-apostrophe/"),
170 ("expose-env-pip-error", "/en/expose-env-pip-error/"),
171 ("explicit-flyout-placement", "/en/explicit-flyout-placement/"),
172 ("envvar-config-file", "/en/envvar-config-file/"),
173 ("environment-variables", "/en/environment-variables/"),
174 ("docusaurus", "/en/docusaurus/"),
175 ("docsify-ads", "/en/docsify-ads/"),
176 ("docsify", "/en/docsify/"),
177 ("datetime", "/en/datetime/"),
178 ("d2lbook", "/en/d2lbook/"),
179 ("custom-404-page", "/en/custom-404-page/"),
180 ("conda-pin-common-deps", "/en/conda-pin-common-deps/"),
181 ("conda-env-py3.7", "/en/conda-env-py3.7/"),
182 ("conda-env-no-py-pinned", "/en/conda-env-no-py-pinned/"),
183 ("conda-env", "/en/conda-env/"),
184 ("c-dependencies", "/en/c-dependencies/"),
185 ("build-tools-mamba", "/en/build-tools-mamba/"),
186 ("build-tools-conda", "/en/build-tools-conda/"),
187 ("build-tools", "/en/build-tools/"),
188 ("build-os-error-message", "/en/build-os-error-message/"),
189 ("build-jobs-spaces-in-command", "/en/build-jobs-spaces-in-command/"),
190 ("build-jobs-post-build", "/en/build-jobs-post-build/"),
191 ("build-jobs-multiline", "/en/build-jobs-multiline/"),
192 ("build-jobs-diff-exit", "/en/build-jobs-diff-exit/"),
193 ("build-jobs", "/en/build-jobs/"),
194 ("build-internals", "/en/build-internals/"),
195 ("build-commands-env-vars", "/en/build-commands-env-vars/"),
196 ("build-commands", "/en/build-commands/"),
197 ("another-matching-branch", "/en/another-matching-branch/"),
198 ("annotated-tag", "/en/annotated-tag/"),
199 ("all-formats-build-jobs", "/en/all-formats-build-jobs/"),
200 ("all-formats-build-commands", "/en/all-formats-build-commands/"),
201 ("all-formats", "/en/all-formats/"),
202 ("alabaster-theme", "/en/alabaster-theme/"),
203 ],
204 'downloads': [
205 ],
206 'subprojects': [
207 ],
208 'slug': 'test-builds',
209 'name': u'test-builds',
210 'rtd_language': u'en',
211 'programming_language': u'words',
212 'canonical_url': 'https://test-builds.readthedocs.io/en/latest/',
213 'analytics_code': 'UA-12341234-1',
214 'single_version': False,
215 'conf_py_path': '/docs/',
216 'api_host': 'https://readthedocs.org',
217 'github_user': 'readthedocs',
218 'proxied_api_host': '/_',
219 'github_repo': 'test-builds',
220 'github_version': 'sphinx-tectonic-pdf',
221 'display_github': True,
222 'bitbucket_user': 'None',
223 'bitbucket_repo': 'None',
224 'bitbucket_version': 'sphinx-tectonic-pdf',
225 'display_bitbucket': False,
226 'gitlab_user': 'None',
227 'gitlab_repo': 'None',
228 'gitlab_version': 'sphinx-tectonic-pdf',
229 'display_gitlab': False,
230 'READTHEDOCS': True,
231 'using_theme': (html_theme == "default"),
232 'new_theme': (html_theme == "sphinx_rtd_theme"),
233 'source_suffix': SUFFIX,
234 'ad_free': False,
235 'docsearch_disabled': False,
236 'user_analytics_code': 'UA-12341234-1',
237 'global_analytics_code': None,
238 'commit': 'd98dc63c',
239}
240
241# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
242# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
243if version_info >= (1, 8):
244 if not globals().get('html_baseurl'):
245 html_baseurl = context['canonical_url']
246 context['canonical_url'] = None
247
248
249
250
251
252if 'html_context' in globals():
253
254 html_context.update(context)
255
256else:
257 html_context = context
258
259# Add custom RTD extension
260if 'extensions' in globals():
261 # Insert at the beginning because it can interfere
262 # with other extensions.
263 # See https://github.com/rtfd/readthedocs.org/pull/4054
264 extensions.insert(0, "readthedocs_ext.readthedocs")
265else:
266 extensions = ["readthedocs_ext.readthedocs"]
267
268# Add External version warning banner to the external version documentation
269if 'branch' == 'external':
270 extensions.insert(1, "readthedocs_ext.external_version_warning")
271 readthedocs_vcs_url = 'None'
272 readthedocs_build_url = 'https://readthedocs.org/projects/test-builds/builds/19330671/'
273
274project_language = 'en'
275
276# User's Sphinx configurations
277language_user = globals().get('language', None)
278latex_engine_user = globals().get('latex_engine', None)
279latex_elements_user = globals().get('latex_elements', None)
280
281# Remove this once xindy gets installed in Docker image and XINDYOPS
282# env variable is supported
283# https://github.com/rtfd/readthedocs-docker-images/pull/98
284latex_use_xindy = False
285
286chinese = any([
287 language_user in ('zh_CN', 'zh_TW'),
288 project_language in ('zh_CN', 'zh_TW'),
289])
290
291japanese = any([
292 language_user == 'ja',
293 project_language == 'ja',
294])
295
296if chinese:
297 latex_engine = latex_engine_user or 'xelatex'
298
299 latex_elements_rtd = {
300 'preamble': '\\usepackage[UTF8]{ctex}\n',
301 }
302 latex_elements = latex_elements_user or latex_elements_rtd
303elif japanese:
304 latex_engine = latex_engine_user or 'platex'
305
306# Make sure our build directory is always excluded
307exclude_patterns = globals().get('exclude_patterns', [])
308exclude_patterns.extend(['_build'])