5

Is there way to change the indent structure of a specific paragraph like shown in the picture?

All the paragraphs begin with indent and no indent afterwards but the third paragraph begins with no indent and then the new lines are indented.

enter image description here

5

For a single paragraph not containing lists or other list based objects such as enumerate or center, you can use the primitives \hangindent and \hangafter:

\documentclass{article}
\usepackage{lipsum}

\newenvironment{reversepar}[1][\parindent]
 {\par\addvspace{\topsep}\hangindent=#1\hangafter=1\parindent=0pt\relax}
 {\par\addvspace{\topsep}}

\begin{document}

\lipsum[4]

\begin{reversepar}
\lipsum[4]
\end{reversepar}

\lipsum[4]

\end{document}

enter image description here

You can change the amount of hanging indentation with

\begin{reversepar}[<dimen>]
3

How about a enumitem-based solution?

\documentclass{article}
\usepackage{enumitem}
\newlist{weirdparagraph}{itemize}{1}
\setlist[weirdparagraph]{
  label=,
  leftmargin=2.5em,
  itemindent=-\leftmargin,
  listparindent=-\leftmargin,
  partopsep=0pt,
  topsep=0pt,
  itemsep=0pt,
  parsep=\parskip
}

\newcommand\test{%
  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis
  facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet
  mi nec ante. Donec ullamcorper, felis non sodales commodo, lectus velit ultrices
  augue, a dignissim nibh lectus placerat pede.%
}

\setlength\parindent{3.5em}
\setlength\parskip{5pt plus 1pt minus 1pt}

\begin{document}
\test

\test

\begin{weirdparagraph}
\item \test\par\test
\end{weirdparagraph}

\test
\end{document}

enumitem

0

The hanging package also does it:

\documentclass{article}
\usepackage{lipsum, hanging}

\begin{document}
    \lipsum[1]
    \hangpara{2em}{1}\lipsum[2]
    \lipsum[3]
\end{document}

as:

enter image description here

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.