Documentation
Page Breaks
All ePubs should have a page break if a print edition is being released, example:
html1<!-- page 123 -->2<a epub:type="pagebreak" id="page123" title="123"></a>
After p
Page breaks that come directly after a <p>
tag should be removed and placed on their own line, regex for the BBEdit Find Panel:
bash1## Find:2([\t]+)<p class="([A-Za-z0-9_-]+)">(<span class="[A-Za-z0-9_-]+">|)<a epub:type="pagebreak" id="page(\d{1,4}|\D{1,6})" title="\4"></a>34## Replace:5\1<a epub:type="pagebreak" id="page\4" title="\4"></a>\r\1<p class="\2">\3
If a page break exists in a <p>
tag with nothing else the <p>
should be removed:
Before
html1<p class="foobar"><a epub:type="pagebreak" id="page10" title="10"></a></p>
After
html1<a epub:type="pagebreak" id="page10" title="10"></a>
A page break builder app does exist, pagebreak_builder.app, that will pull all the page breaks from .bbprojectd, format and identify if any are missing.