How-to guides page navigation
transcript-content-tools-for-accessible-epubs

EPUB Tools

[Narrator:] There are many tools available that support the process of creating an electronic publication, known as an EPUB. Basically, these can be sorted into the following four categories.

  • Text-processing programs, such as LibreOffice, capable of exporting documents to EPUB format. Please take into account that you cannot use Microsoft Word 2016 for this purpose because it does not have a built-in EPUB export tool. However, the DAISY Consortium has developed a plug-in for the Windows version of Word which adds an option to export to EPUB, but for the moment it offers no support for it. Exporting to EPUB from a text-processing program offers a quick start to the creation of an e-book. Even though this is a quick and easy approach, please be aware that you might still need to fine-tune your EPUB to make it accessible.
  • E-book file format converters, such as Calibre. With this tool, you can use a popular file format, like Microsoft Word, as the base for your publication. The resulting file can then be converted to one or more e-book formats.
  • Native WYSIWYG EPUB editors, which stands for what you see is what you get. Tools following the what you see is what you get or WYSIWIG approach offer the most user-friendly experience for editing an e-book. We will show you how to use Sigil, a free, open-source e-book editor.
  • Code editors, such as BBEdit. If you have a thorough understanding of the details of the file format and you know all the possible elements and attributes, then you can create and edit your e-book using a code editor. This approach requires the most know-how, but offers the greatest level of control over the result.

We will take a brief look at every type of solution. Please note that we have selected these solutions for our demo because they perform the necessary functions for our demo and are available for free. This does not constitute an endorsement of any of these products or solutions.

Text-processing and desktop publishing programs

Some text processors and desktop publishing programs offer the option to export their content to EPUB format.

As an example, here we have a document created in LibreOffice. We have created our proper heading styles via the built-in styles and added alternative text to all images. We select File, Export As and choose Export as EPUB. A dialogue box opens requesting some parameters and metadata information.

The first selection allows us to export to EPUB version 2 or 3. For our needs, we select the most current version: version 3. The next parameter allows us to split the e-book into several files. We can choose to split it at every level 1 heading or manual page break that we have inserted into the document. We keep Heading. For the layout method, we want Reflowable. As e-book readers come in a variety of screen sizes and dimensions, we cannot recommend using a fixed layout unless you want to optimise the layout for a specific device.

We can select an image as a cover image. Image files can be in JPEG, PNG or SVG format. The Media directory allows the media and metadata to be loaded in one step. Please refer to the LibreOffice documentation for details.

The metadata block allows for the configuration of the unique identifier, the title, the author, the language and the date of creation. Once we have entered these data, we can start the export process. Here we see our resulting EPUB file.

Let’s open it in a text editor to see if the result satisfies our requirements. We can see the file structure, with the mimetype, the metadata information folder and the OEPS data folder. Inside the data folder are subfolders for images, sections and styles. We open the first page, and we can see some issues worth mentioning. The title was not used at the head of the document. The level 1 heading was not exported as such. The image has lost its alternative text. The list is now a set of paragraphs. This gives you a quick idea of the quality of the export. We could point out many more cases where the export did not match the original structure.

Exporting from LibreOffice: We get a quick result, but the quality is poor. Exports like these can be a good start, but please be aware that you might need to invest additional work into the result to get a properly accessible file. There are other programs that create a more professional result, such as Adobe InDesign. As the export procedure for creating a high-quality e-book in InDesign is complex, we will demonstrate it in a later chapter.

E-book file format converters

Another quick-start method is the conversion of existing file formats into an e-book. We use the same Word file we used before and convert it to EPUB using Calibre. Calibre is an open-source software, which can be downloaded for free for macOS, Windows and Linux using the link under the Documents tab on our platform. It offers a rich set of features related to e-books. It’s an e-book manager. It’s an e-book reader. It’s an e-book editor. It can convert between different e-book file formats. It can back up and share an e-book library. And it has a plug-in interface to extend its functionality. For our course, we want to focus on its ability to convert between different file formats.

