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 substitutions.
115 .. |DM4| replace:: *Inform Designer's Manual*
120 'dm4': ("http://inform-fiction.org/manual/html/%s", ""),
123 # The name of the Pygments (syntax highlighting) style to use.
124 pygments_style = 'friendly'
126 # The default Pygments highlight language.
127 highlight_language = 'none'
129 # A list of ignored prefixes for module index sorting.
130 #modindex_common_prefix = []
132 # If true, keep warnings as "system message" paragraphs in the built documents.
133 #keep_warnings = False
135 # If true, `todo` and `todoList` produce output, else they produce nothing.
136 todo_include_todos = True
139 # -- Options for HTML output ----------------------------------------------
141 # The theme to use for HTML and HTML Help pages. See the documentation for
142 # a list of builtin themes.
143 html_theme = 'alabaster'
145 # Theme options are theme-specific and customize the look and feel of a theme
146 # further. For a list of options available for each theme, see the
148 html_theme_options = {
149 'font_family': 'Georgia',
150 'head_font_family': 'Georgia',
151 'page_width': '1050px',
152 'show_related': True,
155 # Add any paths that contain custom themes here, relative to this directory.
156 #html_theme_path = []
158 # The name for this set of Sphinx documents. If None, it defaults to
159 # "<project> v<release> documentation".
162 # A shorter title for the navigation bar. Default is the same as html_title.
163 #html_short_title = None
165 # The name of an image file (relative to this directory) to place at the top
169 # The name of an image file (within the static path) to use as favicon of the
170 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
174 # Add any paths that contain custom static files (such as style sheets) here,
175 # relative to this directory. They are copied after the builtin static files,
176 # so a file named "default.css" will overwrite the builtin "default.css".
177 #html_static_path = ['static']
179 # Add any extra paths that contain custom files (such as robots.txt or
180 # .htaccess) here, relative to this directory. These files are copied
181 # directly to the root of the documentation.
182 #html_extra_path = []
184 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
185 # using the given strftime format.
186 #html_last_updated_fmt = '%b %d, %Y'
188 # If true, SmartyPants will be used to convert quotes and dashes to
189 # typographically correct entities.
190 #html_use_smartypants = True
192 # Custom sidebar templates, maps document names to template names.
195 # Additional templates that should be rendered to pages, maps page names to
197 #html_additional_pages = {}
199 # If false, no module index is generated.
200 #html_domain_indices = True
202 # If false, no index is generated.
203 #html_use_index = True
205 # If true, the index is split into individual pages for each letter.
206 #html_split_index = False
208 # If true, links to the reST sources are added to the pages.
209 #html_show_sourcelink = True
211 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
212 #html_show_sphinx = True
214 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
215 #html_show_copyright = True
217 # If true, an OpenSearch description file will be output, and all pages will
218 # contain a <link> tag referring to it. The value of this option must be the
219 # base URL from which the finished HTML is served.
220 #html_use_opensearch = ''
222 # This is the file name suffix for HTML files (e.g. ".xhtml").
223 #html_file_suffix = None
225 # Language to be used for generating the HTML full-text search index.
226 # Sphinx supports the following languages:
227 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
228 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
229 #html_search_language = 'en'
231 # A dictionary with options for the search language support, empty by default.
232 # Now only 'ja' uses this config value
233 #html_search_options = {'type': 'default'}
235 # The name of a javascript file (relative to the configuration directory) that
236 # implements a search results scorer. If empty, the default will be used.
237 #html_search_scorer = 'scorer.js'
239 # Output file base name for HTML help builder.
240 htmlhelp_basename = 'IBG'
242 # -- Options for LaTeX output ---------------------------------------------
244 # Title page information.
245 latex_image = "harry_col"
246 latex_image_title = "First Steps"
247 latex_image_info = "(watercolour and crayon on paper, 2002) Harry Firth (2000-)"
248 latex_image_path = os.path.join('images', latex_image + '.png')
249 latex_additional_files = [latex_image_path]
251 template = string.Template(open('config/preamble.tex').read())
253 latex_contents = r"""
263 # The paper size ('letterpaper' or 'a4paper').
264 'papersize': 'a4paper',
266 # The font size ('10pt', '11pt' or '12pt').
269 # Additional stuff for the LaTeX preamble.
270 'preamble': template.substitute(title=project,
273 imagetitle=latex_image_title,
274 imageinfo=latex_image_info,
278 licensetext=licensetext),
280 'tableofcontents': latex_contents,
284 # Latex figure (float) alignment
285 #'figure_align': 'htbp',
288 # Grouping the document tree into LaTeX files. List of tuples
289 # (source start file, target name, title,
290 # author, documentclass [howto, manual, or own class]).
292 (master_doc, 'IBG.tex', project, author, 'howto'),
295 # The name of an image file (relative to this directory) to place at the top of
299 # For "manual" documents, if this is true, then toplevel headings are parts,
301 #latex_use_parts = False
303 # If true, show page references after internal links.
304 latex_show_pagerefs = True
306 # If true, show URL addresses after external links.
307 #latex_show_urls = False
309 # Documents to append as an appendix to all manuals.
310 #latex_appendices = []
312 # If false, no module index is generated.
313 #latex_domain_indices = True
316 # -- Options for manual page output ---------------------------------------
318 # One entry per manual page. List of tuples
319 # (source start file, name, description, authors, manual section).
321 (master_doc, 'IBG', project, [author], 1)
324 # If true, show URL addresses after external links.
325 #man_show_urls = False
328 # -- Options for Texinfo output -------------------------------------------
330 # Grouping the document tree into Texinfo files. List of tuples
331 # (source start file, target name, title, author,
332 # dir menu entry, description, category)
333 texinfo_documents = [
334 (master_doc, 'ibg', project,
335 author, project, 'Beginner\'s guide to Inform.',
339 # Documents to append as an appendix to all manuals.
340 #texinfo_appendices = []
342 # If false, no module index is generated.
343 #texinfo_domain_indices = True
345 # How to display URL addresses: 'footnote', 'no', or 'inline'.
346 #texinfo_show_urls = 'footnote'
348 # If true, do not generate a @detailmenu in the "Top" node's menu.
349 #texinfo_no_detailmenu = False
352 # -- Options for block diagrams -------------------------------------------
354 # The paths to truetype fonts. blockdiag_fontpath option accepts both
355 # single path string and list of paths.
356 blockdiag_fontpath = []
358 # The path to fontmap definitions.
359 blockdiag_fontmap = ""
361 # Render diagrams in antialias mode or not.
362 blockdiag_antialias = True
364 # Render diagrams as transparency or not.
365 blockdiag_transparency = True
367 # The output image format at generating HTML docs ("PNG" or "SVG").
368 blockdiag_html_image_format = "SVG"
370 # The output image format at generating PDF docs (through LaTeX). ("PNG" or
371 # "PDF"). When a value of PDF is specified, you can get clear diagram
372 # images. In which case, reportlab library is required.
373 blockdiag_latex_image_format = "PNG"
375 # Enable debug mode of blockdiag.
376 blockdiag_debug = False