21.5.1 Container Directory and Output Files

A directory containing the files and directories needed for the EPUB format is created when outputting EPUB. The name of this container directory is derived from the base name of the input file (that is, any extension is removed), with _epub_package postpended. If an output directory is specified, with --output, or with the SUBDIR customization variable, the container directory is created in that directory instead of the current directory. At the beginning of a new run, the container directory and all its contents are removed. The container directory is also removed after the final EPUB file has been generated in the default case.

The HTML files produced from the Texinfo manual are output in subdirectories of the container directory. Image files referred to from the Texinfo manual, if found, are copied to subdirectories of the container directory.

The EPUB output file is a ZIP archive of the container directory. The file name is derived from the base name, with the .epub extension postpended. If an output file is specified, with --output, or with the OUTFILE customization function, this file name is used instead. The output EPUB file is never placed in the directory specified by --output or SUBDIR; only the container directory is placed there, as explained just above.

The EPUB output file is not generated if the customization variable EPUB_CREATE_CONTAINER_FILE is set to 0. The container directory is left after the final EPUB file has been generated if EPUB_KEEP_CONTAINER_FOLDER is set.

See Invoking texi2any from a Shell.