2

I need to update some LaTeX files containing lists. I've noticed that all but the last ones items in the lists end with the \\ command, e.g.:

\begin{itemize}
  \item Item1 text\\
  \item Item2 text\\
  \item Item3 text
\end{itemize}

What do these \\ commands do? Is it safe to remove them?

2
  • 2
    \\ is a very basic LaTeX command and it is probably described at the beginning of any LaTeX tutorial. It just adds a line break. In an itemized environment, it starts a new indented paragraph, but without a bullet. What it does with your example is to add an empty paragraph and this way it increases the iter-item space. It is up to you to decide if it is or not safe to remove them, but definitely it will not break your code. Jan 30, 2020 at 11:00
  • 5
    It is not only safe, but also advised to remove them. Outside of tables, there is nearly no place at all where using // is correct. In the specific case you show they are the cause of the underfull box warnings Jan 30, 2020 at 12:02

1 Answer 1

1

It is safe to remove them; they are not needed. If you use a LaTeX IDE like TeXstudio, etc. to generate an example itemized list or numerated list they do not include the line break sequence \\ at the end of each item.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .