Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

MWE:

\documentclass{article}
\begin{document}
A list:

\begin{itemize}
\item \texttt{abc def ghi}\\
This needs to be indented.
\item \texttt{jkl mno pqr}\\
This needs to me indented, too.
\item \texttt{stu vwx yz}\\
But this musn't be indented.
\end{itemize}
\end{document}

I need to indent a little a text after \\ in \item. I need it not to be global change because some of texts (maybe in another list) must not be indented.

EDIT:

\documentclass{article}
\usepackage{enumitem}
\setlist{parsep=0pt,listparindent=\parindent}

\begin{document}
A list:
\begin{itemize}
\item \texttt{abc def ghi}

This needs to be indented.
\item \texttt{jkl mno pqr}

This needs to me indented, too. It is a very long text and I need it to be moved right, not only the first line.
\item \texttt{stu vwx yz}\\
But this musn't be indented.
\end{itemize}
\end{document}

I said earlier something different that I meant. I don't want an indent (that moves first line right). I want to move all lines right.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

Load the enumitem package to change (follow-up) paragraph spacing and indentation inside lists, and in the text body use paragraphs (blank lines) instead of \\ at the appropriate places.

\documentclass{article}

\usepackage{enumitem}
\setlist{parsep=0pt,listparindent=\parindent}

\begin{document}

A list:

\begin{itemize}
\item \texttt{abc def ghi}

This needs to be indented.
\item \texttt{jkl mno pqr}

This needs to me indented, too.
\item \texttt{stu vwx yz}\\
But this musn't be indented.
\end{itemize}

\end{document}

enter image description here

EDIT: Your revised requirement can be solved by, e.g., using the addmargin environment of the scrextend package (part of KOMA-Script):

\documentclass{article}

\usepackage{enumitem}
\setlist{parsep=0pt,listparindent=\parindent}

\usepackage{scrextend}

\begin{document}

A list:

\begin{itemize}
\item \texttt{abc def ghi}

This needs to be indented.
\item \texttt{jkl mno pqr}

\begin{addmargin}[\parindent]{0pt}% optional: additional left margin, mandatory: additional margin
This needs to me indented, too. It is a very long text and I need it to be moved right, not only the first line.
\end{addmargin}
\item \texttt{stu vwx yz}\\
But this musn't be indented.
\end{itemize}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.