source: sasview/docs/sphinx-docs/source/conf.py @ 8f1bb6f

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

Merge branch 'ticket-510' into ticket-639-katex

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