GeneralWeird error: There's no line here to end

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
benowar
Posts: 33
Joined: Mon Aug 06, 2007 2:05 pm

Weird error: There's no line here to end

Post by benowar »

Hi,
the following code snippet produces the error "There's no line here to end" and I dont know why. The resulting PDF looks nice, but I would like to get rid of the error. Any ideas?

Code: Select all

\begin{titlepage}

	\vspace{4em}
	\center
	\Large{\textsf{Diplomarbeit zum Thema}}
	\vspace{1em}
	
	\Huge{\textsf{Headline}}
	\vspace{2em}
	\\
	\Large{
		\textsf{
			zur Erlangung des akademischen Grades\\
			\textbf{Diplom-Foobar (FH)}
			\vspace{6em}
			\\
			Universität zu Berlin\\
			\\
			Fachbereich Wirtschaftswissenschaften I\\
			Studiengang Informatik
}
	}
	\vspace{8em}
	\\
	\Large{
		\textsf{
			Eingereicht von Benjamin\\
			\today
			\vspace{2em}
			\\
			Erstbetreuer: Foo\\
			Zweitbetreuer: Bar
	  }
	}
\end{titlepage}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

markito
Posts: 4
Joined: Mon Oct 08, 2007 4:15 pm

Weird error: There's no line here to end

Post by markito »

Hi!

It´s the double backslash in the line after "Universität zu Berlin" that ends no line.
Universität zu Berlin\\
\\
Fachbereich Wirtschaftswissenschaften I\\


Good luck for the Diploma,

M.
balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Weird error: There's no line here to end

Post by balfonsi »

The problem is the 2 consecutive \\ in

Code: Select all

         Universität zu Berlin\\
         \\
Just add \mbox{} before the 2nd \\.

Btw, there is no \center command. I guess it's \centering?
Also, \Large, \Huge are commands without an argument: they just tell what the size of the current font must be; this will not give an error message; you simply have a useless pair of parentheses; so it would have been simpler to write, e.g.

Code: Select all

\textsf{\Large Diplomarbeit zum Thema}
Regards,

B.A.
Last edited by cgnieder on Mon Oct 15, 2012 9:09 pm, edited 1 time in total.
benowar
Posts: 33
Joined: Mon Aug 06, 2007 2:05 pm

Re: Weird error: There's no line here to end

Post by benowar »

Thanks!
emmkell
Posts: 7
Joined: Thu Jul 05, 2012 4:10 pm

Re: Weird error: There's no line here to end

Post by emmkell »

I had the same problem in Lyx. And lyx told me it was in my main class file, but it was acutally in a completely different filethat has my appendix, i had a \ where i shouldnt have in there, took me forever to find what was wrong
Post Reply