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 08-05-2009, 03:53 PM   #16
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,566
Karma: 3586209
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by Valloric View Post
Define "first page".
A separate file named cover.html.
Nate the great is offline   Reply With Quote
Old 08-05-2009, 03:55 PM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Valloric View Post
This leads me to my main problem with this idea: I can't force the user to place a chapter break after an image and then somehow semantically mark this chapter/XHTML file as one containing the cover only. How would such a UI option even look like? How would it be presented to the user in a simple and understandable way? And honestly, why should the user care? If I were creating an epub book and would have no intention of messing with it in calibre, I would not do this. It would have no tangible benefit to me.

I also wouldn't want to do this automatically on export, not in an editor. An editor (unlike a converter) should never change the structure of the document the user sees in the editor. WYSIWYG means something very specific.

I would welcome suggestions on how could this be handled, because I can't see how it can be.
A button that says "Click me to add cover"?
kovidgoyal is online now   Reply With Quote
Old 08-05-2009, 03:56 PM   #18
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by ahi View Post
Wouldn't a first page consisting solely of an image be a reasonably certain indication that it is a cover... regardless of whether the metadata also attests it to be?

- Ahi
No, it could for example be a copyright page with publishers logo.
kovidgoyal is online now   Reply With Quote
Old 08-05-2009, 04:05 PM   #19
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
No, it could for example be a copyright page with publishers logo.
As the first thing in an eBook? Do you mean "title page"?

If a book has no cover, the "title page" is the next best thing... making treating it as a cover still the right choice.

As for what constitutes a page? Whatever would result in the image being rendered by itself on the device display.

Whether it is by virtue of it being in a separate cover.html file, or whatever other ways ePub gurus could accomplish much the same. Or is there no other way to do that?

- Ahi
ahi is offline   Reply With Quote
Old 08-05-2009, 04:12 PM   #20
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Suppose the user wants to set a new cover in an epub file. Now should calibre replace the first entry in the spine or not? That is the question.

The only way to unambiguously answer it is to have some pointer in the OPF file that tells calibre whether the first entry in the spine is a cover or not.

Try to guess if the first entry is a cover is not at all robust, just take my word for it, I lack the patience to enumerate all the cases where any guessing algorithm will fail.
kovidgoyal is online now   Reply With Quote
Old 08-05-2009, 04:19 PM   #21
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Suppose the user wants to set a new cover in an epub file. Now should calibre replace the first entry in the spine or not? That is the question.

The only way to unambiguously answer it is to have some pointer in the OPF file that tells calibre whether the first entry in the spine is a cover or not.

Try to guess if the first entry is a cover is not at all robust, just take my word for it, I lack the patience to enumerate all the cases where any guessing algorithm will fail.
What about presenting that first image to the user (in a window) at the beginning of the conversion process, and asking them to indicate (by a click) whether it is to be deleted or left in place after the addition of the new cover at the beginning of the eBook?

That seems dummy proof, no?

- Ahi
ahi is offline   Reply With Quote
Old 08-05-2009, 04:56 PM   #22
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by Nate the great View Post
A separate file named cover.html.
You cannot seriously expect all epubs to have a file named "cover.html" in them, can you?

Quote:
Originally Posted by ahi View Post
What about presenting that first image to the user (in a window) at the beginning of the conversion process, and asking them to indicate (by a click) whether it is to be deleted or left in place after the addition of the new cover at the beginning of the eBook?

That seems dummy proof, no?
I was just about to advise something similar. Calibre could start reading the file and presenting the images that appear in the book, from first to last. Arrow buttons for "next", "previous", "Select image" and "Cancel".

This should always work, guide element present or not.
Valloric is offline   Reply With Quote
Old 08-05-2009, 04:59 PM   #23
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by kovidgoyal View Post
A button that says "Click me to add cover"?
Sigil doesn't work that way. What if the user just imported an image and placed it at the beginning of the file? Not to mention that an "add cover image" button is redundant because of the above way of doing this, which most people want to use anyway.

There should be no difference between a cover image and any other image in an epub. Any such difference would be arbitrary and artificial. Reading systems are not required to use the guide element, and even if they were, ebook authors are not required to specify a cover page.
Valloric is offline   Reply With Quote
Old 08-05-2009, 05:14 PM   #24
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by Valloric View Post
Sigil doesn't work that way. What if the user just imported an image and placed it at the beginning of the file? Not to mention that an "add cover image" button is redundant because of the above way of doing this, which most people want to use anyway.

There should be no difference between a cover image and any other image in an epub. Any such difference would be arbitrary and artificial. Reading systems are not required to use the guide element, and even if they were, ebook authors are not required to specify a cover page.
Hmmm... I'm not sure your thinking is necessarily sound here.

A "cover" probably should be treated as metadata, if technology allows. Are there reasons to avoid doing so? (Other than "it's not as easy for Sigil's users"?)

- Ahi
ahi is offline   Reply With Quote
Old 08-05-2009, 05:15 PM   #25
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Valloric View Post
Sigil doesn't work that way. What if the user just imported an image and placed it at the beginning of the file? Not to mention that an "add cover image" button is redundant because of the above way of doing this, which most people want to use anyway.

