Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-11-2012, 01:22 AM   #1
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,395
Karma: 9261478
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
Suppose I wanted to make an epub???

So say I have my document all prepared in a single, basic HTML file, working within-document hyperlinks, titles, and text formatting.

Could I just ZIP the file, and save it as an epub instead of a zip file?

What's the easiest program to convert, without modifying anything of layout, formatting etc?
I'm really not fond of Calibre, so forget that program!
I also think bookdesigner is rather difficult to operate on. I used it a long time ago, but I don't want a 'created by bookdesigner' text at the end of my book!


Is there a program that can directly and efficiently convert HTML to epub?

I don't care if text is formatted in another lettertype or size, but I don't want the program to reconvert pictures, redirect hyperlinks, or start deciding what is a chapter and what isn't.
ProDigit is offline   Reply With Quote
Advert
Old 04-11-2012, 01:29 AM   #2
jhempel24
Wizard
jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.jhempel24 ought to be getting tired of karma fortunes by now.
 
jhempel24's Avatar
 
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
Sigil can do it, and it's free.
jhempel24 is offline   Reply With Quote
Old 04-11-2012, 01:51 AM   #3
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,019
Karma: 32670670
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
You can actually do it manually, as long as you put the "mimetype" thing as the very first thing in the zip archive (uncompressed) and add the rest of the files in after it (can compress).

See this thread for an example of how the two commands to do this look like on a command-line interface, and any decent GUI zip creation app which lets you selectively add and delete files should be able to do it as well.

ETA: You'd have to create yourself an OPF and preferably NCX file as well for the manual approach, so you might prefer Sigil after all.
ATDrake is offline   Reply With Quote
Old 04-11-2012, 01:52 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 80,507
Karma: 73099505
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
Please post in the correct forum section. You've been here long enough to know that ePub questions belong in the ePub forum!
HarryT is online now   Reply With Quote
Old 04-11-2012, 02:19 AM   #5
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,378
Karma: 117701645
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
The easiest way would be fire up Sigil, import the HTML and enter some basic metadata like title and author. Generate a ToC and save.
Oh, and don't forget to push the validate button.

Do remember though that one single HTML file may cause problems on various readers. If the HTML file is larger than 280 KB, than this will be causing problems.
Toxaris is offline   Reply With Quote
Advert
Old 04-11-2012, 02:58 AM   #6
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,395
Karma: 9261478
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
Does only a ZIP program work, or can I also use RAR or 7Z compression?

Can I open an epub file with eg: winzip (or other free program), and replace the files containing the book's text, with my book's text files?

I've opened several epub files and see a lot of useless data there.
Most showing conversion done with calibre, which I see as the new Microsoft, filling up text lines and unnecessary lines of code which only enlarge the book's size.

Some of them defining font types, but I don't really need special font types. The standard font types will do just fine.

Concerning a book's size, you'd recommend keeping it at 128kB or smaller, and dividing large books into chapters instead (eg: have chapter files)?

I'm kind of reverse engineering an epub, to see which data can be eliminated, to still give the same results.

Last edited by ProDigit; 04-11-2012 at 03:13 AM.
ProDigit is offline   Reply With Quote
Old 04-11-2012, 03:13 AM   #7
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,019
Karma: 32670670
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Zip compression only. If your RAR/7z program also happens to be able to create and modify zip files, then you can use it, but ePubs are really just glorified zip archives with the internals arranged in a particular manner.

You'd actually probably have to tweak the existing OPF in another ePub enough for metadata like author, title, etc. that it'd just be easier to create your own OPF. See the Wikipedia example for a version you can quickly copy-paste and substitute your own values into.

Making a simple ePub by hand from scratch with just a text editor and a zip program is actually very easy. Here's the website of someone who has a very easy tutorial which shows you how to do it in plain simple language. You can skip the part which mentions ePub Check if you're just starting out and seeing how things work before committing to distributing or whatever you plan to do with your book.

ETA: Divide large books into chapters. Some older readers can handle reasonably big files, but only if the internal HTML is split into what it considers manageable "chunks".
ATDrake is offline   Reply With Quote
Old 04-11-2012, 03:37 AM   #8
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,395
Karma: 9261478
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
Thank you for the links!
I'll get right to reading and working on converting a book I previously published into the epub format!

