Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

### Chapter 2: Basic structures

After section headings comes your text. Just type it and leave a blank line between paragraphs. That’s all LATEX needs.

The blank line means ‘end the current paragraph here’: it does not (repeat: not) necessarily mean you get a blank line in the typeset output.

The spacing between paragraphs is an independently definable quantity, a dimension or length called \parskip. This is normally zero (no space between paragraphs, because that’s how books are normally typeset), but you can easily set it to any size you want with the command \setlength in your Preamble: like \setcounter it takes two arguments: the name of the length, and the value to set it to:

```\setlength{\parskip}{1cm}
```

This will set the space between paragraphs to 1cm. See § 1.9.1 for details of the various size units LATEX can use. Leaving multiple blank lines between paragraphs in your source document does not create extra space: all extra blank lines are ignored by LATEX: the space between paragraphs is controlled only by the value of \parskip.

White-space in LATEX can also be made flexible (what Leslie Lamport calls ‘rubber’ lengths). This means that values such as \parskip can have a default dimension plus an amount of expansion minus an amount of contraction. This is useful on pages in complex documents where not every page may be an exact number of fixed-height lines long, so some give-and-take in vertical space is useful. You can specify this in a \setlength command:

```\setlength{\parskip}{1cm plus4mm minus3mm}
```

Paragraph indentation can also be set with the \setlength command, although you would always make it a fixed size, never a flexible one, otherwise you would have very ragged-looking paragraphs.

```\setlength{\parindent}{6mm}
```

By default, the first paragraph after a chapter or section heading follows the standard Anglo-American publishers’ practice of no indentation. Subsequent paragraphs are indented by the value of \parindent (default 18pt). You can change this in the same way as any other length.

In the printed version of this document, the paragraph indentation is set to 10pt and the space between paragraphs is set to 0pt. These values do not apply in the Web (HTML) version because not all browsers are capable of that fine a level of control, and because users can apply their own stylesheets regardless of what this document proposes.

### Exercise 6: Start typing!

1. Type some paragraphs of text. Leave a blank line between each. Don’t bother about line-wrapping or formatting — LATEX will take care of all that.

2. If you’re feeling adventurous, add a \section command with the title of a section within your first chapter, and continue typing text below that.

3. Add one or more \setlength commands to your Preamble to experiment with changing paragraph spacing and indentation.

To turn off indentation completely, set it to zero (but you still have to provide units: it’s still a measure!).

```\setlength{\parindent}{0in}
```

If you do this, though, and leave \parskip set to zero, your readers won’t be able to tell easily where each paragraph begins! If you want to use the popular office-document style of having no indentation with a space between paragraphs, use the parskip package, which does it for you (and makes adjustments to the spacing of lists and other structures which use paragraph spacing, so they don’t get too far apart).

1. Paragraph spacing and indentation are cultural settings. If you are typesetting in a language other than English, you should use the babel package, which alters many things, including the spacing and the naming of sections, to conform with the standards of different countries and languages.