I have a document with a title that is spread over several lines using hard line breaks. To configure the title formatting, I use the titling
package with code adapted from its documentation:
\documentclass{article}
\usepackage{titling}
\pretitle{\begin{center}\LARGE\sffamily\bfseries}
\posttitle{\par\end{center}\vskip 0.5em}
\title{Higgelty Pigglety Pop! \\ or \\ There Must Be More to Life}
\begin{document}
\maketitle
\end{document}
…and it works perfectly.
I now want the title additionally to be in all caps and therefore change the \pretitle
command:
\pretitle{\begin{center}\LARGE\sffamily\bfseries\MakeUppercase}
…and I get the following error message:
! Use of \@icentercr doesn't match its definition.
<argument> \def
l.12 \maketitle
This only happens with a title that includes hard line breaks.
What does this error message mean? How can I fix it?