# What is the minimal codes to create my own \documentclass derived from LaTeX's book?

I want to invoke my document class as follows:

\documentclass[cymk,dvips,dvipsnames]{mybook}


Internally mybook.cls includes my own packages such as mytables.sty, mypstricks.sty, etc.

What is the minimal code to create this document class?

-

\ProvidesClass{mybook}[2011/01/20 v 0.01 my own class (hv)]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}% or whatever
\ProcessOptions\relax
%
\LoadClass[% the default options
]{book}
\RequirePackage{xcolors}
\RequirePackage{...}
...
\endinput


And, of course, a comment statement of the license (LPPL) at the beginning, and preferrably some basic info about the file if you plan to ever publish it anywhere.

-
thanks for this solution. I am trying to use it now. – xport Jan 20 '11 at 9:14
I was under the impression that classes need to have: \NeedsTeXFormat{LaTeX2e}[<date of some version>] as the first statement. Did you leave it out? Or am I in error? Thanks. – bev Mar 9 '11 at 0:45
@bev: that is done by the loaded class and already nowadays no more a problem. – Herbert Mar 9 '11 at 6:32