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
141 # -- Options for HTML output ----------------------------------------------
143 # The theme to use for HTML and HTML Help pages. See the documentation for
144 # a list of builtin themes.
145 html_theme = 'alabaster'
147 # Override a few things with local CSS style.
148 html_style = "ibg.css"
150 # Theme options are theme-specific and customize the look and feel of a theme
151 # further. For a list of options available for each theme, see the
153 html_theme_options = {
154 'font_family': 'Georgia',
155 'head_font_family': 'Georgia',
156 'page_width': '1050px',
157 'show_related': True,
158 'fixed_sidebar': True,
161 # Add any paths that contain custom themes here, relative to this directory.
162 #html_theme_path = []
164 # The name for this set of Sphinx documents. If None, it defaults to
165 # "<project> v<release> documentation".
168 # A shorter title for the navigation bar. Default is the same as html_title.
169 #html_short_title = None
171 # The name of an image file (relative to this directory) to place at the top
175 # The name of an image file (within the static path) to use as favicon of the
176 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
180 # Add any paths that contain custom static files (such as style sheets) here,
181 # relative to this directory. They are copied after the builtin static files,
182 # so a file named "default.css" will overwrite the builtin "default.css".
183 html_static_path = ['static']
185 # Add any extra paths that contain custom files (such as robots.txt or
186 # .htaccess) here, relative to this directory. These files are copied
187 # directly to the root of the documentation.
188 #html_extra_path = []
190 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
191 # using the given strftime format.
192 #html_last_updated_fmt = '%b %d, %Y'
194 # If true, SmartyPants will be used to convert quotes and dashes to
195 # typographically correct entities.
196 #html_use_smartypants = True
198 # Custom sidebar templates, maps document names to template names.
201 # Additional templates that should be rendered to pages, maps page names to
203 #html_additional_pages = {}
205 # If false, no module index is generated.
206 #html_domain_indices = True
208 # If false, no index is generated.
209 #html_use_index = True
211 # If true, the index is split into individual pages for each letter.
212 #html_split_index = False
214 # If true, links to the reST sources are added to the pages.
215 #html_show_sourcelink = True
217 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
218 #html_show_sphinx = True
220 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
221 #html_show_copyright = True
223 # If true, an OpenSearch description file will be output, and all pages will
224 # contain a <link> tag referring to it. The value of this option must be the
225 # base URL from which the finished HTML is served.
226 #html_use_opensearch = ''
228 # This is the file name suffix for HTML files (e.g. ".xhtml").
229 #html_file_suffix = None
231 # Language to be used for generating the HTML full-text search index.
232 # Sphinx supports the following languages:
233 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
234 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
235 #html_search_language = 'en'
237 # A dictionary with options for the search language support, empty by default.
238 # Now only 'ja' uses this config value
239 #html_search_options = {'type': 'default'}
241 # The name of a javascript file (relative to the configuration directory) that
242 # implements a search results scorer. If empty, the default will be used.
243 #html_search_scorer = 'scorer.js'
245 # Output file base name for HTML help builder.
246 htmlhelp_basename = 'IBG'
248 # -- Options for LaTeX output ---------------------------------------------
250 # Title page information.
251 latex_image = "harry_col"
252 latex_image_title = "First Steps"
253 latex_image_info = "(watercolour and crayon on paper, 2002) Harry Firth (2000-)"
254 latex_image_path = os.path.join('images', latex_image + '.png')
255 latex_additional_files = [latex_image_path]
257 template = string.Template(open('config/preamble.tex').read())
259 latex_contents = r"""
269 # The paper size ('letterpaper' or 'a4paper').
270 'papersize': 'a4paper',
272 # The font size ('10pt', '11pt' or '12pt').
275 # Additional stuff for the LaTeX preamble.
276 'preamble': template.substitute(title=project,
279 imagetitle=latex_image_title,
280 imageinfo=latex_image_info,
284 licensetext=licensetext),
286 'tableofcontents': latex_contents,
290 # Latex figure (float) alignment
291 #'figure_align': 'htbp',
294 # Grouping the document tree into LaTeX files. List of tuples
295 # (source start file, target name, title,
296 # author, documentclass [howto, manual, or own class]).
298 (master_doc, 'IBG.tex', project, author, 'howto'),
301 # The name of an image file (relative to this directory) to place at the top of
305 # For "manual" documents, if this is true, then toplevel headings are parts,
307 #latex_use_parts = False
309 # If true, show page references after internal links.
310 latex_show_pagerefs = True
312 # If true, show URL addresses after external links.
313 #latex_show_urls = False
315 # Documents to append as an appendix to all manuals.
316 #latex_appendices = []
318 # If false, no module index is generated.
319 #latex_domain_indices = True
322 # -- Options for manual page output ---------------------------------------
324 # One entry per manual page. List of tuples
325 # (source start file, name, description, authors, manual section).
327 (master_doc, 'IBG', project, [author], 1)
330 # If true, show URL addresses after external links.
331 #man_show_urls = False
334 # -- Options for Texinfo output -------------------------------------------
336 # Grouping the document tree into Texinfo files. List of tuples
337 # (source start file, target name, title, author,
338 # dir menu entry, description, category)
339 texinfo_documents = [
340 (master_doc, 'ibg', project,
341 author, project, 'Beginner\'s guide to Inform.',
345 # Documents to append as an appendix to all manuals.
346 #texinfo_appendices = []
348 # If false, no module index is generated.
349 #texinfo_domain_indices = True
351 # How to display URL addresses: 'footnote', 'no', or 'inline'.
352 #texinfo_show_urls = 'footnote'
354 # If true, do not generate a @detailmenu in the "Top" node's menu.
355 #texinfo_no_detailmenu = False
358 # -- Options for block diagrams -------------------------------------------
360 # The paths to truetype fonts. blockdiag_fontpath option accepts both
361 # single path string and list of paths.
362 blockdiag_fontpath = []
364 # The path to fontmap definitions.
365 blockdiag_fontmap = ""
367 # Render diagrams in antialias mode or not.
368 blockdiag_antialias = True
370 # Render diagrams as transparency or not.
371 blockdiag_transparency = True
373 # The output image format at generating HTML docs ("PNG" or "SVG").
374 blockdiag_html_image_format = "SVG"
376 # The output image format at generating PDF docs (through LaTeX). ("PNG" or
377 # "PDF"). When a value of PDF is specified, you can get clear diagram
378 # images. In which case, reportlab library is required.
379 blockdiag_latex_image_format = "PNG"
381 # Enable debug mode of blockdiag.
382 blockdiag_debug = False