I'm writing a wrapper document class that starts with article and adds a bunch of customizations (required for a particular journal style). One of the requirements is to lock down certain options:
\documentclass{thisjournal}
should behave the same as
\documentclass[10pt,twocolumn,letterpaper]{article}
% plus some more stuff
and
\documentclass[12pt]{thisjournal} % or 'onecolumn', or 'a4paper, etc
should produce an error message, but other options should be passed through, e.g.
\documentclass[draft]{thisjournal} % should turn on overfull rules
I've gotten as far as
\ProvidesClass{thisjournal}
\DeclareOption{12pt}{\ClassError{testclass}{Ten point text is required.}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass[10pt,twocolumn,letterpaper]{article}
but I am unenthusiastic about having to write \DeclareOption boilerplate for every possible font and paper size option other than 10pt and letterpaper. (Is it even possible to enumerate that set?) Surely there is a better way?
10pt,letterpaper, andtwocolumn. I have no idea how many other optionsarticle.clshas, and people probably do still want to use the generic "options on the\documentclassline get passed to all packages even if not recognized as class options" mechanism. – Zack Jul 26 '12 at 15:32