ePub format

General comments and questions. Technical support.
Robert
Posts: 1900
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Here are a few related pages:

http://blog.wired.com/business/2009/02/ ... gives.html
“Central to Bookworm's mission is spreading adoption of the ePub format for electronic books. It's an open format, free of DRM and based on web standards, so it's much more flexible than PDF, mobi and other e-book file formats that are tied to specific devices. It's fast becoming the standard, replacing PDF and other inflexible or proprietary formats.
The Bookworm site is free, so anyone can create an account. Once you're logged in, you can upload e-books to your account and use it as your own personal library in the cloud. You can read your books using Bookworm's browser-based reader, which will even remember which page you were on when you last closed each book.”

http://www.adobe.com/devnet/digitalpubl ... asheet.pdf
“EPUB is an XML-based file format designed to reflow text according to screen size. In addition to PDF, Adobe® Digital Editions software supports the EPUB standard, giving users the ideal format to organize and read digital publications on mobile devices.”

http://www.mail-archive.com/bug-texinfo ... 04019.html
“It has the advantage over pdf that the e-reader can layout the pages itself, such that the pages are always at a readable font size. It also has a standard index page which can be automatically rendered in the reader.”

http://www.mobileread.mobi/forums/showt ... hp?t=29968
“EPUB is an industry standard and an open standard, while LRF is a proprietary format.
Compared to the other reflowable formats, EPUB is more advanced, supporting CSS stylesheets, SVG images, a real multi-level table of contents etc...
But the most important point is that EPUB will be used at an industrial level by the publishing industry and available across a large selection of devices.
Currently, it's still early days for the format, and the number of devices/reading systems that support EPUB are limited, but it'll change in the upcoming months.
Take a look at our EPUB help page on Feedbooks: http://www.feedbooks.com/help/epub
Or at the official specs on the IDPF website: http://idpf.org

http://electricbookworks.book.co.za/blo ... r-in-epub/
“When we released the Moxyland ebook with its embedded soundtrack last year, we did it in PDF. There were various technical and logistical advantages to using PDF, but it also had a few drawbacks. Mainly, there were sometimes problems listening to the tracks on Macs, and Adobe DRM (imposed by retailers, not by us) resulted in hassles with simultaneous reading and listening. We’ve now released the ebook in epub format, the open standard increasingly considered the format of choice by ebook creators. Epub uses the same kind of code that websites run on (technical people will cringe at that simplification, but they’ll know what I mean), which offers all kinds of advantages, but being a young format it takes a little longer to master, especially when you’re trying to do something like embed a soundtrack in a novel.
If you’ve got space for $5.99 on your credit card, get yourself a copy and see what we’ve done. At the moment, the best reader for this ebook is the free Adobe Digital Editions (most other epub readers will often have problems with its size or its embedded tracks for reasons beyond our control) – ADE is currently available only for Windows and Mac.”

http://www.adobe.com/products/digitaleditions/
“Adobe® Digital Editions software offers an engaging way to view and manage eBooks and other digital publications. Use it to download and purchase digital content, which can be read both online and offline. Transfer copy-protected eBooks from your personal computer to other computers or devices. Organize your eBooks into a custom library and annotate pages. Digital Editions also supports industry-standard eBook formats, including PDF/A and EPUB.
Check out the Adobe Digital Editions Library, where you can browse and download free eBooks and digital magazines, including full-length novels and works of nonfiction.”
“Did you get here automatically from Adobe Acrobat® 8 or Reader® 8 software or from Digital Editions? Click the install badge below to download and install the latest version of Digital Editions, which provides the eBook capabilities integrated with previous versions of Acrobat and Reader. Digital Editions 1.7.1 is an application update that discontinues support for Adobe Content Server 3. Digital Editions is now available in many languages: English, French, German, Italian, Spanish, Dutch, Brazilian Portuguese, Japanese, Korean, Chinese Simplified, and Chinese Traditional. This version also allows IT professionals to deploy, maintain, and support Digital Editions across your organization.”
andygrunt
Posts: 230
Joined: Mon Jul 23, 2007 12:35 pm

Post by andygrunt »

Thanks - you learn something new every day :)
Robert
Posts: 1900
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

I have downloaded and installed the Adobe Viewer available from http://www.adobe.com/products/digitaleditions. It displays André’s book very well. But the TOC links are inoperative. It appears that the ePub format is not really "device-independent".
Also note that there is an “eBook” version of the PDF format, the “PDF/A” format.
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

I was hoping to get something like this. This is the first page of a book that I downloaded on the iphone. It's from the app called Classics2go. Most likely, this layout is programmed and not possible to gt through a normal epub file.

