EPUB converter

Ken Kopelson kenbkop at gmail.com
Wed Mar 2 22:58:15 UTC 2022


Hello LyX users,
I am sending this email to let people know that I have produced a converter
for LyX that produces an excellent quality EPUB/Kindle file. This converter
takes the LyXHTML file exported from LyX, and spits out an EPUB file that
fully supports Kindle importing. This splits the single export file from
LyX into the multiple chapters, supporting Front Matter, Main Matter, and
Back Matter. It builds a List of Figures, Table of Contents, and moves all
Footnotes to become Chapter Endnotes, which Kindle will show in a separate
window at the bottom of the screen. All backlinks are included also.

I love using LyX with the LyXBook theme (as it has the greatest number of
paragraph formats), and I am able to set up a system of files, having
different Front Matter versions. Unless you have actually self-published a
book, you will not fully appreciate how important it is to have different
Front Matter versions for a single book. A single published book can have
Hardback, Softcover, PDF, EPUB, and Kindle versions, all of which require
different information at the front of the book. LyX allows me to set up a
system for this. The only problem was, I could not produce an EPUB or
Kindle version from the files, so I had to create my own converter. I use
the LyXHTML export because it has tag classes for each type of element in
the files, allowing me to make the correct decisions for processing and
producing the EPUB or Kindle format.

I know that the next version of LyX is supposed to produce EPUB, but I have
my doubts that it will be done in a way that produces high-quality Kindle
books, since I have now learned just how to do this. I can tell you that
NONE of the current tools out there for creating EPUBS does this conversion
correctly or completely. The new tool I have created does.  Just so people
are aware, there is a large and growing market of people self-publishing
their own books. I am doing my best to get authors turned on to using LyX
as their book-writing tool. If anyone is interested in helping me get the
code I've written out there so that other authors can have the ability to
automatically produce perfect EPUB and Kindle, please let me know.

As one final problem, the LyXHTML export fails to include anything in the
LaTeK code blocks, and where this really shows up is with the Lettrine
function for Initials at the start of each Chapter. This initial text is
just omitted from the export file. The other HTML export includes them, but
it does not have any of the LyX class information for each tag, so it is
useless for conversion. Is there a way this can be fixed? It would be
awesome if this text is not excluded, since it is very much part of the
material. I had to come up with a very kludgy workaround for this in my
converter, which really should not be there.

I am happy to work with whoever is doing the EPUB portion of the next
release. My problem was, I could not wait for that to come out. Life must
go on, as they say :)

All the Best,
*Ken Kopelson*
(619) 733-3374
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220302/8e555a63/attachment-0001.html>


More information about the lyx-users mailing list