答案1
对于不包含列表或其他基于列表的对象(如enumerate
或 )的单个段落center
,可以使用原语\hangindent
和\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}
您可以使用以下方式更改悬挂缩进量
\begin{reversepar}[<dimen>]
答案2
基于 的解决方案怎么样enumitem
?
\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}