-
-
Notifications
You must be signed in to change notification settings - Fork 178
/
header.tex
163 lines (139 loc) · 4.35 KB
/
header.tex
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
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\LARGE\bfseries}{\thesection}{1em}{}
\titlespacing{\section}{0pt}{0pt}{30pt}
\newcommand{\sectionbreak}{\clearpage}
%%%% pandoc-fignos: required package
\usepackage{caption}
%% pandoc-fignos: environment to disable figure caption prefixes
\makeatletter
\newcounter{figno}
\newenvironment{fignos:no-prefix-figure-caption}{
\caption@ifcompatibility{}{
\let\oldthefigure\thefigure
\let\oldtheHfigure\theHfigure
\renewcommand{\thefigure}{figno:\thefigno}
\renewcommand{\theHfigure}{figno:\thefigno}
\stepcounter{figno}
\captionsetup{labelformat=empty}
}
}{
\caption@ifcompatibility{}{
\captionsetup{labelformat=default}
\let\thefigure\oldthefigure
\let\theHfigure\oldtheHfigure
\addtocounter{figure}{-1}
}
}
\makeatother
%%%% This is for listings
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries,
stringstyle=\color[rgb]{0.31,0.60,0.02},
commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape,
numberstyle=\footnotesize,
stepnumber=1,
numbersep=5pt,
backgroundcolor=\color[RGB]{248,248,248},
keepspaces=true,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
escapeinside={\%*}{*)},
linewidth=\textwidth,
basewidth=0.5em,
extendedchars=false,
belowskip=-0.3 \baselineskip
}
\newcommand{\passthrough}[1]{#1}
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{\thepage}
\fancyhead[RE]{\textit{ \nouppercase{\leftmark}} }
\fancyhead[RO]{\textit{ \nouppercase{\rightmark}} }
\usepackage[nottoc]{tocbibind}
\usepackage[most]{tcolorbox}
\newtcolorbox{myquote}{colback=yellow!7!white,grow to right by=-10mm,grow to left by=-10mm, boxrule=0pt,boxsep=0pt,breakable}
\newcommand{\personal}[1]{\begin{myquote} \textbf{Personal Experience:} #1 \end{myquote}}
\newcommand{\personalOpinion}[1]{\begin{myquote} \textbf{Personal Opinion:} #1 \end{myquote}}
\usepackage{color}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{darkblue}{rgb}{0,0,0.5}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor=darkblue,
filecolor=darkgreen,
urlcolor=darkblue,
citecolor=darkblue,
pdfsubject={performance analysis},
pdfkeywords={performance analysis},
}
\usepackage{pmboxdraw}
\usepackage{subfig}
\newcommand{\pcdoc}{Pandoc-crossref documentation}
\makeatletter
\@ifpackageloaded{subfig}{}{\usepackage{subfig}}
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\captionsetup[subfloat]{margin=0.5em}
\captionsetup{font=small}
\captionsetup{justification=centering}
\@ifpackageloaded{float}{}{\usepackage{float}}
\floatstyle{ruled}
\@ifundefined{c@chapter}{\newfloat{codelisting}{htb}{lop}}{\newfloat{codelisting}{htb}{lop}[chapter]}
\floatname{codelisting}{Listing}
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
% Redefine the default htbp figure placement
\def\fps@figure{htb}
\makeatother
\usepackage{graphicx}
\graphicspath{{chapters/0-Preface}}
% for wrapping text around figures
\usepackage{wrapfig}
% support for glossary
%\usepackage{glossaries}
%\makenoidxglossaries
%\input{glossary.tex}
\renewcommand*\contentsname{}
\usepackage{multicol}
\usepackage{footnotebackref}
\interfootnotelinepenalty=10000
\usepackage{bookmark}
\usepackage{etoolbox}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=1.5pt] (char) {#1};}}
\makeatletter
\newcommand*{\AddChapterPrefixInBookmarks}{%
\if@mainmatter
\ifnum\bookmarkget{level}=0 %
\preto\bookmark@text{\@chapapp\space}%
\fi
\fi
}
\makeatother
\bookmarksetup{
numbered,
addtohook=\AddChapterPrefixInBookmarks,
}
% Set counter to include chapter number
\usepackage{chngcntr}
\counterwithin{figure}{section}
\counterwithin{table}{section}
\counterwithin{codelisting}{section}
% I added this line to help resolve color printing issue by removing image transparency.
% Not sure if it helps though.
\pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}
% this one to skip adding the title and the author
\AtBeginDocument{\let\maketitle\relax}