I'm trying to create a package with some options. However, whenever I declare options and load other packages, I receive the following error:
LaTeX Error:
\RequirePackage
or\LoadClass
in Options Section.
What is going on here and/or how do I declare package options and load packages?
Here is a minimal example replicating the problem:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{mystyle.sty}
\newcommand{\mycmd}{new}% Define some command
\DeclareOption{change}{\renewcommand{\mycmd}{renew}}% Package option `change` updates \mycmd
\RequirePackage{amsmath}% Load amsmath
\end{filecontents*}
\usepackage{mystyle}
\begin{document}
\mycmd% This should be "new"
\end{document}