We start Calibre. We add a new book; in this case, our Word file. Once it’s loaded, you can see a new line in the library manager. On the right, we see the cover, currently only a default image, and some metadata information. As the Word file does not offer the metadata required for an e-book, we need to create it. We activate the Edit metadata function. We can edit the title, the short version of the title, the author and the short version of the author.

If your document is one of a series of documents, you can add the title of the series and the sequence number of the document. We don’t like the default cover of the document, so we will choose a different one. A cover image should have the proportions of a typical book. It should not be too large as it will be added to the e-book unaltered. So an image of around 120 kilobytes should be sufficient.

You can add and manage some tags, enter a unique identifier for your publication, for example an ISBN, the creation date, the publishing date, the publisher and the document language. You can add several comments to your book. For now, we are happy with what we have entered so far, so we save our metadata.

Now we would like to export our book, so we click Convert books. A new dialogue box opens. We see the input format DOCX from our Word file on the left. On the right, we can choose the output format. We want it to be an EPUB. As you can see, you have many options for the output formats. The AZW3 and MOBI formats are used by the Amazon Kindle e-book platform.

The left-hand menu allows us to set many conversion options. The Look and feel options can change the default fonts, text, layout and styling behaviour. As we prefer those options to be set by the users in their e-book readers, we won’t modify any of them here.

The Heuristic processing scans a book and tries to repair common problems automatically. This may influence line wrapping, automatic heading detection and correction or styling. As we do not want any automatic changes, we leave this switch deactivated. With Page setup, we can optimise the layout for specific readers. As we want a generic document, we choose the default input and output profiles. Structure detection allows us to set additional information to build the structure of the document. For our needs, we want to have a new page at every level 2 heading.

The Table of contents can be created automatically using the parameters we enter in this dialogue box. We would like to generate a table of contents using the headings of levels 1, 2 and 3. The Search and replace dialogue box allows for text changes on all pages of the book. For our scenario, we want the e-book to be created unmodified, as it was written.

There are several other parameters depending on the input and output format. We will not explain every possible conversion function of the program as this topic would need a course of its own. If we are happy with our configuration, we press the OK button. Calibre starts to create our e-book. Once the procedure has finished, we can see that the EPUB format has been added to the document formats list.

Additionally, we see that the number of formats has increased in the left-hand menu bar. We click on the EPUB text and the document opens. We see the cover page, and the table of contents on the left, which we can use interactively. The page separation has worked properly. A new page has been generated at every level 2 heading. We see the images, lists and tables, everything as we wrote it. For details, we start the editor. Calibre has an integrated e-book editor that can be used to edit books. When you start it, you’ll see a list of files on the left. These are the individual HTML files, style sheets, images, etc., that make up the content of the book. Simply double-click on a file to start editing it. As you make changes to the HTML or cascading style sheets (or CSS) in the editor, the changes can be previewed live in the preview panel on the right.

Let’s compare this e-book with the one resulting from the export function we used previously. The title is now correct. Headings have been applied correctly. The image uses the alternative text. The list was transferred into the EPUB as a list. When we look at the table of characters, we can see that our table structure has been preserved. The only thing that could be improved is the conversion of the table headers. The conversion missed these. We can repair this manually. All in all, we are satisfied with the result.

When checking the open package format (or OPF) file, we can see that the information we entered has been coded in the metadata block. If we want to make this e-book discoverable, we can enter the additional metadata values, which we introduced in the last chapter. Voilà! This e-book looks ready to move to the validation phase, which we will explore in the next chapter.

Calibre is an excellent all-round tool for managing e-books. The editor is good, but it is more a code editor than a document editor. You need to know how to code to use this tool.

Native WYSIWYG EPUB editors

If you prefer a more WYSIWYG approach, then Sigil might be of interest to you. Sigil is an open-source EPUB e-book editor, which can be downloaded for free using the link under the Documents tab on our platform. It runs on macOS, Windows and Linux. The complete editor is distributed in two parts. The first part, Sigil, organises the EPUB bundle and its resources. HTML pages, CSS and the OPF and NCX files can be edited at the code level in Sigil. The second part, PageEdit, can be downloaded from the same website. PageEdit can edit the web-based content using a WYSIWYG approach. The two programs can be used simultaneously to edit one e-book. You can create an e-book from scratch or edit an existing one.

