numapde-syntax.sty 16.4 KB
Newer Older
1
% TODO why the double brackets?
2 3 4 5
% This LaTeX package provides numerous short-hand, low-level commands
% which do not carry a semantic meaning. The latter are defined in 
% numapde-semantic.sty.
\ProvidesPackage{numapde-syntax}
Ronny Bergmann's avatar
Ronny Bergmann committed
6

7 8
% Resolve the dependencies of this package
\RequirePackage{numapde-packages}
9
\RequirePackage{calc}
10

11
% Define commands for bold upper-case letters in math mode
Ronny Bergmann's avatar
Ronny Bergmann committed
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
\newcommand{\bA}{{\boldsymbol{A}}}
\newcommand{\bB}{{\boldsymbol{B}}}
\newcommand{\bC}{{\boldsymbol{C}}}
\newcommand{\bD}{{\boldsymbol{D}}}
\newcommand{\bE}{{\boldsymbol{E}}}
\newcommand{\bF}{{\boldsymbol{F}}}
\newcommand{\bG}{{\boldsymbol{G}}}
\newcommand{\bH}{{\boldsymbol{H}}}
\newcommand{\bI}{{\boldsymbol{I}}}
\newcommand{\bJ}{{\boldsymbol{J}}}
\newcommand{\bK}{{\boldsymbol{K}}}
\newcommand{\bL}{{\boldsymbol{L}}}
\newcommand{\bM}{{\boldsymbol{M}}}
\newcommand{\bN}{{\boldsymbol{N}}}
\newcommand{\bO}{{\boldsymbol{O}}}
\newcommand{\bP}{{\boldsymbol{P}}}
\newcommand{\bQ}{{\boldsymbol{Q}}}
\newcommand{\bR}{{\boldsymbol{R}}}
\newcommand{\bS}{{\boldsymbol{S}}}
\newcommand{\bT}{{\boldsymbol{T}}}
\newcommand{\bU}{{\boldsymbol{U}}}
\newcommand{\bV}{{\boldsymbol{V}}}
\newcommand{\bW}{{\boldsymbol{W}}}
\newcommand{\bX}{{\boldsymbol{X}}}
\newcommand{\bY}{{\boldsymbol{Y}}}
\newcommand{\bZ}{{\boldsymbol{Z}}}

39
% Define commands for bold lower-case letters in math mode
Ronny Bergmann's avatar
Ronny Bergmann committed
40 41 42 43 44
\newcommand{\ba}{{\boldsymbol{a}}}
\newcommand{\bb}{{\boldsymbol{b}}}
\newcommand{\bc}{{\boldsymbol{c}}}
\newcommand{\bd}{{\boldsymbol{d}}}
\newcommand{\be}{{\boldsymbol{e}}}
45
\let\bf\undefined \newcommand{\bf}{{\boldsymbol{f}}}
Ronny Bergmann's avatar
Ronny Bergmann committed
46 47
\newcommand{\bg}{{\boldsymbol{g}}}
\newcommand{\bh}{{\boldsymbol{h}}}
48
\let\bi\undefined \newcommand{\bi}{{\boldsymbol{i}}}  % Taylor and Francis
Ronny Bergmann's avatar
Ronny Bergmann committed
49 50 51
\newcommand{\bj}{{\boldsymbol{j}}}
\newcommand{\bk}{{\boldsymbol{k}}}
\newcommand{\bl}{{\boldsymbol{l}}}
52
\let\bm\undefined \newcommand{\bm}{{\boldsymbol{m}}}  % Taylor and Francis
Ronny Bergmann's avatar
Ronny Bergmann committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66
\newcommand{\bn}{{\boldsymbol{n}}}
\newcommand{\bo}{{\boldsymbol{o}}}
\newcommand{\bp}{{\boldsymbol{p}}}
\newcommand{\bq}{{\boldsymbol{q}}}
\newcommand{\br}{{\boldsymbol{r}}}
\newcommand{\bs}{{\boldsymbol{s}}}
\newcommand{\bt}{{\boldsymbol{t}}}
\newcommand{\bu}{{\boldsymbol{u}}}
\newcommand{\bv}{{\boldsymbol{v}}}
\newcommand{\bw}{{\boldsymbol{w}}}
\newcommand{\bx}{{\boldsymbol{x}}}
\newcommand{\by}{{\boldsymbol{y}}}
\newcommand{\bz}{{\boldsymbol{z}}}

