Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2012, 02:47 PM   #16
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,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Quote:
Originally Posted by ProDigit View Post
Wouldn't it be nice that you know which lines are mandatory, and which aren't?
You could just save time by reading the official ePub specifications which do actually detail which things are mandatory and which things are optional in terms of reader device/software support for a fully-compliant ePub file.

Now, if you just want to see how much of the mandatory stuff you can get away with leaving out before whatever error-correction exists in various readers starts to choke on not having them there, that's a different matter.

ETA: If you really want to make a truly minimal ePub, start from scratch because adapting other people's templates means you end up with whatever features they decided to use, which you may or may not consider totally superfluous to your own book.
ATDrake is offline   Reply With Quote
Old 04-15-2012, 07:46 PM   #17
Keroberos
Zealot
Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.
 
Keroberos's Avatar
 
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
Quote:
Originally Posted by ProDigit View Post
And I hope some programmers might read this thread and decide it indeed benefits to not make everything mandatory, but just imply a code within reader software/firmware, that if some specific line of code is not present, a standard pattern will be followed.
I think they should have done that from the start; Like why does every epub needs to have a mimetype file and a container.xml, if for most books these files are identical?
This makes no sense, you are wanting to remove xhtml from the epub in an attempt to make it use less resources, but you want the e-reader programmers to add more code to their readers to correct for the missing bits you think aren't necessary, that kind of code uses resources--probably more than you could save by removing the xhtml restrictions. Web browsers allow for incorrect html because they have a lot of code in them to help correct broken/buggy html.

The epub spec is more strict so they can be opened with the most minimal hardware/software requirements.

Last edited by Keroberos; 04-15-2012 at 07:52 PM. Reason: clarity
Keroberos is offline   Reply With Quote
Advert
Old 04-16-2012, 12:31 AM   #18
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,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
Quote:

ETA: If you really want to make a truly minimal ePub, start from scratch because adapting other people's templates means you end up with whatever features they decided to use, which you may or may not consider totally superfluous to your own book.
That's what I'm basically doing. Through the process of elimination,I eliminate what I don't want or need in my book; though I got to spend some time tomorrow doing more testing on my device,to see what works,and what doesn't.
ProDigit is offline   Reply With Quote
Old 04-16-2012, 01:16 AM   #19
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
Just stick to the specifications. Even if most readers now will allow you to create invalid ePUB's and still work, they are still wrong and there is no guarantee they will still work on other readers.
The ePUB format is already quite slim (contrary to what you claim) and compression makes it even smaller. By tinkering with the opf/ncx you might save 10kb, but probably a lot less. It will take a lot of effort and will gain you almost nothing and possibly generate faulty ePUBs.

The 'why is this needed' is an academical question and should be treated as such. Not for publication of books.
Toxaris is offline   Reply With Quote
Old 04-16-2012, 07:53 AM   #20
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,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
I personally do not believe ePub is optimized code at all!
From there my complaint, if I would have invented the epub, I would have given it the options it now has, but I would have optimized code to look more like the code in this post:
https://www.mobileread.com/forums/sho...27&postcount=3

and not make any hyperlinks and headers mandatory for coding the page.

If you understand anything about coding an HTML document, I've included 2 html's for you to take a look at.
This is what I call "optimal coding".
One is the smallest chapter I could find in the new testament. I chose that one, because not the text of the bible matters here, but the coding done to create this page.
The other is a bible framework I used from before I had only the Sony PRS-505 reader, which was only able to read LRF files back in the days.
LRF files do not support an internal toc, so I had to create one from scratch in HTML format.

If you look at both pages, it's possible, but very difficult to make the coding overhead any smaller than this (see files below).
I had to compress the file, because this site does not allow uploading of HTML files.
Attached Files
File Type: rar temp.rar (3.5 KB, 182 views)
ProDigit is offline   Reply With Quote
Advert
Old 04-16-2012, 08:54 AM   #21
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Usually, I don't feed trolls, but in your case I couldn't resist.

Quote:
Originally Posted by ProDigit View Post
I personally do not believe ePub is optimized code at all!
Nobody said it was and nobody forces you to use advanced ePub features. Make your book as small and as plain as possible, remove as many mandatory ePub elements as you can get away with and enjoy the glorious feeling that your ebook will open a few fractions of a second faster.
Don't like header tags or hyperlinks? Simply remove them and use the search function of your reader instead. It will probably take at least twice as long, but at least you'll be reading an "optimized" ebook.

IMHO, optimizing an ePub for size instead of layout or functionality doesn't make any sense at all. OTOH, if you have too much time on your hands, who am I to tell you what to do with it.

Last edited by Doitsu; 04-16-2012 at 08:56 AM.
Doitsu is offline   Reply With Quote
Old 04-16-2012, 09:28 AM   #22
huebi
Zealot
huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!
 
Posts: 121
Karma: 5070
Join Date: Dec 2010
Device: none
Quote:
Originally Posted by ProDigit View Post
If you understand anything about coding an HTML document, I've included 2 html's for you to take a look at.
nxc and toc files are NOT HTML. They are XML, and in XML there are things just mandantory. You have to live with that, otherwise you are producing invalid ePubs. Please read the specs BEFORE you're fantasiting or doing assumption only based on thoughts.

ePub is an standardized standard and some things are just defined as they are. Its ridiculus to discuss about that.
huebi is offline   Reply With Quote
Old 04-16-2012, 10:01 AM   #23
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
and not make any hyperlinks and headers mandatory for coding the page.
You keep saying this, but you keep ignoring the fact that you've been told over and over that there are no mandatory hyperlinks in the OPF/NCX files. What you keep mistakenly referring to as "hyperlinks" are the xml namespace declarations. Those namespace declarations could be named anything that uniquely indentifies them. But the various developers/groups that have defined those namespaces, use familiar URLs for their unique names so that it's easier for people who have no idea what those namespace specifications are to research those specs. The namespace URI is not used by the parser to look up information. But they need to be there so parsers know which namespace scheme you're using.

Last edited by DiapDealer; 04-16-2012 at 10:03 AM.
DiapDealer is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] calibre not creating content.opf or toc.ncx files during conversion foxxywith2xs Calibre 7 12-16-2012 07:49 PM
NCX file generator (and html ToC and opf) GiorgioC Workshop 0 07-12-2011 06:55 AM
Use Regex to Code an Inline TOC, from an External TOC's .ncx File mostlynovels ePub 2 03-16-2011 12:15 PM
Saving with old toc.ncx file Haderlump Sigil 1 12-28-2010 12:11 PM
Compiling HTML,NCX and OPF file pakiyabhai Calibre 8 12-25-2009 11:12 AM


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


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