Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/doc/en/reference/conf_sub.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
sys.path.append(os.environ['SAGE_DOC'])
16
from common.conf import *
17
18
# settings for the intersphinx extension:
19
20
ref_src = os.path.join(SAGE_DOC, 'en', 'reference')
21
ref_out = os.path.join(SAGE_DOC, 'output', 'html', 'en', 'reference')
22
intersphinx_mapping[ref_out] = None
23
24
for doc in os.listdir(ref_src):
25
if os.path.exists(os.path.join(ref_src, doc, 'index.rst')):
26
intersphinx_mapping[os.path.join(ref_out, doc)] = None
27
28
# We use the main document's title, if we can find it.
29
rst_file = open('index.rst', 'r')
30
rst_lines = rst_file.read().splitlines()
31
rst_file.close()
32
33
title = u''
34
for i in xrange(len(rst_lines)):
35
if rst_lines[i].startswith('==') and i > 0:
36
title = rst_lines[i-1].strip()
37
break
38
39
# Otherwise, we use this directory's name.
40
name = os.path.basename(os.path.abspath('.'))
41
if not title:
42
title = name.capitalize()
43
title = title.replace(u'`', u'$')
44
45
# General information about the project.
46
project = u'Sage Reference Manual: ' + title
47
48
# The name for this set of Sphinx documents. If None, it defaults to
49
# "<project> v<release> documentation".
50
html_title = u'Sage Reference Manual v' + release + ': ' + title
51
52
# A shorter title for the navigation bar. Default is the same as html_title.
53
html_short_title = title
54
55
# HTML theme (e.g., 'default', 'sphinxdoc'). The pages for the
56
# reference manual use a custom theme, a slight variant on the 'sage'
57
# theme, to set the links in the top line.
58
html_theme = 'sageref'
59
60
# Output file base name for HTML help builder.
61
htmlhelp_basename = name
62
63
# Grouping the document tree into LaTeX files. List of tuples (source
64
# start file, target name, title, author, document class
65
# [howto/manual]).
66
latex_documents = [
67
('index', name + '.tex', project, u'The Sage Development Team', 'manual')
68
]
69
70
#Ignore all .rst in the _sage subdirectory
71
exclude_trees = exclude_trees + ['_sage']
72
73
multidocs_is_master = False
74
75