67
% Define commands for bold numbers 0, 1 in math mode
Ronny Bergmann's avatar
Ronny Bergmann committed
68
\newcommand{\bnull}{{\boldsymbol{0}}}
69
\newcommand{\bone}{{\boldsymbol{1}}}
Ronny Bergmann's avatar
Ronny Bergmann committed
70

71 72 73 74 75 76 77 78
% Define commands for bold lower-case Greek letters in math mode
\newcommand{\balpha}{{\boldsymbol{\alpha}}}
\newcommand{\bbeta}{{\boldsymbol{\beta}}}
\newcommand{\bgamma}{{\boldsymbol{\gamma}}}
\newcommand{\bdelta}{{\boldsymbol{\delta}}}
\newcommand{\bepsilon}{{\boldsymbol{\epsilon}}}
\newcommand{\bvarepsilon}{{\boldsymbol{\varepsilon}}}
\newcommand{\bzeta}{{\boldsymbol{\zeta}}}
79
\newcommand{\boldeta}{{\boldsymbol{\eta}}}  % exception: \boldeta instead of \beta
80 81 82 83 84 85 86 87
\newcommand{\btheta}{{\boldsymbol{\theta}}}
\newcommand{\bvartheta}{{\boldsymbol{\vartheta}}}
\newcommand{\biota}{{\boldsymbol{\iota}}}
\newcommand{\bkappa}{{\boldsymbol{\kappa}}}
\newcommand{\bvarkappa}{{\boldsymbol{\varkappa}}}
\newcommand{\blambda}{{\boldsymbol{\lambda}}}
\newcommand{\bmu}{{\boldsymbol{\mu}}}
\newcommand{\bnu}{{\boldsymbol{\nu}}}
Roland Herzog's avatar
Roland Herzog committed
88
\newcommand{\bomicron}{\boldsymbol{o}}
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
\newcommand{\bxi}{{\boldsymbol{\xi}}}
\newcommand{\bpi}{{\boldsymbol{\pi}}}
\newcommand{\bvarpi}{{\boldsymbol{\varpi}}}
\newcommand{\brho}{{\boldsymbol{\rho}}}
\newcommand{\bvarrho}{{\boldsymbol{\varrho}}}
\newcommand{\bsigma}{{\boldsymbol{\sigma}}}
\newcommand{\bvarsigma}{{\boldsymbol{\varsigma}}}
\newcommand{\btau}{{\boldsymbol{\tau}}}
\newcommand{\bupsilon}{{\boldsymbol{\upsilon}}}
\newcommand{\bphi}{{\boldsymbol{\phi}}}
\newcommand{\bvarphi}{{\boldsymbol{\varphi}}}
\newcommand{\bchi}{{\boldsymbol{\chi}}}
\newcommand{\bpsi}{{\boldsymbol{\psi}}}
\newcommand{\bomega}{{\boldsymbol{\omega}}}

% Define commands for bold upper-case Greek letters in math mode
Roland Herzog's avatar
Roland Herzog committed
105 106
\newcommand{\bAlpha}{{\boldsymbol{A}}}
\newcommand{\bBeta}{{\boldsymbol{B}}}
107 108
\newcommand{\bGamma}{{\boldsymbol{\Gamma}}}
\newcommand{\bDelta}{{\boldsymbol{\Delta}}}
Roland Herzog's avatar
Roland Herzog committed
109 110 111
\newcommand{\bEpsilon}{{\boldsymbol{E}}}
\newcommand{\bZeta}{{\boldsymbol{Z}}}
\newcommand{\bEta}{{\boldsymbol{H}}}
112
\newcommand{\bTheta}{{\boldsymbol{\Theta}}}
Roland Herzog's avatar
Roland Herzog committed
113 114
\newcommand{\bIota}{{\boldsymbol{I}}}
\newcommand{\bKappa}{{\boldsymbol{K}}}
115
\newcommand{\bLambda}{{\boldsymbol{\Lambda}}}
Roland Herzog's avatar
Roland Herzog committed
116 117
\newcommand{\bMu}{{\boldsymbol{M}}}
\newcommand{\bNu}{{\boldsymbol{N}}}
118
\newcommand{\bXi}{{\boldsymbol{\Xi}}}
Roland Herzog's avatar
Roland Herzog committed
119
\newcommand{\bOmicron}{{\boldsymbol{O}}}
120
\newcommand{\bPi}{{\boldsymbol{\Pi}}}
Roland Herzog's avatar
Roland Herzog committed
121
\newcommand{\bRho}{{\boldsymbol{P}}}
122
\newcommand{\bSigma}{{\boldsymbol{\Sigma}}}
Roland Herzog's avatar
Roland Herzog committed
123
\newcommand{\bTau}{{\boldsymbol{T}}}
124 125
\newcommand{\bUpsilon}{{\boldsymbol{\Upsilon}}}
\newcommand{\bPhi}{{\boldsymbol{\Phi}}}
Roland Herzog's avatar
Roland Herzog committed
126
\newcommand{\bChi}{{\boldsymbol{X}}}
127 128 129 130
\newcommand{\bPsi}{{\boldsymbol{\Psi}}}
\newcommand{\bOmega}{{\boldsymbol{\Omega}}}

