Until now, I have been collecting my "frequently used packages", custom macros, and configurations in a personal style file. However, some of those configurations depend on the use of one of the KOMA-Script classes, and therefore (according to my own answer to Classes and packages – what's the difference?) good practice stipulates that I rewrite my personal file into a wrapper class.

According to section A.4.8 of the LaTeX Companion, a wrapper class file myclass.cls that builds on article.cls and passes class options specified by the user to the base class would look like, e.g.,

\RequirePackage{<package list>}

or, even easier,

\RequirePackage{<package list>}

However, my base class may in fact be one of several document classes, namely scrartcl, scrreprt, orscrbook. I want to define some wrapper class options (named, say, article/report/book) that, by specifying one of them, load the corresponding KOMA-Script class. (If I don't specify any of them, scrbook shall be loaded by default.) How do I go on about this?

2 Answers 2


This scheme seems to work:


The default class is scrbook, but the options scrartcl or scrreprt will change it.

In my test I tried with the abstract option:


gives Unused global option(s): [abstract], while


doesn't show the message.


The following works for me. I like the flexibility given by keys, but you have to \RequirePackage{kvoptions-patch} or to make your own format including it.

    /MyClassKeys/class/.store in = \MyClass,
    /MyClassKeys/class = scrbook}%

\documentclass[class = extarticle,14pt]{myclass}


This is my class using the \MyClass{} class


Note that is not actually a wrapper but the class itself. If find it easier to maintain (but a .dtx can also be a good solution to maintain different files, including some wrappers).

  • I'd rather avoid the need for a \RequirePackage in actual documents, but +1 for a solution using pgfopts.
    – lockstep
    Nov 26, 2011 at 23:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .