Changed the handling of the "sans" and "roman" class options, to be reflected at the beginning of the document and override style font choices

This commit is contained in:
Xavier Danaux
2012-07-29 14:25:16 +02:00
parent a2fc3c3623
commit 5872ae6b68
10 changed files with 3 additions and 3 deletions

View File

@ -51,15 +51,15 @@
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
% font type options
\DeclareOption{sans}{\renewcommand{\familydefault}{\sfdefault}}
\DeclareOption{roman}{\renewcommand{\familydefault}{\rmdefault}}
\DeclareOption{sans}{\AtBeginDocument{\renewcommand{\familydefault}{\sfdefault}}}
\DeclareOption{roman}{\AtBeginDocument{\renewcommand{\familydefault}{\rmdefault}}}
% draft/final option
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
% execute default options
\ExecuteOptions{a4paper,11pt,sans,final}
\ExecuteOptions{a4paper,11pt,final}
% process given options
\ProcessOptions\relax