FormaTeX
FatalTypography & Layout

No Line Here to End (Misplaced \\)

! LaTeX Error: There's no line here to end.

What this error means

The \\ (forced line break) command was used in a context where it doesn't make sense — such as immediately after \section{}, at the start of a paragraph, or inside \centering without preceding content.

Common causes

  • Using \\ immediately after a sectioning command like \section
  • Placing \\ at the very beginning of a centered or flushed block
  • Using \\ to add vertical space where \vspace{} should be used instead

How to fix it

Remove the \\ from sectioning commands. To add vertical space after a section heading, use \vspace{length}. To force a paragraph break, use \par or leave a blank line instead.

Code examples

Causes the error
\documentclass{article}
\begin{document}

\section{Introduction}\\  % Misplaced line break

The introduction begins here.

\end{document}
Fixed
\documentclass{article}
\begin{document}

\section{Introduction}
% No \\ needed — paragraph break is implicit

The introduction begins here.

\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy