Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to create a document class based on a KOMA-Script class. If myclass.cls contains the following

\ProvidesClass{myclass}[2011/08/31]
\LoadClass[paper=a5]{scrartcl}

then compiling a document whose first line is \documentclass{myclass} generates the warning

LaTeX Warning: Unused global option(s):
    [paper=a5].

The same problem occurs with scrbook and scrreprt. What am I doing wrong?

share|improve this question
    
I think you're looking for the option a5paper and not paper=a5. –  Werner Aug 31 '11 at 17:50
1  
no, paper=a5 is correct –  Herbert Aug 31 '11 at 17:56
add comment

2 Answers

up vote 7 down vote accepted

The option paper is actually not a class option, but an option of the typearea package which is implicitly used by all KOMA-Script classes. Hence, what you need is the following:

\ProvidesClass{myclass}[2011/08/31]
\PassOptionsToPackage{paper=a5}{typearea}
\LoadClass{scrartcl}

The paper option isn't automatically passed to the typearea package by the KOMA-Script classes. On the other hand, this is the case for the old-style a4paper, a5paper etc. options. Thus, an alternative solution to your problem is:

\ProvidesClass{myclass}[2011/08/31]
\LoadClass[a5paper]{scrartcl}

I don't recommend the latter solution, though, since old-style options are more and more deprecated by the KOMA-Script classes.

share|improve this answer
add comment

Your class should be something like this:

\ProvidesClass{myclass}[2011/08/31]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
\LoadClass[paper=a5]{scrartcl}
\RequirePackage{...}
...
share|improve this answer
    
I've tested your solution. The warning is still there. –  mhp Sep 1 '11 at 9:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.