Flag of Sweden
Andreas Rejbrand’s Website

News

Advanced authoring in Microsoft Word – Part 4: Paragraphs and pagination

Basically, a Microsoft Word document consists of text divided into paragraphs. A new paragraph is created when the user presses the Return key. As discussed earlier, a paragraph can have many different logical roles: it might be a normal paragraph, a heading, an example box heading, an example box text paragraph, and so on.

Beware of some possible confusion. Here we use the term ‘paragraph’ in a technical sense, so even headings are paragraphs. But in non-technical contexts, the term ‘paragraph’ is usually reserved for the paragraphs of body text (excluding, among other things, headings).

Now, one way of creating a vertical space in a document is to press Return several times (more than once) in a row. Technically, this will create empty paragraphs, i.e., paragraphs that contain no text at all. For example, it is possible to increase the distance between paragraphs of body text by putting an empty paragraph between each couple of ‘real’ paragraphs (that is, you press Return twice when you need a new paragraph). Similarly, it is possible to add space before a major new section (before a ‘Heading 1’, say) by adding a number of empty paragraphs in front of it. It is also possible to make sure that a new section starts on a new page by adding a suitable number of empty paragraphs before it.

Don’t do this! It is extremely bad practice!

The reason you shouldn’t do this is because spacing is a matter of presentation, and so it should not be included in the content. The practical reasons are as follows:

So, you should never add empty paragraphs to the text. Never press Return twice in a row! But then how do you control the vertical spacing and pagination? The answer is to use the paragraph settings of styles.

To control the paragraph attributes of the body text in a document, you should create a special (paragraph) style for the body text instead of using the ‘Normal’ style (because other styles are based on this one). Let us choose the name ‘Body Text’. Also remember to change the heading styles (‘Heading 1’, …) so that they are followed by ‘Body Text’ and not by ‘Normal’.

Then it is simply a matter of setting appropriate paragraph settings for ‘Body Text’.

One common setting is to use vertical spacing between paragraphs. To accomplish this, simply set the ‘Spacing After’ value:

The Indent and Spacing tab in the Paragraph dialog box in Microsoft Word 2010. The field Spacing After has focus.

A value of 6 pt will produce the following result:

Screenshot from Microsoft Word

Increasing the spacing to 12 pt produces this result:

Screenshot from Microsoft Word

Another common way of separating paragraphs is to use indentation. To do this, set the ‘Space After’ value to zero, and instead add ‘First line’ special indentation:

Screenshot from Microsoft Word

The benefits of using a body text style (like this) are obvious:

However, there is one annoying limitation in Microsoft Word. A very common way of formatting paragraphs is to use indentation, as in the last example, but with the additional rule that only (body text) paragraphs that are preceded by other (body text) paragraphs should be indented. (For example, the first paragraph of body text after a heading should not be indented.) Hence, you would like to achieve this result:

Screenshot from Microsoft Word

Unfortunately, it is not possible to create such rules in Microsoft Word styles. There are a number of fairly obvious workarounds (like using two different paragraph styles or using direct formatting to remove indentation), but no really convenient and robust one. For comparison, in HTML and CSS, this problem does not exist, because the very simple selector p + p will match every (body-text) paragraph immediately preceded by another (body-text) paragraph.

Anyway, let us return to our example.

Of course, you can also adjust the spacing before and after headings. In the following example, the spacing before ‘Heading 1’ is 24 pt, and the spacing after is 0 pt.

Screenshot from Microsoft Word

In the next image, the spacing before is increased to 48 pt and the spacing after is increased to 12 pt.

Screenshot from Microsoft Word

If the second heading would need to end up on a new page, it would start at the very top of it, as one would like. In other words, it would not be pushed down 48 pt from the upper margin of the page.

Notice that as the value of ‘Space Before’ is increased, the more likely it becomes that the heading will start on a new page. Indeed, suppose you require N pt before the heading. Also suppose that the height of the heading, the space between the heading and the first paragraph after it, and the height of the first couple of lines of body text after the heading together sum up to X pt. Then N + X pt of space is needed for the heading to stay on the first page. Hence, as N grows, it becomes less likely that it will fit on the first page, and – consequently – more likely that it will be moved to the top of the next page.

If N is big and the heading is moved to the next page, there might be quite a lot of space left on the first page. But this is all good, and what you would expect for important headings like chapter headings. In fact, you probably always want a chapter to start on a new page, and this is very easy to do in Word. Simply turn on the paragraph setting named ‘Page break before’ on ‘Heading 1’. This will automatically produce the nice result below.

Screenshot from Microsoft Word

Notice that, if the heading is moved to a new page because of the ‘Page break before’ option, it will be pushed down from the top of the page according to the value of ‘Space Before’. This is good, because it is a common practice to put the chapter heading a bit down on the page.

Thus, the best way of making sure some particular type of paragraph (such as a particular level of heading or the caption of a really large table) starts at the top of a new page is to use styles and paragraph settings. In particular, this is much better than the really stupid method described at the beginning of this article. However, for completeness, let us end by noting that there is a third method, not as elegant as the best one, but still far superior to the worst one: you may manually insert a page break in the document using Ctrl+Return. The paragraph following a page break will always start on a new page.

In conclusion:


Show all news items.

Only show the most recent news items.