source: sasview/docs/sphinx-docs/source/conf.py @ df59f92

magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since df59f92 was f80b416e, checked in by Paul Kienzle <pkienzle@…>, 7 years ago

Merge branch 'master' into ticket-639-katex

  • Property mode set to 100644
File size: 10.2 KB
Line 
1# -*- coding: utf-8 -*-
2#
3# SasView documentation build configuration file, created by
4# sphinx-quickstart on Wed Aug 28 14:59:44 2013.
5#
6# This file is execfile()d with the current directory set to its containing dir.
7#
8# Note that not all possible configuration values are present in this
9# autogenerated file.
10#
11# All configuration values have a default; values that are commented out
12# serve to show the default.
13
14import sys, os, collections
15
16# If extensions (or modules to document with autodoc) are in another directory,
17# add these directories to sys.path here. If the directory is relative to the
18# documentation root, use os.path.abspath to make it absolute, like shown here.
19from distutils.util import get_platform
20platform = '.%s-%s'%(get_platform(),sys.version[:3])
21build_lib = os.path.abspath('../../../build/lib'+platform)
22sys.path.insert(0, build_lib)
23sys.path.insert(0, os.path.abspath('_extensions')) # for sphinx extensions
24print "-- path --"
25print "\n".join(sys.path)
26
27# -- General configuration -----------------------------------------------------
28
29# If your documentation needs a minimal Sphinx version, state it here.
30#needs_sphinx = '1.0'
31
32# Add any Sphinx extension module names here, as strings. They can be extensions
33# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
34extensions = ['sphinx.ext.autodoc',
35              'sphinx.ext.todo',
36              'sphinx.ext.coverage',
37              'sphinx.ext.mathjax',
38              #'mathjax',  # replacement mathjax that allows a list of paths
39              'dollarmath',
40              'sphinx.ext.viewcode']
41
42mathjax_path = (
43    'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?'
44    'config=TeX-MML-AM_CHTML')
45
46# For katex uncomment the following
47"""
48#STATIC_PATH = '../../_static/'
49STATIC_PATH = ''
50mathjax_path = [
51    STATIC_PATH + 'katex/katex.min.js',
52    STATIC_PATH + 'katex/contrib/auto-render.min.js',
53    STATIC_PATH + 'rendermath.js'
54]
55mathjax_css = STATIC_PATH + 'katex/katex.min.css'
56"""
57
58
59# Add any paths that contain templates here, relative to this directory.
60templates_path = ['_templates']
61
62# The suffix of source filenames.
63source_suffix = '.rst'
64
65# The encoding of source files.
66#source_encoding = 'utf-8-sig'
67
68# The master toctree document.
69master_doc = 'index'
70
71# General information about the project.
72project = u'SasView'
73copyright = u'2017, The SasView Project'
74
75# The version info for the project you're documenting, acts as replacement for
76# |version| and |release|, also used in various other places throughout the
77# built documents.
78#
79# The short X.Y version.
80version = '4.1'
81# The full version, including alpha/beta/rc tags.
82release = '4.1.2'
83
84# The language for content autogenerated by Sphinx. Refer to documentation
85# for a list of supported languages.
86#language = None
87
88# There are two options for replacing |today|: either, you set today to some
89# non-false value, then it is used:
90#today = ''
91# Else, today_fmt is used as the format for a strftime call.
92#today_fmt = '%B %d, %Y'
93
94# List of patterns, relative to source directory, that match files and
95# directories to ignore when looking for source files.
96#
97# PGP 2014/04/03: We have some code which doesn't get carried over to
98# the build directory.  Exclude the appropriate *.rst files here so
99# that we don't get various "ImportError: No module named ___" when
100# running Sphinx.
101exclude_patterns = ["*sas.sasgui.perspectives.simulation.rst",
102                    "*sas.sascalc.pr.c_extensions.rst",
103                    "*sas.sascalc.realspace.rst",
104                    "*sas.sascalc.simulation.rst",
105                    "*sas.sasview.setup_exe.rst",
106                    "*sas.sasview.setup_mac.rst",
107                    "*sas.sasgui.guiframe.custom_pstats.rst", # pstats not in standard library on Ubuntu out of the box
108                    ]
109
110# The reST default role (used for this markup: `text`) to use for all documents.
111#default_role = None
112
113# If true, '()' will be appended to :func: etc. cross-reference text.
114#add_function_parentheses = True
115
116# If true, the current module name will be prepended to all description
117# unit titles (such as .. function::).
118#add_module_names = True
119
120# If true, sectionauthor and moduleauthor directives will be shown in the
121# output. They are ignored by default.
122#show_authors = False
123
124# The name of the Pygments (syntax highlighting) style to use.
125pygments_style = 'sphinx'
126
127# A list of ignored prefixes for module index sorting.
128#modindex_common_prefix = []
129
130# If true, keep warnings as "system message" paragraphs in the built documents.
131#keep_warnings = False
132
133
134# -- Options for HTML output ---------------------------------------------------
135
136# The theme to use for HTML and HTML Help pages.  See the documentation for
137# a list of builtin themes.
138html_theme = 'default'
139
140# Theme options are theme-specific and customize the look and feel of a theme
141# further.  For a list of options available for each theme, see the
142# documentation.
143#html_theme_options = {}
144
145# Add any paths that contain custom themes here, relative to this directory.
146#html_theme_path = []
147
148# The name for this set of Sphinx documents.  If None, it defaults to
149# "<project> v<release> documentation".
150#html_title = None
151
152# A shorter title for the navigation bar.  Default is the same as html_title.
153#html_short_title = None
154
155# The name of an image file (relative to this directory) to place at the top
156# of the sidebar.
157#html_logo = None
158
159# The name of an image file (within the static path) to use as favicon of the
160# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
161# pixels large.
162#html_favicon = None
163
164# Add any paths that contain custom static files (such as style sheets) here,
165# relative to this directory. They are copied after the builtin static files,
166# so a file named "default.css" will overwrite the builtin "default.css".
167html_static_path = ['_static']
168
169# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
170# using the given strftime format.
171#html_last_updated_fmt = '%b %d, %Y'
172
173# If true, SmartyPants will be used to convert quotes and dashes to
174# typographically correct entities.
175#html_use_smartypants = True
176
177# Custom sidebar templates, maps document names to template names.
178#html_sidebars = {}
179
180# Additional templates that should be rendered to pages, maps page names to
181# template names.
182#html_additional_pages = {}
183
184# If false, no module index is generated.
185#html_domain_indices = True
186
187# If false, no index is generated.
188#html_use_index = True
189
190# If true, the index is split into individual pages for each letter.
191#html_split_index = False
192
193# If true, links to the reST sources are added to the pages.
194#html_show_sourcelink = True
195
196# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
197#html_show_sphinx = True
198
199# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
200#html_show_copyright = True
201
202# If true, an OpenSearch description file will be output, and all pages will
203# contain a <link> tag referring to it.  The value of this option must be the
204# base URL from which the finished HTML is served.
205#html_use_opensearch = ''
206
207# This is the file name suffix for HTML files (e.g. ".xhtml").
208#html_file_suffix = None
209
210# Output file base name for HTML help builder.
211htmlhelp_basename = 'SasViewdoc'
212
213# Turn off permalinks, which are a nice feature for the docs when viewed in a
214# browser, but which look weird (and cannot be "right-click->copy url") in
215# the SasView help.
216html_add_permalinks = ""
217
218
219# -- Options for LaTeX output --------------------------------------------------
220
221# TODO: seems like angstroms is defined twice.
222LATEX_PREAMBLE=r"""
223\usepackage[utf8]{inputenc}      % Allow unicode symbols in text
224\newcommand{\lt}{<}              % HTML needs \lt rather than <
225\newcommand{\gt}{>}              % HTML needs \gt rather than >
226\renewcommand{\AA}{\text{\r{A}}} % Allow \AA in math mode
227\DeclareUnicodeCharacter {212B} {\AA}                  % Angstrom
228\DeclareUnicodeCharacter {00B7} {\ensuremath{\cdot}}   % cdot
229\DeclareUnicodeCharacter {00B0} {\ensuremath{^\circ}}  % degrees
230"""
231latex_elements = {
232# The paper size ('letterpaper' or 'a4paper').
233'papersize': 'a4paper',
234
235# The font size ('10pt', '11pt' or '12pt').
236#'pointsize': '10pt',
237
238# Additional stuff for the LaTeX preamble.
239'preamble': LATEX_PREAMBLE
240
241}
242
243# Grouping the document tree into LaTeX files. List of tuples
244# (source start file, target name, title, author, documentclass [howto/manual]).
245latex_documents = [
246  ('index', 'SasView.tex', u'SasView Documentation',
247   u'The SasView Project', 'manual'),
248]
249
250# The name of an image file (relative to this directory) to place at the top of
251# the title page.
252#latex_logo = None
253
254# For "manual" documents, if this is true, then toplevel headings are parts,
255# not chapters.
256#latex_use_parts = False
257
258# If true, show page references after internal links.
259#latex_show_pagerefs = False
260
261# If true, show URL addresses after external links.
262#latex_show_urls = False
263
264# Documents to append as an appendix to all manuals.
265#latex_appendices = []
266
267# If false, no module index is generated.
268#latex_domain_indices = True
269
270
271# -- Options for manual page output --------------------------------------------
272
273# One entry per manual page. List of tuples
274# (source start file, name, description, authors, manual section).
275man_pages = [
276    ('index', 'sasview', u'SasView Documentation',
277     [u'The SasView Project'], 1)
278]
279
280# If true, show URL addresses after external links.
281#man_show_urls = False
282
283
284# -- Options for Texinfo output ------------------------------------------------
285
286# Grouping the document tree into Texinfo files. List of tuples
287# (source start file, target name, title, author,
288#  dir menu entry, description, category)
289texinfo_documents = [
290  ('index', 'SasView', u'SasView Documentation',
291   u'The SasView Project', 'SasView', 'One line description of project.',
292   'Miscellaneous'),
293]
294
295# Documents to append as an appendix to all manuals.
296#texinfo_appendices = []
297
298# If false, no module index is generated.
299#texinfo_domain_indices = True
300
301# How to display URL addresses: 'footnote', 'no', or 'inline'.
302#texinfo_show_urls = 'footnote'
303
304# If true, do not generate a @detailmenu in the "Top" node's menu.
305#texinfo_no_detailmenu = False
306
307if os.path.exists('rst_prolog'):
308    with open('rst_prolog') as fid:
309        rst_prolog = fid.read()
310
311numfig = True
Note: See TracBrowser for help on using the repository browser.