forked from milesdai/TAoE3Solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaoesolutions.sty
63 lines (54 loc) · 1.92 KB
/
taoesolutions.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
\ProvidesPackage{taoesolutions}[2018/05/16 v1.0 Macros used to make solutions for The Art of Electronics 3rd ed.]
\usepackage{circuitikz}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{float}
\usepackage[
margin=1in,
includefoot,
footskip=30pt,
]{geometry}
\newcommand{\todo}[1]{\textcolor{red}{\textbf{TODO: #1}}}
\renewcommand{\title}[1]{\begin{center}\begin{Huge}#1\end{Huge}\end{center}}
\newcommand{\subtitle}[1]{\begin{center}\begin{Large}#1\end{Large}\end{center}}
\newcommand{\ex}[1]{\section*{Exercise #1}}
\newcommand{\mans}[1]{\boxed{\mathbf{#1}}}
\newcommand{\tans}[1]{\framebox{\textbf{#1}}}
% Make easier use of EE order of magnitude notation
\newcommand{\M}{\ensuremath{\text{M}}} % Mega
\renewcommand{\k}{\ensuremath{\text{k}}} % kilo
\newcommand{\m}{\ensuremath{\text{m}}} % milli
\renewcommand{\u}{\ensuremath{\mu}} % micro
\newcommand{\V}{\ensuremath{\text{V}}}
\newcommand{\Ohm}{\ensuremath{\Omega}}
\newcommand{\W}{\ensuremath{\text{W}}}
\newcommand{\A}{\ensuremath{\text{A}}}
\newcommand{\F}{\ensuremath{\text{F}}}
\renewcommand{\H}{\ensuremath{\text{H}}}
\newcommand{\Hz}{\ensuremath{\text{Hz}}}
\newcommand{\Th}{\ensuremath{\text{Th}}} % Thevenin
\renewcommand{\in}{\ensuremath{\text{in}}} % In (for V_{In})
\newcommand{\out}{\ensuremath{\text{out}}}
\newcommand{\load}{\ensuremath{\text{load}}}
\newcommand{\source}{\ensuremath{\text{source}}}
\newcommand{\pp}{\ensuremath{\text{p-p}}}
\newcommand{\rms}{\ensuremath{\text{rms}}}
\newenvironment{circuit}[2]% param1=label, param2=caption
{
\begin{figure}[H]
\caption{#2}
\label{#1}
\begin{center}
% \centering
\begin{circuitikz}[american]\draw
}
{
;
\end{circuitikz}
\end{center}
\end{figure}
}
% Set first level of list to (a) format
\setlist[enumerate,1]{label=(\alph*)}
% Be sure to use \mans{<answer>} for math answers
% Use \tans{<answer>} for text answers