Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2017, 04:20 PM   #1
Jerry_Lodriguss
Junior Member
Jerry_Lodriguss began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2017
Device: iPad
HTML5 to ePub

Hi,

Newbie here hoping for help.

I have written a book in HTML5. I have validated it on two different validation sites, so it's validated HTML5.

It is a fairly complicated book with lots of images and videos and javascript for image switches with mouse clicks, as well as a built-in search engine in javascript, and it goes down into three for four sub-directories for each chapter. I have all of the image files for each chapter in an image directory for that chapter.

I want to turn it into an ePub book.

So, here are my initial questions:

1. Looking at some on-line tutorials, it seems that most normal books, which are mostly text, are all xhtml. But when I take one of these xhtml files from an ePub book to just look at it and try to learn what the parts are, the first thing I did was to use an xhtml validator, and none of them validated correctly.

2. Do these xhtml files need a doctype declaration?

3. Where can I find some simple explanations for what is required for these fles?

4. What directory structures are permissible in ePub? Do all of the images have to be in one single images directory, and all of the content in one text directory, both in the OEPBS directory?

5. Am I asking these questions in the right forum?

Thanks in advance!

Jerry
Jerry_Lodriguss is offline   Reply With Quote
Old 02-15-2017, 05:29 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Hi Jerry, Welcome to MR!

Unfortunately the answer to your questions is mostly: it depends.

The ePub3 standard is based on html5 but only certain parts of it are supported. Also, only certain functions of scripting are supported. MR has a wiki that talks about ebook production and you can find in there more specifics about html5. That certainly isn't all there is to know, but it'll get you started. You may also find it interesting - in a sharp-stick-in-the-eye kind of way - to read the ePub3 standards.

Cheers!

Last edited by Turtle91; 02-15-2017 at 05:35 PM.
Turtle91 is offline   Reply With Quote
Advert
Old 02-16-2017, 02:30 AM   #3
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by Jerry_Lodriguss View Post
Hi,

1. Looking at some on-line tutorials, it seems that most normal books, which are mostly text, are all xhtml. But when I take one of these xhtml files from an ePub book to just look at it and try to learn what the parts are, the first thing I did was to use an xhtml validator, and none of them validated correctly.
This is quite strange: if an ePub is not validated it can not be sold, usually.

Quote:
Originally Posted by Jerry_Lodriguss View Post
2. Do these xhtml files need a doctype declaration.
In EPUB3 we use the XHTML5, I usually use the doctype declaration.

Quote:
Originally Posted by Jerry_Lodriguss View Post
3. Where can I find some simple explanations for what is required for these fles?
See the good answer of Turtle91.
Quote:
Originally Posted by Jerry_Lodriguss View Post
4. What directory structures are permissible in ePub? Do all of the images have to be in one single images directory, and all of the content in one text directory, both in the OEPBS directory?
Except the mimetipe file and META-INF folder and contents, you are free.

Quote:
Originally Posted by Jerry_Lodriguss View Post
5. Am I asking these questions in the right forum?
I hope!

f.
fbrzvnrnd is offline   Reply With Quote
Old 02-16-2017, 12:31 PM   #4
Jerry_Lodriguss
Junior Member
Jerry_Lodriguss began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2017
Device: iPad
Do you all know of any professionals who you could recommend to convert a complex HTML5 book (with javascript, videos and a search engine) to Epub?

I looked at the EPUB3 overview, and my eyes glazed over.

Thanks in advance,

Jerry
Jerry_Lodriguss is offline   Reply With Quote
Old 02-16-2017, 02:52 PM   #5
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,069
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
I suggest that you decide ahead of time where you want to sell your book. Support for advanced EPUB 3 features is spotty. For example, what you want to do won't work in the Amazon kindle platform.

You may be better off selling your book as an app if your feature set is outside of the capabilities of the major e-book platforms.

Last edited by jhowell; 02-16-2017 at 02:54 PM.
jhowell is offline   Reply With Quote
Advert
Old 02-16-2017, 03:23 PM   #6
Jerry_Lodriguss
Junior Member
Jerry_Lodriguss began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2017
Device: iPad
Quote:
Originally Posted by jhowell View Post
I suggest that you decide ahead of time where you want to sell your book. Support for advanced EPUB 3 features is spotty. For example, what you want to do won't work in the Amazon kindle platform.

You may be better off selling your book as an app if your feature set is outside of the capabilities of the major e-book platforms.
The funny thing is, I have all of these HTML5 files working perfectly on PC and Mac desktops, and on Android and iOS tablets and phones.

The problem is getting the HTML5 files onto iOS devices. Yes, it can be done, but not by novice customers, and not without some kind of reader like GoodReader.

It's really hard for me to believe that there isn't some simple way to turn these files into an EPUB.

Jerry
Jerry_Lodriguss is offline   Reply With Quote
Old 02-16-2017, 04:48 PM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Jerry_Lodriguss View Post
It's really hard for me to believe that there isn't some simple way to turn these files into an EPUB.
Why? A website is not an e-book and an e-book is not a website. Although they both use a similar (not equal!) language doesn't mean they can easily be converted.

The more 'fancy' is it, the less likely it will be that it will be fully supported in the reading app. And you will probably end up with a version that more or less works in one specific reading app, but not another.
Toxaris is offline   Reply With Quote
Old 02-16-2017, 05:19 PM   #8
Jerry_Lodriguss
Junior Member
Jerry_Lodriguss began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2017
Device: iPad
Quote:
Originally Posted by Toxaris View Post
Why? A website is not an e-book and an e-book is not a website. Although they both use a similar (not equal!) language doesn't mean they can easily be converted.