% Define commands for calligraphic upper-case letters in math mode
131
\let\AA\undefined \newcommand{\AA}{\mathcal{A}}
Ronny Bergmann's avatar
Ronny Bergmann committed
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
\newcommand{\BB}{\mathcal{B}}
\newcommand{\CC}{\mathcal{C}}
\newcommand{\DD}{\mathcal{D}}
\newcommand{\EE}{\mathcal{E}}
\newcommand{\FF}{\mathcal{F}}
\newcommand{\GG}{\mathcal{G}}
\newcommand{\HH}{\mathcal{H}}
\newcommand{\II}{\mathcal{I}}
\newcommand{\JJ}{\mathcal{J}}
\newcommand{\KK}{\mathcal{K}}
\newcommand{\LL}{\mathcal{L}}
\newcommand{\MM}{\mathcal{M}}
\newcommand{\NN}{\mathcal{N}}
\newcommand{\OO}{\mathcal{O}}
\newcommand{\PP}{\mathcal{P}}
\newcommand{\QQ}{\mathcal{Q}}
\newcommand{\RR}{\mathcal{R}}
149
\let\SS\undefined
150
\newcommand{\SS}{\mathcal{S}}
Ronny Bergmann's avatar
Ronny Bergmann committed
151 152 153 154 155 156 157 158
\newcommand{\TT}{\mathcal{T}}
\newcommand{\UU}{\mathcal{U}}
\newcommand{\VV}{\mathcal{V}}
\newcommand{\WW}{\mathcal{W}}
\newcommand{\XX}{\mathcal{X}}
\newcommand{\YY}{\mathcal{Y}}
\newcommand{\ZZ}{\mathcal{Z}}

159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
% Define commands for lower-case letters with vector accents in math mode
\newcommand{\va}{\vec{a}}
\newcommand{\vb}{\vec{b}}
\newcommand{\vc}{\vec{c}}
\newcommand{\vd}{\vec{d}}
\newcommand{\ve}{\vec{e}}
\newcommand{\vf}{\vec{f}}
\let\vg\undefined \newcommand{\vg}{\vec{g}}  % ESAIM
\newcommand{\vh}{\vec{h}}
\newcommand{\vi}{\vec{i}}
\newcommand{\vj}{\vec{j}}
\newcommand{\vk}{\vec{k}}
\newcommand{\vl}{\vec{l}}
\newcommand{\vm}{\vec{m}}
\newcommand{\vn}{\vec{n}}
\newcommand{\vo}{\vec{o}}
\newcommand{\vp}{\vec{p}}
\newcommand{\vq}{\vec{q}}
\newcommand{\vr}{\vec{r}}
\newcommand{\vs}{\vec{s}}
\newcommand{\vt}{\vec{t}}
\newcommand{\vu}{\vec{u}}
\newcommand{\vv}{\vec{v}}
\newcommand{\vw}{\vec{w}}
\newcommand{\vx}{\vec{x}}
\newcommand{\vy}{\vec{y}}
\newcommand{\vz}{\vec{z}}

