0

While most people want to want to remove the default "the-empty-line-generating-a-new-paragraph"-function, I myself do not even have it working on my system to begin with.

I recently installed the latest MiKTeX distribution and I am able to seamlessly generate my LaTeX PDF-documents (I have Texmaker on my machine but use it scarcely; I much more preferably and frequently use Sublime Text 2 together the LaTeXTools package instead).

I tried compiling the follow piece of code:

    \documentclass{article}
    \begin{document}
    Hello this is the first paragraph.

    Hello again, this now is the second paragraph.
    \end{document}

I was hoping that the generated PDF would have two different paragraphs but what I instead found is simply a "Hello again, this now is the second paragraph." landing right below the first sentence, as a line break. See picture:

enter image description here

Why does this happen? I thought it was supposed to be a default setting.

  • 6
    I wonder what you are expecting by 'a new paragraph'. LaTeX default settings indent the first line of a paragraph with no gap between paragraphs. With two very short pieces of text you won't really see much of an effect of the indent: you need a few lines for this to show. – Joseph Wright Jun 03 '13 at 11:27
  • 2
    What is the evidence for the statement 'most people want to want to remove the default "the-empty-line-generating-a-new-paragrah"-function'? – Ian Thompson Jun 03 '13 at 11:30
  • 4
    Your picture shows two indented paragraphs (although you do not see the indent as they are just one line.) Make the text in each paragraph longer so you see the second line starts to the left and the paragraph indentation is clearer. The first sentence of your question is false! – David Carlisle Jun 03 '13 at 11:35
  • It seems there's nothing wrong: http://i.imgur.com/AXUgboI.png – latex user Jun 03 '13 at 11:36
  • If you would like additional space between paragraphs, use \parskip 1ex or some other suitable length. If you wish to change the paragraph indent, use \parindent 1em, for example. – Steven B. Segletes Jun 03 '13 at 11:37
  • Is not LaTeX supposed generate a space between the two sentences, instead grouping them together like shown in the picture? – user31662 Jun 03 '13 at 11:41
  • Ok, gaps between paragraphs can be achieved with \newline but it would be really tedious to have to write this command repeatedly. Does there exist a workaround? – user31662 Jun 03 '13 at 11:57
  • 1
    No the default presentation is an indentation with no vertical gap (which is the most common paragraph marker in printed works generally) You should almost never need to use an explicit \newline in a latex document. – David Carlisle Jun 03 '13 at 12:03
  • @DavidCarlisle: Fair enough, however I in spite of that wish to be able to give rise to raps between paragraphs at will. I am suspecting manually typing \newline is the only to go about? – user31662 Jun 03 '13 at 12:07
  • No. Why even consider \newline (which would prevent latex forming a new paragraph anyway)? Marco already told you about \parskip in his answer. – David Carlisle Jun 03 '13 at 12:29

1 Answers1

4

Paragraphs can be highlighted in two ways. (1) A paragraph has a small indent at the beginning. This is the default behaviour. The length is stored inside the dimension \parindent. (2) The other method is to have a skip between two paragraphs. These skip is saved in the skip register \parskip.

Please note: Never combine these two methods.

To setup the mechanism you have several ways which are related to your document class.

For standard classes the package parskip is useful. If you are using a KOMA class then you can work with the option parskip. There is no need for an extra package.

Related to your example both lines are indented. You can't see this because the first line (the paragraph) is to short.

Marco Daniel
  • 95,681
  • Thanks for the reply. Fact is that, much like a Word doc, I wish to have gaps between paragraphs and furthermore unindented paragraphs. This necessitates using \parindent and \parindent simultaneously, but how come one is advised against doing that? – user31662 Jun 03 '13 at 12:06
  • Normally the package parskip should do the job. If you are using a KOMA class like scrartcl do: \documentclass[parskip=full]{scrartcl} – Marco Daniel Jun 03 '13 at 12:09
  • 3
    @user31662 -- traditionally, printed works use the indentation of the first line to signal the beginning of a paragraph. this leaves open the option of leaving a gap between paragraphs (usually with the following line unindented) to signal a major break in thought. if all paragraphs are separated by space, the use of the latter possibility is degraded, so there's a possible loss of clarity. since an author's first duty is to communicate clearly, indentation rather than space between paragraphs has remained the preference. – barbara beeton Jun 03 '13 at 12:14
  • 2
    @user31662 By "never combine these two methods" Marco means you shouldn't have indented paragraphs as well as gaps between paragraphs. To get what you want, you should use \parindent=0pt and \parskip=5mm. This doesn't count as combining the methods. – John Wickerson Jun 03 '13 at 12:33
  • @JohnWickerson: parskip is a skip register and should be defined with a glue part. So it's better to load the package parskip – Marco Daniel Jun 03 '13 at 12:42