forked from DanielSank/vankampen-stochastic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.tex
34 lines (31 loc) · 1.06 KB
/
macros.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
\usepackage{amsmath}
\usepackage{amstext}
\usepackage{amsfonts}
\usepackage{import}
\usepackage{coseoul}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=blue,
urlcolor=black
}
% See this Stack Exchange question for information on how this macro works
% http://tex.stackexchange.com/questions/245348/recursively-import-sub-document-at-arbitrary-level
\makeatletter
\newcounter{currentimportdepth}
\setcounter{currentimportdepth}{0}
\newcommand{\subimportlevel}[2]{
\expandafter\edef\csname @currentlevel\thecurrentimportdepth\endcsname{\thecurrentlevel}
\addtocounter{currentimportdepth}{1}
\subimport*{#1}{#2}
\addtocounter{currentimportdepth}{-1}
\setcounter{currentlevel}{\csname @currentlevel\thecurrentimportdepth\endcsname}
}
\makeatother
\newcommand{\avg}[1]{\left \langle #1 \right \rangle}
\newcommand{\braced}[1]{\left\{ #1 \right\}}
\newcommand{\bracketed}[1]{\left[ #1 \right]}
\newcommand{\ket}[1]{\left \lvert #1 \right \rangle}
\newcommand{\braket}[2]{\left \langle #1 | #2 \right \rangle}