In my custom LaTeX class, I've created some different options, such as different font sizes, 11pt
, 12pt
and 13pt
, and paper sizes, such as a4paper
and letterpaper
. However, only one option from each group should be given, like the following.
\documentclass[12pt, letterpaper]{class} % or
\documentclass[13pt, a4paper]{class} % but never
\documentclass[12pt, 13pt]{class}
The last one shouldn't be used since it specifies the font size twice, which would create an undesirable effect. What I would want instead is that if two or more commands which clash are provided, such as in \documentclass[12pt, 13pt]{class}
, my class delivers an error message using \ClassError
. How would this be done?
Just in case I would need to use conditional 'if' statements, please try to give code using the style of statement used for the etoolbox
package, it's what I use and find easiest.