source: sasview/docs/sphinx-docs/source/conf.py @ 85cf6b8

magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249unittest-saveload
Last change on this file since 85cf6b8 was b229a3b, checked in by ajj, 6 years ago

Updating version numbers and DOI for 4.2 release

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