Problem with \maketitle: "there's no line here to end"

The first \\ in \title is the source of the error. Remove it and your code becomes compilable. You should check this out for more insight into how \\ is used.

I understand that you used \\ in \title as an attempt to customise the formatting of the title on the title page. However, it's good practice to do most of the formatting of the title page by either redefining the \maketitle command "manually" (the original definition is usually found in the .cls file) or using the titling package.

Final note: as pointed out by @MartinH in his comment, a titlepage environment is already used in the definition of the \maketitle command ; therefore, there is no need to enclose \maketitle inside another titlepage environment, as you did in your code.

\documentclass{scrartcl}
\newcommand{\aone}{Anna}
\newcommand{\atwo}{Bob}
\newcommand{\topic}{Tpoic}
\subject{University \\ Paper}
\title{topic\\ suubtitle}
\author{\aone\and \atwo}
\begin{document}
\maketitle
\end{document}

enter image description here

Tags:

Titles

Errors