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

Possible Duplicate:
Defining a wrapper class for a set of document classes

When writing a new class (say, journal), how can I base it on an existing class (say, scrbook)?

share|improve this question

marked as duplicate by Martin Schröder, diabonas, clemens, Marco Daniel, egreg Sep 15 '12 at 22:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Related: tex.stackexchange.com/questions/36274/… – lockstep Sep 13 '12 at 6:45
Thanks @lockstep, this is pretty much what I would like to achieve indeed, but this question didn't show up when searching. – ℝaphink Sep 13 '12 at 6:48
up vote 11 down vote accepted

The LaTeX Companion does explain this in more detail, but here is what you basically have to do in your journal.cls:




You need to be careful when dealing with class options. I discussed this issue when using the kvoptions key-value package in http://tex.stackexchange.com/a/68475/15616. But there are also native LaTeX commands \DeclareOption, \DeclareOption* and \ProcessOptions*.

share|improve this answer

Besides the command \LoadClass there's a command \PassOptionsToClass{<options-list>}{<class-name>} that can be used before \LoadClass{<class-name>}. This is a simple beginning of your class:

\ProvidesClass{myclass}[2012/09/13 v0.1 My Class]




If you want all options user gives to myclass to be passed to article, you can used \LoadClassWithOptions{article}. However, this can have some drawbacks and I'm not sure it is always a good idea.

share|improve this answer
Please see the answer I linked to, for the correct way of passing options on in this case (with kvoptions). – canaaerus Sep 13 '12 at 6:56

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