42

I am finding this very inefficient, every time I type up something MiKTeX just indents for me and I have to enclose everything in \noindent{...}.

Is there a quick way of going past this?

jub0bs
  • 58,916
Lemon
  • 3,153
  • 9
    \noindent is a switch, not a macro that takes an argument. Therefore, you don't need the braces. – Werner May 09 '12 at 03:24
  • I do...if I don't the next sentence in my document just keeps indenting without my permission. – Lemon May 09 '12 at 03:28
  • Maybe indentation helps recognising the paragraphs? –  Nov 10 '16 at 08:47
  • Of course normally typeset text has paragraph indent. What kind of text is it that you are writing where you don't want paragraph indentation? Maybe the real solution is that you use a document class that is meant for the type of text you are writing. – pst Feb 05 '21 at 17:33

1 Answers1

59

If you don't want any indent, anywhere in your document, add \setlength{\parindent}{0pt} in your document preamble. This quick-fix works, but it is better to include the parskip package. It manages the two lengths \parskip and \parindent together:

\usepackage{parskip}% http://ctan.org/pkg/parskip

From the parskip documentation:

Package to be used with any document class at any size. It produces the following Paragraph Layout:

Zero \parindent and non-zero \parskip. The stretchable glue in \parskip helps LaTeX in finding the best place for page breaks.

In addition, the package adjusts the skips between list items. With package option parfill, the package also adjusts \parfillskip to impose a minimum space at the end of the last line of a paragraph.

memoir and KOMA-script classes provide similar functionality.

Werner
  • 603,163
  • I am new to this game, so \setlength{\parindent}{0pt} works! – Lemon May 09 '12 at 03:29
  • 5
    @jak Especially because you are new to this game, you should use Werner's second solution. Use the parskip package, instead of just changing the \parindent length. – Alan Munn May 09 '12 at 03:30
  • But I don't understand what the package's difference makes – Lemon May 09 '12 at 03:34
  • 7
    @jak: The parskip package does more than just \setlength{\parindent}{0pt}. It also maintains other lengths that "interact with \parindent" (like lists). – Werner May 09 '12 at 03:39
  • 2
    @jak: "Changing \parindent and \parskip is considered as one of the deadly sins", as per Too much white space before enumerate. – Peter Grill May 09 '12 at 15:26
  • @PeterGrill it appears you refer to this answer, but it seems the answerer misinterpreted his reference, see also my comment. – Jacob Akkerboom Dec 23 '15 at 13:48
  • @JacobAkkerboom: I don't know if jak deleted his comment or if Hawk previously went by the username jak? – Peter Grill Dec 23 '15 at 13:54
  • @PeterGrill It seems Hawk went by the jak, because he was to referred to as jak in another comment – Jacob Akkerboom Dec 23 '15 at 13:59
  • 1
    @PeterGrill it seems the reference I mention above is against the combination of \setlength{\parindent}{0pt} and \setlength{\parskip}{\baselineskip}, because of the side effects of \parskip. It seems \setlength{\parindent}{0pt} in isolation is harmless. If you know more, I would like to hear your thoughts. – Jacob Akkerboom Dec 24 '15 at 09:56
  • @JacobAkkerboom: Sorry, I don't know any more than that reference. I would suggest you post a question and reference Gonzalo Medina's answer that mentions it. – Peter Grill Dec 24 '15 at 22:57
  • 2
    \usepackage{parskip} adds vertical spacing between elements throughout the document. \setlength{\parindent}{0pt} solves it without side-effects. – qubodup May 24 '16 at 20:00
  • @qubodup: As mentioned, parskip adds "..non-zero \parskip. The stretchable glue in \parskip helps LaTeX in finding the best place for page breaks." If you're using something like \raggedbottom in your document, go with \setlength{\parskip}{0pt}, otherwise (with something like \flushbottom) you might run into underful \vbox issues. – Werner May 24 '16 at 20:38
  • parskip causes some weird behavior in some cases. https://tex.stackexchange.com/questions/446195/parskip-package-causing-some-problems-in-parbox-itemize-content – user32882 Aug 15 '18 at 19:36
  • It doesn't remove the indentation for my situation together with tufte-handout style. – Yu Shen Jan 12 '20 at 02:14
  • LaTeX needs a package in order to set \parindent=0pt? :). – wipet Feb 05 '21 at 17:28