Hello-3.2.epub - EPUB 3.2 Simple Demonstration
How to build a simple EPUB file to demonstrate some EPUB 3.2 features?
You can follow this tutorial to build a simple EPUB file to demonstrate some EPUB 3.2 features
Create 5 required files and place them according to the following structure:
├── mimetype ├── META-INF │ └── container.xml ├── content.xhtml ├── navigation.xhtml └── package.opf
1. The "mimetype" file must be named as "mimetype". It is the same as in EPUB 3.1.
2. The "container.xml" file must be an XML file and placed in a sub-directory called META-INF. It is the same as in EPUB 3.1.
3. The package file must be named with .opf file extension. Its name and location are specified in the "container.xml" file, for example, "./package.opf".
Since "authority" and "term" properties are added for "dc:subject" in EPUB 3.2. The following was added in package.opf to demonstrate this feature.
<!-- Added in EPUB 3.2 --> <dc:subject id="subject01">FICTION / Occult & Supernatural</dc:subject> <meta refines="#subject01" property="authority">BISAC</meta> <meta refines="#subject01" property="term">FIC024000</meta>
4. The navigation file can be placed in any sub-directory, for example, ./navigation.xhtml. Its location must be specified correctly in the package file.
5. The content file can be placed in any sub-directory, for example, ./content.xhtml. Its exact location must be specified correctly in the package file.
When you have all 5 files ready, you can build Hello-3.2.epub with WinRAR on Windows computers:
C:C:\fyicenter> WinRAR a -afzip Hello-3.2.epub mimetype C:C:\fyicenter> WinRAR a Hello-3.2.epub META-INF\container.xml C:C:\fyicenter> WinRAR a Hello-3.2.epub package.opf C:C:\fyicenter> WinRAR a Hello-3.2.epub navigation.xhmtl C:C:\fyicenter> WinRAR a Hello-3.2.epub content.xhtml
You can also build Hello-3.2.epub with "zip" command on Linux/macOS computers:
fyicenter$ zip -0X Hello-3.2.epub mimetype fyicenter$ zip -X Hello-3.2.epub META-INF fyicenter$ zip -X Hello-3.2.epub META-INF/container.xml fyicenter$ zip -X Hello-3.2.epub package.opf fyicenter$ zip -X Hello-3.2.epub navigation.xhmtl fyicenter$ zip -X Hello-3.2.epub content.xhtml
Once the Hello-3.2.epub file is created, you can validate it with EpubCheck:
C:C:\fyicenter> java -jar \fyicenter\epubcheck\epubcheck.jar Hello-3.2.epub Validating using EPUB version 3.2 rules. No errors or warnings detected. Messages: 0 fatals / 0 errors / 0 warnings / 0 infos EPUBCheck completed
If you want to see those 5 required files in Hello-3.2.epub, you can click Hello-3.2.epub to download. Unzip Hello-3.2.epub, you will see all 5 files.
2022-02-09, 221👍, 0💬
How To Add Column Headers to a Table? If you want to add column headers to a table, you need to use ...
How to dump (or encode, serialize) a Python object into a JSON string using json.dumps()? The json.d...
How to create Hello-2.0.epub with WinRAR? I have all required files to create Hello-2.0.epub. To cre...
How To Connect to MySQL from a PHP Script in PHP? If you want access the MySQL server, you must crea...
What is Azure API Management Developer Portal Admin? The Developer Portal Admin is an Azure Web port...