(makes me feel like I'm contributing to the world).

It seems that Katiebooks recommends this text to be inside the 'container.xml' file:
<?xml version="1.0" encoding="UTF-8" ?>

<container version="1.0"

It seems to me that I can remove these lines of code, while still read the book. should I remove them then, or do you think there's compatibility issues with some devices, if these lines are not inserted?

Last edited by ProDigit; 04-11-2012 at 03:43 AM.
ProDigit is offline   Reply With Quote
Old 04-11-2012, 10:56 AM   #9
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,019
Karma: 32670670
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
You absolutely cannot remove the xml declaration or the container top-level tag. It is a vital part of the file which tells the software what kind of file it is so that it can read it properly.

Some software admittedly might have some sort of error correction built in to automatically compensate, but it really is part of the required bits specified in the spec and books that omit it will be regarded as incorrect and might well be ignored by some readers which won't even regard them as working ePubs at all.
ATDrake is offline   Reply With Quote
Old 04-11-2012, 02:43 PM   #10
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,378
Karma: 117701645
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
You cannot randomly replace files in an ePUB. That will definitively break it. You could try my post, which will do what you need.
If you want to know more about the format, read the Wiki or the Jedisaber site. The format is described there including the required files.

Remember, it is not a regular zip. There are some specifics making it an ePUB.
Toxaris is offline   Reply With Quote
Old 04-11-2012, 05:20 PM   #11
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,395
Karma: 9261478
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
I'm studying up on CCS and ePub for now.

Just one more question,
Suppose I would put a link in the header and/or footer of every chapter, linking to the next and previous chapter. Is there a way to create a single line in CCS, or should I manually create the link in every chapter, in the HTML code?

CCS Seems to me some kind of code where you can specify the overall text, so you won't have to re-specify this same information within every HTML chapter of the epub.
Now most ebook readers I have, have internal fonts, and internally regulate fontsize, and neither do I find it necessary to specify external websites within an epub, as the devices don't connect to the web anyway, so I don't need to specify all those parameters in CSS, and can just get rid of them.
In fact, leaving it with a clean, stripped to the core, HTML might even be better.
For that reason I was thinking of not using CCS at all, removing any line of code that was not vital to a reading device.

Previously I even removed lines like the one I mentioned above, to save on HTML complexity, but I recoded my files with bookdesigner, and I don't know how BD modified the source HTML (perhaps added that info again when encoding to LRF files without my knowledge).

So, unless if I can use CSS to create some kind of code that will save me time in HTML code, and keeps the overall ePub file clean, I am thinking of getting rid of CSS altogether!

As far as removing the lines of code:
Code:
<?xml version="1.0" encoding="UTF-8" ?>

<container version="1.0"
Tell me, is there any other container version out there?
Any reading device I know automatically selects UTF-8 when not specified (even in HTML), and since there is only one container version, I presume each reading device presumes you're using this container version. None of the reading devices is equipped to read version 2.0, so to me it's like a useless line of code; as the device probably will automatically assume it's container version 1, and even if not, it will handle it as one; but further testing on that soon, once I've been able to create a basic ePub file.

I still have an Astak reader Pro, and Ectaco Jetbook Color to test my epub files on (unfortunately I switched my regular Jetbook for a Jetbook Color, so I no longer have that device for testing).



As far as replacing files in an existing epub, so far it has worked, just as long as I manually update the internal files, mentioning any change in chapters, titles, and file names and so on...

Last edited by ProDigit; 04-11-2012 at 05:26 PM.
ProDigit is offline   Reply With Quote
Old 04-11-2012, 05:40 PM   #12
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,395
Karma: 9261478
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
Also,in my study I've come across conflicting data.
Some sites say epub accepts only SVG files, others say PNG.
Both are low compression file formats, and in my opinion not the best for mobile books.
.jpg files should be a lot better for reading devices, jpeg2000 for photo realistic pictures, and gif for simplistic, anime-like graphics.

I'm perplexed that ePub originally wasn't made to support these major formats, eventhough (al)most (all) devices support those formats from their OS.
ProDigit is offline   Reply With Quote
Old 04-11-2012, 07:25 PM   #13
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,019
Karma: 32670670
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
CSS is actually for specifying formatting without cluttering up the source HTML with extraneous markup. You can autogenerate some extra text with it, but it's poorly supported even in web browsers for that and not recommended. Consider doing a navigable table of contents and NCX chapter marks instead.

There is currently no container version 2.0, but the spec is built for forward-compatibility and backward readability thus assumes there someday might be. You may be able to get away with omitting for some software but there will probably be error messages or outright refusals to open in others, such as KindleGen when converting to mobi.

ePub potentially accepts a very wide range of audio/video/image formats just the same as HTML. Again, the limitation is the software and modern readers support jpg and gif. You can actually get better compression/smaller filesizes with png than gif if you use palettes and get the settings right in many cases. SVG is just glorified text and compresses very well; the problem is support.

Hope this helps.
ATDrake is offline   Reply With Quote
Old 04-12-2012, 03:31 AM   #14
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,378
Karma: 117701645
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Using headers and footers is not really supported in ePUB. It is in the specs, but all readers ignore it to my knowledge. Also, a link is not required to go to the next chapter or the previous. Just turn the page and you will go to the next chapter. Just make sure that the sequence is correct in the opf file.

You must realize the difference between layout and structure. Not HTML, but XHTML is used in ePUB (hence the <?xml reference). Those quite similar, but there are differences. You should limit you XHTML files to structure only. It should identify what is a paragraph, what is a header and so on. In your stylesheet (CSS) you define the layout. How must a paragraph look like? Font-size, italic, indent, all kind of layout stuff. By doing it in a stylesheet, you can easily reuse that for all your XHTML files.

According to the ePUB specs, JPG, PNG and SVG must be supported. Some have claimed problems with SVG, but so far I haven't. Not all SVG functions (like animation) is supported, but the specs also specify that.
They all have their uses. For photo's JPG is usually the best. For line images, PNG is much better. Smaller and less artifacts. Also if you have text in your image, PNG is usually best.
SVG is a strange beast. Very powerful though. You can use an image converted to (or directly created in) SVG and it will work. I personally use it for things like formula's (scalable!) and captions. There are various ways to incorporate an SVG in an ePUB. Directly as text between <div></div> tags is one option. Another is adding it like a picture and reference to it in a <img> tag. In SVG it is also possible to display another picture. The resizing-quality is rather good then and it gives the possibility to create a caption to the picture and keep them together on a page.
Toxaris is offline   Reply With Quote
Old 04-12-2012, 04:27 AM   #15
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,395
Karma: 9261478
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
Thanks for explaining so far!
I can't help but think that epub code is far from optimized, much like how MS office creates HTML pages, with lots of things that aren't really necessary.

Suppose I just want to display my book, do titles in bold and larger letter type than the regular text; but I don't really care about what lettertype or fontsize it will be,
can I get rid of CSS, and just simply compress HTML files in an epub?

I mean, I've read many manuals concerning creating an epub, but I've never seen one that keeps itself to the basics of basics.
Suppose I don't want an ID reference number, and I don't want external sites within my ebook,
What would be an utmost minimalistic epub (eg: one with no extra lines of code, one that just displays a cover photo, a toc, and one or two chapters)?

Most of the manuals online add too much data in their epub. Data that I find is not really necessary. Like for those people that load their books from a file browser structure, adding a title within an epub book more than once is not really necessary.
In fact, I see no reason to write a book title within an epub, if it's already mentioned in the filename.

From point of writing a very minimalistic epub, I find that the epub format has way too much garbage in it, that is unneccessary for any user to read.
It may be good for having databases, and organizing stuff automatically, or converting books, but to read, all you need is a basic HTML0 book, I'd presume?
ProDigit is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
new ereader wanted, but cant make up mind which... loulou123 Which one should I buy? 10 01-20-2012 02:06 PM
added epub, now wanted to get metdata salines Calibre 12 11-24-2011 01:28 AM
'Amazon couldn’t make a Kindle [in the U.S.] if it wanted to' RockdaMan News 54 08-25-2011 09:39 AM
Wanted: EPUB testbed e-reader - what's good and cheap Ralph Sir Edward Which one should I buy? 4 10-11-2010 10:58 AM
Just suppose AlexBell Kindle Formats 4 04-06-2009 07:08 AM


All times are GMT -4. The time now is 04:39 AM.


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