![更改段落的缩进结构](https://linux22.com/image/389349/%E6%9B%B4%E6%94%B9%E6%AE%B5%E8%90%BD%E7%9A%84%E7%BC%A9%E8%BF%9B%E7%BB%93%E6%9E%84.png)
答案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}