0

The following image is the output from the following block of code:

\begin{itemize}
    \item In the document, put: \textbackslash lipsum[1-2] \\
        [1-2] means generate paragraph from 1 to 2.
\end{itemize}

enter image description here

However, what I intend to produce is something that looks like:

•In the document, put:\lipsum[1-2]
 [1-2] means generate paragraph from 1 to 2

I'm confused of what went wrong and don't know how to fix it.

Claire
  • 157
  • 4
    don't ignore error messages! use \\ \relax so the [1... isn't taken as the optional \\[5pt] length argument (and generate an error about missing length) – David Carlisle Jun 04 '21 at 20:32

1 Answers1

0
  • Building on David's comment.
  • You can use \\{}.
  • For more background info see here (regarding \\{}) and here (regarding \\[5mm]).

\documentclass{article}
\begin{document}

\begin{itemize} \item In the document, put: \textbackslash lipsum[1-2] \{} [1-2] means generate paragraph from 1 to 2. \item In the document, put: \textbackslash lipsum[1-2] \[5mm] % You can also try "0mm" :) [1-2] means generate paragraph from 1 to 2. \end{itemize}

\end{document}

enter image description here