I was toying a bit with the \@startsection command to change the layout of chapter / section headings. More specifically, I wanted my headers to be converted to uppercase.
I was following an example from the LaTeX compendium:
\documentclass{scrbook}
\makeatletter
\renewcommand\chapter{\@startsection
{chapter}{0}{0mm}
{-\baselineskip}
{0.5\baselineskip}
{\MakeUppercase}}
\makeatother
\usepackage{lipsum}
\begin{document}
\chapter{SomeChapter}
\lipsum[1]
\end{document}
This tossed an error message at me from the line \chapter{SomeChapter}:
Argument of \@gobble has an extra }.
After quite some trial & error, I found that using \uppercase instead of \MakeUppercase worked fine - but not for Umlauts.
What did I do wrong? Shouldn't \MakeUppercase work as well (and handle Umlauts correctly)?
\g@addto@macroapproach above withchapterworked perfectly, butsectiongave me the very same troubles as mentioned in the question. However: It turns out that\uppercase, in this case, doesn't generate any errors and works correctly with Umlauts. :-D – DevSolar Aug 08 '11 at 17:47