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
48 # Add any paths that contain templates here, relative to this directory.
49 templates_path = ['templates']
51 # The suffix(es) of source filenames.
52 source_suffix = ['.rst']
54 # The encoding of source files.
55 #source_encoding = 'utf-8-sig'
57 # The master toctree document.
60 # General document information.
61 project = u"The Inform Beginner's Guide"
62 author = u"Roger Firth and Sonja Kesserich"
63 copyright = u'2004, ' + author
65 editor = "Dennis G. Jerz"
66 edition = "Third Edition: August 2004"
67 extra = "With a foreword by Graham Nelson"
69 licensetext = codecs.open('LICENSE', encoding='utf-8').read()
71 # The version info for the project you're documenting, acts as replacement
72 # for |version| and |release|, also used in various other places throughout
73 # the built documents.
75 # The short X.Y version.
77 # The full version, including alpha/beta/rc tags.
80 # The language for content autogenerated by Sphinx. Refer to documentation
81 # for a list of supported languages.
83 # This is also used if you do content translation via gettext catalogs.
84 # Usually you set "language" from the command line for these cases.
87 # There are two options for replacing |today|: either, you set today to some
88 # non-false value, then it is used:
90 # Else, today_fmt is used as the format for a strftime call.
91 #today_fmt = '%B %d, %Y'
93 # List of patterns, relative to source directory, that match files and
94 # directories to ignore when looking for source files.
95 exclude_patterns = ['config', 'output', 'tables']
97 # The reST default role (used for this markup: `text`) to use for all
101 # If true, '()' will be appended to :func: etc. cross-reference text.
102 #add_function_parentheses = True
104 # If true, the current module name will be prepended to all description
105 # unit titles (such as .. function::).
106 #add_module_names = True
108 # If true, sectionauthor and moduleauthor directives will be shown in the
109 # output. They are ignored by default.
110 #show_authors = False
112 # The name of the Pygments (syntax highlighting) style to use.
113 pygments_style = 'friendly'
115 # The default Pygments highlight language.
116 highlight_language = 'none'
118 # A list of ignored prefixes for module index sorting.
119 #modindex_common_prefix = []
121 # If true, keep warnings as "system message" paragraphs in the built documents.
122 #keep_warnings = False
124 # If true, `todo` and `todoList` produce output, else they produce nothing.
125 todo_include_todos = True
128 # -- Options for HTML output ----------------------------------------------
130 # The theme to use for HTML and HTML Help pages. See the documentation for
131 # a list of builtin themes.
132 html_theme = 'alabaster'
134 # Theme options are theme-specific and customize the look and feel of a theme
135 # further. For a list of options available for each theme, see the
137 html_theme_options = {
138 'font_family': 'Georgia',
139 'head_font_family': 'Georgia',
140 'page_width': '1050px',
141 'show_related': True,
144 # Add any paths that contain custom themes here, relative to this directory.
145 #html_theme_path = []
147 # The name for this set of Sphinx documents. If None, it defaults to
148 # "<project> v<release> documentation".
151 # A shorter title for the navigation bar. Default is the same as html_title.
152 #html_short_title = None
154 # The name of an image file (relative to this directory) to place at the top
158 # The name of an image file (within the static path) to use as favicon of the
159 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
163 # Add any paths that contain custom static files (such as style sheets) here,
164 # relative to this directory. They are copied after the builtin static files,
165 # so a file named "default.css" will overwrite the builtin "default.css".
166 #html_static_path = ['static']
168 # Add any extra paths that contain custom files (such as robots.txt or
169 # .htaccess) here, relative to this directory. These files are copied
170 # directly to the root of the documentation.
171 #html_extra_path = []
173 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
174 # using the given strftime format.
175 #html_last_updated_fmt = '%b %d, %Y'
177 # If true, SmartyPants will be used to convert quotes and dashes to
178 # typographically correct entities.
179 #html_use_smartypants = True
181 # Custom sidebar templates, maps document names to template names.
184 # Additional templates that should be rendered to pages, maps page names to
186 #html_additional_pages = {}
188 # If false, no module index is generated.
189 #html_domain_indices = True
191 # If false, no index is generated.
192 #html_use_index = True
194 # If true, the index is split into individual pages for each letter.
195 #html_split_index = False
197 # If true, links to the reST sources are added to the pages.
198 #html_show_sourcelink = True
200 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
201 #html_show_sphinx = True
203 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
204 #html_show_copyright = True
206 # If true, an OpenSearch description file will be output, and all pages will
207 # contain a <link> tag referring to it. The value of this option must be the
208 # base URL from which the finished HTML is served.
209 #html_use_opensearch = ''
211 # This is the file name suffix for HTML files (e.g. ".xhtml").
212 #html_file_suffix = None
214 # Language to be used for generating the HTML full-text search index.
215 # Sphinx supports the following languages:
216 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
217 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
218 #html_search_language = 'en'
220 # A dictionary with options for the search language support, empty by default.
221 # Now only 'ja' uses this config value
222 #html_search_options = {'type': 'default'}
224 # The name of a javascript file (relative to the configuration directory) that
225 # implements a search results scorer. If empty, the default will be used.
226 #html_search_scorer = 'scorer.js'
228 # Output file base name for HTML help builder.
229 htmlhelp_basename = 'IBG'
231 # -- Options for LaTeX output ---------------------------------------------
233 # Title page information.
234 latex_image = "harry_col"
235 latex_image_title = "First Steps"
236 latex_image_info = "(watercolour and crayon on paper, 2002) Harry Firth (2000-)"
237 latex_image_path = os.path.join('images', latex_image + '.png')
238 latex_additional_files = [latex_image_path]
240 template = string.Template(open('config/preamble.tex').read())
242 latex_contents = r"""
252 # The paper size ('letterpaper' or 'a4paper').
253 'papersize': 'a4paper',
255 # The font size ('10pt', '11pt' or '12pt').
258 # Additional stuff for the LaTeX preamble.
259 'preamble': template.substitute(title=project,
262 imagetitle=latex_image_title,
263 imageinfo=latex_image_info,
267 licensetext=licensetext),
269 'tableofcontents': latex_contents,
273 # Latex figure (float) alignment
274 #'figure_align': 'htbp',
277 # Grouping the document tree into LaTeX files. List of tuples
278 # (source start file, target name, title,
279 # author, documentclass [howto, manual, or own class]).
281 (master_doc, 'IBG.tex', project, author, 'howto'),
284 # The name of an image file (relative to this directory) to place at the top of
288 # For "manual" documents, if this is true, then toplevel headings are parts,
290 #latex_use_parts = False
292 # If true, show page references after internal links.
293 latex_show_pagerefs = True
295 # If true, show URL addresses after external links.
296 #latex_show_urls = False
298 # Documents to append as an appendix to all manuals.
299 #latex_appendices = []
301 # If false, no module index is generated.
302 #latex_domain_indices = True
305 # -- Options for manual page output ---------------------------------------
307 # One entry per manual page. List of tuples
308 # (source start file, name, description, authors, manual section).
310 (master_doc, 'IBG', project, [author], 1)
313 # If true, show URL addresses after external links.
314 #man_show_urls = False
317 # -- Options for Texinfo output -------------------------------------------
319 # Grouping the document tree into Texinfo files. List of tuples
320 # (source start file, target name, title, author,
321 # dir menu entry, description, category)
322 texinfo_documents = [
323 (master_doc, 'ibg', project,
324 author, project, 'Beginner\'s guide to Inform.',
328 # Documents to append as an appendix to all manuals.
329 #texinfo_appendices = []
331 # If false, no module index is generated.
332 #texinfo_domain_indices = True
334 # How to display URL addresses: 'footnote', 'no', or 'inline'.
335 #texinfo_show_urls = 'footnote'
337 # If true, do not generate a @detailmenu in the "Top" node's menu.
338 #texinfo_no_detailmenu = False
341 # -- Options for block diagrams -------------------------------------------
343 # The paths to truetype fonts. blockdiag_fontpath option accepts both
344 # single path string and list of paths.
345 blockdiag_fontpath = []
347 # The path to fontmap definitions.
348 blockdiag_fontmap = ""
350 # Render diagrams in antialias mode or not.
351 blockdiag_antialias = True
353 # Render diagrams as transparency or not.
354 blockdiag_transparency = True
356 # The output image format at generating HTML docs ("PNG" or "SVG").
357 blockdiag_html_image_format = "SVG"
359 # The output image format at generating PDF docs (through LaTeX). ("PNG" or
360 # "PDF"). When a value of PDF is specified, you can get clear diagram
361 # images. In which case, reportlab library is required.
362 blockdiag_latex_image_format = "PNG"
364 # Enable debug mode of blockdiag.
365 blockdiag_debug = False