> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/latex-errors/18-latex-error-there-s-no-line-here-to-end.md).

# LaTeX Error: There's no line here to end

If you use a line-breaking command such as **`\\`** or **`\newline`** at a time when LaTeX is not expecting it, you will generate the error shown below:

main.tex, line 12

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

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.8 \\\ Your command was ignored. Type I to replace it with another command, or to continue without it.

## Common Causes

**Using a linebreak \\\ when it is not appropriate:**

One common cause of this error is if a line-break command such as **`\\`** or **`\newline`** is used inappropriately. If LaTeX encounters a line-break command when it is not building a paragraph, it will generate an error. An example of this mistake is shown below:

```latex
\\ We have put a line-break in the wrong place
```

In the above example, a line-break has been inserted with no text before it. LaTeX doesn't know what to do since it cannot break the line which doesn't exist, so it returns an error.

**Putting a line-break after a list environment:**

This error can also appear if you attempt to place a line-break after a list environment as shown below

```latex
\begin{itemize}
    \item This is a list item
    \item This is another list item
\end{itemize}\newline
```

LaTeX does not see this list as a paragraph, but rather as a separate grouping of objects, and as such it does not find a line to break. If you would like there to be more space beneath all of your lists, it is best to redefine the **`itemize`** in your preamble or class file, however for a one time case, this error can be avoided by writing **`\leavevmode`** in front of the line-break command as shown below:

```latex
\begin{itemize}
    \item This is a list item
    \item This is another list item
\end{itemize}\leavevmode\newline
```

**Trying to write a list item label on a line of its own:**

Another common reason for this error to occur is if you are trying to write a list with labels using the **`description`** environment, and you would like the label to be on a line of its own. An example how a mistake would be made here is shown below:

```latex
\begin{description}
\item[This is our label] \\
     We would like this text to be on its own line.
\end{description}
```

This will generate an error, as LaTeX sees the label entry as an argument of the **`\item`** command, and not as part of a paragraph of text. If you would like to have the labels in your list be on separate lines to the list entries, you would have to redefine the **`description`** environment. The easiest way to do this is by using the **`enumitem`** package, and including **`\setlist[description]{style=nextline}`** in your preamble as shown below:

```latex
% In your preamble

\usepackage{enumitem}
\setlist[description]{style=nextline}

% In the main body of your document

\begin{description}
\item[This is our label]
     We would like this text to be on its own line.
\end{description}
```

![Enumitem.PNG](/files/KA4Zvaqd8fE0ADJj7ZLP)

This will give the desired result, by making all labels appear on a separate line to the list entry.

If you would prefer to simply have only one label be on a separate line, you can do this by using the **`\leavevmode`** command, as shown below:

```latex
\begin{description}
\item[This is a label] \leavevmode \\
     This text will appear on its own line
\item[This is another label] This text will be on the same line as the label.
\end{description}
```

![Leavevmode.PNG](/files/ToWX6fxL8E83C3hmd5Wa)

This is because LaTeX encounters such errors when it is trying to skip lines in vertical mode. The **`\leavevmode`** command causes the compiler to temporarily leave vertical mode, so the error is avoided.

**Creating whitespace when using the center, flushleft or flushright environments:**

Another cause of this error appearing is when you have tried to include multiple line-breaks by writing

* **`\\\\`**
* **`\\\newline`**
* **`\newline\newline`**
* etc.

while in the **`center`**, **`flushleft`** or **`flushright`** environments as shown below

```latex
\begin{center}
  We would like there to be a one line gap between this line \\\\
  and this line
\end{center}
```

This is not allowed in LaTeX, and will generate an error. The correct way to include multiple line-breaks here is to write **`\\[length]`** where **`length`** is the distance you would like between the lines. An example is shown below:

```latex
\begin{center}
  We would like there to be a one line gap between this line \\[2\baselineskip]
  and this line
\end{center}
```

![Centerskip.PNG](/files/yEFFsDEx7fu3oSbqKwbi)

Here, the **`\\[2\baselineskip]`** command tells latex to skip two lines at that point. The different measurement options for the distances you can input in the **`length`** option are listed [here](/latex/formatting/01-lengths-in-latex.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/latex-errors/18-latex-error-there-s-no-line-here-to-end.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
