-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththesis_preamble.tex
155 lines (121 loc) · 5.18 KB
/
thesis_preamble.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
%---- Math related packages
\usepackage{amsmath}
\usepackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage{amsbsy}
%---- Astronomy related packages
\usepackage{wasysym} % astronomical symbols
%---- Latex stuff
\usepackage{fmtcount} % access to page and footer counters
\usepackage{multirow} % so columns in tabular can span multiple rows
\usepackage{hhline}
%---- Graphics packages
\usepackage{graphics}
\usepackage{graphicx}
%---- Bibtex bibliography
\usepackage{cite}
%---- Notes in the text
% This should be replaced with something better
\usepackage{colortbl}
\definecolor{notegray}{gray}{0.85}
\newcommand{\NOTE}[1]{\colorbox{notegray}{#1}}
%---- Vector macros
\renewcommand{\vec}[1]{\ensuremath{\boldsymbol{#1}}}
\newcommand{\vechat}[1]{\ensuremath{\vec{\hat #1}}}
\newcommand{\vecbar}[1]{\ensuremath{\vec{\bar #1}}}
\newcommand{\vectilde}[1]{\ensuremath{\vec{\tilde #1}}}
\newcommand{\vecsubtilde}[2]{\ensuremath{\vec{\tilde #1}_{#2}}}
\newcommand{\vectildeest}[3]{\ensuremath{\vec{\tilde #1}_{#2|#3}}}
\newcommand{\vecsubbar}[2]{\ensuremath{\vec{\bar #1}_{#2}}}
\newcommand{\vechatest}[3]{\ensuremath{\vec{\hat #1}_{#2|#3}}}
\newcommand{\vechatsub}[2]{\ensuremath{\vec{\hat #1}_{#2}}}
\newcommand{\vecsub}[2]{\ensuremath{\vec{#1}_{#2}}}
\newcommand{\veczero}{\ensuremath{\vec{0}}}
%---- Matrix macros
\newcommand{\mat}[1]{\ensuremath{\boldsymbol{#1}}}
\newcommand{\matest}[3]{\ensuremath{\mat{#1}_{#2|#3}}}
\newcommand{\mattildeest}[3]{\ensuremath{\mattilde{#1}_{#2|#3}}}
\newcommand{\mathat}[1]{\ensuremath{\mat{{\hat #1}}}}
\newcommand{\matbar}[1]{\ensuremath{\mat{{\bar #1}}}}
\newcommand{\mattilde}[1]{\ensuremath{\mat{{\tilde #1}}}}
\newcommand{\matsubbar}[2]{\ensuremath{\mat{{\bar #1}}_{#2}}}
\newcommand{\matsubtilde}[2]{\ensuremath{\mat{{\tilde #1}}_{#2}}}
\newcommand{\matsub}[2]{\ensuremath{\mat{#1}_{#2}}}
\newcommand{\matzero}{\ensuremath{\mat{O}}}
%---- Statistics macros
\newcommand{\E}[1]{\ensuremath{ E[#1]}}
\newcommand{\Covs}[1]{\ensuremath{\mathit{Cov}\bigparens{#1}}}
\newcommand{\Cov}[2]{\ensuremath{\mathit{Cov}\bigparens{#1, #2}}}
%---- Blackboard and script letters
\newcommand{\R}[1]{\ensuremath{\mathbb{R}^{#1}}}
%---- Useful stuff for math
\providecommand{\abs}[1]{\lvert#1\rvert}
\providecommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\apri}{{\it a priori~}}
\newcommand{\apost}{{\it a posteriori~}}
\newcommand{\argmaxtext}{\operatornamewithlimits{arg\,max}~}
\newcommand{\argmintext}{\operatornamewithlimits{arg\,min}~}
\newcommand{\argmin}[1]{\underset{#1}{\argmintext}}
\newcommand{\argmax}[1]{\underset{#1}{\argmaxtext}}
\newcommand{\Span}[1]{\textit{Span}\bigparens{#1}}
\newcommand{\Null}[1]{\textit{Null}\bigparens{#1}}
\newcommand{\pd}[2]{\ensuremath{\frac{\partial~#1}{\partial #2}}}
\newcommand{\pdil}[2]{\ensuremath{\partial #1/\partial #2}} %partial derivive inline
%---- left-right blocks for nice nesting of brackets etc
\newcommand{\parens}[1]{\left( #1 \right)}
\newcommand{\angles}[1]{\left< #1 \right>}
\newcommand{\brackets}[1]{\left[ #1 \right]}
\newcommand{\braces}[1]{\left\{ #1 \right\}}
\newcommand{\bigparens}[1]{\big( #1 \big)}
\newcommand{\bigangles}[1]{\big< #1 \big>}
\newcommand{\bigbrackets}[1]{\big[ #1 \big]}
\newcommand{\bigbraces}[1]{\big\{ #1 \big\}}
%---- Astronomy paper stuff
\newcommand{\FITSKeyword}[1]{\texttt{#1}}
\newcommand{\ccode}[1]{\texttt{#1}} % for c-language code
%---- For the algorithm environment
\usepackage{algpseudocode}
\usepackage{algorithm}
\algsetblockx{Begin}{End}{}{0.125in}[1]{{\bf Begin} #1}[1]{{\bf End} #1}
\algsetblockx{MyFor}{MyForEnd}{}{0.125in}[1]{{\bf for}~#1~{\bf do}}{{\bf end for}}
\algsetblockx{MyIf}{MyIfEnd}{}{0.125in}[1]{{\bf if}~#1~{\bf then}}{{\bf end if}}
\algsetblockx{BeginComBlock}{EndComBlock}{}{0.125in}[1]{\texttt{// #1}}{}
%\algblockx{Begin}{End}[1]{{\bf Begin} #1}[1]{{\bf End} #1}
%\algblockx{BeginComBlock}{EndComBlock}[1]{\texttt{// #1}}{}
%---- Count algorithms correctly
\numberwithin{algorithm}{chapter}
%---- Make foot notes not suck
\usepackage[stable]{footmisc}
%---- Readable figure captions
\usepackage[font=sf,labelfont=bf,margin=2em]{caption}
%---- Allow subfigures
\usepackage{subfig}
%---- Line spacing
\usepackage{setspace}
%---- Section-like items
\newcommand{\SECcmd}{Sec}
\newcommand{\SEC}[1]{{\SECcmd}.~\ref{#1}}
\newcommand{\SECs}[1]{{\SECcmd}s.~\ref{#1}}
\newcommand{\CHcmd}{Ch}
\newcommand{\CH}[1]{{\CHcmd}.~\ref{#1}}
\newcommand{\CHs}[1]{{\CHcmd}s.~\ref{#1}}
%---- Floating items
\newcommand{\ALGcmd}{Alg}
\newcommand{\ALG}[1]{{\ALGcmd}.~\ref{#1}}
\newcommand{\ALGs}[1]{{\ALGcmd}s.~\ref{#1}}
\newcommand{\FIGcmd}{Fig}
\newcommand{\FIG}[1]{{\FIGcmd}.~\ref{#1}}
\newcommand{\FIGs}[1]{{\FIGcmd}s.~\ref{#1}}
\newcommand{\TBLcmd}{Tbl}
\newcommand{\TBL}[1]{{\TBLcmd}.~\ref{#1}}
\newcommand{\TBLs}[1]{{\TBLcmd}s.~\ref{#1}}
%---- List Items
\newcommand{\REQcmd}{Req}
\newcommand{\REQ}[1]{{\REQcmd}.~\ref{#1}}
\newcommand{\REQs}[1]{{\REQcmd}s.~\ref{#1}}
\newcommand{\EQcmd}{Eq}
\newcommand{\EQ}[1]{{\EQcmd}.~\ref{#1}}
\newcommand{\EQs}[1]{{\EQcmd}s.~\ref{#1}}
\newcommand{\LINEcmd}{Line}
\newcommand{\LINE}[1]{{\LINEcmd}~\ref{#1}}
\newcommand{\LINEs}[1]{{\LINEcmd}s~\ref{#1}}