Calibre, ePub and epubcheck: the curse of editing XHTML
davidgerard.co.uk
davidgerard.co.uk
Citation needed? epubcheck has existed for more than a decade and is in somewhat in active development. This would be somewhat surprising for a tool that is widely used in the industry.
Looking at the examples in the article doesn't help.
> Calibre adds an <ol><li></ol> to every heading and subheading.
That's just invalid XHTML by Calibre. How's that epubcheck's fault?
> If you wrote the book in a particular font, the index generated from a DOCX may be in whatever Calibre thinks is a good default font — and this default font may show up elsewhere.
Again, how is that epubcheck's fault?
> Calibre is also the most common ePub generator. Its format converters are robust and battle-hardened.
Usually I see pandoc being talked about epub generation. I didn't even know Calibre had epub output.
I only see problems in the article created by the Calibre converter and I have serious doubts about calling a XHTML generator "robust and battle-hardened" that can't even produce valid XHTML.
No, it's quite valid. The trouble is that FBReader doesn't do what's wanted with it. This is in the next sentence of the original article text.
"<ol><li></li></ol>" or "<ol><li/></ol>" would be valid XHTML.
<ol class="list_"> <li id="id_RefHeading___Toc28800_897132658" value="2" class="block_10"><b class="calibre5">Introduction: Taking over the money</b></li> </ol>
The thing that's disconcerting me is that so far I've had zero responses that are "you should use this tool instead to get from LO to an ePub that passes epubcheck, you foolish person." Like, not even LO’s internal ePub export passes epubcheck. I thought this would be a sufficient nerdbait ...
Feels like a workaround for some specific issue.
As I said previously, pandoc might be worth a look. But it's installation is more involved and it's able to convert everything to almost everything (it would even allow converting a LaTeX document to ePub :-) https://pandoc.org/epub.html).
But I can't really attest the quality for more complex documents. You have a working workflow and sometimes it's better to keep the devil you know instead of getting lots of unknown devils.