I need to disable indentation in only one section of my document (subsection, to be specific). How can I do that?
Default indentation is provided by indentfirst package.
Paragraph indentation The \parindent command controls the indentation of paragraphs. To change the indentation document-wide, set \parindent in the document preamble to the desired value. To disable the indentation for a single paragraph, use \noindent at the beginning of the paragraph.
Paragraph indent It is possible to override it by using the \setlength command. This will set paragraph indents to 1cm: \setlength{\parindent}{1cm} % Default is 15pt. at the beginning of the paragraph.
It depends on how pervasively you want to eradicate the indentation. But the first thing I'd try is setting \parindent
to 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.
An environment that sets the indent could be a possible solution? You define it in the preamble like:
\newlength\mystoreparindent
\newenvironment{myparindent}[1]{%
\setlength{\mystoreparindent}{\the\parindent}
\setlength{\parindent}{#1}
}{%
\setlength{\parindent}{\mystoreparindent}
}
In your document you would then write something like:
\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}
Or if you want a large paragraph indent
\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}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With