[Tuglist] Changing class file

David Kastrup tuglist@tug.org.in
06 Jun 2002 10:28:04 +0200

"Dr. Dinesh Karia" <dineshjk@earth.planet.net.in> writes:

>  I want to prepare a kind of lecture notes. So, I chose to use the
>  book or amsbook class. None of these classes offers a suitable
>  layout. As a result, first I referred to amsclass.faq. As is
>  suggested there, I copied the file amsbook.cls to mybook.cls and
>  used it. I got the following error
> --------------------- copied from the log file-------
> ! LaTeX Error: File `mybook.cls' not found.
> Type X to quit or <RETURN> to proceed,
> or enter new name. (Default extension: cls)

Others have already commented on this, the filename database needs to
be refreshed.  How to do this depends on the TeX distribution in
use.  Most Unix-based ones have the program `texhash' for that.

> When I copied my texfile into the directory
> C:\texmf\tex\latex\amscls and latexed it, it issued me the following
> warning
> LaTeX Warning: You have requested document class `mybook',
>                but the document class provides `amsbook'.
> But it compiled and produced the dvi file correctly.

mybook.cls will contain a line
or similar.  Of course, this is not appropriate.

Note that if your package basically ises amsbook, but changes a few
things, this mechanism of copy-and-change is not a good idea.
Instead take a look at clsguide (which should come with your system).
Again, on Unix-based systems

texdoc clsguide

should do the trick.  This will describe how you can create your own
derivate of amsbook that loads the original amsbook, then changes
what is necessary.

> (C:\texmf\tex\latex\amsmath\amsmath.sty

Ok, not a Unix-based system, obviously.  Refreshing the filename
database must be somewhere within MikTeX's menus, and you will find
clsguide.dvi somewhere in your tree.  Sorry that I don't know more
about it.

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de