# nodoctest1# Sage documentation build configuration file, created by2# sphinx-quickstart on Thu Aug 21 20:15:55 2008.3#4# This file is execfile()d with the current directory set to its containing dir.5#6# The contents of this file are pickled, so don't put values in the namespace7# that aren't pickleable (module imports are okay, they're removed automatically).8#9# All configuration values have a default; values that are commented out10# serve to show the default.1112import os1314from sage.env import SAGE_DOC, SAGE_DOC_SRC15from sage_docbuild.conf import *16from sage_docbuild.conf import exclude_patterns1718# 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 the20# builtin static files, so a file named "default.css" will overwrite the21# builtin "default.css". html_common_static_path imported from sage_docbuild.conf22# contains common paths.23html_static_path = [] + html_common_static_path2425ref_src = os.path.join(SAGE_DOC_SRC, 'en', 'reference')26ref_out = os.path.join(SAGE_DOC, 'html', 'en', 'reference')2728# We use the main document's title, if we can find it.29rst_file = open('index.rst', 'r', encoding='utf-8')30rst_lines = rst_file.read().splitlines()31rst_file.close()3233title = ''34for i in range(len(rst_lines)):35if rst_lines[i].startswith('==') and i > 0:36title = rst_lines[i-1].strip()37break3839# Otherwise, we use this directory's name.40name = os.path.basename(os.path.abspath('.'))41if not title:42title = name.capitalize()43title = title.replace('`', '$')4445# We use the directory's name to add small view/edit buttons.46html_theme_options.update({47'source_view_link': os.path.join(source_repository, f'blob/develop/src/doc/en/reference/{name}', '{filename}'),48'source_edit_link': os.path.join(source_repository, f'edit/develop/src/doc/en/reference/{name}', '{filename}'),49})5051# General information about the project.52project = title5354# The name for this set of Sphinx documents.55html_title = title56html_short_title = title5758# Output file base name for HTML help builder.59htmlhelp_basename = name6061# Grouping the document tree into LaTeX files. List of tuples (source62# start file, target name, title, author, document class63# [howto/manual]).64latex_documents = [65('index', name + '.tex', title,66'The Sage Development Team', 'manual')67]6869latex_elements['hyperref'] = r"""70\usepackage{xr}71\externaldocument[../references/]{../references/references}72% Include hyperref last.73\usepackage{hyperref}74% Fix anchor placement for figures with captions.75\usepackage{hypcap}% it must be loaded after hyperref.76% Set up styles of URL: it should be placed after hyperref.77\urlstyle{same}"""7879#Ignore all .rst in the _sage subdirectory80exclude_patterns = exclude_patterns + ['_sage']8182multidocs_is_master = False838485