I'd like to create a new document class which inherits most of its options from the base class article, but which sets the default font option to 11pt instead of 10pt, and also defines its own new options. I'm most of the way there, but I'm having trouble getting the new class to recognize the inherited options. Currently, my class file resembles
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{newclass}
\DeclareOption{newoption}{\def\x{x}}
\PassOptionsToClass{11pt}{article}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{newoption,11pt}
\ProcessOptions\relax
\LoadClass{article}
This mostly gets the job done - The default font is 11pt, and calling \documentclass[12pt]{newclass} gives a document in 12pt font. However, calling \documentclass[10pt]{newclass} does not gives a document in 10pt font. Instead, it keeps the default 11pt font.
Test file:
\documentclass
%
[10pt] %11pt...
%[11pt] %
%[12pt] %
{newclass}
\stop
I've also tried using something of the form
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{newclass}
\DeclareOption{newoption}{...}
\ExecuteOptions{newoption,11pt}
\ProcessOptions\relax
\LoadClassWithOptions{article}
...
This processes all of the options correctly. However, in this case the 11pt option in \ExecuteOptions doesn't seem to be recognized, and loading the calling the class without options gives a document in 10pt font.
My questions are:
Why is the 10pt option not recognized when using the first method?
Why are inherited options in
\ExecuteOptionsnot recognized when using the second method?