This repository has been archived by the owner on Nov 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phdstyle.sty
169 lines (129 loc) · 5.89 KB
/
phdstyle.sty
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{phdstyle}[2017/10/31 Custom LaTeX style]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PACKAGES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Standalone
\RequirePackage{standalone}
%% Encoding
\RequirePackage[utf8]{inputenx}
\RequirePackage[T1]{fontenc}
%% Fonts and typography
\RequirePackage{lmodern} % Latin Modern
\renewcommand{\sfdefault}{phv} % Helvetica
\RequirePackage[scaled]{beramono} % Bera Mono (Bitstream Vera Sans Mono)
\RequirePackage[final]{microtype} % Improved typography
\RequirePackage{enumitem} % Format lists
\setlist[description]{font = \bfseries\sffamily}
\RequirePackage{siunitx} % Typesetting units
\RequirePackage[final]{listings} % Typesetting code
\lstset
{
basicstyle = \ttfamily\footnotesize,
keywordstyle = \color{uiored},
commentstyle = \color{uiogrey},
stringstyle = \itshape
}
%% Mathematics
\RequirePackage{amssymb} % Extra symbols
\RequirePackage{amsthm} % Theorem-like environments
\RequirePackage{thmtools} % Theorem-like environments, extends amsthm
\RequirePackage{mathtools} % Fonts and environments for mathematical formulae
\RequirePackage{mathrsfs} % Script font with \mathscr{}
\RequirePackage{dsfont} % Double stroke font with \mathds{}
\RequirePackage{cancel} % Cancel terms with \cancel, \bcancel or \xcancel
\RequirePackage{stmaryrd} % Brackets
%% Tables
\RequirePackage{multirow} % Rows spanning multiple lines in tables
\RequirePackage{tablefootnote} % Footnotes for tables
%% Drawing
\RequirePackage{tikz} % Drawing tool
\usetikzlibrary{calc}
\usetikzlibrary{intersections}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{cd} % An implementation of simple commutative diagrams in tikz
\RequirePackage[all]{xy} % For backwards compatibility with respect to publishing articles.
%% Organising tools
\RequirePackage[notref, notcite]{showkeys} % Labels in margins
\renewcommand{\showkeyslabelformat}[1]{\fbox{\normalfont\tiny\ttfamily #1}}
\RequirePackage[obeyFinal,
color = LightGray,
bordercolor = LightGray,
textsize = tiny,
textwidth = 25mm,
figwidth = 0.99\linewidth]{todonotes} % Marginal notes
%% Miscellaneous
\RequirePackage{xspace} % Clever space
\RequirePackage{titletoc} % Partial table of contents
%% Bibliography
\RequirePackage[backend = biber,
style = alphabetic]{biblatex}
\addbibresource{bibliography.bib}
%% Cross references and links
\RequirePackage{varioref} % \vref
\RequirePackage{hyperref} % Clickable links
\RequirePackage[nameinlink, capitalize, noabbrev]{cleveref} % \cref
\RequirePackage{doi} % Ignore LaTeX syntax in DOI links
\renewcommand{\doitext}{DOI:}
\urlstyle{sf}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% USER-DEFINED MACROS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Environments
\declaretheoremstyle[headfont = \bfseries\sffamily,
notefont = \normalfont,
spaceabove = 6pt plus 0pt minus 2pt]{plain}
\declaretheoremstyle[headfont = \bfseries\sffamily,
notefont = \normalfont,
spaceabove = 6pt plus 0pt minus 2pt]{definition}
\declaretheorem[style = plain, numberwithin = section]{theorem}
\declaretheorem[style = plain, sibling = theorem]{corollary}
\declaretheorem[style = plain, sibling = theorem]{lemma}
\declaretheorem[style = plain, sibling = theorem]{proposition}
\declaretheorem[style = plain, sibling = theorem]{observation}
\declaretheorem[style = plain, sibling = theorem]{conjecture}
\declaretheorem[style = definition, sibling = theorem]{definition}
\declaretheorem[style = definition, sibling = theorem]{example}
\declaretheorem[style = definition, sibling = theorem]{notation}
\declaretheorem[style = remark, sibling = theorem]{remark}
\declaretheorem[style = definition, numbered = no]{acknowledgements}
\crefname{observation}{Observation}{Observations}
\Crefname{observation}{Observation}{Observations}
\crefname{conjecture}{Conjecture}{Conjectures}
\Crefname{conjecture}{Conjecture}{Conjectures}
\crefname{notation}{Notation}{Notations}
\Crefname{notation}{Notation}{Notations}
\crefname{paper}{Paper}{Papers}
\Crefname{paper}{Paper}{Papers}
%% Operators
\DeclareMathOperator{\im}{im}
%% Delimiters
\DeclarePairedDelimiter{\p}{\lparen}{\rparen} % Parenthesis
\DeclarePairedDelimiter{\set}{\lbrace}{\rbrace} % Set
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % Absolute value
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert} % Norm
\DeclarePairedDelimiter{\ip}{\langle}{\rangle} % Inner product, ideal
\DeclarePairedDelimiter{\sqb}{\lbrack}{\rbrack} % Square brackets
\DeclarePairedDelimiter{\ssqb}{\llbracket}{\rrbracket} % Double brackets
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} % Ceiling
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} % Floor
%% Sets
\newcommand{\N}{\mathbb{N}} % Natural numbers
\newcommand{\Z}{\mathbb{Z}} % Integers
\newcommand{\Q}{\mathbb{Q}} % Rational numbers
\newcommand{\R}{\mathbb{R}} % Real numbers
\newcommand{\C}{\mathbb{C}} % Complex numbers
\newcommand{\A}{\mathbb{A}} % Affine space
\renewcommand{\P}{\mathbb{P}} % Projective space
%% Vectors
\renewcommand{\a}{\mathbf{a}}
\renewcommand{\b}{\mathbf{b}}
\renewcommand{\c}{\mathbf{c}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\0}{\mathbf{0}}
% \newcommand{\1}{\mathbf{1}} There is incompatibility between this and the xy-pic package
%% Miscellaneous
\renewcommand{\qedsymbol}{\(\blacksquare\)}
\newcommand{\ie}{\leavevmode\unskip, i.e.,\xspace}
\newcommand{\eg}{\leavevmode\unskip, e.g.,\xspace}
\newcommand{\dash}{\textthreequartersemdash\xspace}
\newcommand{\TikZ}{Ti\textit{k}Z\xspace}
\newcommand{\matlab}{\textsc{Matlab}\xspace}
\endinput