Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/src/doc/en/reference/conf.py
4111 views
1
# nodoctest
2
# Sage documentation build configuration file, created by
3
# sphinx-quickstart on Thu Aug 21 20:15:55 2008.
4
#
5
# This file is execfile()d with the current directory set to its containing dir.
6
#
7
# The contents of this file are pickled, so don't put values in the namespace
8
# that aren't pickleable (module imports are okay, they're removed automatically).
9
#
10
# All configuration values have a default; values that are commented out
11
# serve to show the default.
12
13
import os
14
from sage.env import SAGE_DOC_SRC, SAGE_DOC
15
from sage_docbuild.conf import release, latex_elements, exclude_patterns
16
from sage_docbuild.conf import *
17
18
# Add any paths that contain custom static files (such as style sheets),
19
# relative to this directory to html_static_path. They are copied after the
20
# builtin static files, so a file named "default.css" will overwrite the
21
# builtin "default.css". html_common_static_path imported from sage_docbuild.conf
22
# contains common paths.
23
html_static_path = [] + html_common_static_path
24
25
ref_src = os.path.join(SAGE_DOC_SRC, 'en', 'reference')
26
ref_out = os.path.join(SAGE_DOC, 'html', 'en', 'reference')
27
28
# Add small view/edit buttons.
29
html_theme_options.update({
30
'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/reference/index.rst'),
31
'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/reference/index.rst'),
32
})
33
34
# General information about the project.
35
project = "Reference Manual"
36
37
# The name for this set of Sphinx documents. Do not include release info.
38
html_title = project
39
html_short_title = project
40
41
# Output file base name for HTML help builder.
42
htmlhelp_basename = 'reference'
43
44
# Grouping the document tree into LaTeX files. List of tuples
45
# (source start file, target name, title, author, document class [howto/manual]).
46
latex_documents = [
47
('index', 'reference.tex', 'Reference Manual',
48
'The Sage Development Team', 'manual'),
49
]
50
51
latex_elements['preamble'] += r'''
52
% One-column index
53
\makeatletter
54
\renewenvironment{theindex}{
55
\chapter*{\indexname}
56
\markboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}
57
\setlength{\parskip}{0.1em}
58
\relax
59
\let\item\@idxitem
60
}{}
61
\makeatother
62
'''
63
64
#Ignore all .rst in the _sage subdirectory
65
exclude_patterns = exclude_patterns + ['_sage']
66
67
multidocs_is_master = True
68
69
# Sorted list of subdocs. Include all subdirectories of ref_src except
70
# for 'static' and 'templates', and to deal with upgrades: 'sage',
71
# 'media', and 'other'.
72
bad_directories = ['static', 'templates', 'sage', 'media', 'other']
73
multidocs_subdoc_list = sorted([x for x in os.listdir(ref_src)
74
if os.path.isdir(os.path.join(ref_src, x))
75
and x not in bad_directories])
76
77
# List of directories, relative to source directory, that shouldn't be
78
# searched for source files.
79
exclude_patterns += multidocs_subdoc_list + [
80
'sage', 'options'
81
]
82
83