【发布时间】:2015-07-03 22:12:29
【问题描述】:
我只需要在文档的一个部分(具体来说就是小节)中禁用缩进。我该怎么做?
默认缩进由 indentfirst 包提供。
【问题讨论】:
标签: latex indentation
我只需要在文档的一个部分(具体来说就是小节)中禁用缩进。我该怎么做?
默认缩进由 indentfirst 包提供。
【问题讨论】:
标签: latex indentation
这取决于您想要消除压痕的普遍程度。但我要尝试的第一件事是将\parindent 设置为0pt:
Some text with normal indentation...
{\parindent0pt % disables indentation for all the text between { and }
Text with no indentation.
Still no indentation.
}% restore indentation
Indented again.
【讨论】:
\setlength{\parindent}{0pt} 代替。 \parindent0pt 是纯 TeX,它的使用可能会混淆 LaTeX。
\noindent 仅适用于第一段。以下段落将有它们通常的缩进。
{\parindent0pt \subsubsection{Title}},部分标题就会消失。
设置缩进的环境可能是一种可能的解决方案?你在序言中定义它:
\newlength\mystoreparindent
\newenvironment{myparindent}[1]{%
\setlength{\mystoreparindent}{\the\parindent}
\setlength{\parindent}{#1}
}{%
\setlength{\parindent}{\mystoreparindent}
}
然后你会在你的文档中写如下内容:
\begin{myparindent}{0pt}
This paragraph is not indented, ehm well, actually it is indented by 0pt
which is the same as not indented.
And this paragraph neither\ldots
\end{myparindent}
或者如果你想要一个大的段落缩进
\begin{myparindent}{5cm}
The first line of this paragraph is indented by 5 cm.
And so is the first line of the next paragraph.
\end{myparindent}
【讨论】:
\noindent 我认为这就是你想要的。
【讨论】: