1 # -*- coding: utf-8 -*-
3 # Inform Beginner's Guide documentation build configuration file, created by
4 # sphinx-quickstart on Tue Mar 29 07:50:39 2016.
6 # This file is execfile()d with the current directory set to its
9 # Note that not all possible configuration values are present in this
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
20 # If extensions (or modules to document with autodoc) are in another directory,
21 # add these directories to sys.path here. If the directory is relative to the
22 # documentation root, use os.path.abspath to make it absolute, like shown here.
23 sys.path.insert(0, ".")
25 import tools.sphinxpatch
27 from tools.inform import InformLexer
28 from tools.transcript import TranscriptLexer
32 app.add_lexer('inform', InformLexer())
33 app.add_lexer('transcript', TranscriptLexer())
35 # -- General configuration ------------------------------------------------
37 # If your documentation needs a minimal Sphinx version, state it here.
40 # Add any Sphinx extension module names here, as strings. They can be
41 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
45 'sphinx.ext.extlinks',
49 # Add any paths that contain templates here, relative to this directory.
50 templates_path = ['templates']
52 # The suffix(es) of source filenames.
53 source_suffix = ['.rst']
55 # The encoding of source files.
56 #source_encoding = 'utf-8-sig'
58 # The master toctree document.
61 # General document information.
62 project = u"The Inform Beginner's Guide"
63 author = u"Roger Firth and Sonja Kesserich"
64 copyright = u'2004, ' + author
66 editor = "Dennis G. Jerz"
67 edition = "Third Edition: August 2004"
68 extra = "With a foreword by Graham Nelson"
70 licensetext = codecs.open('LICENSE', encoding='utf-8').read()
72 # The version info for the project you're documenting, acts as replacement
73 # for |version| and |release|, also used in various other places throughout
74 # the built documents.
76 # The short X.Y version.
78 # The full version, including alpha/beta/rc tags.
81 # The language for content autogenerated by Sphinx. Refer to documentation
82 # for a list of supported languages.
84 # This is also used if you do content translation via gettext catalogs.
85 # Usually you set "language" from the command line for these cases.
88 # There are two options for replacing |today|: either, you set today to some
89 # non-false value, then it is used:
91 # Else, today_fmt is used as the format for a strftime call.
92 #today_fmt = '%B %d, %Y'
94 # List of patterns, relative to source directory, that match files and
95 # directories to ignore when looking for source files.
96 exclude_patterns = ['config', 'output', 'tables']
98 # The reST default role (used for this markup: `text`) to use for all
102 # If true, '()' will be appended to :func: etc. cross-reference text.
103 #add_function_parentheses = True
105 # If true, the current module name will be prepended to all description
106 # unit titles (such as .. function::).
107 #add_module_names = True
109 # If true, sectionauthor and moduleauthor directives will be shown in the
110 # output. They are ignored by default.
111 #show_authors = False
113 # Global definitions.
114 rst_prolog = open("config/defs.rst").read()
118 'dm4': ("http://inform-fiction.org/manual/html/%s", ""),
121 # The name of the Pygments (syntax highlighting) style to use.
122 pygments_style = 'friendly'
124 # The default Pygments highlight language.
125 highlight_language = 'none'
127 # A list of ignored prefixes for module index sorting.
128 #modindex_common_prefix = []
130 # If true, keep warnings as "system message" paragraphs in the built documents.
131 #keep_warnings = False
133 # If true, `todo` and `todoList` produce output, else they produce nothing.
134 todo_include_todos = True
137 # -- Options for HTML output ----------------------------------------------
139 # The theme to use for HTML and HTML Help pages. See the documentation for
140 # a list of builtin themes.
141 html_theme = 'alabaster'
143 # Theme options are theme-specific and customize the look and feel of a theme
144 # further. For a list of options available for each theme, see the
146 html_theme_options = {
147 'font_family': 'Georgia',
148 'head_font_family': 'Georgia',
149 'page_width': '1050px',
150 'show_related': True,
153 # Add any paths that contain custom themes here, relative to this directory.
154 #html_theme_path = []
156 # The name for this set of Sphinx documents. If None, it defaults to
157 # "<project> v<release> documentation".
160 # A shorter title for the navigation bar. Default is the same as html_title.
161 #html_short_title = None
163 # The name of an image file (relative to this directory) to place at the top
167 # The name of an image file (within the static path) to use as favicon of the
168 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
172 # Add any paths that contain custom static files (such as style sheets) here,
173 # relative to this directory. They are copied after the builtin static files,
174 # so a file named "default.css" will overwrite the builtin "default.css".
175 #html_static_path = ['static']
177 # Add any extra paths that contain custom files (such as robots.txt or
178 # .htaccess) here, relative to this directory. These files are copied
179 # directly to the root of the documentation.
180 #html_extra_path = []
182 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
183 # using the given strftime format.
184 #html_last_updated_fmt = '%b %d, %Y'
186 # If true, SmartyPants will be used to convert quotes and dashes to
187 # typographically correct entities.
188 #html_use_smartypants = True
190 # Custom sidebar templates, maps document names to template names.
193 # Additional templates that should be rendered to pages, maps page names to
195 #html_additional_pages = {}
197 # If false, no module index is generated.
198 #html_domain_indices = True
200 # If false, no index is generated.
201 #html_use_index = True
203 # If true, the index is split into individual pages for each letter.
204 #html_split_index = False
206 # If true, links to the reST sources are added to the pages.
207 #html_show_sourcelink = True
209 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
210 #html_show_sphinx = True
212 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
213 #html_show_copyright = True
215 # If true, an OpenSearch description file will be output, and all pages will
216 # contain a <link> tag referring to it. The value of this option must be the
217 # base URL from which the finished HTML is served.
218 #html_use_opensearch = ''
220 # This is the file name suffix for HTML files (e.g. ".xhtml").
221 #html_file_suffix = None
223 # Language to be used for generating the HTML full-text search index.
224 # Sphinx supports the following languages:
225 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
226 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
227 #html_search_language = 'en'
229 # A dictionary with options for the search language support, empty by default.
230 # Now only 'ja' uses this config value
231 #html_search_options = {'type': 'default'}
233 # The name of a javascript file (relative to the configuration directory) that
234 # implements a search results scorer. If empty, the default will be used.
235 #html_search_scorer = 'scorer.js'
237 # Output file base name for HTML help builder.
238 htmlhelp_basename = 'IBG'
240 # -- Options for LaTeX output ---------------------------------------------
242 # Title page information.
243 latex_image = "harry_col"
244 latex_image_title = "First Steps"
245 latex_image_info = "(watercolour and crayon on paper, 2002) Harry Firth (2000-)"
246 latex_image_path = os.path.join('images', latex_image + '.png')
247 latex_additional_files = [latex_image_path]
249 template = string.Template(open('config/preamble.tex').read())
251 latex_contents = r"""
261 # The paper size ('letterpaper' or 'a4paper').
262 'papersize': 'a4paper',
264 # The font size ('10pt', '11pt' or '12pt').
267 # Additional stuff for the LaTeX preamble.
268 'preamble': template.substitute(title=project,
271 imagetitle=latex_image_title,
272 imageinfo=latex_image_info,
276 licensetext=licensetext),
278 'tableofcontents': latex_contents,
282 # Latex figure (float) alignment
283 #'figure_align': 'htbp',
286 # Grouping the document tree into LaTeX files. List of tuples
287 # (source start file, target name, title,
288 # author, documentclass [howto, manual, or own class]).
290 (master_doc, 'IBG.tex', project, author, 'howto'),
293 # The name of an image file (relative to this directory) to place at the top of
297 # For "manual" documents, if this is true, then toplevel headings are parts,
299 #latex_use_parts = False
301 # If true, show page references after internal links.
302 latex_show_pagerefs = True
304 # If true, show URL addresses after external links.
305 #latex_show_urls = False
307 # Documents to append as an appendix to all manuals.
308 #latex_appendices = []
310 # If false, no module index is generated.
311 #latex_domain_indices = True
314 # -- Options for manual page output ---------------------------------------
316 # One entry per manual page. List of tuples
317 # (source start file, name, description, authors, manual section).
319 (master_doc, 'IBG', project, [author], 1)
322 # If true, show URL addresses after external links.
323 #man_show_urls = False
326 # -- Options for Texinfo output -------------------------------------------
328 # Grouping the document tree into Texinfo files. List of tuples
329 # (source start file, target name, title, author,
330 # dir menu entry, description, category)
331 texinfo_documents = [
332 (master_doc, 'ibg', project,
333 author, project, 'Beginner\'s guide to Inform.',
337 # Documents to append as an appendix to all manuals.
338 #texinfo_appendices = []
340 # If false, no module index is generated.
341 #texinfo_domain_indices = True
343 # How to display URL addresses: 'footnote', 'no', or 'inline'.
344 #texinfo_show_urls = 'footnote'
346 # If true, do not generate a @detailmenu in the "Top" node's menu.
347 #texinfo_no_detailmenu = False
350 # -- Options for block diagrams -------------------------------------------
352 # The paths to truetype fonts. blockdiag_fontpath option accepts both
353 # single path string and list of paths.
354 blockdiag_fontpath = []
356 # The path to fontmap definitions.
357 blockdiag_fontmap = ""
359 # Render diagrams in antialias mode or not.
360 blockdiag_antialias = True
362 # Render diagrams as transparency or not.
363 blockdiag_transparency = True
365 # The output image format at generating HTML docs ("PNG" or "SVG").
366 blockdiag_html_image_format = "SVG"
368 # The output image format at generating PDF docs (through LaTeX). ("PNG" or
369 # "PDF"). When a value of PDF is specified, you can get clear diagram
370 # images. In which case, reportlab library is required.
371 blockdiag_latex_image_format = "PNG"
373 # Enable debug mode of blockdiag.
374 blockdiag_debug = False