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'2023, 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 'sphinx_tabs.tabs' 61] 62 63# Add any paths that contain templates here, relative to this directory. 64templates_path = ['main/_templates'] 65 66# The suffix(es) of source filenames. 67# You can specify multiple suffix as a list of string: 68# 69# source_suffix = ['.rst', '.md'] 70source_suffix = '.rst' 71 72# The master toctree document. 73#master_doc = 'main/title_main' 74master_doc = 'index' 75 76# The language for content autogenerated by Sphinx. Refer to documentation 77# for a list of supported languages. 78# 79# This is also used if you do content translation via gettext catalogs. 80# Usually you set "language" from the command line for these cases. 81language = 'en' 82 83# List of patterns, relative to source directory, that match files and 84# directories to ignore when looking for source files. 85# This pattern also affects html_static_path and html_extra_path. 86exclude_patterns = [] 87 88# The name of the Pygments (syntax highlighting) style to use. 89pygments_style = None 90 91# Syntax highlighting for the :: directive 92highlight_language = 'cpp' 93 94if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita': 95 rst_prolog = """ 96.. |full_name| replace:: Intel\ |reg|\ oneAPI Threading Building Blocks (oneTBB) 97.. |short_name| replace:: oneTBB 98.. |product| replace:: oneTBB 99.. |reg| unicode:: U+000AE 100.. |copy| unicode:: U+000A9 101.. |base_tk| replace:: Intel\ |reg|\ oneAPI Base Toolkit 102.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler 103 """ 104else: 105 rst_prolog = """ 106.. |full_name| replace:: oneAPI Threading Building Blocks (oneTBB) 107.. |short_name| replace:: oneTBB 108.. |product| replace:: oneTBB 109.. |reg| unicode:: U+000AE 110.. |copy| unicode:: U+000A9 111.. |base_tk| replace:: Intel\ |reg|\ oneAPI Base Toolkit 112.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler 113 """ 114 115# -- Options for HTML output ------------------------------------------------- 116 117# The theme to use for HTML and HTML Help pages. See the documentation for 118# a list of builtin themes. 119# 120# Theme options are theme-specific and customize the look and feel of a theme 121# further. For a list of options available for each theme, see the 122# documentation. 123# 124 125html_theme = 'sphinx_book_theme' 126 127if BUILD_TYPE == 'dita': 128 html_theme_options = { 129 'repository_url': 'https://github.com/oneapi-src/oneTBB', 130 'path_to_docs': 'doc', 131 'repository_branch': 'master' 132 } 133else: 134 html_theme_options = { 135 'repository_url': 'https://github.com/oneapi-src/oneTBB', 136 'path_to_docs': 'doc', 137 'use_issues_button': True, 138 'use_edit_page_button': True, 139 'repository_branch': 'master', 140 } 141 142if BUILD_TYPE != 'oneapi' and BUILD_TYPE != 'dita': 143 html_theme_options = { 144 "extra_footer": "<div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a> <a data-wap_ref='dns' id='wap_dns' href='https://www.intel.com/content/www/us/en/privacy/intel-cookie- notice.html'>| Do Not Share My Personal Information</a> </div><div>© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others. No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document, with the sole exception that code included in this document is licensed subject to the Zero-Clause BSD open source license (OBSD), <a href='http://opensource.org/licenses/0BSD'>http://opensource.org/licenses/0BSD</a>. </div><br><div>oneTBB is licensed under Apache License Version 2.0. Refer to the <a href='https://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt'>LICENSE </a> file for the full license text and copyright notice.</div>" 145 } 146 147 148# Add any paths that contain custom static files (such as style sheets) here, 149# relative to this directory. They are copied after the builtin static files, 150# so a file named "default.css" will overwrite the builtin "default.css". 151html_static_path = ['_static'] 152 153if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita': 154 html_context = { 155 'css_files': [ 156 '_static/theme_overrides.css', # override wide tables in RTD theme 157 ], 158 } 159else: 160 html_js_files = ['custom.js'] 161 162html_theme_options = { 163 "logo": { 164 "text": "oneTBB Documentation", 165 } 166} 167 168html_logo = '_static/oneAPI-rgb-rev-100.png' 169html_favicon = '_static/favicons.png' 170 171 172# Custom sidebar templates, must be a dictionary that maps document names 173# to template names. 174# 175# The default sidebars (for documents that don't match any pattern) are 176# defined by theme itself. Builtin themes are using these templates by 177# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 178# 'searchbox.html']``. 179# 180# html_sidebars = {} 181 182 183# -- Options for HTMLHelp output --------------------------------------------- 184 185# Output file base name for HTML help builder. 186htmlhelp_basename = 'sphinx-infodevdoc' 187 188 189# -- Options for LaTeX output ------------------------------------------------ 190 191#latex_engine = 'xelatex' 192#PDF_TITLE = 'Information Development Template' 193# 194#with open(PREAMBLE_FILE, 'r', encoding='utf-8') as f: 195# PREAMBLE = f.read() 196# 197#with open(TITLE_PAGE_FILE, 'r', encoding='utf-8') as f: 198# TITLE_PAGE = f.read().replace('<PDF_TITLE>', PDF_TITLE) 199# 200# 201#latex_elements = { 202# # The paper size ('letterpaper' or 'a4paper'). 203# # 204# 'extraclassoptions': 'openany,oneside', 205# 'babel' : '\\usepackage[english]{babel}', 206# 'papersize': 'a4paper', 207# 'releasename':" ", 208# # Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup 209# # 'fncychap': '\\usepackage[Lenny]{fncychap}', 210# 'fncychap': '', 211# #'fontpkg': '\\usepackage{amsmath,amsfonts,amssymb,amsthm}', 212# 213# 'figure_align':'htbp', 214# # The font size ('10pt', '11pt' or '12pt'). 215# # 216# 'pointsize': '12pt', 217# 218# # Additional stuff for the LaTeX preamble. 219# # 220# 'preamble': PREAMBLE, 221# 222# 'maketitle': TITLE_PAGE, 223# # Latex figure (float) alignment 224# # 225# # 'figure_align': 'htbp', 226# 'sphinxsetup': \ 227# 'hmargin={0.7in,0.7in}, vmargin={1in,1in}, \ 228# verbatimwithframe=true, \ 229# TitleColor={rgb}{0,0.686,0.941}, \ 230# HeaderFamily=\\rmfamily\\bfseries, \ 231# InnerLinkColor={rgb}{0,0.686,0.941}, \ 232# OuterLinkColor={rgb}{0,0.686,0.941}', 233# 234# 'tableofcontents':' ' 235#} 236# 237#latex_logo = '_latex/intel_logo.png' 238## Grouping the document tree into LaTeX files. List of tuples 239## (source start file, target name, title, 240## author, documentclass [howto, manual, or own class]). 241#latex_documents = [ 242# (master_doc, 'sphinx-infodev.tex', u'sphinx-infodev Documentation', 243# u'Intel', 'manual'), 244#] 245 246#breathe_projects = { #todd-mod 247# project: "../doxygen/xml" 248#} 249#breathe_default_project = project 250 251# Setup the exhale extension 252#exhale_args = { #todd-mod 253# # These arguments are required 254# "containmentFolder": "./api", 255# "rootFileName": "library_root.rst", 256# "rootFileTitle": "Library API", 257# "doxygenStripFromPath": "..", 258# "fullApiSubSectionTitle": 'Full API' 259#} 260 261 262# -- Options for manual page output ------------------------------------------ 263 264# One entry per manual page. List of tuples 265# (source start file, name, description, authors, manual section). 266man_pages = [ 267 (master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation', 268 [author], 1) 269] 270 271 272# -- Options for Texinfo output ---------------------------------------------- 273 274# Grouping the document tree into Texinfo files. List of tuples 275# (source start file, target name, title, author, 276# dir menu entry, description, category) 277texinfo_documents = [ 278 (master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation', 279 author, 'sphinx-infodev', 'One line description of project.', 280 'Miscellaneous'), 281] 282 283 284# -- Options for Epub output ------------------------------------------------- 285 286# Bibliographic Dublin Core info. 287epub_title = project 288 289# The unique identifier of the text. This can be a ISBN number 290# or the project homepage. 291# 292# epub_identifier = '' 293 294# A unique identification for the text. 295# 296# epub_uid = '' 297 298# A list of files that should not be packed into the epub file. 299epub_exclude_files = ['search.html'] 300 301 302# -- Extension configuration ------------------------------------------------- 303 304# -- Options for intersphinx extension --------------------------------------- 305 306# Example configuration for intersphinx: refer to the Python standard library. 307intersphinx_mapping = {'https://docs.python.org/': None} 308 309# -- Options for todo extension ---------------------------------------------- 310 311# If true, `todo` and `todoList` produce output, else they produce nothing. 312todo_include_todos = True 313