1# -*- coding: utf-8 -*- 2# 3# Configuration file for the Sphinx documentation builder. 4# 5# This file does only contain a selection of the most common options. For a 6# full list see the documentation: 7# http://www.sphinx-doc.org/en/master/config 8 9# -- Path setup -------------------------------------------------------------- 10 11# If extensions (or modules to document with autodoc) are in another directory, 12# add these directories to sys.path here. If the directory is relative to the 13# documentation root, use os.path.abspath to make it absolute, like shown here. 14# 15import os 16# import sys 17# sys.path.insert(0, os.path.abspath('.')) 18 19SOURCE_DIR = os.path.dirname(__file__) 20LATEX_DIR = os.path.join(SOURCE_DIR, '_latex') 21PREAMBLE_FILE = os.path.join(LATEX_DIR, 'preamble.tex') 22TITLE_PAGE_FILE = os.path.join(LATEX_DIR, 'title_page.tex') 23 24BUILD_TYPE = os.getenv("BUILD_TYPE") 25 26# -- Project information ----------------------------------------------------- 27 28if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita': 29 project = u'Intel® oneAPI Threading Building Blocks (oneTBB)' 30else: 31 project = u'oneTBB' 32copyright = u'2022, Intel Corporation' 33author = u'Intel' 34 35# The short X.Y version 36version = u'' 37# The full version, including alpha/beta/rc tags 38release = u'' 39 40 41# -- General configuration --------------------------------------------------- 42 43# If your documentation needs a minimal Sphinx version, state it here. 44# 45# needs_sphinx = '1.0' 46 47# Add any Sphinx extension module names here, as strings. They can be 48# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 49# ones. 50extensions = [ 51 'sphinx.ext.autodoc', 52 'sphinx.ext.doctest', 53 'sphinx.ext.intersphinx', 54 'sphinx.ext.todo', 55 'sphinx.ext.coverage', 56 'sphinx.ext.imgmath', 57 'sphinx.ext.ifconfig', 58 'sphinx.ext.viewcode', 59 'sphinx.ext.githubpages' 60] 61 62# Add any paths that contain templates here, relative to this directory. 63templates_path = ['main/_templates'] 64 65# The suffix(es) of source filenames. 66# You can specify multiple suffix as a list of string: 67# 68# source_suffix = ['.rst', '.md'] 69source_suffix = '.rst' 70 71# The master toctree document. 72#master_doc = 'main/title_main' 73master_doc = 'index' 74 75# The language for content autogenerated by Sphinx. Refer to documentation 76# for a list of supported languages. 77# 78# This is also used if you do content translation via gettext catalogs. 79# Usually you set "language" from the command line for these cases. 80language = None 81 82# List of patterns, relative to source directory, that match files and 83# directories to ignore when looking for source files. 84# This pattern also affects html_static_path and html_extra_path. 85exclude_patterns = [] 86 87# The name of the Pygments (syntax highlighting) style to use. 88pygments_style = None 89 90# Syntax highlighting for the :: directive 91highlight_language = 'cpp' 92 93if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita': 94 rst_prolog = """ 95.. |full_name| replace:: Intel\ |reg|\ oneAPI Threading Building Blocks (oneTBB) 96.. |short_name| replace:: oneTBB 97.. |product| replace:: oneTBB 98.. |reg| unicode:: U+000AE 99.. |copy| unicode:: U+000A9 100.. |base_tk| replace:: Intel\ |reg|\ oneAPI Base Toolkit 101.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler 102 """ 103else: 104 rst_prolog = """ 105.. |full_name| replace:: oneAPI Threading Building Blocks (oneTBB) 106.. |short_name| replace:: oneTBB 107.. |product| replace:: oneTBB 108.. |reg| unicode:: U+000AE 109.. |copy| unicode:: U+000A9 110.. |base_tk| replace:: Intel\ |reg|\ oneAPI Base Toolkit 111.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler 112 """ 113 114# -- Options for HTML output ------------------------------------------------- 115 116# The theme to use for HTML and HTML Help pages. See the documentation for 117# a list of builtin themes. 118# 119# Theme options are theme-specific and customize the look and feel of a theme 120# further. For a list of options available for each theme, see the 121# documentation. 122# 123 124html_theme = 'sphinx_book_theme' 125 126if BUILD_TYPE == 'dita': 127 html_theme_options = { 128 'repository_url': 'https://github.com/oneapi-src/oneTBB', 129 'path_to_docs': 'doc', 130 'repository_branch': 'master' 131 } 132else: 133 html_theme_options = { 134 'repository_url': 'https://github.com/oneapi-src/oneTBB', 135 'path_to_docs': 'doc/main', 136 'use_issues_button': True, 137 'use_edit_page_button': True, 138 'repository_branch': 'master', 139 'extra_footer': '<p align="right"><a href="https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html">Cookies</a></p>' 140 } 141 142 143# Add any paths that contain custom static files (such as style sheets) here, 144# relative to this directory. They are copied after the builtin static files, 145# so a file named "default.css" will overwrite the builtin "default.css". 146html_static_path = ['_static'] 147 148if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita': 149 html_context = { 150 'css_files': [ 151 '_static/theme_overrides.css', # override wide tables in RTD theme 152 ], 153 } 154else: 155 html_js_files = ['custom.js'] 156 157 158html_logo = '_static/oneAPI-rgb-rev-100.png' 159html_favicon = '_static/favicons.png' 160 161# Custom sidebar templates, must be a dictionary that maps document names 162# to template names. 163# 164# The default sidebars (for documents that don't match any pattern) are 165# defined by theme itself. Builtin themes are using these templates by 166# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 167# 'searchbox.html']``. 168# 169# html_sidebars = {} 170 171 172# -- Options for HTMLHelp output --------------------------------------------- 173 174# Output file base name for HTML help builder. 175htmlhelp_basename = 'sphinx-infodevdoc' 176 177 178# -- Options for LaTeX output ------------------------------------------------ 179 180#latex_engine = 'xelatex' 181#PDF_TITLE = 'Information Development Template' 182# 183#with open(PREAMBLE_FILE, 'r', encoding='utf-8') as f: 184# PREAMBLE = f.read() 185# 186#with open(TITLE_PAGE_FILE, 'r', encoding='utf-8') as f: 187# TITLE_PAGE = f.read().replace('<PDF_TITLE>', PDF_TITLE) 188# 189# 190#latex_elements = { 191# # The paper size ('letterpaper' or 'a4paper'). 192# # 193# 'extraclassoptions': 'openany,oneside', 194# 'babel' : '\\usepackage[english]{babel}', 195# 'papersize': 'a4paper', 196# 'releasename':" ", 197# # Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup 198# # 'fncychap': '\\usepackage[Lenny]{fncychap}', 199# 'fncychap': '', 200# #'fontpkg': '\\usepackage{amsmath,amsfonts,amssymb,amsthm}', 201# 202# 'figure_align':'htbp', 203# # The font size ('10pt', '11pt' or '12pt'). 204# # 205# 'pointsize': '12pt', 206# 207# # Additional stuff for the LaTeX preamble. 208# # 209# 'preamble': PREAMBLE, 210# 211# 'maketitle': TITLE_PAGE, 212# # Latex figure (float) alignment 213# # 214# # 'figure_align': 'htbp', 215# 'sphinxsetup': \ 216# 'hmargin={0.7in,0.7in}, vmargin={1in,1in}, \ 217# verbatimwithframe=true, \ 218# TitleColor={rgb}{0,0.686,0.941}, \ 219# HeaderFamily=\\rmfamily\\bfseries, \ 220# InnerLinkColor={rgb}{0,0.686,0.941}, \ 221# OuterLinkColor={rgb}{0,0.686,0.941}', 222# 223# 'tableofcontents':' ' 224#} 225# 226#latex_logo = '_latex/intel_logo.png' 227## Grouping the document tree into LaTeX files. List of tuples 228## (source start file, target name, title, 229## author, documentclass [howto, manual, or own class]). 230#latex_documents = [ 231# (master_doc, 'sphinx-infodev.tex', u'sphinx-infodev Documentation', 232# u'Intel', 'manual'), 233#] 234 235#breathe_projects = { #todd-mod 236# project: "../doxygen/xml" 237#} 238#breathe_default_project = project 239 240# Setup the exhale extension 241#exhale_args = { #todd-mod 242# # These arguments are required 243# "containmentFolder": "./api", 244# "rootFileName": "library_root.rst", 245# "rootFileTitle": "Library API", 246# "doxygenStripFromPath": "..", 247# "fullApiSubSectionTitle": 'Full API' 248#} 249 250 251# -- Options for manual page output ------------------------------------------ 252 253# One entry per manual page. List of tuples 254# (source start file, name, description, authors, manual section). 255man_pages = [ 256 (master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation', 257 [author], 1) 258] 259 260 261# -- Options for Texinfo output ---------------------------------------------- 262 263# Grouping the document tree into Texinfo files. List of tuples 264# (source start file, target name, title, author, 265# dir menu entry, description, category) 266texinfo_documents = [ 267 (master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation', 268 author, 'sphinx-infodev', 'One line description of project.', 269 'Miscellaneous'), 270] 271 272 273# -- Options for Epub output ------------------------------------------------- 274 275# Bibliographic Dublin Core info. 276epub_title = project 277 278# The unique identifier of the text. This can be a ISBN number 279# or the project homepage. 280# 281# epub_identifier = '' 282 283# A unique identification for the text. 284# 285# epub_uid = '' 286 287# A list of files that should not be packed into the epub file. 288epub_exclude_files = ['search.html'] 289 290 291# -- Extension configuration ------------------------------------------------- 292 293# -- Options for intersphinx extension --------------------------------------- 294 295# Example configuration for intersphinx: refer to the Python standard library. 296intersphinx_mapping = {'https://docs.python.org/': None} 297 298# -- Options for todo extension ---------------------------------------------- 299 300# If true, `todo` and `todoList` produce output, else they produce nothing. 301todo_include_todos = True 302