2010-11-01 62 views

Trả lời

17

Tùy thuộc vào mức độ phổ biến bạn muốn loại bỏ thụt đầu dòng. Nhưng điều đầu tiên tôi muốn thử được thiết \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. 
+0

Điều này phù hợp với tôi. Cảm ơn bạn. –

+3

Tôi nghĩ rằng trong LaTeX bạn thực sự nên sử dụng '\ setlength {\ parindent} {0pt}' thay thế. '\ parindent0pt' là TeX thuần túy và việc sử dụng nó có thể gây nhầm lẫn cho LaTeX. – Nikratio

+0

@Nikratio: Nó sẽ không gây nhầm lẫn cho LaTeX, nhưng bạn có thể sử dụng \ setlength như bạn nói. – godbyk

3

\ noindent tôi nghĩ là những gì bạn muốn.

+6

\ noindent vô hiệu hóa thụt đầu dòng chỉ trong một đoạn. –

3

Một môi trường mà bộ thụt lề có thể là một giải pháp khả thi? Bạn định nghĩa nó trong lời mở đầu như sau:

\newlength\mystoreparindent 
\newenvironment{myparindent}[1]{% 
\setlength{\mystoreparindent}{\the\parindent} 
\setlength{\parindent}{#1} 
}{% 
\setlength{\parindent}{\mystoreparindent} 
} 

Trong tài liệu của bạn thì bạn sẽ viết một cái gì đó như:

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

Hoặc nếu bạn muốn có một thụt lề đoạn lớn

\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

Tại sao bạn nghĩ câu hỏi với câu trả lời đã được chấp nhận từ năm 2010 cần một câu trả lời khác? –

+1

@ Michał: Điều này rất hữu ích nếu bạn muốn sử dụng một môi trường. – tricasse

Các vấn đề liên quan