-
Notifications
You must be signed in to change notification settings - Fork 3
/
commands.tex
177 lines (125 loc) · 5.15 KB
/
commands.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
% Insert HERE any additional commands
% as examples here are some commands from the JFM template:
%
\newcommand\etal{\mbox{\textit{et al.}}}
\newcommand\etc{etc.\ }
\newcommand\eg{e.g.\ }
\providecommand\bnabla{\boldsymbol{\nabla}}
\providecommand\bcdot{\boldsymbol{\cdot}}
\newcommand\Rey{\mbox{\textit{Re}}} % Reynolds number
\newcommand\Pran{\mbox{\textit{Pr}}} % Prandtl number, cf TeX's \Pr product
\newcommand\Pen{\mbox{\textit{Pe}}} % Peclet number
% Commands used for chapter open science
\newcommand{\fluidpack}[1]{\href{https://fluid#1.readthedocs.io}{%
\codeinline{fluid#1}}}
% \newcommand{\codeinline}[1]{\mintinline{python}{#1}}
\newcommand{\codeinline}[1]{\texttt{#1}}
\newcommand{\fluiddyn}{\fluidpack{dyn}\xspace}
\newcommand{\Numpy}{\codeinline{Numpy}\xspace}
\newcommand{\Scipy}{\codeinline{Scipy}\xspace}
\newcommand{\pack}[1]{\codeinline{#1}\xspace}
\newcommand{\mako}{\href{http://www.makotemplates.org/}{\pack{mako}}}
\newcommand{\libpack}[2][]{%
\ifstrequal{#2}{FFTW}{%
\href{http://fftw.org}{#2}}{%
\ifstrequal{#2}{MKL}{%
\href{https://software.intel.com/en-us/mkl}{#2}}{%
\ifstrequal{#2}{PFFT}{%
\href{https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software.php.en}{#2}}{%
\ifstrequal{#2}{P3DFFT}{%
\href{http://p3dfft.net}{#2}}{%
\ifstrequal{#2}{2decomp\&FFT}{%
\href{http://www.2decomp.org}{#2}}{%
\ifstrequal{#2}{cuFFT}{%
\href{https://docs.nvidia.com/cuda/cufft/index.html}{#2}}{%
\ifstrequal{#2}{clFFT}{%
\href{https://clmathlibraries.github.io/clFFT/}{#2}}{%
\ifstrequal{#2}{FFTPACK}{%
\href{http://www.netlib.org/fftpack}{#2}}{%
\ifstrempty{#1}{%
#2
}{%
\href{#1}{#2}}
}}}}}}}}\xspace % Close the if-else-if tree above!
}
% other
\newcommand{\p}{\partial}
\newcommand{\Dt}[1]{\ensuremath{\frac{D #1}{Dt}}}
% Wikipedia-style "citation needed" macro
\newcommand{\citationneeded}[1][]{\textsuperscript{\color{blue} [citation needed: #1]}}
\newcommand{\paragraphbf}[1]{\subparagraph{\bf #1}}
\renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textit{#1}}
% Extend href with footnote url
\newcommand{\fnref}[3][]{\href{#2}{#3}\footnote{#1\url{#2}}}
% !Undefined control sequence.
% https://tex.stackexchange.com/questions/8361/latex-ieeetran-cls-use-titlesec-package
% \newcommand{\tocsubparagraph}{}
% commands from milestone_issf paper
\newcommand{\R}{\mathcal{R}}
\newcommand{\eps}{\varepsilon}
\newcommand{\epsK}{\varepsilon_{\!\scriptscriptstyle K}}
\newcommand{\epsA}{\varepsilon_{\!\scriptscriptstyle A}}
\newcommand{\epsP}{\varepsilon_{\!\scriptscriptstyle P}}
% From shallow water paper
\newcommand\shalf{\ensuremath{{\scriptstyle\frac{1}{2}}}}
\newcommand\sh{\ensuremath{^{\shalf}}}
\newcommand\smh{\ensuremath{^{-\shalf}}}
\newcommand\squart{\ensuremath{{\textstyle\frac{1}{4}}}}
\newcommand\thalf{\ensuremath{{\textstyle\frac{1}{2}}}}
\newcommand\Gat{\ensuremath{\widetilde{G_a}}}
\newcommand\ttz{\ensuremath{\rightarrow 0}}
\newcommand\ndq{\ensuremath{\frac{\mbox{$\partial$}}{\mbox{$\partial$} n_q}}}
\newcommand\sumjm{\ensuremath{\sum_{j=1}^{M}}}
\newcommand\pvi{\ensuremath{\int_0^{\infty}%
\mskip \ifCUPmtlplainloaded -30mu\else -33mu\fi -\quad}}
\newcommand{\uu}{\textbf{u}}
\newcommand{\xx}{\textbf{x}}
\newcommand{\kk}{\textbf{k}}
\newcommand{\JJ}{\textbf{J}}
\newcommand{\rr}{\textbf{r}}
\newcommand{\ff}{\textbf{f}}
\newcommand{\FF}{\textbf{F}}
\newcommand{\baa}{\textbf{a}}
\newcommand{\bb}{\textbf{b}}
\newcommand{\NN}{\textbf{N}}
\newcommand{\ErtelPV}{\mathcal{Q}}
\newcommand{\fdiss}{f_{\mbox{\scriptsize diss}}}
\newcommand{\D}{\mbox{D}}
\newcommand{\eez}{\boldsymbol{e_z}}
\newcommand{\scalarprod}[2]{\big( #1 \, , \ #2 \big)_{\kk}}
\newcommand{\mean}[1]{\langle #1 \rangle}
\newcommand{\meane}[1]{\langle #1 \rangle}
% \newcommand{\meane}[1]{{\langle #1 \rangle_{\hspace{-0.4mm}e}}}
\newcommand{\meanx}[1]{{\langle #1 \rangle_{\hspace{-0.4mm}\mbox{\scriptsize$\xx$}}}}
\newcommand{\meant}[1]{{\langle #1 \rangle_{\hspace{-0.4mm}\theta}}}
\newcommand{\means}[1]{{\langle #1 \rangle_{\hspace{-0.4mm}s}}}
\newcommand{\shocks}{ {\mbox{\tiny shocks}} }
\newcommand{\kmax}{k_{\mbox{\scriptsize max}}}
\newcommand{\kdiss}{k_{\mbox{\scriptsize diss}}}
\newcommand{\mA}{\mathcal{A}}
\newlength{\halfwidth}
\setlength{\halfwidth}{2.6in}
\newcommand{\PA}[1]{{\color{green}#1}}
\newcommand{\Add}[1]{{\color{blue}#1}}
% \newcommand{\Add}[1]{#1}
\newcommand{\Remove}[1]{{\color{red}\st{#1}}}
% \newcommand{\Remove}[1]{}
% \newtheorem{lemma}{Lemma}
% \newtheorem{corollary}{Corollary}
% Milestone paper
\newcommand{\vv}{\boldsymbol{v}}
\newcommand{\CKA}{C_{K\rightarrow A}}
\newlength{\figwidth}
\setlength{\figwidth}{0.95\textwidth}
% Personal
\newcommand{\order}[1]{\ensuremath{\mathcal{O}(#1)}}
\newcommand{\kfivethird}{\ensuremath{k^{-5/3}}}
\newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
% \newcommand{\red}[1]{{\textcolor{red}{#1}}}
% \newcommand{\green}[1]{{\textcolor{teal}{#1}}}
\newcommand{\red}[1]{\colorbox{pink}{{$\displaystyle #1$}}}
\newcommand{\green}[1]{\colorbox{Goldenrod}{{$\displaystyle #1$}}}
% Change font size of tables
\AtBeginEnvironment{tabular}{\small}
\newcommand{\expn}[2]{\ensuremath{#1\times10^{#2}}}