2010-11-01 24 views

回答

17

這取決於你如何普遍地根除縮進。但我想嘗試的第一件事就是設置\parindent0pt

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. 
+0

這適用於我。謝謝。 – 2010-11-02 10:14:38

+3

我認爲在LaTeX中你應該使用'\ setlength {\ parindent} {0pt}'來代替。 '\ parindent0pt'是純TeX,它的使用可能會混淆LaTeX。 – Nikratio 2012-10-11 20:58:43

+0

@Nikratio:它不會混淆LaTeX,但你可以像你說的那樣使用\ setlength。 – godbyk 2012-10-12 00:22:51

3

\ noindent我認爲是你想要的。

+6

\ noindent,會禁用縮進只有一段。 – 2010-11-01 22:48:08

3

,設置縮進可能是一個可行的解決方案的環境?

\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} 
+0

爲什麼您認爲自2010年以來已接受答案的問題需要另一個答案? – 2015-07-03 14:27:51

+1

@Michał:如果您想使用環境,這非常有用。 – tricasse 2017-06-04 09:38:46

相關問題