-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.sty
167 lines (150 loc) · 4.83 KB
/
preamble.sty
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
\ProvidesPackage{preamble}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{wrapfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{physics}
\usepackage{siunitx}
\usepackage{float}
\usepackage{scalerel}
\usepackage{ltxtable}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{filecontents}
\usepackage{mathtools}
\usepackage{ltxtable}
\usepackage{tikz}
\usepackage{array}
\usepackage{fancyhdr}
\usepackage{pgfplots}
\usepackage{mhchem}
\newcommand{\defined}{\overset{\underset{\mathrm{def}}{}}{=}}
\DeclareMathOperator{\di}{d\!}
\newcommand*\Eval[3]{\left.#1\right\rvert_{#2}^{#3}}
\usepackage{amsthm}
\usepackage{stackengine}
\newcommand\momentL[1]{\stackengine{-.3ex}{#1}{\CAL}{0}{c}{F}{F}{L}}
\newcommand\CAL{\scalebox{2}{\rotatebox[origin=center]{90}{$\circlearrowleft$}}}
\newcommand\momentR[1]{\stackengine{-.3ex}{#1}{\CAR}{0}{c}{F}{F}{L}}
\newcommand\CAR{\scalebox{2}{\rotatebox[origin=center]{90}{$\circlearrowright$}}}
\stackMath
\sisetup{range-phrase=-,range-units=single}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns}
\pgfplotsset{height=10cm,width=10cm,compat=1.14}
\usetikzlibrary{circuits.ee.IEC}
\tikzset{circuit declare symbol = ac current source}
\tikzset{
ac current source IEC graphic/.style={
circuit symbol lines,
circuit symbol size = width 2 height 2,
shape = generic circle IEC,
/pgf/generic circle IEC/before background={
\pgfpathmoveto{\pgfpoint{-0.8pt}{0pt}}
\pgfpathsine{\pgfpoint{0.4pt}{0.4pt}}
\pgfpathcosine{\pgfpoint{0.4pt}{-0.4pt}}
\pgfpathsine{\pgfpoint{0.4pt}{-0.4pt}}
\pgfpathcosine{\pgfpoint{0.4pt}{0.4pt}}
\pgfusepath{stroke}
},
transform shape
}
}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\cis}{\mathrm{cis}}
\newcommand{\vi}{\vec{\imath}}
\newcommand{\vj}{\vec{\jmath}}
\newcommand{\vk}{\vec{k}}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage[framed, numbered]{matlab-prettifier}
\usepackage{fancyhdr}
\usepackage{amsthm}
\usepackage{pgfplotstable}
\usepackage[]{graphics}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\cosc}{cosc}
\usetikzlibrary{decorations.pathreplacing,decorations.markings}
\tikzset{
% style to apply some styles to each segment of a path
on each segment/.style={
decorate,
decoration={
show path construction,
moveto code={},
lineto code={
\path [#1]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
},
curveto code={
\path [#1] (\tikzinputsegmentfirst)
.. controls
(\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
..
(\tikzinputsegmentlast);
},
closepath code={
\path [#1]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
},
},
},
% style to add an arrow in the middle of a path
mid arrow/.style={postaction={decorate,decoration={
markings,
mark=at position .5 with {\arrow[#1]{stealth}}
}}},
}
\DeclareSIUnit\grates{grates}
\newcommand{\defi}{\overset{\underset{\mathrm{def}}{}}{=}}
\newcommand{\findmax}[1]{
\pgfplotsforeachungrouped \table in {#1} {%
\pgfplotstablevertcat{\concatenated}{\table}%
}%
\pgfplotstablesort[sort key={1},sort cmp={float >}]{\sorted}{\concatenated}%
\pgfplotstablegetelem{0}{1}\of{\sorted}%
\let\ymax=\pgfplotsretval%
}
\newcommand{\findmin}[1]{
\pgfplotsforeachungrouped \table in {#1} {%
\pgfplotstablevertcat{\concatenated}{\table}%
}%
\pgfplotstablesort[sort key={1},sort cmp={float <}]{\sorted}{\concatenated}%
\pgfplotstablegetelem{0}{1}\of{\sorted}%
\let\ymin=\pgfplotsretval%
}
\makeatletter \renewcommand\d[1]{\ensuremath{%
\;\mathrm{d}#1\@ifnextchar\d{\!}{}}}
\makeatother
\colorlet{Tangent}{blue!75!black}
\usetikzlibrary{
calc,
intersections,
math,
}
\newenvironment{polynomial}
{\par\vspace{\abovedisplayskip}%
\setlength{\leftskip}{\parindent}%
\setlength{\rightskip}{\leftskip}%
\medmuskip=4mu plus 2mu minus 2mu
\binoppenalty=0
\noindent$\displaystyle}
{$\par\vspace{\belowdisplayskip}}
\usepackage{hyperref}
\makeatletter
\newcommand\appendix@section[1]{%
\refstepcounter{section}%
\orig@section*{Appendix \@Alph\c@section: #1}%
\addcontentsline{toc}{section}{Appendix \@Alph\c@section: #1}%
}
\let\orig@section\section
\g@addto@macro\appendix{\let\section\appendix@section}
\makeatother