This is a sample Epub-format digital book in Japanese. Epub is an open digital e-book format adopted by Apple iBookStore, Google Editions and Sony readers. Epub can be used as an input format for an Amazon Kindle book too.
I tested this sample first with a Windows e-book reader application, Adobe Digital Edition. I also tested it with iPad iBooks reader.
Send to iBooks via Podcast: podcast-en.xml
(Clicking this link starts iTunes in your PC and the file is downloaded into the library. At this time, if iTunes asks you to register the Podcast, cancel registration. Then connect iPhone or iPad to PC, sync the content and start iBooks on iPhone or iPad. The sample book should appear on the book shelf.)
See also: Kobu.Com started sales of an Epub Book titled "Java Programming with Mifare and ACR120" through Apple iBooks Store.
This Japanese Epub book (Open eBook) sample was created based on the following Epub sample written in English.
.epub eBooks Tutorial (How to Make an ePub eBook by Hand)
The Epub format is a ZIP file containing XHTML body text files and some XML meta files such as table of contents. As with this example, you can create it only with text editor and zip command. A special authoring tool is not necessarily required.
I used Digital Edition for display testing. It is a reader software from Adobe that runs under Windows and supports Epub.
Actually Japanese characters are not properly displayed if I just replaced characters in the English sample with Japanese characters. I have to add language specification to XHTML files as described in the following link:
In summary, you have to specify language in HTML declaration in XHTML files that constitute the contents of the book.
<html xmlns="http://www.w3.org/1999/xhtml"> | v <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
The Japanese characters displayed properly with this modification.
This sample book consists of three sections; title page, chapter one and chapter two. The following images show how this sample file looks like when it is opened with Adobe Digital Edition.
Epub is one of open standards for electronic books (eBook); named after the extension of the file containg the book. International Digital Publishing Forum (IDPF) defined this standard.
In summary, an Epub book:
Here are major versions of the specification (List of specs):
(Added 2010 March 30) Epub includes another format called DTBook as well as XHTML-based format.
You can find the following files if you unzip the sample zip file (sample-epub.zip).
sample.epub sample/ mimetype META-INF/ container.xml OEBPS/ content.opf toc.ncx title_page.xhtml chap01.xhtml chap02.xhtml stylesheet.css page-template.xpgt images/ koma.gif (sample.jpg replaced) makeepub.bat
sample.epub is an Epub format ZIP file. Its contents are in sample folder. I renamed the file extension of sample.epub to zip and extract the files in it. I borrowed the original English sample introduced above, and modified or replaced some files in order to test display of Japanese characters. The file names in bold face are modified or replaced files. makeepub.bat is a batch command used to bind contents in sample folder into sample.epub.
The following files are meta files conforming to Epub standard.
|mimetype||File for informing that this is an Epub-format ZIP file.|
|META-INF/container.xml||A file that indicates the location of the OPF file below.|
|OEBPS/content.opf||List of files comprising the book content. All files including XHTML, CSS and graphics. Order of pages (spine) is also described here.|
|OEBPS/toc.ncx||Table of contents.|
The following files are files that make up the Epub book. They are displayable with a web browser.
title_page.xhtml chap01.xhtml chap02.xhtml stylesheet.css koma.gif
The following file is an XML-format stylesheet added by Adobe as an extension to Epub . iBooks does not support Adobe's page template.
You need a ZIP tool to build an Epub-format ZIP file from the source.
But there is a troublesome condition. metafile must be the first file in the ZIP file and must be uncompressed. I don't know how to add an uncompressed file with Windows XP's builtin ZIP tool (probably we can't do it). I used a command-line ZIP tool which I am familiar with.
makeepub.bat looks like:
cd sample zip -0 ..\sample.epub mimetype zip -r ..\sample.epub * -x mimetype cd ..
Here, -0 option specifies uncompression, -r specifies inclusion of subfolders, and -x specifies files to be excluded.
Most Epub-compatible readers can display Japanese characters. I feel that quality of Japanese character layout has been greatly improved in many readers these days although, in some reader, it is not very comfortable to read them due to unbalanced placement of neighboring characters.
There are three Japanese-language specific features that most Japanese readers want to be supported: kinsoku, ruby and vertical reading.
At least, I found iBooks reader seems to support what Japanese people call "kinsoku" (avoidance of some punctuation characters appearing at the beginning or end of a line).
Ruby is a group of small characters placed next to the main text for pronounciation aid.
Ruby may be implemented through <ruby> tag defined in XHTML 1.1.
<ruby><rb>Epub</rb><rp>(</rp><rt>eee pab</rt><rp>)</rp></ruby> (A ruby-capable reader will display small "eee pab" above "Epub" while an incapable reader will place "eee pab" in parentheses following "Epub.")
Epub version 1.2 does not include <ruby> tag. Epub 2.0 version defines it within an extension module. This means a future reader may support ruby as an option.
I expect vertical reading will gradually be supported by overseas and domestic reader manufacturers as the Japanese digital book market grows regardless they are defined in the Epub specification or not.
This is the end of description of the sample.
(Added 2010 April 14) Japan Electronic Publishing Association (JEPA) published Minimal Requirements on EPUB for Japanese Text Layout (english). They say this work is based on W3C's Requirements for Japanese Text Layout (english with japanese translation) which describes how Japanese text is layed out in great detail with many examples.
(Added 2010 June 3) Concrete stylesheet attributes for specifying typesetting orientation are proposed for addition to the Epub specification by Murakami and Murata (Japanese). This document describes writing-mode attribute for specifying rendering direction of a text passage, block or entire document, and margin-before/after/start/end attributes for specifying space of the surrounding four sides of a block, among others.
Other document samples in this site are:
Kobu.Com's related businesses are:
Kobu.Com welcomes questions and comments about this Epub sample. Please contact us if you need some help with text- and XML-based document creation and digital publishing in general.
Presented by: Kobu.Com
The published sample code is a prototype and is not complete.
Please refrain from duplicating the sample code and its document in another place.
This page is link-free. We welcome your questions and comments.