1 %%% This file contains definitions of various useful macros and environments %%%
2 %%% Please add more macros here instead of cluttering other files with them. %%%
4 %%% Minor tweaks of style
6 % These macros employ a little dirty trick to convince LaTeX to typeset
7 % chapter headings sanely, without lots of empty space above them.
10 \def\@makechapterhead#1{
11 {\parindent \z@ \raggedright \normalfont
12 \Huge\bfseries \thechapter. #1
16 \def\@makeschapterhead#1{
17 {\parindent \z@ \raggedright \normalfont
24 % This macro defines a chapter, which is not numbered, but is included
25 % in the table of contents.
28 \addcontentsline{toc}{chapter}{#1}
31 % Draw black "slugs" whenever a line overflows, so that we can spot it easily.
34 %%% Macros for definitions, theorems, claims, examples, ... (requires amsthm package)
37 \newtheorem{thm}{Theorem}
38 \newtheorem{lemma}[thm]{Lemma}
39 \newtheorem{claim}[thm]{Claim}
42 \newtheorem{defn}{Definition}
45 \newtheorem*{cor}{Corollary}
46 \newtheorem*{rem}{Remark}
47 \newtheorem*{example}{Example}
49 %%% An environment for proofs
51 %%% FIXME %%% \newenvironment{proof}{
52 %%% FIXME %%% \par\medskip\noindent
53 %%% FIXME %%% \textit{Proof}.
55 %%% FIXME %%% \newline
56 %%% FIXME %%% \rightline{$\square$} % or \SquareCastShadowBottomRight from bbding package
59 %%% An environment for typesetting of program code and input/output
60 %%% of programs. (Requires the fancyvrb package -- fancy verbatim.)
62 \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small, frame=single}
64 %%% The field of all real and natural numbers
65 \newcommand{\R}{\mathbb{R}}
66 \newcommand{\N}{\mathbb{N}}
68 %%% Useful operators for statistics and probability
69 \DeclareMathOperator{\pr}{\textsf{P}}
70 \DeclareMathOperator{\E}{\textsf{E}\,}
71 \DeclareMathOperator{\var}{\textrm{var}}
72 \DeclareMathOperator{\sd}{\textrm{sd}}
74 %%% Transposition of a vector/matrix
75 \newcommand{\T}[1]{#1^\top}
77 %%% Various math goodies
78 \newcommand{\goto}{\rightarrow}
79 \newcommand{\gotop}{\stackrel{P}{\longrightarrow}}
80 \newcommand{\maon}[1]{o(n^{#1})}
81 \newcommand{\abs}[1]{\left|{#1}\right|}
82 \newcommand{\dint}{\int_0^\tau\!\!\int_0^\tau}
83 \newcommand{\isqr}[1]{\frac{1}{\sqrt{#1}}}
85 %%% Various table goodies
86 \newcommand{\pulrad}[1]{\raisebox{1.5ex}[0pt]{#1}}
87 \newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}