% Define commands for upper-case letters with vector accents in math mode
\newcommand{\vA}{\vec{A}}
\newcommand{\vB}{\vec{B}}
\newcommand{\vC}{\vec{C}}
\newcommand{\vD}{\vec{D}}
\newcommand{\vE}{\vec{E}}
\newcommand{\vF}{\vec{F}}
\newcommand{\vG}{\vec{G}}
\newcommand{\vH}{\vec{H}}
\newcommand{\vI}{\vec{I}}
\newcommand{\vJ}{\vec{J}}
\newcommand{\vK}{\vec{K}}
\newcommand{\vL}{\vec{L}}
\newcommand{\vM}{\vec{M}}
\newcommand{\vN}{\vec{N}}
\newcommand{\vO}{\vec{O}}
\newcommand{\vP}{\vec{P}}
\newcommand{\vQ}{\vec{Q}}
\newcommand{\vR}{\vec{R}}
\newcommand{\vS}{\vec{S}}
\newcommand{\vT}{\vec{T}}
\newcommand{\vU}{\vec{U}}
\newcommand{\vV}{\vec{V}}
\newcommand{\vW}{\vec{W}}
\newcommand{\vX}{\vec{X}}
\newcommand{\vY}{\vec{Y}}
\newcommand{\vZ}{\vec{Z}}

% Define commands for numbers 0, 1 with vector accents in math mode
\newcommand{\vnull}{{\vec{0}}}
\newcommand{\vone}{{\vec{1}}}

% Define commands for lower-case Greek letters with vector accents in math mode
\newcommand{\valpha}{{\vec{\alpha}}}
\newcommand{\vbeta}{{\vec{\veta}}}
\newcommand{\vgamma}{{\vec{\gamma}}}
\newcommand{\vdelta}{{\vec{\delta}}}
\newcommand{\vepsilon}{{\vec{\epsilon}}}
\newcommand{\vvarepsilon}{{\vec{\varepsilon}}}
\newcommand{\vzeta}{{\vec{\zeta}}}
\newcommand{\veta}{{\vec{\eta}}} 
\newcommand{\vtheta}{{\vec{\theta}}}
\newcommand{\vvartheta}{{\vec{\vartheta}}}
\newcommand{\viota}{{\vec{\iota}}}
\newcommand{\vkappa}{{\vec{\kappa}}}
\newcommand{\vvarkappa}{{\vec{\varkappa}}}
\newcommand{\vlambda}{{\vec{\lambda}}}
\newcommand{\vmu}{{\vec{\mu}}}
\newcommand{\vnu}{{\vec{\nu}}}
Roland Herzog's avatar
Roland Herzog committed
236
\newcommand{\vomicron}{\vec{o}}
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
\newcommand{\vxi}{{\vec{\xi}}}
\newcommand{\vpi}{{\vec{\pi}}}
\newcommand{\vvarpi}{{\vec{\varpi}}}
\newcommand{\vrho}{{\vec{\rho}}}
\newcommand{\vvarrho}{{\vec{\varrho}}}
\newcommand{\vsigma}{{\vec{\sigma}}}
\newcommand{\vvarsigma}{{\vec{\varsigma}}}
\newcommand{\vtau}{{\vec{\tau}}}
\newcommand{\vupsilon}{{\vec{\upsilon}}}
\newcommand{\vphi}{{\vec{\phi}}}
\newcommand{\vvarphi}{{\vec{\varphi}}}
\newcommand{\vchi}{{\vec{\chi}}}
\newcommand{\vpsi}{{\vec{\psi}}}
\newcommand{\vomega}{{\vec{\omega}}}

