KOMA Script 中新增无缩进的段落

KOMA Script 中新增无缩进的段落

这可能是 TeX.sx 上问过的最愚蠢的问题,但我最近改变了我的段落风格,现在遇到了问题。考虑以下 MWE:

\documentclass{scrartcl}

\begin{document}

This is a line. This is a line. This is a line. This is a line. This is a line. 

Indented new paragraph. Indented new paragraph. Indented new paragraph. Indented new paragraph. Indented new paragraph.\\

New block again indented. Should not be indented.

\end{document}

它产生以下输出:

缩进新段落

我认为第二段不应该有缩进。我该如何避免这种情况?

答案1

手动解决方案:\noindent在不应缩进的段落开头添加。

自动解决方案:启用parskip,即段落之间的空格,并为“缩进换行符”创建自定义宏。这有效,但无论如何都不美观。我在对你的问题的评论中写的内容仍然适用,请查看第 49f 页(0.5 页)第 3.1.3 节KOMA-Script 手册关于 的缺点parskip

\documentclass[parskip=full]{scrartcl}

\newcommand{\mylinebreak}{\newline\hspace*{11pt}}% 11pt is about the standard \parindent
                 %(but only if you don't use a font size option to your document class!)

\begin{document}

This is a line. This is a line. This is a line. This is a line. This is a line.\mylinebreak
Indented new paragraph. Indented new paragraph. Indented new paragraph. Indented new paragraph. Indented new paragraph.

New block again indented. Should not be indented.

\end{document}

输出的屏幕截图

要找出当前\parindent(例如,如果您已经加载了带有选项的文档类12pt),请删除该parskip选项并添加\the\parskip到文档正文中,这会将当前值打印\parindent到您的文档中。

相关内容