-
Notifications
You must be signed in to change notification settings - Fork 1
/
phdstyle.sty
168 lines (139 loc) · 5.36 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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{phdstyle}[2021/01/14 v1.3]
%%% PACKAGES
%% Standalone
\RequirePackage{standalone}
%% Encoding
\RequirePackage[utf8]{inputenc} % encoding for the input of the document
\RequirePackage[T1]{fontenc} % encoding on the fonts
%% Mathematics
\RequirePackage{mathptmx}
\RequirePackage{amsmath}
\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
\everymath
{
\ifodd\value{page} % Allow multiline equations
\allowdisplaybreaks[1] % to break across two pages:
\else % - Breaks from odd to even pages are allowed,
\allowdisplaybreaks[4] % but discouraged.
\fi % - Breaks from even to odd pages are allowed.
}
%% Language
\RequirePackage[estonian,english]{babel} % multilingual support for tex
\RequirePackage{csquotes}
%%% Fonts and dimensions
\renewcommand{\sfdefault}{phv}
\setlength\topmargin{-2.5mm}
\setlength\headheight{0mm}
\setlength\headsep{0mm}
\setlength\textheight{43\baselineskip}
\setlength\footskip{13.5mm}
\setlength\textwidth{125mm}
\setlength\oddsidemargin{\paperwidth}
\addtolength\oddsidemargin{-\textwidth}
\setlength\oddsidemargin{0.5\oddsidemargin}
\addtolength\oddsidemargin{-1in}
\setlength\evensidemargin{\oddsidemargin}
%% Organising tools
\RequirePackage{color}
% \RequirePackage{cite}
%% Bibliography
\usepackage[backend=biber,
style=alphabetic, % possible options: numeric, alphabetic, for more options refer to https://www.overleaf.com/learn/latex/biblatex_citation_styles
defernumbers=true, % necessary for the roman numerals on the list of publications
refsection=section]
{biblatex}
% Roman numerals for the list of the publications: https://tex.stackexchange.com/questions/299064/biblatex-two-bibliographies-with-different-styles-and-sortings
\DeclareFieldFormat{Roman}{\RN{#1}}
% The following definition is copied from numeric.bbx
\defbibenvironment{roman-numerals}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield[Roman]{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
% == drawing black boxes with numbers before publications ==
\usepackage{tikz, blindtext}
%% enumerating
% \usepackage{enumerate}
\usepackage{pdfpages}
%% Cross references and links
\RequirePackage{url}
\RequirePackage[bookmarks,colorlinks,
linkcolor=black,citecolor=black,filecolor=black,urlcolor=black,
pdfhighlight=/O,pdfstartview=FitH,unicode]{hyperref}
%% USER-DEFINED MACROS
%% Operators
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\rank}{rank}
%% 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
%% Blackboard bold
\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
%% Bold face
\renewcommand{\a}{\mathbf{a}}
\renewcommand{\b}{\mathbf{b}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\0}{\mathbf{0}}
\newcommand{\1}{\mathbf{1}}
%% Glossaries
\RequirePackage{longtable}
\RequirePackage[acronym]{glossaries}
% abbreviations:
\newacronym{ny}{NY}{New York}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un}{UN}{United Nations}
% nomenclature:
\newglossaryentry{angelsperarea}{
name = $a$ ,
description = The number of angels per unit area,
}
\newglossaryentry{numofangels}{
name = $N$ ,
description = The number of angels per needle point
}
\newglossaryentry{areaofneedle}{
name = $A$ ,
description = The area of the needle point
}
\makeglossaries
%% Miscellaneous
\renewcommand{\qedsymbol}{\(\blacksquare\)}
\newcommand{\arxiv}[1]{arXiv:\space\href{http://arxiv.org/abs/#1}{#1}\xspace}
\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