5

Is there any LaTeX command allowing to indent a whole paragraph but its first line ?

I tried by compiling the text then, knowing where starts a new line, inserting a \quad. However, for long paragraphs, this forces to recompile more and more times because adding \quad changes the point of each line breaks.

  • 1
    Welcome to TeX.SX! On TeX level there's \hangindent and \hangafter. – TeXnician Mar 6 at 12:05
  • 2
    There's also the hanging package. Its user guide describe the package as "provid[ing] facilities for both hanging paragraphs and hanging punctuation". – Mico Mar 6 at 12:26
3
\documentclass{article}
\usepackage{lipsum}
\parskip 1ex
\newenvironment{reverseindent}[1]
  {\par\noindent\hspace{-\dimexpr#1\relax}\leftskip=#1\relax\ignorespaces}
  {\par\leftskip=0pt\relax}
\begin{document}
\lipsum[1]

\begin{reverseindent}{1cm}
\lipsum[2]
\end{reverseindent}

\lipsum[3]
\end{document}

enter image description here

  • It is exactly what I was searching for; unfortunately it seems to conflicts with other packages I uses. Do you know which packges could affect your suggestion? – Nando Bici Mar 7 at 15:00
  • @NandoBici Perhaps the name reverseindent is already taken, as that is the only new name I introduce. Just rename reverseindent to something else (e.g., Rindent), and try again. – Steven B. Segletes Mar 7 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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