# macro - problems with renewcommand [duplicate]

I'm using the book class and I want to renew its existing command \@makechapterhead. The original command is shown on p.32 of this document. In particular, I want to change the spacing in line 811 from 50 to 30, so I did the following

\renewcommand{\@makechapterhead}{
\vspace*{30\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
⟨book⟩     \if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
⟨book⟩    \fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
}


But I got an error saying illegal parameter number in definition of \@makechapterhead. How do I fix this?

Thanks.

• did you remove the <book> tag in your redefinition? – Yan Zhou Jan 23 '17 at 2:06

\makeatletter

The original definition of \@makechapterhead is backup-ed in \@makechapterhead@ori. Next, a negative vertical of 20pt is added and then the original \@makechapterhead is applied. As a result, you got a vertical space of 50-20 = 30pt, as desired.