Vertical Spacing for text: pBook and eBook

When we choose a value for leading in InDesign, we are actually defining the distance between the baselines.

Chris Jennings
Feb 4, 2017 · 5 min read

The more traditional definition of leading is the space between the baseline and top of character container; the term coming from the little slabs of lead put between the type.

Baseline Grid or Doing the maths?

Text should always align across the spine of a double page spread, whether for print or eBook. In print, text should also align where columns are used. To be be more specific, the main text or body text must align to an imaginary baseline across the spread. In print the lines of text should coincide through the page when held up to the light.

InDesign can help control this through the ‘align to grid’ in the paragraph style settings, however care must be taken with this method since it may not achieve the desired result for a double page view for a reflowable eBook.

So how can we get the correct alignment for both pBook and eBook?

Since your type sizes and leading will use points (pts) then you can set the vertical units in InDesign’s preferences to pts also. This will then give you the benefit of being able to ensure that all vertical dimensions follow a multiple of the body text leading. But beware. You don’t want to set your preferences generally to use points for vertical units because you cannot (easily) set the page dimensions with points; for this you really need millimetres. So the trick is to set the vertical units to points after you have started the document and set the paper size and the margins.

You will see from the first images here that we can interrupt the flow of the body text with sub headings or blockquotes that are not aligned to the baseline grid, and are positioned with space-before. The body text goes back to the grid after the heading or blockquote.

Our body text uses 13pts leading so the space taken up by the subhead is 26pts, thus keeping the text aligned.

What about the reflowable eBook?

Maths, but don’t panic.

The first problem that we encounter with InDesign is the units in use. Type is measured in points, whereas other dimensions (vertical and horizontal) are measured in more worldly units such as millimetres or inches. Since 1 point measures 0.352777778 millimetres, we don’t want to have to keep making this conversion!

The vertical position of the lines of text are dependent on:

  • type size (font-size)
  • the leading (line-height)
  • space before the paragraph (margin-top)
  • space after the paragraph (margin-bottom)

In the brackets at the end of these lines, we reveal what CSS in the ePub package is used to control the vertical space.

In the reflowable eBook

The body text

Other block level elements

Say we have a sub heading that breaks the flow of the body text. We need to add together the space-before and space-after with the leading to get a multiple of the body-text leading.

Our sub heading could have a font size of 16pts with leading of 17.5pts The space-before could be 6pts and the space-after 2.5pts. This then computes as follows: 17.5 + 2.5 + 6 = 26 — which a multiple of 13

With this calculation, our body text should be back in alignment after the heading.

What about images in the text?

Originally published at on February 4, 2017.


Articles and papers that revolve around publishing technology, book and typographic design and occassional posts of a more personal nature from Chris Jennings. See also my static GitHub site:

Chris Jennings

Written by

eBook Consultant who teaches in the Oxford International Centre for Publishing at Oxford Brookes University. He also owns a boat ‘Perspectief’ on the Thames.



Articles and papers that revolve around publishing technology, book and typographic design and occassional posts of a more personal nature from Chris Jennings. See also my static GitHub site:

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade