TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written a wrapper for the scrartcl class in the following way:





\PassOptionsToClass{fleqn, openbib, headings=big, DIV=12}{scrartcl}

This way I can provide some default arguments for scrartcl like DIV=12 and still override them by passing

\documentclass{title=mytitle, subtitle=thesubtitle, DIV=10}

The problem I have, is that srcartcl marks the other options, e.g., title=mytitle as unused

LaTeX Warning: Unused global option(s)

which is certainly false. I tried unsetting the options with


right after \ProcessKeyvalOptions*, but that didn't work. How can I mark those options as used?

share|improve this question
Sorry, I misread the question completely and my solution is therefore surely wrong. – yo' Aug 23 '12 at 16:29
Btw, shouldn't doing \LoadClass[fleqn, openbib, headings=big, DIV=12]{scrartcl} instead of \PassOptionsToClass and \LoadClassWithOptions help? – yo' Aug 23 '12 at 16:31
up vote 5 down vote accepted

I took a fresh, thorough look at The LaTeX Companion (A.4.8) and solved the problem myself.

Despite what I previously assumed, \PassOptionsToClass and \LoadClassWithOptions do not work together. The whole point of \LoadClassWithOptions is passing exactly the same arguments as the current class got. So here switching to \LoadClass will now take the default options.

Unfortunately now the user given global options will not overwrite the default ones. Therefore they have to passed manually to the class. Here kvoptions provides \DeclareDefaultOption as a equivalent to the classic \DeclareOption*. All in all the result looks like:




\PassOptionsToClass{fleqn, openbib, headings=big, DIV=12}{scrartcl}




So whenever \ProcessKeyvalOptions* sees an unknown option, like DIV=10, it passes it along to scrartcl, overwriting any default value in the process. That's why \PassOptionsToClass had to be moved in front of it.

share|improve this answer
As far as the options you pass to scrartcl does not depend on the global ones, this shall work. But you should at least define the draft option for your class, something like \DeclareVoidOption{draft}{\overfullrule5\p@}. – yo' Aug 23 '12 at 17:26
@tohecz: That is not necessary. Because of my use of \DeclareDefaultOption, all those global options (like draft) that I'm not handling myself, are passed on to scrartcl. – canaaerus Aug 23 '12 at 17:29
Oh ok, one learns all the time, even after he's written two sort-of complex classes himself... – yo' Aug 23 '12 at 17:48

Your Answer


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.