I use indentation of the first line for paragraphs. When a new paragraph starts after a code listing (or some other figure), this looks a bit unpleasant to me. What is the typographical convention for this? Is it OK to use \noindent to supress the indentation?

  • 3
    I typically add comments between figures and the text so that TeX will know it is not a new paragraph. If that doesnt do, I will move the figure. This clears up the look in the file and you will not do any local fixes. – zeroth Jan 24 '12 at 22:02
  • I think what is happening is that since it is difficult to tell if the text following a figure is a new paragraph, an indent is added. If it should not be a new paragraph then certainly \noindent would be correct. – Peter Grill Jan 25 '12 at 2:09
  • 7
    If the text after the list/display and the list/display itself [is in the same paragraph as] the text before the list/display, you don't indent. Otherwise, you indent. Without this convention, your readers won't know the difference between a start of a new paragraph or a continuation of the current paragraph. – user10274 Jan 25 '12 at 7:39
  • Marc's right. Try adding a background to your figures or using parskip; that may look better to you. – Chel Jan 25 '12 at 7:55
  • Further to rds's suggestion, you could also indent the listing. – user10274 Jan 25 '12 at 8:29

The typographical convention is to indent the paragraph following a figure (even a display figure). The reason is simple, suppose you have a figure on top of the page and text underneath it, there is nothing signalling that this is the beginning of a new paragraph or the start of a sentence from a paragraph that ended at the previous page. (La)TeX incorporates paragraph indentation in this fashion as a default.

Even when images are placed in the middle, it is good typography to be consistent and they do not look "out of place", if you treat the figures properly. Here is such an example from a statistics book.

enter image description here


\noindent would work but actually latex goes to a lot of trouble working out if figures and displayed lists etc are between paragraphs or mid-paragraph, and not indenting in the latter case. So if you are getting indentation where you don't want it, then probably you have spurious blank line somewhere signaling the start of a paragraph at a point that you want to consider mid-paragraph.


While I agree entirely with David Carlisle's answer, when it comes to reading my own .tex files, /I/ like to have some blank space between the start and end of a list or figure or table (etc., etc.) since I find it makes for better reading of the `.tex. file. But you certainly don't want to 'start' a new paragraph where it is inappropriate. So I usually do one of two things:

paragraph text:
resumption of paragraph text....

or I use \noindent and use plain blank lines to break everything up. I am not consistent across documents, but I tend to be consistent within a document as to which one I use.

  • Depending on your settings, leaving a blank line will also change spacing. I'm not sure how lists are handled, but it can definitely change how math is displayed. – Caramdir Apr 27 '12 at 21:58
  • @Caramdir -- a fair point. I never do math so I have no idea what effect my 'solution' would have. – jon Apr 27 '12 at 22:02

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.