% Define commands for upper-case Greek letters with vector accents in math mode
Roland Herzog's avatar
Roland Herzog committed
253 254
\newcommand{\vAlpha}{{\vec{A}}}
\newcommand{\vBeta}{{\vec{B}}}
255 256
\newcommand{\vGamma}{{\vec{\Gamma}}}
\newcommand{\vDelta}{{\vec{\Delta}}}
Roland Herzog's avatar
Roland Herzog committed
257 258 259
\newcommand{\vEpsilon}{{\vec{E}}}
\newcommand{\vZeta}{{\vec{Z}}}
\newcommand{\vEta}{{\vec{H}}} 
260
\newcommand{\vTheta}{{\vec{\Theta}}}
Roland Herzog's avatar
Roland Herzog committed
261 262
\newcommand{\vIota}{{\vec{I}}}
\newcommand{\vKappa}{{\vec{K}}}
263
\newcommand{\vLambda}{{\vec{\Lambda}}}
Roland Herzog's avatar
Roland Herzog committed
264 265 266
\newcommand{\vMu}{{\vec{M}}}
\newcommand{\vNu}{{\vec{N}}}
\newcommand{\vOmicron}{\vec{O}}
267 268
\newcommand{\vXi}{{\vec{\Xi}}}
\newcommand{\vPi}{{\vec{\Pi}}}
Roland Herzog's avatar
Roland Herzog committed
269
\newcommand{\vRho}{{\vec{P}}}
270
\newcommand{\vSigma}{{\vec{\Sigma}}}
Roland Herzog's avatar
Roland Herzog committed
271
\newcommand{\vTau}{{\vec{T}}}
272 273
\newcommand{\vUpsilon}{{\vec{\Upsilon}}}
\newcommand{\vPhi}{{\vec{\Phi}}}
Roland Herzog's avatar
Roland Herzog committed
274
\newcommand{\vChi}{{\vec{X}}}
275 276 277 278 279
\newcommand{\vPsi}{{\vec{\Psi}}}
\newcommand{\vOmega}{{\vec{\Omega}}}



280
% Define commands for some blackboard characters in math mode, mainly used for sets
281
\let\C\undefined \newcommand{\C}{\mathbb{C}}
282
\newcommand{\K}{\mathbb{K}}
Ronny Bergmann's avatar
Ronny Bergmann committed
283 284 285
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
286
\let\S\undefined \newcommand{\S}{\mathbb{S}}
287
\newcommand{\Z}{\mathbb{Z}}
Ronny Bergmann's avatar
Ronny Bergmann committed
288

289
% Define some English abbreviations 
290
\let\aa\undefined \newcommand{\aa}{a.a.\xspace}
Roland Herzog's avatar
Roland Herzog committed
291
\newcommand{\ale}{a.e.\xspace}
292
\let\cf\undefined \newcommand{\cf}{cf.\xspace}
293
\newcommand{\eg}{e.\,g.\xspace}
294
\let\ie\undefined \newcommand{\ie}{i.\,e.\xspace}
295
\newcommand{\iid}{i.\,i.\,d.\xspace}
Roland Herzog's avatar
Roland Herzog committed
296
\let\st\undefined \newcommand{\st}{s.\,t.\xspace}  % WileyNJD-v2.cls (loads soul.sty)
297
\newcommand{\wrt}{w.r.t.\xspace}
298

299 300 301 302 303 304 305 306 307 308 309 310 311 312
% Define some German abbreviations 
\newcommand{\dah}{d.\,h.\xspace}
\newcommand{\Dah}{D.\,h.\xspace}
\newcommand{\fue}{f.\,ü.\xspace}
\newcommand{\fs}{f.\,s.\xspace}
\newcommand{\iA}{i.\,A.\xspace}
\newcommand{\IA}{I.\,A.\xspace}
\newcommand{\idR}{i.\,d.\,R.\xspace}
\newcommand{\IdR}{I.\,d.\,R.\xspace}
\newcommand{\iW}{i.\,W.\xspace}
\newcommand{\IW}{I.\,W.\xspace}
\newcommand{\mE}{m.\,E.\xspace}
\newcommand{\oBdA}{o.\,B.\,d.\,A.\xspace}
\newcommand{\OBdA}{O.\,B.\,d.\,A.\xspace}
Roland Herzog's avatar
Roland Herzog committed
313
\let\og\undefined \newcommand{\og}{o.\,g.\xspace}  % cedram.cls
314 315 316
\newcommand{\oae}{o.\,ä.\xspace}
\newcommand{\pa}{p.\,a.\xspace}
\newcommand{\spd}{s.\,p.\,d.\xspace}
Roland Herzog's avatar
Roland Herzog committed
317
\let\so\undefined \newcommand{\so}{s.\,t.\xspace}  % WileyNJD-v2.cls (loads soul.sty)
318 319 320 321 322 323 324 325 326
\newcommand{\ua}{u.\,a.\xspace}
\newcommand{\ug}{u.\,g.\xspace}
\newcommand{\Ua}{U.\,a.\xspace}
\newcommand{\usw}{u.\,s.\,w.\xspace}
\newcommand{\uU}{u.\,U.\xspace}
\newcommand{\UnU}{U.\,U.\xspace}
\newcommand{\zB}{z.\,B.\xspace}
\newcommand{\ZB}{Z.\,B.\xspace}
\newcommand{\zHd}{z.\,Hd.\xspace}
327

