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.
21 if alabaster.version.__version_info__ < (0, 7, 8):
22 raise RuntimeError("requires albaster 0.7.8 or newer")
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, ".")
29 import tools.sphinxpatch
31 from tools.inform import InformLexer
32 from tools.transcript import TranscriptLexer
36 app.add_lexer('inform', InformLexer())
37 app.add_lexer('transcript', TranscriptLexer())
39 # -- General configuration ------------------------------------------------
41 # If your documentation needs a minimal Sphinx version, state it here.
44 # Add any Sphinx extension module names here, as strings. They can be
45 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
49 'sphinx.ext.extlinks',
53 # Add any paths that contain templates here, relative to this directory.
54 templates_path = ['templates']
56 # The suffix(es) of source filenames.
57 source_suffix = ['.rst']
59 # The encoding of source files.
60 #source_encoding = 'utf-8-sig'
62 # The master toctree document.
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
70 editor = "Dennis G. Jerz"
71 edition = "Third Edition: August 2004"
72 extra = "With a foreword by Graham Nelson"
74 licensetext = codecs.open('LICENSE', encoding='utf-8').read()
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.
80 # The short X.Y version.
82 # The full version, including alpha/beta/rc tags.
85 # The language for content autogenerated by Sphinx. Refer to documentation
86 # for a list of supported languages.
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.
92 # There are two options for replacing |today|: either, you set today to some
93 # non-false value, then it is used:
95 # Else, today_fmt is used as the format for a strftime call.
96 #today_fmt = '%B %d, %Y'
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']
102 # The reST default role (used for this markup: `text`) to use for all
106 # If true, '()' will be appended to :func: etc. cross-reference text.
107 #add_function_parentheses = True
109 # If true, the current module name will be prepended to all description
110 # unit titles (such as .. function::).
111 #add_module_names = True
113 # If true, sectionauthor and moduleauthor directives will be shown in the
114 # output. They are ignored by default.
115 #show_authors = False
117 # Global definitions.
118 rst_prolog = open("config/defs.rst").read()
122 'dm4': ("http://inform-fiction.org/manual/html/%s", ""),
125 # The name of the Pygments (syntax highlighting) style to use.
126 pygments_style = 'friendly'
128 # The default Pygments highlight language.
129 highlight_language = 'none'
131 # A list of ignored prefixes for module index sorting.
132 #modindex_common_prefix = []
134 # If true, keep warnings as "system message" paragraphs in the built documents.
135 #keep_warnings = False
137 # If true, `todo` and `todoList` produce output, else they produce nothing.
138 todo_include_todos = True
140 # Turn off default domain.
141 primary_domain = None
144 # -- Options for HTML output ----------------------------------------------
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'
150 # Override a few things with local CSS style.
151 html_style = "ibg.css"
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
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,
164 # Add any paths that contain custom themes here, relative to this directory.
165 #html_theme_path = []
167 # The name for this set of Sphinx documents. If None, it defaults to
168 # "<project> v<release> documentation".
171 # A shorter title for the navigation bar. Default is the same as html_title.
172 #html_short_title = None
174 # The name of an image file (relative to this directory) to place at the top
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
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']
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 = []
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'
197 # If true, SmartyPants will be used to convert quotes and dashes to
198 # typographically correct entities.
199 #html_use_smartypants = True
201 # Custom sidebar templates, maps document names to template names.
204 # Additional templates that should be rendered to pages, maps page names to
206 #html_additional_pages = {}
208 # If false, no module index is generated.
209 #html_domain_indices = True
211 # If false, no index is generated.
212 #html_use_index = True
214 # If true, the index is split into individual pages for each letter.
215 #html_split_index = False
217 # If true, links to the reST sources are added to the pages.
218 #html_show_sourcelink = True
220 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
221 #html_show_sphinx = True
223 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
224 #html_show_copyright = True
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 = ''
231 # This is the file name suffix for HTML files (e.g. ".xhtml").
232 #html_file_suffix = None
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'
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'}
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'
248 # Output file base name for HTML help builder.
249 htmlhelp_basename = 'IBG'
251 # -- Options for LaTeX output ---------------------------------------------
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]
260 template = string.Template(open('config/preamble.tex').read())
262 latex_contents = r"""
272 # The paper size ('letterpaper' or 'a4paper').
273 'papersize': 'a4paper',
275 # The font size ('10pt', '11pt' or '12pt').
278 # Additional stuff for the LaTeX preamble.
279 'preamble': template.substitute(title=project,
282 imagetitle=latex_image_title,
283 imageinfo=latex_image_info,
287 licensetext=licensetext),
289 'tableofcontents': latex_contents,
293 # Latex figure (float) alignment
294 #'figure_align': 'htbp',
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]).
301 (master_doc, 'IBG.tex', project, author, 'howto'),
304 # The name of an image file (relative to this directory) to place at the top of
308 # For "manual" documents, if this is true, then toplevel headings are parts,
310 #latex_use_parts = False
312 # If true, show page references after internal links.
313 latex_show_pagerefs = True
315 # If true, show URL addresses after external links.
316 #latex_show_urls = False
318 # Documents to append as an appendix to all manuals.
319 #latex_appendices = []
321 # If false, no module index is generated.
322 #latex_domain_indices = True
325 # -- Options for manual page output ---------------------------------------
327 # One entry per manual page. List of tuples
328 # (source start file, name, description, authors, manual section).
330 (master_doc, 'IBG', project, [author], 1)
333 # If true, show URL addresses after external links.
334 #man_show_urls = False
337 # -- Options for Texinfo output -------------------------------------------
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.',
348 # Documents to append as an appendix to all manuals.
349 #texinfo_appendices = []
351 # If false, no module index is generated.
352 #texinfo_domain_indices = True
354 # How to display URL addresses: 'footnote', 'no', or 'inline'.
355 #texinfo_show_urls = 'footnote'
357 # If true, do not generate a @detailmenu in the "Top" node's menu.
358 #texinfo_no_detailmenu = False
361 # -- Options for block diagrams -------------------------------------------
363 # The paths to truetype fonts. blockdiag_fontpath option accepts both
364 # single path string and list of paths.
365 blockdiag_fontpath = []
367 # The path to fontmap definitions.
368 blockdiag_fontmap = ""
370 # Render diagrams in antialias mode or not.
371 blockdiag_antialias = True
373 # Render diagrams as transparency or not.
374 blockdiag_transparency = True
376 # The output image format at generating HTML docs ("PNG" or "SVG").
377 blockdiag_html_image_format = "SVG"
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"
384 # Enable debug mode of blockdiag.
385 blockdiag_debug = False