Changes

Jump to navigation Jump to search
1,122 bytes added ,  09:35, 6 March 2020
section about zipping
The ePub facilities of ConTeXt are based on its [[Export]] of XML/XHTML. Make sure you get useful export output from your project before you try ePub.
 
= Documentation about ePub =
 
* [https://en.wikipedia.org/wiki/EPUB Wikipedia entry] with some examples
* [http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm Open Packaging Format] (OPF) 2.0.1 specs; contains also information about NCX
* [https://www.iso.org/standard/53255.html ePub3 ISO/IEC TS 30135-1:2014] (Buy specs for 118 CHF?)
* [https://github.com/w3c/epubcheck ePub Check] validator (most validation tools are based on this)
= Minimal ePub =
* .opf: list of all resources, this keeps the "book" together. See also [http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm OPF specs].
* .ncx: table of contents
 
= Compressing the structure =
 
The file structure outlined above gets packaged into a ZIP archive with the .epub extension.
 
* <tt>mimetype</tt> must be the first directory entry of the archive.
* You must not use "extra file attributes", e.g. from macOS (AKA resource forks) or NTFS; use the X parameter of zip.
* You don’t want some other lurking files like macOS’s <tt>.DS_Store</tt> directory information or PDF images; exclude them from recursive packaging.
 
EPUB=minimal.epub
zip -u9X $EPUB mimetype
zip -u9X $EPUB META-INF/container.xml
zip -u9rX $EPUB OEBPS -x OEBPS/.DS_Store OEBPS/Text/.DS_Store OEBPS/Images/.DS_Store "*/.DS_Store" "OEBPS/Images/*.pdf"
 
= TODO =

Navigation menu