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.

Une chose rapide

Nous suivons l'utilisation anonyme — pages vues, utilisation des fonctionnalités, événements de compilation — pour comprendre ce qui fonctionne et ce qui ne fonctionne pas. Pas de publicité, pas de données personnelles, pas de partage avec des tiers.

Politique de cookies