% 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}

\let\@epsilon\epsilon
\let\@theta\theta
\let\@phi\phi
\AtBeginDocument{
	\RenewCommandCopy{\epsilon}{\varepsilon}
	\RenewCommandCopy{\varepsilon}{\@epsilon}
	\RenewCommandCopy{\theta}{\vartheta}
	\RenewCommandCopy{\vartheta}{\@theta}
	\RenewCommandCopy{\phi}{\varphi}
	\RenewCommandCopy{\varepsilon}{\@epsilon}
	\undef\@epsilon
	\undef\@theta
	\undef\@phi

	\RenewCommandCopy{\angle}{\measuredangle}
}
