EPUB/Converting ODF to EPUB

This page discusses the process of Converting ODF to EPUB.

Which Formats?
There are many possible routes for converting ODF -> EPUB. In this section, we'll focus on the conversion of ODT -> EPUB, using (in general) tools that support ODF 1.2 and EPUB 3.

EPUB Support in LibreOffice
In LibreOffice, there's currently an enhancement request: - [FILEOPEN/FILESAVE] EPUB Documents. If that support is implemented, export directly from LibreOffice will probably become the best method for ODT to EPUB conversion.

In the meantime, there are multiple tools that produce EPUB output...

Best Practices for Conversion
Because of limitations in the conversion process, this section will contain a set of "Best Practices" that will help authors improve the ease with which their ODT documents may be converted to EPUB.


 * eLAIX requires a heading (e.g. 'Heading 1') used in the document
 * Tests have indicated that some converters do not correctly convert bulleted/numbered list styles; direct formatting may be preferable

Notes from Harry Boldt re: eLAIX conversion testing:


 * Most problems however appeared, because eLAIX needs style names such as "Heading 1..4" for headings and "Illustration" for image captions. I know, it should be possible to use own style names everywhere. I will correct this in future versions.


 * The title page: eLAIX starts reading from the first heading, what means, that all stuff placed before is not exported. Your title page is a good example, that this is not a good solution. So I will change the export in the way, that everything will be exported, regardless of the occurence of headings.


 * Lists: eLAIX is assuming, that a new list starts, when the style is changing. In your document, you use "Start - Continue - End" styles for lists, what is a good practice. Unfortunately I wasn't aware of that. So I have to find a better solution here.


 * Headings: As long as there is no better solution in eLAIX, please do not change the style name for headings. Leave them the way, LO generates it "Heading 1", "Heading 2" and so on. If you do so, the styling of your headings will be reflected in the ePUB.


 * Table breaking across pages: I'll try to find a solution for avoiding page breaks, see http://www.pigsgourdsandwikis.com/2011/11/keeping-it-together-page-breaks-in.html.


 * TABs in content: They are not supported so far. It's on the to do list.
 * (Work-around: Use a table instead)


 * Table border/strokes missing in Figure 3: Can you explain more detailed, what you mean? I can't see a border.


 * Small graphics/icons: I have to test in more detail, why your small graphics an missplaced in the ePUB. If you click on the appropriate eLAIX toolbar button "Graphic Align Inline", they will be properly exported. What is then been done behind the scenes is: AnchorType=AsCharacter, HoriOrient=Left, TextWrap=None.


 * Image Captions: It is really hard, to recognize an image caption in LO by macro. Internally, the caption is not saved as an image property. LO just generates a paragraph below the image. Therefore, in order to identify an image caption, eLAIX looks for the style "Illustration". Not the best solution, I know. Using the style "Illustration" for image captions will lead to the standard HTML5 construction:  Caption.


 * Use the character style "Standard" for general settings of your ePUB such as font-family, font-color, font-size, font-weight, text-decoration and text-align. Those settings will be generated as CSS rules for the body tag of the ePUB document. As long as these settings aren't overwritten by other paragraph settings, they will be inherited.


 * eLAIX does not remove special characters like "/" and "." from styles at the present. So as long as this isn't fixed, do not use special characters for paragraph, frame or character styles, since they won't work in the ePUBs CSS.