[texhax] Writing a class

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Tue Sep 23 16:39:20 CEST 2003


> Hi,
> 
> I intend to write a documentclass based on KOMA's scrlttr2. I would like to pass
> the option DINmtext and DIN, respectively. I read something about
> \PassOptionToClass in clsguide.dvi, but I am not sure how to realise it. The
> result should be like this:
> 
> \documentclass[DIN]{myletter} -> \LoadClass[DIN...]{scrlttr2}
> \documentclass[DINmtext]{myletter} -> \LoadClass[DINmtext...]{scrlttr2}
> 
> Any ideas? Thank you!

unless you want to pass all options to the loaded class
\LoadClassWithOptions, you do:

\DeclareOption{DIN}{\PassOptionsToClass{\CurrentOption}{scrlttr2}
... % similar for all pass-through options
... % other option declarations
\ProcessOptions
\LoadClass{scrlttr2}


More information about the texhax mailing list