There should be no difference between a cover image and any other image in an epub. Any such difference would be arbitrary and artificial. Reading systems are not required to use the guide element, and even if they were, ebook authors are not required to specify a cover page.
Yes but users like to change the covers of ebooks. To me, what users actually want is far more important than what the EPUB spec says they should want.

If the user just imports an image file at the beginning of the document and doesn't specify that it's a cover, that's the users problem. But Sigil should at least present the possibility for a user to do it the right way.

At the very least Sigil should not strip out existing guide elements, unless the file it points to is removed.
kovidgoyal is online now   Reply With Quote
Old 08-05-2009, 05:21 PM   #26
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,566
Karma: 3586209
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by Valloric View Post
You cannot seriously expect all epubs to have a file named "cover.html" in them, can you?
No, I don't. I'm still thinking about how to cooperate with this odd little thing that Kovid did.

TBH, I've moved it down my list of priorities. It's not in the spec so there's no reason for me to mess with it.
Nate the great is offline   Reply With Quote
Old 08-05-2009, 05:28 PM   #27
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by ahi View Post
A "cover" probably should be treated as metadata, if technology allows. Are there reasons to avoid doing so? (Other than "it's not as easy for Sigil's users"?)
Oh I'd love it if the EPUB spec had some "cover image" metadata. That would be awesome. But it doesn't. What little it has that could be used to specify the cover image is not mandatory.

EDIT: And even that cannot be used to specify the cover image, only the cover page!

Quote:
Originally Posted by kovidgoyal View Post
Yes but users like to change the covers of ebooks.
Open it in Sigil, delete the cover image, insert a new one. Done. No need for a guide element.

Quote:
Originally Posted by kovidgoyal View Post
If the user just imports an image file at the beginning of the document and doesn't specify that it's a cover, that's the users problem. But Sigil should at least present the possibility for a user to do it the right way.
Fair point. But the "right way" is arbitrary now, it's what you say is "right". I say "right" means putting an image at the beginning of the document. Again, there is no way to semantically specify the cover image in an epub that all reading systems would have to respect.

Even ADE has its own proprietary extension for this I believe.

Quote:
Originally Posted by kovidgoyal View Post
At the very least Sigil should not strip out existing guide elements, unless the file it points to is removed.
The file pointed to is not present after importing. Sigil disassembles the imported epub and creates the NCX, OPF etc on export. These files are not stored after they are imported.

Last edited by Valloric; 08-05-2009 at 05:32 PM.
Valloric is offline   Reply With Quote
Old 08-05-2009, 05:37 PM   #28
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Valloric View Post
Oh I'd love it if the EPUB spec had some "cover image" metadata. That would be awesome. But it doesn't. What little it has that could be used to specify the cover image is not mandatory.
Yes but it exists, why not use it?

Quote:

Open it in Sigil, delete the cover image, insert a new one. Done. No need for a guide element.
Yes, but the world is larger than Sigil.


Quote:
Fair point. But the "right way" is arbitrary now, it's what you say is "right". I say "right" means putting an image at the beginning of the document. Again, there is no way to semantically specify the cover image in an epub that all reading systems would have to respect.
It's not arbitrary, it's in the spec. The fact that reading systems dont have to support it is immaterial, since the cover is also the first element in the spine.


Quote:
The file pointed to is not present after importing. Sigil disassembles the imported epub and creates the NCX, OPF etc on export. These files are not stored after they are imported.
Doesn't mean you can't keep an internal pointer to the file and output it in the generated OPF.
kovidgoyal is online now   Reply With Quote
Old 08-05-2009, 06:20 PM   #29
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by kovidgoyal View Post
Doesn't mean you can't keep an internal pointer to the file and output it in the generated OPF.
There is no "file". It's content is read, parsed and copied to an internal buffer along with the other OPS documents. Nothing of the original document remains.

But I did notice you completely ignored suggestions for a dialog that lets the user specify what is the cover image. The world is larger than calibre, too. A lot of epubs, if not the vast majority, will not have the guide element.

So let's make a deal: you make a dialog for specifying what is the cover image in the book in calibre, and I'll add WYSIWYG actions for specifying what is a cover page in Sigil (which will generate the guide element on export). Deal?

I think this works in the user's favor, no matter what the application.
Valloric is offline   Reply With Quote
Old 08-05-2009, 06:26 PM   #30
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sigh, whatever, I give up. I can see that getting Sigil to play well with calibre is not going to happen.

Probably faster for me to just make my own EPUB editor.
kovidgoyal is online now   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
Free Book (Kindle) - Periodic Table & Acupressure Guide koland Deals, Freebies, and Resources (No Self-Promotion) 0 09-15-2010 11:56 PM
Adding a <reference> item to <guide> in OPF file GRiker Sigil 2 04-12-2010 02:06 PM
EFF's guide to e-book buying & privacy grimo1re News 52 12-25-2009 09:17 PM
HTML, NCX & OPF --> MESS pakiyabhai Workshop 2 12-22-2009 11:43 AM
Can html2epub create the OPF & NCX files? Acey Calibre 4 11-17-2008 01:33 AM


All times are GMT -4. The time now is 03:57 AM.


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