[texhax] trying to modify book.cls to automatically add TOC entry for \chapter* gives errors

Susan Dittmar SDittmar at eureca.de
Thu May 8 09:16:34 CEST 2008

Quoting Niall Mansfield (texhax at uit.co.uk):
> - Using book.cls
> - Want to change \chapter*{} in order to:
> 	* add a TOC entry
> 	* set the running heads
>    so that we can use \chapter*{} for Preface, Foreword,
>    Glossary, etc.

I personally do not like such redefinitions. I think it would be better to
define a new command for the new job -- after all, are you sure you will
never need the original starred version? And will you still be able to read
your own code in some years? Especially the second part will be much easier
if you use a new name for the new command.

So what I would do is something like this (untested!):

	% allow for the optional argument of chapter*:

Hope that helps,


More information about the texhax mailing list