diff options
| author | Warrick Lo <warrick.s.z.lo@gmail.com> | 2026-02-11 07:16:45 -0800 |
|---|---|---|
| committer | Warrick Lo <warrick.s.z.lo@gmail.com> | 2026-02-11 07:16:45 -0800 |
| commit | f1a9a85c6138715c3933c957c695d0482b901154 (patch) | |
| tree | f2d6ca37aa60eb35737f31a4a8ab3a202e07f01c /macros.sty | |
Finish lab report up to Task 2B
Signed-off-by: Warrick Lo <warrick.s.z.lo@gmail.com>
Diffstat (limited to 'macros.sty')
| -rw-r--r-- | macros.sty | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/macros.sty b/macros.sty new file mode 100644 index 0000000..5cc98b9 --- /dev/null +++ b/macros.sty @@ -0,0 +1,58 @@ +% Horizontal rule. +\newcommand{\hr}{\noindent\rule[0.5ex]{\linewidth}{0.5pt}} + +% Ensure upright text in math events. +\NewCommandCopy{\vartext}{\text} +\renewcommand{\text}[1]{\vartext{\textnormal{#1}}} + +% Upright type for Euler's number and imaginary number. +\newcommand{\e}{\ensuremath{\mathrm{e}}} +\renewcommand{\i}{\ensuremath{\mathrm{i}}} +\renewcommand{\j}{\ensuremath{\mathrm{j}}} + +% Use bold for vectors. +\renewcommand{\vec}{\symbf} + +% Use blackboard bold. +\let\mathbb\relax +\DeclareMathAlphabet{\mathbb}{U}{msb}{m}{n} +\newcommand{\N}{\ensuremath{\mathbb{N}}} +\newcommand{\Z}{\ensuremath{\mathbb{Z}}} +\newcommand{\Q}{\ensuremath{\mathbb{Q}}} +\newcommand{\R}{\ensuremath{\mathbb{R}}} +\newcommand{\C}{\ensuremath{\mathbb{C}}} + +% Does not exist. +\newcommand{\DNE}{\ensuremath{\text{DNE}}} + +% Trigonometric and hyperbolic functions. +\DeclareMathOperator{\sech}{sech} +\DeclareMathOperator{\csch}{csch} +\DeclareMathOperator{\arccot}{arccot} +\DeclareMathOperator{\arcsec}{arcsec} +\DeclareMathOperator{\arccsc}{arccsc} +\DeclareMathOperator{\arsinh}{arsinh} +\DeclareMathOperator{\arcosh}{arcosh} +\DeclareMathOperator{\artanh}{artanh} +\DeclareMathOperator{\arcoth}{arcoth} +\DeclareMathOperator{\arsech}{arsech} +\DeclareMathOperator{\arcsch}{arcsch} + +\makeatletter +\let\@epsilon\epsilon +\let\@theta\theta +\let\@phi\phi +\AtBeginDocument{ + \RenewCommandCopy{\angle}{\measuredangle} + + \RenewCommandCopy{\epsilon}{\varepsilon} + \RenewCommandCopy{\varepsilon}{\@epsilon} + \RenewCommandCopy{\theta}{\vartheta} + \RenewCommandCopy{\vartheta}{\@theta} + \RenewCommandCopy{\phi}{\varphi} + \RenewCommandCopy{\varepsilon}{\@epsilon} + \undef\@epsilon + \undef\@theta + \undef\@phi +} +\makeatother |