generated from pingpingy1/textbook-sol-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.tex
79 lines (73 loc) · 2.56 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
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
\usepackage{braket}
\usepackage{enumitem}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{fontawesome5}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{subcaption}
% Graph Drawing
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc, shapes.misc, decorations.pathmorphing, decorations.markings, arrows, patterns.meta}
\tikzset{%
axis/.style={black, thick, ->},
pole/.style={
draw, red, cross out, very thick, draw, minimum size=2 * (#1-\pgflinewidth),
inner sep=0cm, outer sep=0cm
},
pole/.default={0.15cm},
branch cut/.style={red, thick, decorate, decoration={snake}},
contour/.style={
blue, very thick, postaction={decorate},
decoration={markings, mark={at position 0.5 with {\arrow{>}}}}
},
charged strip/.style={orange, very thick}
}
% General
\newcommand{\half}{\frac{1}{2}}
\newcommand{\halfpi}{\frac{\pi}{2}}
\newcommand{\quarterpi}{\frac{\pi}{4}}
\newcommand{\partialderiv}[1]{\frac{\partial}{\partial{}#1}}
\newcommand{\partialsecondderiv}[1]{\frac{\partial^2}{\partial{}#1^2}}
\newcommand{\res}[1]{\mathop{\mathrm{Res}}_{#1}}
\newcommand{\evalAt}[2]{{\left. #1 \right|}_{#2}}
\newcommand{\diffBetween}[3]{{\left[ #1 \right]_{#2}^{#3}}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\inv}[1]{\frac{1}{#1}}
\newcommand{\Laurentcoeff}[2]{\left[ z^{#1} \right] \left( #2 \right)}
\newcommand{\const}{\text{const.}}
% Vectors
\renewcommand{\mathbb}{\mathbbm}
\newcommand{\norm}[1]{\left|\left| #1 \right|\right|}
\newcommand{\unitvec}[1]{\hat{\mathbb{#1}}}
\newcommand{\xhat}{\unitvec{x}}
\newcommand{\yhat}{\unitvec{y}}
\newcommand{\zhat}{\unitvec{z}}
\DeclareMathOperator{\Tr}{Tr}
% Text
\newcommand{\refeq}[2]{Eq.~(#1--#2)}
\newcommand{\refeqsub}[2]{(#1--#2)}
\newcommand{\refprob}{Problem}
\newcommand{\reffig}{Figure}
\newcommand{\urlfoot}[2]{\href{#1}{#2}\footnote{\url{#1}}}
\newcommand{\notyet}{\faTired[regular] Whoops!
This problem is under construction ($\because$ author's skill issue).
Please wait or consider contributing!}
% Operators
\DeclareMathOperator{\Ci}{Ci}
\DeclareMathOperator{\Si}{Si}
\DeclareMathOperator{\Ei}{Ei}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\Beta}{B}
\DeclareMathOperator{\bigO}{O}
\DeclareMathOperator{\sign}{sign}
\newcommand{\indicator}[1]{\mathbb{1}\left\{ #1 \right\}}
\newcommand{\Lapltransf}[1]{\mathcal{L}\left[ #1 \right]}
\newcommand{\invLapltransf}[1]{\mathcal{L}^{-1}\left[ #1 \right]}
\newcommand{\Pint}{\mathrm{P}\int}
\makeatletter
\newcommand{\xRightarrow}[2][]{\ext@arrow 0359\Rightarrowfill@{#1}{#2}}
\makeatother