Reflowable EPUB3: "Page Navigation" export option adds a space inside hyphenated words at page breaks
Version of InDesign: 19.4
steps to reproduce
- create a new InDesign file
- add a text frame to the blank page
- add enough text so some words are hyphenated at the page breaks for the next pages
- export to epub3
- enable "Page Navigation" on EPUB export
Expected result
Page navigation markers are added without interrupting the hyphenated words at the page breaks.Actual result
When using the "Page Navigation" export option for reflowable EPUB exports, InDesign adds a <span> and </span> tag pair with a blank space character in the HTML export instead of simply dropping the soft hyphen that was present in the print layout.
Result in the EPUBs XHTML:
<p class="bodytext">Idel illandia suntusdae quoditint debitatissit quam quamus magnimus es quiaeper elor eper<span id="page2" role="doc-pagebreak" aria-label="2" epub:type="pagebreak"> </span>nat quo con re nimus?</p>
Another example using English text (from the "Georgia" file in the EPUB3 samples project):
In my file "georgia", the words "consists" and "headward" are both hyphenated by InDesign as "con-sists" and "head-ward" at the page breaks, but exported to EPUB as
con<span id="page2" role="doc-pagebreak" aria-label="2" epub:type="pagebreak"> </span>sists
and
head<span id="page3" role="doc-pagebreak" aria-label="3" epub:type="pagebreak"> </span>ward</span>
respectively, thus displaying as "con sists" and "head ward".
I am confident that this is not an issue of readers / apps display the EPUB erroneously, as I tested my example files on a PC with Kindle Previewer 3.81, Adobe Digital Editions 4.5, Thorium 2.2.0, as well as on a Kindle Paperwhite via Send to Kindle, a tolino (popular brand of readers in Germany, both with Adobe RMSDK rendering engine and new Readium-based rendering engine), an iPad with Apple Books and a Pocketbook InkPad Color.
The W3C recommendation for page break markers is not a pair of opening <span> and closing </span> tags, but a self-closing <span/> tag, e.g.
<span id="page2" role="doc-pagebreak" aria-label="2" epub:type="pagebreak"/>
which would look like this for the above examples:
<p class="bodytext">Idel illandia suntusdae quoditint debitatissit quam quamus magnimus es quiaeper elor eper<span id="page2" role="doc-pagebreak" aria-label="2" epub:type="pagebreak"/>nat quo con re nimus?</p>
con<span id="page2" role="doc-pagebreak" aria-label="2" epub:type="pagebreak"/>sists
head<span id="page3" role="doc-pagebreak" aria-label="3" epub:type="pagebreak"/>ward</span>
Personally, I'd think using a pair of <span> / </span> tags WITHOUT an additional space should work out, too, if you absolutely must use a tag pair for whatever reason.
However, I would strongly urge you to change the implementation to conform to the W3C recommendation.
Either way, the current behaviour creates errors on EPUB export which are not present in the indd source file - so please change this as soon as possible.
Test files
How am I supposed to supply a sample file if I am neither allowed to upload indd, idml, epub or zip files‽
Since I raised this issue on the Community board first, please go there for the sample files: https://community.adobe.com/t5/indesign-discussions/page-navigation-markers-for-epub-interrupt-hyphenated-words/m-p/14636220#M575090
Further Reading
https://www.w3.org/TR/dpub-aria-1.0/#doc-pagebreak
https://kb.daisy.org/publishing/docs/html/dpub-aria/doc-pagebreak.html