André
Attachments
IMG_0015.PNG
IMG_0015.PNG (221.25 KiB) Viewed 16903 times
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
Robert
Posts: 1900
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi André,
You could try saving your document as a Web page from Atlantis, using a background image.
Drop-caps are not yet supported in Atlantis.
HTH.
Cheers,
Robert
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

But will it keep this graphic layout as a epub file? Isn't the epub stripping away everything except .txt info?
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
andygrunt
Posts: 230
Joined: Mon Jul 23, 2007 12:35 pm

Post by andygrunt »

Andremusic wrote:Most likely, this layout is programmed and not possible to gt through a normal epub file.
I'm no expert but I would guess it was created using desktop publishing software.
andygrunt
Posts: 230
Joined: Mon Jul 23, 2007 12:35 pm

Post by andygrunt »

Or you could probably knock it up in an image editor and paste it in as a graphic at the start of your document before exporting?
Robert
Posts: 1900
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi André,
You can easily add a background image to epub documents. Here is how to proceed:
1. Rename any of your ePub files so that it has the extension “.zip” instead of “.epub”.
2. Extract the resulting Zip file to an empty folder.
3. You should have an “OPS” sub-folder. Open that folder.
4. Place a picture that you’d like to use as background to the epub document in that OPS sub-folder.
5. This same OPS sub-folder should contain a file with the “.css” extension. If you haven’t got such a “.css” file to test, you could download http://www.web-books.com/Classics/EPUB/ ... ables.epub. It contains a “.css” file. You could use it a a test document.
4. Open the “.css” file in Notepad or any other pure text editor.
5. In the “.css” file, you should find a “body” tag. Add a “background” attribute to it. Like so:

body { text-align: justify; background: url(flowers.png) }

“flowers.png” is just an example. Use the name of the background picture that you placed in the OPS sub-folder.
The “text-align” value can be “left”, “right”, “center”, or “justify”.

5. Save your changes and close all open files.
6. Select the “META-INF”, “OPS”, and “mimetype” sub-folders, and zip them into a new zip file.
7. Rename that zip file so that it has the “.epub” file extension.
8. Double-click the new “.epub” file to view it in your default eBook viewer.

Now you might want to add a background image only on specific pages of your epub document. Here is how to do it:
1. Repeat steps 1 through 4 above.
2. Open the “.html” file to which you want to add a background in Notepad.
3. Add a “background” attribute to the “body” tag. Like so:

<body background=flowers.png>

“flowers.png” is just an example. Use the name of the background picture that you placed in the OPS sub-folder.

5. Save your changes and close all open files.
6. Select the “META-INF”, “OPS”, and “mimetype” sub-folders, and zip them into a new zip file.
7. Rename that zip file so that it has the “.epub” file extension.
8. Double-click the new “.epub” file to view it in your default eBook viewer.

Of course, all this will be automatic when Atlantis has support for the “ePub” format. :)

HTH.
Cheers,
Robert
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

Hi Robert,
I did everything but the background stays the same when I open the epub file in my reader. I could however not find a section in the css file that has a body tag so I just put that command line at the bottom of the list. Probably that's why it doesn't work. How do I make that tag? I don't know so much about html.

So Atlantis is going to work on it? That's great news! Any idea how long this will take (no pressure...) :wink:

André
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

This is my css info:

@font-face { font-family: "Linux Libertine O"; src: url(fonts/LinLibertine_Re-2.8.14.otf); }
@font-face { font-family: "Linux Libertine O"; font-style:italic; src: url(fonts/LinLibertine_It-2.8.2.otf); }
@font-face { font-family: "Linux Libertine O"; font-weight:bold; src: url(fonts/LinLibertine_Bd-2.8.1.otf); }
@font-face { font-family: "Linux Libertine O"; font-style:italic; font-weight:bold; src: url(fonts/LinLibertine_BI-2.8.0.otf); }
.st001 { text-align:center; text-indent:1em }
.st002 { color:#000000; font-size:0.8em; font-weight:bold }
.st003 { page-break-before:avoid; text-align:center; text-indent:1em }
.st004 { color:#000000; font-size:0.8em; font-style:normal; font-weight:normal }
.st005 { page-break-before:avoid; text-align:left; text-indent:1em }
.st006 { page-break-before:avoid; text-align:justify; text-indent:1em }
.st007 { page-break-before:always; text-align:center; text-indent:1em }
.st008 { color:#000000; font-size:0.8em; font-style:italic; font-weight:normal }
.st009 { page-break-before:always; text-align:left; text-indent:1em }
.st010 { page-break-before:always; text-align:justify; text-indent:1em }
<body>
{ text-align: justify; background: url(Paper.jpg) }
</body>
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
Robert
Posts: 1900
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi André,
HTML code has to be included AS IS. You have got to be accurate.

In css files, the “body” attribute looks like this:

body { text-align: justify; background: url(flowers.png) }

As you can see, there isn’t anything like <body> </body>

In your above example (that is in your css file), it should be:
body { text-align: justify; background: url(Paper.jpg) }
That’s all.

If you want to have a background image on a specific page, you have to edit the corresponding “.html” file and include a “background” attribute within the “body” tag. Like so:
<body background=Paper.jpg>
That’s all.

HTH.
Cheers,
Robert
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

Btw. when I try to do this on my mac instead on windows, I get these files after renaming it from epub to zip:

see picture...

No Ops folder there. Just an observation, doe this mean that epub files are different on mac and windows?
Attachments
Picture 1.png
Picture 1.png (27.12 KiB) Viewed 15216 times
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
Robert
Posts: 1900
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi André,
First, I don’t have a Mac, have no access to a Mac, and Atlantis cannot be run on a Mac. So I cannot say anything about epub files on a Mac. But I assume they should look the same, the epub format being cross-platform.

Now it appears that epub files are built slightly differently depending on which application is used to create them. It also appears that not all applications stick to the official specifications. If I am to believe the tutorial available at http://www.jedisaber.com, the basic epub file layout should look like this:
- mimetype
META-INF
- container.xml
OEBPS
images
- content.opf
- toc.ncx
- stylesheet.css
- content.xhtml
If I take “Raouls%20Reddingsmissie%20-%20Andreas%20van%20Haren.epub” as a sample document, and “unzip” it, I get the following structure (the first two items being folders):
content
META-INF
mimetype
toc.ncx
metadata.opf
If you open the “content\resources” sub-folder, you’ll find a file named “index_2.css”. Open it in a pure text editor like Windows Notepad. It includes the following lines:
body {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0
}
body {
margin-left: 5pt;
margin-right: 5pt
}
Replace all of them with these lines:
body {
margin-top: 5;
margin-bottom: 5;
margin-left: 5;
margin-right: 5;
Background: url(background.png);
}
Please replace “background.png” by the name of the picture that you want to use as a background. Note that names, including file names, are case sensitive.

HTH.
Cheers,
Robert
User avatar
admin
Site Admin
Posts: 2826
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Andremusic wrote:Here it is. This is my first novel and it was published for some years in Holland, but I have the full copyrights again since this year, so no laws are being broken by posting it here! Maybe you have some suggestions how to improve the epub file. Like I said, when I read it on my iphone, the links work but the chapters are starting randomly in the middle of pages.

http://www.box.net/shared/uxya5lr0pt

André

(ps. this book was completely written in Atlantis!)
As I understand, you composed your eBook (I mean your file "Raouls Reddingsmissie - Andreas van Haren.epub") in Calibre.

You might wish to know that your .epub file does not display correctly in Adobe Digital Editions and Mobipocket Reader Desktop. Table of Contents does not work correctly when your .epub is viewed in Adobe Digital Editions (I suppose the problem is that Calibre does not split ebooks into chapters correctly). Mobipocket Reader Desktop simply refuses to open your .epub.
User avatar
admin
Site Admin
Posts: 2826
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Atlantis Word Processor 1.6.3 with support for the DOCX document format of MS Word 2007 has been just released officially.

Atlantis Word Processor 1.6.4 with the "Save as E-book" feature will be available for betatesting in the next few days.
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

admin wrote:Atlantis Word Processor 1.6.3 with support for the DOCX document format of MS Word 2007 has been just released officially.

Atlantis Word Processor 1.6.4 with the "Save as E-book" feature will be available for betatesting in the next few days.
That sounds great! Looking forwards to this coming release!

André
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
User avatar
admin
Site Admin
Posts: 2826
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Atlantis Word Processor 1.6.4 is now available for betatesting.
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

You guys are great! Thanks for this option, it's so easy to create a pub file now for my iphone! I am going to try it and will tell you how it goes.
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
Andremusic
Posts: 189
Joined: Fri Mar 12, 2004 8:17 am
Location: Sweden
Contact:

Post by Andremusic »

I tried the Rembrandt example, took out all the green text, opened the createdepub file with Stanza and synced it with Stanza on my iPhone. Everything works and looks great! And the toc works perfect. Only the cover image and the Title text are too big for the iPhone screen. I see only about 2/3 of it. Would it be better to make the image smaller?

I remember we talked before about giving the paper of the ebook a personal touch, like a different papers structure or color. Is this possible to include as well?
Keep on Writing!

Atlantis 1.6.4.3 on Acer laptop, Aspire 1804WSMi, Pentium 4, 2 gb ram, Windows 7. iMac G5, Leopard 10.5.7, 2.5 GB ram. iPhone 3G. Coffee machine by Philips...
Post Reply