328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
% Define a default markdown for named (mostly software related)
% packages, and some commands for often-used packages as well
\newcommand{\namemd}[1]{\textsc{#1}\xspace}
\newcommand{\adimat}{\namemd{ADiMat}}
\newcommand{\ampl}{\namemd{AMPL}}
\newcommand{\BibTeX}{\namemd{Bib\TeX}}
\newcommand{\BibLaTeX}{\namemd{Bib\LaTeX}}
\newcommand{\cg}{\namemd{CG}}
\newcommand{\cpp}{\namemd{C++}}
\newcommand{\cppmat}{\namemd{cppmat}}
\newcommand{\dolfin}{\namemd{Dolfin}}
\newcommand{\dolfinplot}{\namemd{Dolfin-Plot}}
\newcommand{\dolfinadjoint}{\namemd{Dolfin-Adjoint}}
\newcommand{\doxygen}{\namemd{Doxygen}}
\newcommand{\femorph}{\namemd{FEMorph}}
\newcommand{\fenics}{\namemd{FEniCS}}
\newcommand{\ffc}{\namemd{FFC}}
\newcommand{\fmg}{\namemd{FMG}}
\newcommand{\fortran}{\namemd{Fortran}}
\newcommand{\gmres}{\namemd{Gmres}}
\newcommand{\gmsh}{\namemd{Gmsh}}
\newcommand{\ipopt}{\namemd{Ipopt}}
\newcommand{\libsvm}{\namemd{LIBSVM}}
\newcommand{\liblinear}{\namemd{LIBLINEAR}}
\newcommand{\macmpec}{\namemd{MacMPEC}}
\newcommand{\manopt}{\namemd{Manopt}}
\newcommand{\manoptjl}{\namemd{Manopt.jl}}
\newcommand{\mathematica}{\namemd{Mathematica}}
\newcommand{\matlab}{\namemd{Matlab}}
\newcommand{\maple}{\namemd{Maple}}
\newcommand{\maxima}{\namemd{Maxima}}
Roland Herzog's avatar
Roland Herzog committed
359
\newcommand{\meshio}{\namemd{meshio}}
360 361 362 363
\newcommand{\metis}{\namemd{Metis}}
\newcommand{\minres}{\namemd{Minres}}
\newcommand{\mshr}{\namemd{mshr}}
\newcommand{\mvirt}{\namemd{MVIRT}}
364
\newcommand{\numapde}{\namemd{numapde}}
365 366 367 368 369 370 371 372 373 374 375 376
\newcommand{\numpy}{\namemd{NumPy}}
\newcommand{\paraview}{\namemd{Paraview}}
\newcommand{\perl}{\namemd{Perl}}
\newcommand{\petsc}{\namemd{PETSc}}
\newcommand{\pymat}{\namemd{pymat}}
\newcommand{\python}{\namemd{Python}}
\newcommand{\scikit}{\namemd{SciKit}}
\newcommand{\scikitlearn}{\namemd{SciKit-learn}}
\newcommand{\scipy}{\namemd{SciPy}}
\newcommand{\sphinx}{\namemd{Sphinx}}
\newcommand{\subminres}{\namemd{SubMinres}}
\newcommand{\superlu}{\namemd{SuperLU}}
377
\newcommand{\svmlight}{\namemd{SVM${}^\text{light}$}}
378
\newcommand{\TikZ}{Ti\textit{k}Z\xspace}
379 380 381 382 383 384 385 386
\newcommand{\tritetmesh}{\namemd{TriTetMesh}}
\newcommand{\ufl}{\namemd{UFL}}
\newcommand{\uqlab}{\namemd{UQLab}}
\newcommand{\viper}{\namemd{Viper}}
\newcommand{\xml}{\namemd{XML}}

% Define \enclose command
% \enclose[a]{b}{c}{d} encloses content (c) in brackets (b,d) where the optional parameter
387
% a scales the brackets (big, Big, bigg, Bigg) or (auto)matically scales them
388 389
% \enclosespacing allows for additional spacing before and after the \enclose:d content
% https://blag.nullteilerfrei.de/2014/01/16/a-dynamic-bracketing-macro-in-latex/
390
% The \enclose command is mainly meant for internal use; use \paren instead
391
\newcommand{\enclspacing}{}
392
\newcommand{\enclose}[4][]{%
393
	\ifthenelse{\isempty{#1}}%
394 395 396 397 398 399
	{\ifthenelse{\equal{#2}{.}}{}{#2}\enclspacing#3\enclspacing#4}%
	{\ifthenelse{\equal{#1}{auto}}%
		{\left#2\enclspacing#3\enclspacing\right#4}%
		{\csname#1l\endcsname#2\enclspacing#3\enclspacing\csname#1r\endcsname#4}%
	}%
}
400

401 402 403 404 405 406 407 408
% Define \encloseSet command to do { c | e }
% \enclose[a]{b}{c}{d}{e}{f} encloses content c and e in brackets (b,f) with a center delimiter d, where the optional parameter
% a scales the brackets (big, Big, bigg, Bigg) or (auto)matically scales them
% \enclosespacingSet allows for additional spacing before and after the center delimiter, the outer brackets gain a \encloseSpacing as \enclose:
% https://blag.nullteilerfrei.de/2014/01/16/a-dynamic-bracketing-macro-in-latex/
% The \enclose command is mainly meant for internal use; use \paren instead
\newcommand{\enclspacingSet}{\,}
\newcommand{\encloseSet}[6][]{%
409 410 411 412 413
	\ifthenelse{\isempty{#1}}%
		{#2\enclspacing#3 \enclspacingSet#4\enclspacingSet #5\enclspacing#6}%
		{\ifthenelse{\equal{#1}{auto}}%
			{\left#2\enclspacing#3\enclspacingSet\middle#4\enclspacingSet#5\right#6}% 
			{\csname#1l\endcsname#2\enclspacing#3\enclspacingSet\csname#1\endcsname#4\enclspacingSet#5\enclspacing\csname#1r\endcsname#6}%
414 415 416
		}%
	}

417 418 419
% Define \paren command
% \paren[a]bc{d} encloses content (d) in brackets b,c where the optional parameter
% a scales the brackets
420
\newcommand{\paren}[4][]{\enclose[#1]{#2}{#4}{#3}}
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439

% Define the \clap (complementing \{l,r}lap) and \math{l,c,r}lap commands,
% which horizontally smash the argument with alignment
% http://www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf
\def\clap#1{\hbox to 0pt{\hss#1\hss}}
\def\mathllap{\mathpalette\mathllapinternal}
\def\mathrlap{\mathpalette\mathrlapinternal}
\def\mathclap{\mathpalette\mathclapinternal}
\def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}}
\def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
\def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}}

% Define the \mrep[a]{b}{c} command, which prints b but reserves the space for c.
% The optional argument a specifies the alignment {l,c,r}. The command works in text and math modes.
% https://groups.google.com/forum/?fromgroups#!topic/comp.text.tex/GikFchXJIM0
\def\my@mathpalette#1#2#3#4{\mathchoice{#1\displaystyle{#2}{#3}{#4}}{#1\textstyle{#2}{#3}{#4}}{#1\scriptstyle{#2}{#3}{#4}}{#1\scriptscriptstyle{#2}{#3}{#4}}}
\def\mrepinternal#1#2#3#4{\makebox[\widthof{$#1#4$}][#2]{$#1\vphantom{#4}{#3}$}}
\newcommand{\mrep}[3][l]{\ifmmode\my@mathpalette\mrepinternal{#1}{#2}{#3}\else\makebox[\widthof{#3}][#1]{\vphantom{#3}#2}\fi}

440 441 442 443 444 445
% Simplify the use of German and English quotation marks
\newcommand{\gq}[1]{\glq#1\grq}
\newcommand{\gqq}[1]{\glqq#1\grqq}
\newcommand{\eq}[1]{`#1'}
\newcommand{\eqq}[1]{``#1''}