Remove conversion notes from README.
[ibg.git] / conf.py
1 # -*- coding: utf-8 -*-
2 #
3 # Inform Beginner's Guide documentation build configuration file, created by
4 # sphinx-quickstart on Tue Mar 29 07:50:39 2016.
5 #
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
14
15 import os
16 import sys
17 import string
18 import codecs
19
20 import alabaster
21 if alabaster.version.__version_info__ < (0, 7, 8):
22     raise RuntimeError("requires albaster 0.7.8 or newer")
23
24 # If extensions (or modules to document with autodoc) are in another directory,
25 # add these directories to sys.path here. If the directory is relative to the
26 # documentation root, use os.path.abspath to make it absolute, like shown here.
27 sys.path.insert(0, ".")
28
29 import tools.sphinxpatch
30
31 from tools.inform import InformLexer
32 from tools.transcript import TranscriptLexer
33
34 # Setup function.
35 def setup(app):
36     app.add_lexer('inform', InformLexer())
37     app.add_lexer('transcript', TranscriptLexer())
38
39 # -- General configuration ------------------------------------------------
40
41 # If your documentation needs a minimal Sphinx version, state it here.
42 #needs_sphinx = '1.0'
43
44 # Add any Sphinx extension module names here, as strings. They can be
45 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
46 # ones.
47 extensions = [
48     'sphinx.ext.todo',
49     'sphinx.ext.extlinks',
50     'tools.blockdiag',
51 ]
52
53 # Add any paths that contain templates here, relative to this directory.
54 templates_path = ['templates']
55
56 # The suffix(es) of source filenames.
57 source_suffix = ['.rst']
58
59 # The encoding of source files.
60 #source_encoding = 'utf-8-sig'
61
62 # The master toctree document.
63 master_doc = 'index'
64
65 # General document information.
66 project = u"The Inform Beginner's Guide"
67 author = u"Roger Firth and Sonja Kesserich"
68 copyright = u'2004, ' + author
69
70 editor = "Dennis G. Jerz"
71 edition = "Third Edition: August 2004"
72 extra = "With a foreword by Graham Nelson"
73
74 licensetext = codecs.open('LICENSE', encoding='utf-8').read()
75
76 # The version info for the project you're documenting, acts as replacement
77 # for |version| and |release|, also used in various other places throughout
78 # the built documents.
79 #
80 # The short X.Y version.
81 version = '3'
82 # The full version, including alpha/beta/rc tags.
83 release = version
84
85 # The language for content autogenerated by Sphinx. Refer to documentation
86 # for a list of supported languages.
87 #
88 # This is also used if you do content translation via gettext catalogs.
89 # Usually you set "language" from the command line for these cases.
90 language = None
91
92 # There are two options for replacing |today|: either, you set today to some
93 # non-false value, then it is used:
94 #today = ''
95 # Else, today_fmt is used as the format for a strftime call.
96 #today_fmt = '%B %d, %Y'
97
98 # List of patterns, relative to source directory, that match files and
99 # directories to ignore when looking for source files.
100 exclude_patterns = ['config', 'output', 'tables']
101
102 # The reST default role (used for this markup: `text`) to use for all
103 # documents.
104 default_role = "any"
105
106 # If true, '()' will be appended to :func: etc. cross-reference text.
107 #add_function_parentheses = True
108
109 # If true, the current module name will be prepended to all description
110 # unit titles (such as .. function::).
111 #add_module_names = True
112
113 # If true, sectionauthor and moduleauthor directives will be shown in the
114 # output. They are ignored by default.
115 #show_authors = False
116
117 # Global definitions.
118 rst_prolog = open("config/defs.rst").read()
119
120 # External links.
121 extlinks = {
122     'dm4': ("http://inform-fiction.org/manual/html/%s", ""),
123 }
124
125 # The name of the Pygments (syntax highlighting) style to use.
126 pygments_style = 'friendly'
127
128 # The default Pygments highlight language.
129 highlight_language = 'none'
130
131 # A list of ignored prefixes for module index sorting.
132 #modindex_common_prefix = []
133
134 # If true, keep warnings as "system message" paragraphs in the built documents.
135 #keep_warnings = False
136
137 # If true, `todo` and `todoList` produce output, else they produce nothing.
138 todo_include_todos = True
139
140 # Turn off default domain.
141 primary_domain = None
142
143
144 # -- Options for HTML output ----------------------------------------------
145
146 # The theme to use for HTML and HTML Help pages.  See the documentation for
147 # a list of builtin themes.
148 html_theme = 'alabaster'
149
150 # Override a few things with local CSS style.
151 html_style = "ibg.css"
152
153 # Theme options are theme-specific and customize the look and feel of a theme
154 # further.  For a list of options available for each theme, see the
155 # documentation.
156 html_theme_options = {
157     'font_family': 'Georgia',
158     'head_font_family': 'Georgia',
159     'page_width': '1050px',
160     'show_related': True,
161     'fixed_sidebar': True,
162 }
163
164 # Add any paths that contain custom themes here, relative to this directory.
165 #html_theme_path = []
166
167 # The name for this set of Sphinx documents.  If None, it defaults to
168 # "<project> v<release> documentation".
169 html_title = project
170
171 # A shorter title for the navigation bar.  Default is the same as html_title.
172 #html_short_title = None
173
174 # The name of an image file (relative to this directory) to place at the top
175 # of the sidebar.
176 #html_logo = None
177
178 # The name of an image file (within the static path) to use as favicon of the
179 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
180 # pixels large.
181 #html_favicon = None
182
183 # Add any paths that contain custom static files (such as style sheets) here,
184 # relative to this directory. They are copied after the builtin static files,
185 # so a file named "default.css" will overwrite the builtin "default.css".
186 html_static_path = ['static']
187
188 # Add any extra paths that contain custom files (such as robots.txt or
189 # .htaccess) here, relative to this directory. These files are copied
190 # directly to the root of the documentation.
191 #html_extra_path = []
192
193 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
194 # using the given strftime format.
195 #html_last_updated_fmt = '%b %d, %Y'
196
197 # If true, SmartyPants will be used to convert quotes and dashes to
198 # typographically correct entities.
199 #html_use_smartypants = True
200
201 # Custom sidebar templates, maps document names to template names.
202 #html_sidebars = {}
203
204 # Additional templates that should be rendered to pages, maps page names to
205 # template names.
206 #html_additional_pages = {}
207
208 # If false, no module index is generated.
209 #html_domain_indices = True
210
211 # If false, no index is generated.
212 #html_use_index = True
213
214 # If true, the index is split into individual pages for each letter.
215 #html_split_index = False
216
217 # If true, links to the reST sources are added to the pages.
218 #html_show_sourcelink = True
219
220 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
221 #html_show_sphinx = True
222
223 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
224 #html_show_copyright = True
225
226 # If true, an OpenSearch description file will be output, and all pages will
227 # contain a <link> tag referring to it.  The value of this option must be the
228 # base URL from which the finished HTML is served.
229 #html_use_opensearch = ''
230
231 # This is the file name suffix for HTML files (e.g. ".xhtml").
232 #html_file_suffix = None
233
234 # Language to be used for generating the HTML full-text search index.
235 # Sphinx supports the following languages:
236 #   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
237 #   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
238 #html_search_language = 'en'
239
240 # A dictionary with options for the search language support, empty by default.
241 # Now only 'ja' uses this config value
242 #html_search_options = {'type': 'default'}
243
244 # The name of a javascript file (relative to the configuration directory) that
245 # implements a search results scorer. If empty, the default will be used.
246 #html_search_scorer = 'scorer.js'
247
248 # Output file base name for HTML help builder.
249 htmlhelp_basename = 'IBG'
250
251 # -- Options for LaTeX output ---------------------------------------------
252
253 # Title page information.
254 latex_image = "harry_col"
255 latex_image_title = "First Steps"
256 latex_image_info = "(watercolour and crayon on paper, 2002) Harry Firth (2000-)"
257 latex_image_path = os.path.join('images', latex_image + '.png')
258 latex_additional_files = [latex_image_path]
259
260 template = string.Template(open('config/preamble.tex').read())
261
262 latex_contents = r"""
263 \coverpage
264 \licensepage
265 \historypage
266 \contentspage
267 \newpage
268 \maintext
269 """
270
271 latex_elements = {
272     # The paper size ('letterpaper' or 'a4paper').
273     'papersize': 'a4paper',
274
275     # The font size ('10pt', '11pt' or '12pt').
276     'pointsize': '12pt',
277
278     # Additional stuff for the LaTeX preamble.
279     'preamble': template.substitute(title=project,
280                                     author=author,
281                                     image=latex_image,
282                                     imagetitle=latex_image_title,
283                                     imageinfo=latex_image_info,
284                                     editor=editor,
285                                     edition=edition,
286                                     extra=extra,
287                                     licensetext=licensetext),
288
289     'tableofcontents': latex_contents,
290
291     'fontpkg': '',
292
293     # Latex figure (float) alignment
294     #'figure_align': 'htbp',
295 }
296  
297 # Grouping the document tree into LaTeX files. List of tuples
298 # (source start file, target name, title,
299 #  author, documentclass [howto, manual, or own class]).
300 latex_documents = [
301     (master_doc, 'IBG.tex', project, author, 'howto'),
302 ]
303
304 # The name of an image file (relative to this directory) to place at the top of
305 # the title page.
306 #latex_logo = None
307
308 # For "manual" documents, if this is true, then toplevel headings are parts,
309 # not chapters.
310 #latex_use_parts = False
311
312 # If true, show page references after internal links.
313 latex_show_pagerefs = True
314
315 # If true, show URL addresses after external links.
316 #latex_show_urls = False
317
318 # Documents to append as an appendix to all manuals.
319 #latex_appendices = []
320
321 # If false, no module index is generated.
322 #latex_domain_indices = True
323
324
325 # -- Options for manual page output ---------------------------------------
326
327 # One entry per manual page. List of tuples
328 # (source start file, name, description, authors, manual section).
329 man_pages = [
330     (master_doc, 'IBG', project, [author], 1)
331 ]
332
333 # If true, show URL addresses after external links.
334 #man_show_urls = False
335
336
337 # -- Options for Texinfo output -------------------------------------------
338
339 # Grouping the document tree into Texinfo files. List of tuples
340 # (source start file, target name, title, author,
341 #  dir menu entry, description, category)
342 texinfo_documents = [
343   (master_doc, 'ibg', project,
344    author, project, 'Beginner\'s guide to Inform.',
345    'Games'),
346 ]
347
348 # Documents to append as an appendix to all manuals.
349 #texinfo_appendices = []
350
351 # If false, no module index is generated.
352 #texinfo_domain_indices = True
353
354 # How to display URL addresses: 'footnote', 'no', or 'inline'.
355 #texinfo_show_urls = 'footnote'
356
357 # If true, do not generate a @detailmenu in the "Top" node's menu.
358 #texinfo_no_detailmenu = False
359
360
361 # -- Options for block diagrams -------------------------------------------
362
363 # The paths to truetype fonts. blockdiag_fontpath option accepts both
364 # single path string and list of paths.
365 blockdiag_fontpath = []
366
367 # The path to fontmap definitions.
368 blockdiag_fontmap = ""
369
370 # Render diagrams in antialias mode or not.
371 blockdiag_antialias = True
372
373 # Render diagrams as transparency or not.
374 blockdiag_transparency = True
375
376 # The output image format at generating HTML docs ("PNG" or "SVG").
377 blockdiag_html_image_format = "SVG"
378
379 # The output image format at generating PDF docs (through LaTeX). ("PNG" or
380 # "PDF").  When a value of PDF is specified, you can get clear diagram
381 # images. In which case, reportlab library is required.
382 blockdiag_latex_image_format = "PNG"
383
384 # Enable debug mode of blockdiag.
385 blockdiag_debug = False