Contents | Start | End | Previous: KB0172: Why is paragraph spacing not always preserved from the original Word file? | Next: KB0174: Why does Jutoh warn about duplicate identifiers?


KB0173: Why is spacing after a page break not preserved in the ebook?

If you have explicit page breaks in your project, any before-paragraph spacing for the following paragraph or heading may not be shown in an Epub or Kindle viewer. This doesn't happen at the beginning of a section - just after a page break.

Another symptom can be that the top of a table after the page break loses its border.

By convention, an HTML-based renderer is not obliged to preserve spacing directly after a page break. A renderer may or may not respect spacing you specify in your styles. If the spacing is important for your project, you have two choices:

  1. split your project into separate documents so that page breaks are not necessary;

  2. enable the configuration option Preserve spacing after page break. This generates an invisible separator that forces ebooks to show spacing following the break.

The code that Jutoh generates to create a page break while forcing spacing is as follows:

<!-- Invisible separator to preserve spacing -->
<div style="page-break-before: always; visibility: hidden; font-size: 0.1em;">&#8291;</div>

You may see a very slight increase in spacing size due to the extra HTML code.


Contents | Start | End | Previous: KB0172: Why is paragraph spacing not always preserved from the original Word file? | Next: KB0174: Why does Jutoh warn about duplicate identifiers?