21.5 Generating EPUB

EPUB is a format designed for reading electronic books on portable devices. texi2any generated EPUB 3.2 in 2022. An EPUB file is a ZIP archive container, holding informative files as well as the manual rendered in HTML.

The generation of the EPUB file depends on the Archive::Zip Perl module being installed. This dependency is checked at runtime. In the default case, trying to output EPUB without this dependency raises an error. However, if the EPUB output file is not generated, with the customization variable EPUB_CREATE_CONTAINER_FILE set to 0, it is not an error if Archive::Zip is not installed.

The texi2any tests related to EPUB generation do not require the installation of Archive::Zip, as they set EPUB_CREATE_CONTAINER_FILE to 0 and keep the directory containing the files and directories needed for the EPUB file by setting the EPUB_KEEP_CONTAINER_FOLDER customization variable to 1.