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
\documentclass{article}
\begin{document}
\section{Introduction}\\ % Misplaced line break
The introduction begins here.
\end{document}\documentclass{article}
\begin{document}
\section{Introduction}
% No \\ needed — paragraph break is implicit
The introduction begins here.
\end{document}Related errors
Overfull \hbox (Line Too Wide)
Overfull \hbox (Xpt too wide) in paragraph at lines N--M.
Underfull \hbox (Poor Word Spacing)
Underfull \hbox (badness 10000) in paragraph at lines N--M.
Float Used in Non-Outer-Par Mode
! LaTeX Error: Not in outer par mode.
Illegal Unit of Measure
! Illegal unit of measure (pt inserted).
Test the fix live
Paste your LaTeX into the playground and compile instantly.

