TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
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 at 15:34
    
indentation {\setlength{parskip}{0pt} no indentation} indentation or define a simple environment (like quotation). – Johannes_B Feb 21 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 at 15:36
up vote 8 down vote accepted

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.

share|improve this answer

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
share|improve this answer
    
I would not recommend this. – egreg Feb 21 at 15:46
1  
@egreg nor I.... – David Carlisle Feb 21 at 15:47
1  
Does this work? shouldn't it be \begin{parindent}=0pt or \begin{parindent} 0pt? – Manuel Feb 21 at 16:21
    
@Manuel see the comment under Mico's answer.... – David Carlisle Feb 21 at 16:22

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
share|improve this answer
2  
ooops sorry I'm an idiot:-) – David Carlisle Feb 21 at 15:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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