The more 'fancy' is it, the less likely it will be that it will be fully supported in the reading app. And you will probably end up with a version that more or less works in one specific reading app, but not another.
Isn't HTML5 the basis of EPUB 3?

I read about this 5 years ago.


Jerry
Jerry_Lodriguss is offline   Reply With Quote
Old 02-16-2017, 06:37 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Yes, HTML5 is part of ePub 3. So if javascript. But, as has been said, support for ePub 3 is not good. Most eInk Readers won't work with your interactive ePub. The reason Windows, OS X, iOS, Android, Linux are all working with your code is because it's being handled as a website by a web browser that understands the code.
JSWolf is offline   Reply With Quote
Old 02-16-2017, 06:55 PM   #10
Jerry_Lodriguss
Junior Member
Jerry_Lodriguss began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2017
Device: iPad
Quote:
Originally Posted by JSWolf View Post
Yes, HTML5 is part of ePub 3. So if javascript. But, as has been said, support for ePub 3 is not good. Most eInk Readers won't work with your interactive ePub. The reason Windows, OS X, iOS, Android, Linux are all working with your code is because it's being handled as a website by a web browser that understands the code.
I'm disappointed that the format has not matured in those 5 years to the point where it would support that stuff, but I guess you are saying that the eink readers are for text only, and I can understand that on something like a a low-end Kindle Paperwhite, but my market is for higher-end devices that will have full-color capabilities.

Everybody told me that Epub was the way to go on this project, but I guess they were wrong.

Thanks for your comments.

Jerry
Jerry_Lodriguss is offline   Reply With Quote
Old 02-16-2017, 06:58 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jerry_Lodriguss View Post
I'm disappointed that the format has not matured in those 5 years to the point where it would support that stuff, but I guess you are saying that the eink readers are for text only, and I can understand that on something like a a low-end Kindle Paperwhite, but my market is for higher-end devices that will have full-color capabilities.

Everybody told me that Epub was the way to go on this project, but I guess they were wrong.

Thanks for your comments.

Jerry
Since you are going for a color device, that would be a tablet or smartphone. The suggestion to do this as an app is a good idea. You can do it for iOS and Android and that covers your basis.
JSWolf is offline   Reply With Quote
Old 02-17-2017, 12:36 AM   #12
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by Jerry_Lodriguss View Post
Isn't HTML5 the basis of EPUB 3?

I read about this 5 years ago.


Jerry
Actually EPUB3 is based on IDPF rules, not HTML5. Those rules includes media overlay, XML configuration files, other things and - yes - XHTML5 (not HTML5) with severe limitation. EPUB is an ebook, not an HTML5 wrapper; it has virtual pages (not handled in javascript), reading order, no scrolling...
If you want I can take a look to your code (we are a service too) but if the code is too much web oriented, well, could be a lot of work to do.
fbrzvnrnd is offline   Reply With Quote
Old 02-17-2017, 08:27 AM   #13
Jerry_Lodriguss
Junior Member
Jerry_Lodriguss began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2017
Device: iPad
Quote:
Originally Posted by fbrzvnrnd View Post
Actually EPUB3 is based on IDPF rules, not HTML5. Those rules includes media overlay, XML configuration files, other things and - yes - XHTML5 (not HTML5) with severe limitation. EPUB is an ebook, not an HTML5 wrapper; it has virtual pages (not handled in javascript), reading order, no scrolling...
If you want I can take a look to your code (we are a service too) but if the code is too much web oriented, well, could be a lot of work to do.
Thanks but it doesn't seem like EPUB is going to work for my book.

Jerry
Jerry_Lodriguss is offline   Reply With Quote
Old 02-17-2017, 12:55 PM   #14
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by Jerry_Lodriguss View Post
Thanks but it doesn't seem like EPUB is going to work for my book.

Jerry
It will work. Apple's own eBook program (iBook) can read ePub 3. There are also third party iOS apps that can read ePub 3. See https://www.apple.com/itunes/working.../book-faq.html

Dale
DaleDe is offline   Reply With Quote
Old 02-17-2017, 04:33 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,716
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DaleDe View Post
It will work. Apple's own eBook program (iBook) can read ePub 3. There are also third party iOS apps that can read ePub 3. See https://www.apple.com/itunes/working.../book-faq.html

Dale
And for Android have a look at the Gitden and Infinity viewers, both handle many EPUB3 features, including interactivity.

Converting a set of HTML5 web pages to EPUB3 or so-called 'apps' for IOS and Android will require considerable effort.

With care it should be possible to produce an EPUB3 that - a) makes use of your HTML5 code (assuming it's consistent and coherent), and - b) works on the better EPUB3 readers for IOS and Android.

Creating an 'app' for both IOS and Android is best done with one of the several cross-platform development tools - but they ain't cheap, and I'm not sure how much of your HTML5 could be reused - somewhere between none and some.


I hate the noise that's spelt 'app', a loathsome appellation that I would send to the dustbins of Uffern.

BR

Last edited by BetterRed; 02-17-2017 at 04:40 PM.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub 3 .. load image to html5 canvas ?!! ali_86 ePub 12 01-08-2013 05:33 PM
flash to html5 aime Apple Devices 4 11-16-2012 03:13 PM
Flash is Gone; Where's HTML5? tubemonkey General Discussions 20 08-20-2012 06:14 PM
HTML5 parsing nickredding Conversion 8 08-09-2012 09:50 AM
Apple: HTML5 Demos kjk Apple Devices 7 06-04-2010 06:49 PM


All times are GMT -4. The time now is 12:44 PM.


MobileRead.com is a privately owned, operated and funded community.