|May the source be with you, but remember the KISS principle ;-)|
|Contents||Bulletin||Scripting in shell and Perl||Network troubleshooting||History||Humor|
|News||Kindle publishing bookshelf||Recommended Links||Self Publishing||Grammar checkers||Frontpage||Kindle Publishing Tools|
|KindleGen||Kindle Previewer||calibre||Guidelines||Amazon KDP Support Forum||Humor||Etc|
Adapted from Wikipedia and Liza Daly atrile Build a digital book with EPUB published on IBM DeveloperWorks
The EPUB format has gained popularity as a vendor-independent XML-based e-book format. The format can be read by the Kobo eReader, Blackberry Playbook, Apple's iBooks app running on iOS devices such as the iPhone, iPod Touch and iPad, Barnes and Noble Nook and several other devices. It also can be read via the Mozilla Firefox add-on EPUBReader, and Okular
It also can be used as a debugging format for Kindle books as conversion to Kindle format is easy and can be automated.
An EPUB file uses XHTML 1.1 to construct the content of a book as of version 2.0.1. An EPUB file is ZIP archive containing a group of files that conform to the OPS/OPF standards. The OCF specifies how to organize these files in the ZIP, and defines two additional files that must be included.
A minimally conforming EPUB bundle has several required files root directory and two folders with fixed names:
The specification is quite strict about the format, contents, and location of those files within the EPUB archive. This section explains what you must know when you work with the EPUB standard.
The basic structure of a minimal EPUB file follows the pattern :
mimetype META-INF/ container.xml OEBPS/ content.opf title.html content.html stylesheet.css toc.ncx images/ cover.png
Note: A sample book following this pattern is available from Downloads, but I recommend that you create your own as you follow the tutorial.
To start building your EPUB book, create a directory for the EPUB project. Open a text editor or an IDE such as Eclipse. I recommend using an editor that has an XML mode for example Microsoft XML Editor which is included in Visual Studio Express Web Edition.
This one's pretty easy: The mimetype file is required and must be named mimetype. The contents of the file are always:
Note that the mimetype file cannot contain any newlines or carriage returns.
Additionally, the mimetype file must be the first file in the ZIP archive and must not itself be compressed. You'll see how to include it using common ZIP arguments in Bundling your EPUB file as a ZIP archive. For now, just create this file and save it, making sure that it's at the root level of your EPUB project.
At the root level of the EPUB, there must be a META-INF directory, and it must contain a file named container.xml. EPUB reading systems will look for this file first, as it points to the location of the metadata for the digital book.
Create a directory called META-INF. Inside it, open a new file called container.xml for writing. The container file is very small, but its structural requirements are strict. Paste the following code into META-INF/container.xml.
<?xml version="1.0"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml" /> </rootfiles> </container>
The value of
full-path (in bold) is the only part of this file that will ever
vary. The directory path must be relative to the root of the EPUB file itself, not relative to the META-INF
The mimetype and container files are the only two whose location in the EPUB archive are strictly controlled. As recommended (although not required), store the remaining files in the EPUB in a sub-directory. (By convention, this is usually called OEBPS, for Open eBook Publication Structure, but can be whatever you like.)
Next, create the directory named OEBPS in your EPUB project. The following section of this tutorial covers the files that go into OEBPS-the real meat of the digital book: its metadata and its pages.
Although this file can be named anything, the OPF file is conventionally called content.opf. It specifies the location of all the content of the book, from its text to other media such as images. It also points to another metadata file, the Navigation Center eXtended (NCX) table of contents.
The OPF file is the most complex metadata in the EPUB specification. Create OEBPS/content.opf, and paste the contents
<?xml version='1.0' encoding='utf-8'?> <package xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" unique-identifier="bookid" version="2.0"> <metadata> <dc:title>Hello World: My First EPUB</dc:title> <dc:creator>My Name</dc:creator> <dc:identifier id="bookid">urn:uuid:0cc33cbd-94e2-49c1-909a-72ae16bc2658</dc:identifier> <dc:language>en-US</dc:language> <meta name="cover" content="cover-image" /> </metadata> <manifest> <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/> <item id="cover" href="title.html" media-type="application/xhtml+xml"/> <item id="content" href="content.html" media-type="application/xhtml+xml"/> <item id="cover-image" href="images/cover.png" media-type="image/png"/> <item id="css" href="stylesheet.css" media-type="text/css"/> </manifest> <spine toc="ncx"> <itemref idref="cover" linear="no"/> <itemref idref="content"/> </spine> <guide> <reference href="title.html" type="cover" title="Cover"/> </guide> </package>
The OPF document itself must use the namespace http://www.idpf.org/2007/opf, and the metadata will be in the Dublin Core Metadata Initiative (DCMI) namespace, http://purl.org/dc/elements/1.1/.
This would be a good time to add the OPF and DCMI schema to your XML editor. All the schemas used in EPUB are available from IBM Downloads.
Dublin Core defines a set of common metadata terms that you can use to describe a wide variety of digital materials; it's not part of the EPUB specification itself. Any of these terms are allowed in the OPF metadata section. When you build an EPUB for distribution, include as much detail as you can here. Minimal variant is below:
... <metadata> <dc:title>Hello World: My First EPUB</dc:title> <dc:creator>My Name</dc:creator> <dc:identifier id="bookid">urn:uuid:12345</dc:identifier> <meta name="cover" content="cover-image" /> </metadata> ...The two required terms are title and identifier. According to the EPUB specification, the identifier must be a unique value, although it's up to the digital book creator to define that unique value. For book publishers, this field will typically contain an ISBN or Library of Congress number. For other EPUB creators, consider using a URL or a large, randomly generated unique user ID (UUID). Note that the value of the attribute
unique-identifiermust match the ID attribute of the
Other metadata to consider adding, if it's relevant to your content, include:
dc:publisher). (This can be your company or individual name.)
dc:rights). (If releasing the work under a Creative Commons license, put the URL for the license here.)
See Resources for more information on DCMI.
meta element with the
name attribute containing
is not part of the EPUB specification directly, but is a recommended way to make cover pages and images
more portable. Some EPUB renderers prefer to use an image file as the cover, while others will use an
XHTML file containing an inlined cover image. This example shows both forms. The value of the
content attribute should be the ID of the book's cover image in the
manifest, which is the next part of the OPF file.
The OPF manifest lists all the resources found in the EPUB that are part of the content (and excluding metadata). This usually means a list of XHTML files that make up the text of the eBook plus some number of related media such as images. EPUB encourages the use of CSS for styling book content, so CSS files are also included in the manifest. Every file that goes into your digital book must be listed in the manifest.
... <manifest> <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/> <item id="cover" href="title.html" media-type="application/xhtml+xml"/> <item id="content" href="content.html" media-type="application/xhtml+xml"/> <item id="cover-image" href="images/cover.png" media-type="image/png"/> <item id="css" href="stylesheet.css" media-type="text/css"/> </manifest> ...
An EPUB book is distibuted as a ZIP file. The OCF specifies how to organize these files in the ZIP, and defines two additional files that must be included.
mimetype file must be a text document in ASCII that contains the string
It must also be uncompressed, unencrypted, and the first file in the ZIP archive. This file provides
a more reliable way for applications to identify the mimetype of the file than just the
There must be a folder named
META-INF, which contains the required file
container.xml. This XML file points to the file defining the contents of the book. This
is the OPF file, though additional alternative
rootfile elements are allowed.
META-INF/container.xml, the other files (OPF, NCX,
XHTML, CSS and images files) are traditionally put in a directory named
An example file structure:
--ZIP Container-- mimetype META-INF/ container.xml OEBPS/ content.opf chapter1.xhtml ch1-pic.png css/ style.css myfont.otf
An example container.xml, given the above file structure:
<?xml version="1.0" encoding="UTF-8" ?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container>
An EPUB file can optionally contain DRM as an additional layer, but it is not required by the specifications. In addition, the specification does not name any particular DRM system to use, so publishers can choose a DRM scheme to their liking.
The EPUB specification does not enforce or suggest a particular DRM scheme. This could affect the level of support for various DRM systems on devices and the portability of purchased e-books. Consequently, such DRM incompatibility may segment the EPUB format along the lines of DRM systems, undermining the advantages of a single standard format and confusing the consumer.
When present, DRMed EPUB files must contain a file called
rights.xml within the
META-INF directory at the root level of the ZIP container.
An open source tool called epubcheck exists for validating and detecting errors in the structural markup (OPS, OPF, OCF) as well as the XHTML and image files. The tool can be run from the command line, or used in webapps and applications as a library. A large part of the original work on the tool was done at Adobe Systems.
The following software can read and display EPUB files:
|Software||License||Platform||DRM formats supported||Notes|
|Adobe Digital Editions||Proprietary||Windows, Mac OS X||Adobe Content Server||Requires online activation for ePub files with DRM.|
|calibre||GPL||Windows, Mac OS X, GNU/Linux||None||Open source. Primarily for library management, conversion, and transferring to devices, it includes a reader. "Calibre: About".|
|FBReader||GPL||Windows, GNU/Linux, Android, PDAs||None||Open source.|
|Google Books||Proprietary||Web application, Android, iOS||Lektz DRM||Supports downloading purchased books as ePub and/or PDF.|
|Okular||GPL||Windows, Mac OS X, GNU/Linux||?||Open source|
|calibre||Windows, Mac OS X, GNU/Linux||GPL||Conversion software and e-book organizer. Allows plugins, including for editing EPUB files; there is for instance a plugin to merge several EPUB files into one.|
|Sigil||Windows, GNU/Linux, Mac OS X||GPLv3||This application can also open and edit EPUB books, instead of just converting from other formats to EPUB. Since version 0.7, Sigil supports embedding video or audio in EPUB.|
This is a step-by-step tutorial, with example, of making a standards-compliant ePub book by hand.
We'll be using the public domain (in both illustrations and text) book The Velveteen Rabbit. It has the following good qualifications as a tutorial example:
- Exists in HTML form in the public domain.
- Tiny table of contents, but a table of contents still exists.
At the moment, whenever I create a Mobipocket book for the Kindle, I start off with creating the ePub version, because things are a bit cleaner that way.
While there are existing ePub tutorials out there, they're usually not thorough enough to avoid a lot of *headdesk* moments. Currently the best by far is Harrison Ainsworth's Epub Format Construction Guide, which is referred to by this tutorial from time to time.
If you want to follow along, here's the final ePub of this process: the_velveteen_rabbit.epub
WikipediaThe .epub or OEBPS format is an open standard for e-books created by the International Digital Publishing Forum (IDPF). It combines three IDPF open standards:
- Open Publication Structure (OPS) 2.0, which describes the content markup (either XHTML or Daisy DTBook)
- Open Packaging Format (OPF) 2.0, which describes the structure of an .epub in XML
- OEBPS Container Format (OCF) 1.0, which bundles files together (as a renamed ZIP file)
The EPUB format has gained some popularity as a vendor-independent XML-based e-book format. The format can be read by the Kobo eReader, Blackberry Playbook, Apple's iBooks app running on iOS devices such as the iPhone, iPod Touch and iPad, Barnes and Noble Nook,
Another other Sony Reader, BeBook, Bookeen Cybook Gen3 (with firmware v. 2 and up), COOL-ER,
Adobe Digital Editions, Lexcycle Stanza, BookGlutton, AZARDI, FBReader, Aldiko, Moon+ Reader and WordPlayer on Android,
Freda on Windows Mobile and Windows Phone 7,
the Mozilla Firefox add-on EPUBReader, and Okular. Several other desktop reader software programs are currently implementing support for the format, such as dotReader, Mobipocket, uBook.
The only notable device lacking integrated support for the ePUB format is the Amazon Kindle, although there has recently been speculation that the Kindle will soon support this format.
Adobe Digital Editions uses .epub format for its e-books, with DRM protection provided through their proprietary ADEPT mechanism. The recently developed ADEPT framework and scripts have been reverse-engineered to circumvent this DRM system.
DSLibris, a Sourceforge.net project, is able to decode e-books in .epub and .xht format for reading on Nintendo DS systems.
This article describes how you can download ebooks in epub format for free, how to read epub ebooks on your desktop or mobile phones and how to convert PDF, Word and other documents into the ePUB ebook format.
ePub is a standard e-book file format that is supported by all popular e-book reading device including the Sony Reader, BeBook, IREX Reader, iPhone and the Nook from Barnes & Noble's.
Amazon Kindle reader uses a proprietary format (AZW) and cannot read ePub files directly though there are free tools to convert ePub into MOBI (or even PDF) which is a format that your Kindle can read.
Other than hardware devices, you can also read .epub books on your desktop or mobile phone using free e-reader software like Mobipocket, FBReader (for Linux), Aldiko (for Android) or Adobe Digital Editions.Download Books in ePub Format
If you are looking to download classic titles in ePub format to read offline, the best place is Google Books (select the "public domain only" option).
Google Books has more than a million public domain (out of copyright) books in the EPUB format that are completely free and they aren't protected by DRM so you can read these ebook titles on any device / computer without restrictions.
Project Gutenberg and FeedBooks are some other useful sites that offers most of their titles in the EPUF format.Read ePub e-books inside Firefox
Firefox users can download EPUBReader, a free add-on that lets you read the contents of any ePub book right inside their favorite browser without requiring any special software.
ePub is basically a zip file that contains a collection of text files and images. This add-on will simply uncompress that zip file and display the contents inside your browser.
In regular course, if you click on a link that points to an ePub file, Firefox will prompt you to to save that file onto the hard-drive but with this add-on installed, the ebook will directly open inside your Firefox tab like any other web page.
Additionally, you can open any ePub file that's on your desktop using the File -> Open File menu in Firefox. All the ebook are automatically stored in your Firefox profile under a separate sub-directory.How to Create ePub eBooks
If you want to publish your own books or blog in ePUB format, the easiest option is that you compose the text in Word (or Google Docs), save it as an RTF file and then you use Amazon's Stanza program to convert that document into an ePUB ebook.
Before publishing, you should also use the EpubCheck tool from Adobe to make sure that the markup in your ePUB file is valid after conversion.
Alternatively, you may use the free Calibre program to convert virtually any document format into ePUB in a batch. Calibre is available for Linux, Windows and Mac OS X. And for editing ePUB files, you should try Sigil – a WYSIWYG editor that also runs on Windows, Linux and Mac
Download Google Books with Sony Desktop Reader
While you can download ePUB books directly from the Google Books website, Sony offers an excellent desktop application (for Mac and PC) that is nice integrated with Google Books and you don't have to own the Sony Reader for using that application.
You can then search public domain titles on Google Books directly from the desktop and save them to your local library in ePUB format.
Softpanorama hot topic of the month
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.
ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least
Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.
Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info|
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: September, 12, 2017