-
Notifications
You must be signed in to change notification settings - Fork 29
/
_global_settings.tex
172 lines (147 loc) · 5.33 KB
/
_global_settings.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
164
165
166
167
168
169
170
171
172
\ifdefined\DoubleSided
\documentclass[twoside,openright,a4paper]{nusthesis}
\else
\documentclass[a4paper]{nusthesis}
\fi
\dsp % pseudo double spacing
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
%%% The abstract of the thesis is titled as "Abstract" by default.
%%% However, the Graduate Division may require you to name it as "Summary".
%\renewcommand{\abstractname}{Summary}
%\addto{\captionsenglish}{\renewcommand{\abstractname}{Summary}}
%%% Depth of section numbering
\setcounter{secnumdepth}{3}
%%% Depth of numbering in table of content
\setcounter{tocdepth}{2}
\usepackage{indentfirst} % indent the first paragraph of a section
\usepackage{silence} % ignore trivial warnings
\WarningFilter{biblatex}{File 'english-ieee.lbx'}
\usepackage{bookmark}
\usepackage[
backend=biber,
style=ieee,
citestyle=numeric,
giveninits=true,
sorting=nyt,
maxbibnames=99,
dashed=false,
doi=false]{biblatex}
\DeclareFieldFormat*{title}{``#1''\newunitpunct} % move comma outside the quotation mark
\addbibresource{references.bib}
\newcommand{\citet}[1]{%
\AtNextCite{\defcounter{maxnames}{1}\defcounter{minnames}{1}}%
\citeauthor{#1}%
}
\usepackage{microtype} % Better typography
\usepackage{tabulary} % Automatic table sizing
\usepackage{hhline}
\usepackage{enumitem}
\usepackage{hyperref}
\renewcommand{\sectionautorefname}{\S}
\let\subsectionautorefname\sectionautorefname
\let\subsubsectionautorefname\sectionautorefname
\renewcommand{\chapterautorefname}{Chapter}
\usepackage{listings}
\renewcommand{\lstlistingname}{Code}
\lstset{language=SQL,
morekeywords={ONLINE, WITHIN},
frame=none,
float,
basicstyle=\ttfamily\normalsize,
keywordstyle=\bfseries,
numbers=none,
showstringspaces=false,
aboveskip=-2pt, %\smallskipamount
belowskip=-4pt, %\smallskipamount
xleftmargin=1em,
escapeinside={(*@}{@*)},
captionpos=b
}
\let\proof\relax
\let\endproof\relax
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{defn}{Definition} \newcommand{\defnautorefname}{Definition}
\theoremstyle{plain}
\newtheorem{rul}{Rule} \newcommand{\rulautorefname}{Rule}
\newtheorem{thm}{Theorem} \newcommand{\thmautorefname}{Theorem}
\newtheorem{lemma}{Lemma} \newcommand{\lemmaautorefname}{Lemma}
\newtheorem{coroll}{Corollary} \newcommand{\corollautorefname}{Corollary}
\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\vbar}{\vert}{\vert}
\DeclarePairedDelimiter{\vbarbar}{\Vert}{\Vert}
\DeclarePairedDelimiter{\parenLR}{\lparen}{\rparen}
\DeclarePairedDelimiter{\brackLR}{\lbrack}{\rbrack}
\DeclarePairedDelimiter{\braceLR}{\lbrace}{\rbrace}
\DeclarePairedDelimiter{\angleLR}{\langle}{\rangle}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\usepackage{interval}
\intervalconfig{soft open fences}
\newcommand{\intervalO}{\interval[open]}
\newcommand{\intervalOL}{\interval[open left]}
\newcommand{\intervalOR}{\interval[open right]}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\SetAlgorithmName{Algorithm}{Algorithm}{Algorithm}
\newcommand{\AlgoFontSize}{\small} % \scriptsize \footnotesize \small \normalsize
\IncMargin{0.5em}
\SetCommentSty{textnormal}
\SetNlSty{}{}{:}
\SetAlgoNlRelativeSize{0}
\SetKwInput{KwGlobal}{Global}
\SetKwInput{KwPrecondition}{Precondition}
\SetKwProg{Proc}{Procedure}{:}{}
\SetKwProg{Func}{Function}{:}{}
\SetKw{And}{and}
\SetKw{Or}{or}
\SetKw{To}{to}
\SetKw{DownTo}{downto}
\SetKw{Break}{break}
\SetKw{Continue}{continue}
\SetKw{SuchThat}{\textit{s.t.}}
\SetKw{WithRespectTo}{\textit{wrt}}
\SetKw{Iff}{\textit{iff.}}
\SetKw{MaxOf}{\textit{max of}}
\SetKw{MinOf}{\textit{min of}}
\SetKwBlock{Match}{match}{}{}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{color}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{soul}
\soulregister\cite7
\soulregister\ref7
\soulregister\pageref7
\soulregister\autoref7
\soulregister\eqref7
\newcommand{\hlred}[2][Lavender]{{\sethlcolor{#1}\hl{#2}}}
\newcommand{\hlblue}[2][SkyBlue]{{\sethlcolor{#1}\hl{#2}}}
\newcommand{\hlyellow}[2][GreenYellow]{{\sethlcolor{#1}\hl{#2}}}
\newcommand{\hlgreen}[2][YellowGreen]{{\sethlcolor{#1}\hl{#2}}}
\let\originaleqref\eqref
\renewcommand{\eqref}{Equation~\ref}
%%% Use this command when you need to add a hyphen with hyphenation
%%% enabled for the individual compound words
\newcommand{\zz}{-\nolinebreak\hspace{0pt}}
%%% Handy commands for image/figure insertion
\newcommand*{\RootPicDir}{pic}
\newcommand*{\PicDir}{\RootPicDir}
\newcommand*{\ResetPicDir}{\renewcommand*{\PicDir}{\RootPicDir}}
\newcommand*{\SetPicSubDir}[1]{\renewcommand*{\PicDir}{\RootPicDir /#1}}
\newcommand*{\Pic}[2]{\PicDir /#2.#1}
\newcommand*{\RootExpDir}{exp}
\newcommand*{\ExpDir}{\RootExpDir}
\newcommand*{\ResetExpDir}{\renewcommand*{\ExpDir}{\RootExpDir}}
\newcommand*{\SetExpSubDir}[1]{\renewcommand*{\ExpDir}{\RootExpDir /#1}}
\newcommand*{\Exp}[2]{\ExpDir /#2.#1}
\newcommand*{\BeforeCaptionVSpace}{1ex}
\newcommand*{\BeforeSubCaptionVSpace}{0.75ex}
%%% For example code used only
\usepackage{lipsum} % for generating dummy text
\newcommand{\CMD}[1]{\texttt{\string#1}} % for typing a command