2

Why do I constantly get this error: There's no line here to end. \maketitle

When I learned to use latex I was told to use \maketitle where I want to have my title placed. What is written in the title is defined by \title. Like this:

\documentclass[a4paper,oneside,abstracton]{scrartcl}

\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc}               %Zeichencodierung Text
\usepackage[T1]{fontenc}                     %Schriftsatz Dokument

%%Language settings
\usepackage[english]{babel}                  %ngerman for German
\usepackage{csquotes}                        %[babel,quotes=english]
\usepackage{caption}
\addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}
%\renewcommand{\contentsname}{Table of Contents}   % only works when not using babel

%%Paper adjustments
\usepackage{graphicx}
\usepackage{epstopdf}                        %if problems with importing .eps graphics
%\usepackage{a4wide}                         %obsolete and replaced by geometry
\usepackage[a4paper,bottom=3.1cm]{geometry}  %also with command \geometry{options}
\usepackage{changepage}
\usepackage{titling}


\begin{document}

\title{\LARGE Advanced Course \\ [1em] \huge \textbf{Tools}}
\author{Muster1 \hspace{1cm} Muster2}
\date{\\[1em] {Today} \\ [0.8cm] Supervisor Dr. Muster3 \\ [0.5cm] Institut \\ University of Whatsoever}

\clearpage
\maketitle
\thispagestyle{empty}
\renewcommand\abstractname{Abstract}
\renewcommand\tablename{Table}
\newpage

\end{document}
1
  • 3
    lose the \\[1em] at the start of your date. Feb 23, 2015 at 14:37

1 Answer 1

2

The problem is that you are using \\ (inside \date) when TeX is in vertical mode. TeX has the vertical and the horizontal modes. Horizontal mode is for putting letters into lines and assembling those into paragraphs, vertical mode is for putting those paragraphs and other things onto the page. \\ is a horizontal mode command that breaks the current line inside a paragraph. The error you are getting, no line to end, is exactly right: you have not begun a line, i.e. entered horizontal mode, yet.

Use \vspace{1em} instead of \\[1em] as vspace is a vertical mode macro that will function exactly how you want it to.

8
  • \null isn't a (supported) latex command for use in documents (and does not start horizontal mode so will do nothing here) Feb 23, 2015 at 16:05
  • Would \hbox{} be the proper thing to use, then? I was under the misconception that \null simply expanded to \hbox{}. Feb 23, 2015 at 16:07
  • \null does expand to \hbox{} that is why it does not work. Feb 23, 2015 at 16:13
  • The reason that we always ask people to provide MWE in questions is so that people can test answers. Did you try adding \null? Feb 23, 2015 at 16:15
  • I'm not at a computer right now, but I'll rush to one to try as you suggest. Feb 23, 2015 at 16:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .