![使所有单行段落都变成 \noindent](https://linux22.com/image/477475/%E4%BD%BF%E6%89%80%E6%9C%89%E5%8D%95%E8%A1%8C%E6%AE%B5%E8%90%BD%E9%83%BD%E5%8F%98%E6%88%90%20%5Cnoindent.png)
答案1
在我看来,你想要做的事情会导致非常糟糕的排版。
这是一种非常基本的方法,但它只允许使用普通段落;列表或类似的东西都会破坏它。
\documentclass{article}
\def\testpar#1\par{%
\sbox0{#1}%
\ifdim\wd0<\columnwidth
{\setbox0=\lastbox}#1\par
\else
#1\par
\fi
}
\newenvironment{astounding}
{\everypar={\testpar}}
{}
\begin{document}
\begin{astounding}
This is a single line.
This line will be two lines long if I just add a few words
and more words until it is long enough.
\end{astounding}
\end{document}