Electronic Publication (EPUB, or ePUB) is an open ebook (also known as e-reader)-oriented document encoding format, which is also compatible with wide set of desktop and mobile software and all major e-readers such as Amazon Kindle and Barnes and Nobleās Nook.
EPUBās file format works similarly to Microsoft Word in the sense that it consists of a zip file which contains encodes the text elements as XML and includes embedded resources as separate files. The EPUB specification (latest major version is 3) is maintained by the W3C.
Example
<section id="this-is-a-level-1-heading" class="level1">
<h1>This is a level 1 heading</h1>
<section id="this-is-a-level-2-heading" class="level2">
<h2>This is a level 2 heading</h2>
<p>This is text in <strong>bold</strong> and <em>italics</em>, and this is an external link to <a
href="https://docops.guide">DocOps</a>. Now, some bullet points:</p>
<ul>
<li>Bullet point 1</li>
<li>Bullet point 2</li>
<li>Bullet point 3</li>
</ul>
</section>
</section>
The above file represents a snippet taken from EPUB/text/ch001.xhmtl
, assuming the below directory structure:
EPUB/text
EPUB/text/ch001.xhtml
EPUB/text/title_page.xhtml
EPUB/nav.xhtml
EPUB/styles
EPUB/styles/stylesheet1.css
EPUB/toc.ncx
EPUB/content.opf
META-INF
META-INF/container.xml
META-INF/com.apple.ibooks.display-options.xml
mimetype
Unless the documentation is solely produced for e-reading use cases, EPUB is considered as a render format.
The example has been generated using Pandoc from the markdown version.
© 2022-2024 Ernesto Garbarino | Contact me at ernesto@garba.org