<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Dear list, <br></div><div><br></div><div>As promised, I started working on ePub output, building upon the new DocBook output. <br></div><div><br></div><div>Here is a script that performs the complete process of taking a DocBook file and generating the ePub. It has several dependencies: <br></div><div><br></div><div>- an XSLT processor:</div><div><ul><li>not xsltproc (<a href="http://xmlsoft.org/xslt/xsltproc2.html" target="_blank">http://xmlsoft.org/xslt/xsltproc2.html</a>): available for most Linux distributions, I guess it is available by default on macOS, must be bundled for Windows.
I tried several versions for Windows, but an old bug that should have been fixed in 1.1.24 (roughly 2010) is still there: <br></li><ul><li>I/O error : No such file or directory</li><li>xsltDocumentElem: unable to save to C:/Users/Thibaut/AppData/Local/Temp/tmp6c2i6a7h/OEBPS/package.opf</li></ul><li>Saxon 6 (available for most Linux distributions, must be bundled for Windows and macOS, requires Java). It's outdated software (circa 2005), but newer versions are not 100% backward compatible, so it is still very widely used. Other DocBook stylesheets would work on newer Saxon, but they are not as reliable as the old ones (like <a href="https://github.com/docbook/xslTNG" target="_blank">https://github.com/docbook/xslTNG</a>).<br></li><li>not MSXML6 (Windows-only, mostly built-it, but not compatible with the DocBook stylesheets — it wrongly errors with chunking) or .Net XSLT engine (nxslt/nxslt2). </li></ul></div><div></div><div>- the official DocBook XSLT stylesheets. Three parts are required: XHTML, XHTML5, and ePub. For now, I copied the needed parts in a patch. On some Linux distributions, this could be replaced by a version installed by the package manager (Ubuntu 20.04 has a near-up-to-date version, although the latest one has been released in 2016: <a href="https://github.com/docbook/xslt10-stylesheets/releases/tag/release%2F1.79.2" target="_blank">https://github.com/docbook/xslt10-stylesheets/releases/tag/release%2F1.79.2</a>; Fedora is up-to-date).</div><div><br></div><div>The integration into LyX should be complete, minus testing on Linux and others and packaging issues: the dependencies must be included for Windows and macOS, not for all Linux distros. <br></div><div><br></div><div>(By the way, these patches have been written on top of the 14 others I just submitted to the list: they should apply cleanly, but that's not 100% guaranteed.)</div><div><br></div><div>It's open for comments :)! <br></div></div>