-
Notifications
You must be signed in to change notification settings - Fork 3
/
conf.py
288 lines (227 loc) · 10.2 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from docutils import nodes
# -- Project information -----------------------------------------------------
project = 'SYCL 101'
copyright = '2023, various'
author = 'Urszula Guminska, Roberto Marivela, Benjamin Odom'
# -- Publishing Meta Data ----------------------------------------------------
ditaxml_default_codeblock_type='cpp'
ditaxml_make_flat=True
ditaxml_topic_meta={}
ditaxml_topic_meta["audience"]="etm-bd7e6ab0b34d4e95901e82eaa67c07a8" # Software Developer
ditaxml_topic_meta["classification_type"]="Public"
ditaxml_topic_meta["content_classification"]="Public"
ditaxml_topic_meta["metadata_classification"]="Public"
ditaxml_topic_meta["content_type"]="etm-8f11476223194fa68d9e0bad77696e2f" # Tutorial
ditaxml_topic_meta["document_title"]="SYCL 101"
ditaxml_topic_meta["description"]="An Introduction to Modern C++ using C++ 20 examples."
ditaxml_topic_meta["group_content_id"]="805686" # 694972_694973 for version 2023.0 #requested
ditaxml_topic_meta["publication_content_id"]="805688"
ditaxml_topic_meta["keywords"]="None"
ditaxml_topic_meta["locale"]="en-us"
ditaxml_topic_meta["menu"]="/content/data/globalelements/US/en/sub-navigation/idz/developer-sub-navigation-breadcrumb"
ditaxml_topic_meta["menu_parent"]="/content/www/us/en/developer/tools/overview"
ditaxml_topic_meta["notification_dl"]="[email protected]"
ditaxml_topic_meta["primary_business_owner"]="Odom, Benjamin J ([email protected])"
ditaxml_topic_meta["primary_owner"]="Odom, Benjamin J ([email protected])"
ditaxml_topic_meta["primary_tags"]="etm-086ec8c4b4074875b84ba0e35d214cf5" # Product Documentation
ditaxml_topic_meta["program_identifier"]="idz"
ditaxml_topic_meta["latest_version"]="true"
ditaxml_topic_meta["publish_date"]="2023-12-20" #TBD
ditaxml_topic_meta["revision_date"]="2023-12-01" #TBD
ditaxml_topic_meta["publication_root_node"]="oneapi"
ditaxml_topic_meta["publication_name"]="sycl-101"
ditaxml_topic_meta["latest_version"]="true"
ditaxml_prod_info={}
ditaxml_prod_info["prodname"]=""
ditaxml_prod_info["version"]="2023.1"
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.]
extensions = ['myst_parser',
'sphinx_md',
'rst2pdf.pdfbuilder',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',]
# 'sphinx_new_tab_link',] # to open links in a new tab
pdf_documents = [('index', u'SYCL_101', u'SYCL 101', u'Intel Corporation'),]
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README.md']
smartquotes=False
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
project_title = 'SYCL 101'
html_title = project_title
html_theme = 'pydata_sphinx_theme'
html_output_encoding = 'ascii'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = ['tiles.css','custom.css']
def fixFigureTargets(app, doctree, docname):
for node in doctree.traverse(nodes.reference):
internal = node.get('internal')
if not internal:
uri = node.get('refuri')
if not uri:
continue
if uri.endswith('.rst') and '://' not in uri:
node['refuri'] = uri.replace('.rst',app.builder.out_suffix)
def setup(app):
app.connect('doctree-resolved',fixFigureTargets)
# -- Options for LaTeX output ---------------------------------------------
latex_engine = 'pdflatex'
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
'papersize': 'letterpaper',
'releasename':" ",
# Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup
# 'fncychap': '\\usepackage[Lenny]{fncychap}',
'fncychap': '\\usepackage{fncychap}',
'fontpkg': '\\usepackage{amsmath,amsfonts,amssymb,amsthm}',
'figure_align':'htbp',
# The font size ('10pt', '11pt' or '12pt').
#
'pointsize': '12pt',
# Additional stuff for the LaTeX preamble.
#
'preamble': r'''
%%%%%%%%%%%%%%%%%%%% Meher %%%%%%%%%%%%%%%%%%
%%%add number to subsubsection 2=subsection, 3=subsubsection
%%% below subsubsection is not good idea.
\setcounter{secnumdepth}{3}
%
%%%% Table of content upto 2=subsection, 3=subsubsection
\setcounter{tocdepth}{2}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{graphicx}
%%% reduce spaces for Table of contents, figures and tables
%%% it is used "\addtocontents{toc}{\vskip -1.2cm}" etc. in the document
\usepackage[notlot,nottoc,notlof]{}
\usepackage{color}
\usepackage{transparent}
\usepackage{eso-pic}
\usepackage{lipsum}
\usepackage{footnotebackref} %%link at the footnote to go to the place of footnote in the text
%% spacing between line
\usepackage{setspace}
%%%%\onehalfspacing
%%%%\doublespacing
\singlespacing
%%%%%%%%%%% datetime
\usepackage{datetime}
\newdateformat{MonthYearFormat}{%
\monthname[\THEMONTH], \THEYEAR}
%% RO, LE will not work for 'oneside' layout.
%% Change oneside to twoside in document class
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
%%% Alternating Header for oneside
\fancyhead[L]{\ifthenelse{\isodd{\value{page}}}{ \small \nouppercase{\leftmark} }{}}
\fancyhead[R]{\ifthenelse{\isodd{\value{page}}}{}{ \small \nouppercase{\rightmark} }}
%%% Alternating Header for two side
%\fancyhead[RO]{\small \nouppercase{\rightmark}}
%\fancyhead[LE]{\small \nouppercase{\leftmark}}
%% for oneside: change footer at right side. If you want to use Left and right then use same as header defined above.
\fancyfoot[R]{\ifthenelse{\isodd{\value{page}}}{{\tiny Meher Krishna Patel} }{\href{http://pythondsp.readthedocs.io/en/latest/pythondsp/toc.html}{\tiny PythonDSP}}}
%%% Alternating Footer for two side
%\fancyfoot[RO, RE]{\scriptsize Meher Krishna Patel ([email protected])}
%%% page number
\fancyfoot[CO, CE]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\RequirePackage{tocbibind} %%% comment this to remove page number for following
\addto\captionsenglish{\renewcommand{\contentsname}{Table of contents}}
\addto\captionsenglish{\renewcommand{\listfigurename}{List of figures}}
\addto\captionsenglish{\renewcommand{\listtablename}{List of tables}}
% \addto\captionsenglish{\renewcommand{\chaptername}{Chapter}}
%%reduce spacing for itemize
\usepackage{enumitem}
\setlist{nosep}
%%%%%%%%%%% Quote Styles at the top of chapter
\usepackage{epigraph}
\setlength{\epigraphwidth}{0.8\columnwidth}
\newcommand{\chapterquote}[2]{\epigraphhead[60]{\epigraph{\textit{#1}}{\textbf {\textit{--#2}}}}}
%%%%%%%%%%% Quote for all places except Chapter
\newcommand{\sectionquote}[2]{{\quote{\textit{``#1''}}{\textbf {\textit{--#2}}}}}
''',
'maketitle': r'''
\pagenumbering{Roman} %%% to avoid page 1 conflict with actual page 1
\begin{titlepage}
\centering
\vspace*{40mm} %%% * is used to give space from top
\textbf{\Huge {Sphinx format for Latex and HTML}}
\vspace{0mm}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{logo.jpg}
\end{figure}
\vspace{0mm}
\Large \textbf{{Meher Krishna Patel}}
\small Created on : Octorber, 2017
\vspace*{0mm}
\small Last updated : \MonthYearFormat\today
%% \vfill adds at the bottom
\vfill
\small \textit{More documents are freely available at }{\href{http://pythondsp.readthedocs.io/en/latest/pythondsp/toc.html}{PythonDSP}}
\end{titlepage}
\clearpage
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables
\clearpage
\pagenumbering{arabic}
''',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
'sphinxsetup': \
'hmargin={0.7in,0.7in}, vmargin={1in,1in}, \
verbatimwithframe=true, \
TitleColor={rgb}{0,0,0}, \
HeaderFamily=\\rmfamily\\bfseries, \
InnerLinkColor={rgb}{0,0,1}, \
OuterLinkColor={rgb}{0,0,1}',
'tableofcontents':' ',
}
#latex_logo = '_static/logo.jpg'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
#latex_documents = [
# ('main.tex', 'Sphinx format for Latex and HTML',
# 'Meher Krishna Patel', 'report')
#]