Search:   Help



LyX documentation


Shared groups



Categories: GSOC
<< | Page list | >>

This page contains information about the XHTML and ePub Export GSoC project.

Brief Explanation

ePub is gaining popularity as a free and open e-book standard. It is based on the idea of reflowable text, which will adapt to the type of reader that is used. This reader can either be a phone, or an iPad, or an e-book reader, or a regular pc. One can think of this as an extension of the LaTeX idiom that one should only care about the contents, not on the layout of it. ePub is an open standard used by many major companies and publishers, including Google. For that reason, the ability to create ePub files directly from LyX would provide writers and publishers a way to target both print and electronic audiences with their work.

ePub is a sub-set of XHTML and CSS (more information can be found at, which LyX is already able to export. However, improvements are needed to LyX's existing XHTML export and CSS support. Additionally, LyX is able to work a related format: DocBook, though the current implementation has been outdated.

Expected Results

The goal is to be be able to export ePub files from within LyX. This would mean improving the existing XHTML support, controlling the export of images so that they are scaled and sampled for the destination format, and creating a user-interface which unifies the export options. Basic support for all of these options already exist within LyX, however, the student should be able to take those foundations and expand upon them as needed.

Existing XHTML Export Bugs

A list of existing XHTML export bugs can be found on trac.


One major issue concerns how footnotes are handled. At the moment, they appear and disappear as the user rolls over the footnote number, using the magic of CSS. Unfortunately, this does not work well on some systems, and it does not work well for ePub. So we need to figure out a different way to handle footnotes.

One option, explored a bit by Rob Oakes, is to treat them as endnotes.

If endnote the user should be able to put footnotes at the end of each chapter.


Another important issue concerns the possibility of splitting a document, for example, by chapter. Design decisions need to be made here first. How should the user tell us how the document should be split? Should there be a UI that allows choice of "Chapter", "Section", or whatever? Or should we leverage the parent-child structure to allow the user to indicate explicitly what the different units should be? Both options pose various technical challenges.

There could be an option to split the document according to the subdocuments used by the author (master.lyx, chap1.lyx, chap2.lyx etc.)


Generated epubs must validate using a good validator like epubcheck.

Acceptance on different shop systems

Test the acceptance of the lyx-ebpubs on different shops. It is paramount to professional authors that epubs created by lyx are accepted by the big platforms such as Kindle Direct Publishing. Don't just test the results on different ebook readers.

GUI options

A good starting point for GUI ideas of the export dialog is

Image handling

It must be possible to include different image types in the resulting PDF and ePub. So either you have to scale the pictures during the converting process or it must be possible to use different sources. Take a look at Sphinx ( In Sphinx you include a picture using a wildcard as extension. Sphinx automatically uses eg. image.pdf to include it in the LaTeX-PDF files and image.png or image.svg to include it in the ePub file. So the user can scale the images beforehand.

Conditional includes

It should be possible to have conditional includes for the different output formats. If you produce a printed book and an ebook eg. the ISBNs are different. Often you have to include different frontmatters for print books and ebooks.

-- Cannot this already be achieved by using branches? Turn on/off specific branches depending on the desired output format..


Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2013-06-06 07:42 UTC