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

Can someone tell me why


isn't safe to do? Nevermind why I'm asking, I have workarounds so this is more about LaTeX not behaving the way I thought it would. The \let command should backup the original \chapter definition as \stdchapter, and redefining \chapter to expand to \stdchapter should make it do exactly what it did in the first place. However, LaTeX fails to process my document if I make this change (error message: "LaTeX Error: Something's wrong--perhaps a missing \item.").

UPDATE: Here's minimal code needed to reproduce the problem:

share|improve this question

you have to catch the star version of \chapter



share|improve this answer
Let's note that this is a nice demonstration of the usage of \@dblarg ! – yo' Jun 20 '12 at 12:37

It's difficult to say right away what's the source of the problem. Your redefinition should work reasonably, albeit not being what I'd recommend.

The \chapter macro usually has no argument. It appears to have an optional and a mandatory argument, but it really hasn't and this should be taken into consideration when doing redefinitions.

For example, the definition of \chapter in the book class is


which shows that \chapter doesn't look for arguments.

I can understand that your example is just an example, but in that way you lose all facilities provided by \chapter (*-form and optional argument).

Why you get that error surely depends on how you're actually redefining \chapter.

Let's see why you get the error in your example. The macro \tableofcontents issues \chapter*{\contentsname} and here's where your redefinition fails: the argument to \chapter is *.

The argument to a command is either the text contained in the braced group that follows the command or, if an open brace doesn't immediately follow, the first token (different from a space).

share|improve this answer
It could be that some other package is also modifying \chapter, and that's why it fails. Thanks for answering. – Haakon Riiser Jun 20 '12 at 6:58
@HaakonRiiser Would you try and present a minimal working example (MWE) that illustrates your problem? Welcome to TeX.SX! – egreg Jun 20 '12 at 7:54
fwiw, the code as presented works for me; class book, definition after \begin{document} (and of course before the first \chapter command) – wasteofspace Jun 20 '12 at 8:25
Thank you for explaining how the starred version causes this problem, and to Herbert for providing a full example! I'm not actually going to use this is my thesis as it was cleaner to just make a new chapter macro with a different name, but it bugged me that I didn't understand why the redefinition didn't work. :) – Haakon Riiser Jun 20 '12 at 10:59
@HaakonRiiser It's generally unwise to redefine a macro that could be used in internals changing also its syntax: if it has no arguments, then its redefinition shouldn't have them either. – egreg Jun 20 '12 at 11:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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