4

I am trying to turn of the indentation for a group of paragraphs in my document. So I would like something like:

\begin{noindent}
Paragraph 1

Paragraph 2

Paragraph 3
\end{noindent}

How can I achieve this?

P.S. My question is not a duplicate of this one.

3
  • You will need to have paragraph skips if you don't want indentation of new paragraphs. But why isn't this a duplicate? Doesn't the solutions help you? – Johannes_B Feb 21 '16 at 15:34
  • indentation {\setlength{parskip}{0pt} no indentation} indentation or define a simple environment (like quotation). – Johannes_B Feb 21 '16 at 15:35
  • @Johannes_B, my situation is like this: N indented paragraphs, group of M not indented paragraphs and P indented paragraph (with the original indentation) – Victor Feb 21 '16 at 15:36
9

Just define a new environment

\newenvironment{zeroindent}
  {\par\setlength{\parindent}{0pt}}
  {\par}

Then, in the document, you do

\begin{zeroindent}
Paragraph 1

Paragraph 2

Paragraph 3
\end{zeroindent}

The usefulness of this is unclear to me, though.

3

A slightly strange request and a more semantically oriented markup would be preferable but without any indication of the intended use, the basic layout can be obtained by

indented para

\begin{parindent}0pt

no indent

no indent

\end{parindent}

indent again
4
  • I would not recommend this. – egreg Feb 21 '16 at 15:46
  • 1
    @egreg nor I.... – David Carlisle Feb 21 '16 at 15:47
  • 1
    Does this work? shouldn't it be \begin{parindent}=0pt or \begin{parindent} 0pt? – Manuel Feb 21 '16 at 16:21
  • @Manuel see the comment under Mico's answer.... – David Carlisle Feb 21 '16 at 16:22
2

Another solution, which uses explicit \begingroup and \endgroup statements to delimit the scope of \setlength\parindent{0pt}. (Relative to the earlier posting you provided a link to, the only difference is the addition of \begingroup and \endgroup.) In the code, note the use blank lines before \begingroup and after \endgroup; the blank lines generate paragraph breaks.

Paragraph 0

\begingroup
\setlength\parindent{0pt}

Paragraph 1

Paragraph 2

Paragraph 3
\endgroup

Paragraph 4
1
  • 2
    ooops sorry I'm an idiot:-) – David Carlisle Feb 21 '16 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.