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