Here we open the e-book we have just created in Calibre. We see the different resources in the EPUB bundle on the left. The code editor appears in the centre, the preview on the right.

Let’s edit some text. As you can see, we are editing the source code. There are some buttons to help us add the syntax to the code. We can create code for headings, paragraphs and lists. There is an additional tool that supports capitalisation. In the toolbar above, we can see functions for creating, opening and saving an e-book. The following buttons offer the undo and redo functions as well as the copy/paste functions. The next button forwards our current page to the external XHTML editor, which in most cases will be PageEdit. We will come back to this button in a moment.

The following buttons offer find and replace functionality, page splitting, image handling, insertion of special characters and link handling. As we can navigate e-books in the Sigil preview window, the toolbar offers us a back button. Next is a button that asks the user for a donation, the metadata editor, the table of contents generator and, finally, the built-in spellchecker.

Let’s come back to the external XHTML editor button. Once we press this button, PageEdit will start, offering us a real WYSIWYG editor. At the bottom of the editor window is the zoom function, which we can use to enlarge or reduce the size of the elements in the window. The toolbar in the editor presents us with the same functions we saw earlier in Sigil. Additionally, the toolbar offers us a code inspector, so we can edit and view the resulting code in parallel.

We add another list item to the page. As you can see, the code builds while we are adding the text in the editor window. And, vice versa, we can edit the code and the editor will follow the changes. Once we save our changes in PageEdit, the code gets updated in Sigil. In this way, we can jump back and forth between Sigil and PageEdit to update the book’s content.

If we forward the OPF file to the editor, all the pages of the book can be edited. To create and maintain the table of contents, press the Table of contents button. To update the metadata, press the Metadata button. To add or update the cover image, select Add cover from the Menu bar. Sigil offers integrated validation tools.

Let’s damage some code. We get an error message. When we fix the error, the message disappears. You can start the validator manually via the Tools menu, using the Well-Formed Check EPUB function. That’s the end of our very short introduction to Sigil and what you can do with it.

Sigil is a reliable and easy-to-use tool, but it has its limits. To illustrate this, here are two examples from version 1.4, the version available at the time of the creation of this video. The first example limitation is that if we want to edit the alternative text in images, we have to do this in the code editor. Right now it is not possible to add alternative text directly when managing the images. The second example limitation is related to the metadata editor. When we open the metadata editor, we can see all the metadata… Or not? There is something missing. The editor does not show the information that makes the e-book discoverable, even though it is in the OPF file. As you can see, these limitations are not real showstoppers as we can work around them, but there is still room for improvement in future versions of the program.

Code editors

For those of you who prefer to work directly in the code at a low level, you might prefer to use a code editor. For our example, we are using BBEdit on macOS. It is a text editor which is available for free with limited functionality. If you pay for a licence, additional functions will be added. For our example, we will use the free edition. BBEdit is a universal text editor primarily aimed at programmers. It has hundreds of functions to make programmers more productive.

We open an EPUB file. BBEdit can open the EPUB zip archive directly and it shows us all the resources on the left. We can click on a file, edit it and save our changes in the EPUB file. As editing EPUB code requires expert knowledge and this course is just an introduction, we won’t examine this tool any further.

Where to continue?

You have seen how to create EPUB files using different types of tools. We cannot recommend a specific tool or even a type as the value of these tools differs depending on your workflow. Test them out and try to find the one that works best for you. We have only shown tools here that can be downloaded and used for free. Feel free to keep an eye out for commercial alternatives, which offer usually more functionality.

Depending on your personal interests, you could continue with one of the following chapters:

  • EPUB testing
  • EPUB Adobe InDesign

[Automated voice:] Accessibility. For more information visit: op.europa.eu/web/accessibility.

Close tab​​​​​​​