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

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 03-17-2024, 02:25 PM   #1
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
giude item "cover" displayed as "Title page"

Menu "Go to..." of ebook viewer displays guide item of type "cover" as "Title page". Even though guide item declares its own name (using title attribute). Moreover displayed name "Title page" is not factually correct (because cover != title page).

Guide section in toc.opf:
Code:
<?xml version="1.0" encoding="utf-8"?>
<package {...}>
  <metadata {...}>{...}</metadata>
  <manifest>{...}</manifest>
  <spine toc="ncx">{...}</spine>
  <guide>
    <reference type="cover" title="Obálka" href="Text/cover.xhtml"/>
    <reference type="title-page" title="Titulní strana" href="Text/title-page.xhtml"/>
    <reference type="text" title="Text" href="Text/chapter1.xhtml"/>
    <reference type="colophon" title="Tiráž" href="Text/imprint.xhtml"/>
  </guide>
</package>
Go to... menu:


Guide items of type "title-page", "text" and "colophon" are displayed (as expected) under their names, as declared in corresponding title attributes ("Titulní strana", "Text", "Tiráž").
Guide item of type "cover" is displayed as "Title page" (expected name: "Obálka").
And, which probably is not intentional either, as last in list. (Expected order would be either order of items in guide section, or order of target positions in document reading order definition...)

Calibre 7.7 (just for info, behaviour is not specific for this Calibre version)
epub attached
Attached Files
File Type: epub Baj.epub (557.3 KB, 37 views)

Last edited by quinta@ebf.cz; 03-17-2024 at 02:28 PM.
quinta@ebf.cz is offline   Reply With Quote
Old 03-17-2024, 04:42 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,873
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
One item is how did you generate a toc.ncx with every src changed to scr for all the pagelist entries?

Then there are the two pairs of entries pointing to the same target. Again, this is not valid.
Code:
  <navPoint id="navPoint1" playOrder="1">
    <navLabel><text>Báj</text></navLabel>
    <content src="Text/cover.xhtml"/>
  
    <navPoint id="navPoint2" playOrder="2">
      <navLabel><text>obálka</text></navLabel>
      <content src="Text/cover.xhtml"/>
    </navPoint>
Code:
  <navPoint id="navPoint33" playOrder="33">
    <navLabel><text>Báj</text></navLabel>
    <content src="Text/afterword.xhtml"/>
  
    <navPoint id="navPoint34" playOrder="34">
      <navLabel><text>doslov (Jaroslav Putík)</text></navLabel>
      <content src="Text/afterword.xhtml"/>
    </navPoint>
I would suggesting correcting these errors and then testing the epub again.
DNSB is offline   Reply With Quote
Advert
Old 03-18-2024, 12:36 AM   #3
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: 44,024
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In the EPUB2 guide there must be only one guide entry of type cover that points to the actual cover image and one entry of type titlepage that points to the actual HTML file that displays that cover. Any other setup gets forced into this form by calibre's EPUB2 input processing. The viewer (and indeed all of calibre) require this for various kinds of further processing they do.
kovidgoyal is online now   Reply With Quote
Old 03-18-2024, 03:48 AM   #4
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
Quote:
Originally Posted by DNSB View Post
One item is how did you generate a toc.ncx with every src changed to scr for all the pagelist entries?
Excelent observation! Page list was generated just for testing purposes, and probably would be abandoned as "not working"... (Calibre editor "Check book" function does not anounce any errors...) Well, now page list testing can start from zero again... My feelings are mixed.
Anyway, removing pageList section from ncx did not affect guide "cover" issue.

Quote:
Originally Posted by DNSB View Post
Then there are the two pairs of entries pointing to the same target. Again, this is not valid.
Pairs of navPoints pointing to the same target are intentional. They are part of TOC solution...
Anyway, removing "duplicate src" navPoints from navMap did not affect guide "cover" issue.

Thank you very much for suggestions.
quinta@ebf.cz is offline   Reply With Quote
Old 03-18-2024, 06:16 AM   #5
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
In the EPUB2 guide there must be only one guide entry of type cover that points to the actual cover image and one entry of type titlepage that points to the actual HTML file that displays that cover. Any other setup gets forced into this form by calibre's EPUB2 input processing. The viewer (and indeed all of calibre) require this for various kinds of further processing they do.
I think I have never seen guide item of type "titlepage". As far as I know, Calibre generates just one guide item (as can be seen e.g. in conversion from docx) . It is of type "cover", and is pointing to file (containing cover image):
Code:
  <guide>
    <reference type="cover" href="titlepage.xhtml" title="Cover"/>
  </guide>
(Also there is nothing as type "titlepage" in EPUB2 standard. There is mentioned type "title-page" there...): https://idpf.org/epub/20/spec/OPF_2....htm#Section2.6

In any case, Calibre _can_ successfuly process other types of guide items (other then of type "cover"): they are added as fully functional items into "Go to..." menu in Veiwer. As you can see in attached epub. Actually only guide item of type "cover" is processed in "wrong" way... Probably because of its special role in Calibre.

Just tested: When the type "cover" is simply replaced with "something else", menu is generated perfectly. Of course this is not a good solution; readers can expect type "cover", and probably even Calibre would miss type "cover" in some situations.
Code:
<guide>
  <reference type="cover-dummy" title="Obálka" href="Text/cover.xhtml"/>
  <reference type="title-page" title="Titulní strana" href="Text/title-page.xhtml"/>
  <reference type="text" title="Text" href="Text/chapter1.xhtml"/>
  <reference type="colophon" title="Tiráž" href="Text/imprint.xhtml"/>
</guide>
One more note: Phrase "title page" (in file name "titlepage.xhtml", or in menu item name "Title page") from my opinion is in Calibre used in wrong context. Phrase "title page" is in book terminology used for different book part than "cover". (Ok, cover can be in some cases identified as title page. But typically "title page" is page inside of book, it si a part of book front matter...). Of course, name of file "titlepage.xhtml" is many years old Calibre convention, and there would not be good idea to change it. Anyway should be taken into account that "titlepage.xhtml" actually is not "title page". Its "cover"...
quinta@ebf.cz is offline   Reply With Quote
Advert
Old 03-18-2024, 06:34 AM   #6
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: 44,024
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
*If* you use titlepage it must point to the cover HTML. If you use something else feel free to use whatever. And covers in the calibre viewer are always at the start so there is no use for a cover item in go to
kovidgoyal is online now   Reply With Quote
Old 03-18-2024, 07:15 AM   #7
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
*If* you use titlepage ...
What exactly is meant by the word "titlepage" here?
quinta@ebf.cz is offline   Reply With Quote
Old 03-18-2024, 11:21 PM   #8
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: 44,024
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by quinta@ebf.cz View Post
What exactly is meant by the word "titlepage" here?
An entry in the guide of type="titlepage". THese are used internally by calibre to point to the html file that hosts the cover image.
kovidgoyal is online now   Reply With Quote
Old 03-19-2024, 05:53 AM   #9
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
Still confused. Wasn't the word "titlepage" typing error? Didn't you mean
Quote:
entry in the guide of type="cover"
?
Code:
  <guide>
    <reference type="cover" href="titlepage.xhtml" title="Cover"/>
  </guide>
quinta@ebf.cz is offline   Reply With Quote
Old 03-19-2024, 06:18 AM   #10
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: 44,024
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
cover refers to the actual IMAGE. titlepage refers to the HTML file that displays the image.
kovidgoyal is online now   Reply With Quote
Old 03-19-2024, 12:21 PM   #11
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 946
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
In the EPUB2 guide there must be only one guide entry of type cover that points to the actual cover image and one entry of type titlepage that points to the actual HTML file that displays that cover. Any other setup gets forced into this form by calibre's EPUB2 input processing. The viewer (and indeed all of calibre) require this for various kinds of further processing they do.
Quote:
Originally Posted by kovidgoyal View Post
cover refers to the actual IMAGE. titlepage refers to the HTML file that displays the image.
Hi, Kovid.

According to EPUB2 specification, the Guide section says that:
Code:
Each reference must have an href attribute referring to an OPS Content Document included in the manifest, and which may include a fragment identifier
Now, it also defines:
Code:
OPS CONTENT DOCUMENT:
An XHTML, DTBook, or Out-Of-Line XML Island that conforms to this specification that may legally appear in an OPF Package Document spine element.
An entry pointing directly to the image file doesn't seem to be valid. Also, the cover image file is already marked in the Metadata section:
Code:
<meta name="cover" content="cover_image_file_id"/>
The specification also defines the types "cover" and "title-page":
Code:
cover: the book cover(s), jacket information, etc.
title-page: page with possibly title, author, publisher, and other metadata
The "title-page" type is very well defined, and does not refer to the cover page. Now, the "cover" type might be a little misleading, as it does not use the word 'page', but the that is implied by the other definitions (OPS Content Document).

The thing is calibre treats "title-page"/"titlepage" as equivalent to "cover". This happens not only in the Guide section, but also when adding a cover page using the Editor, Polish or Conversion.
thiago.eec is offline   Reply With Quote
Old 03-19-2024, 03:34 PM   #12
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
I am browsing available (Calibre related) epub files. And actually cannot find any guide item "titlepage"... But Calibre surely have to be related into it somehow: simply because guide item "titlepage" do not generate "Go to..." menu item (unlike any other guide item type).

On the other hand, what I can see everywhere is guide item "cover", but pointing on html (not image)...:
Code:
  <guide>
    <reference type="cover" href="titlepage.xhtml" title="Cover"/>
  </guide>
Such markup is generated e.g. during conversion from docx, or using (right click) menu item "Mark filename.xhtml as cover page" in editor...

I would sware I before met information that guide item "cover" can be used to identify cover image file (besides of second method via manifest/meta[@name="cover"] etc.)... But now, I can't find such info again. Just examples of cover item pointing to html file...:
https://epubsecrets.com/where-do-you...e-opf-file.php
https://wiki.mobileread.com/wiki/Ebook_Covers
quinta@ebf.cz is offline   Reply With Quote
Old 03-19-2024, 07:34 PM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,873
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Unless you want to try placing the cover image file in the guide's loi item (list of illustrations), there is no way to point a guide item to the cover image. cover points to the xhtml file that displays the cover image which is normally cover.xhtml and can also point to a jacket file, etc. but again all xhtml files. The title-page item points to an xhtml file with possibly title, author, publisher, etc. other metadata.

Of course, the guide is deprecated in ePub3 where you use the landmark items in the xhtml navigation documents.
DNSB is offline   Reply With Quote
Old 03-19-2024, 07:42 PM   #14
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 946
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by DNSB View Post
Unless you want to try placing the cover image file in the guide's loi item (list of illustrations), there is no way to point a guide item to the cover image. cover points to the xhtml file that displays the cover image which is normally cover.xhtml and can also point to a jacket file, etc. but again all xhtml files. The title-page item points to an xhtml file with possibly title, author, publisher, etc. other metadata.

Of course, the guide is deprecated in ePub3 where you use the landmark items in the xhtml navigation documents.
Well, that was basically my point.
thiago.eec is offline   Reply With Quote
Old 03-20-2024, 05:34 AM   #15
quinta@ebf.cz
Connoisseur
quinta@ebf.cz began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
Term "titlepage" in Calibre manual:
Quote:
Originally Posted by Editing ebooks -> The file browser
Many files have special meaning, in the book. These will typically have an icon next to their names, indicating the special meaning. For example, in the picture to the left, you can see that the files cover_image.jpg and titlepage.xhtml have the icon of a cover next to them, this indicates they are the book cover image and titlepage.
https://manual.calibre-ebook.com/edi...e-file-browser

Quote:
Originally Posted by Editing ebooks -> Marking the cover
EPUB files has the concept of a titlepage. A title page is a HTML file that acts as the title page/cover for the book
https://manual.calibre-ebook.com/edi...king-the-cover
quinta@ebf.cz 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
Use "short" instead of "full" title for title sort & renaming? wolpi Library Management 2 08-04-2016 05:25 PM
A warning for Linux users: slow "Add Books", "Unknown" title and Author rolgiati Library Management 8 07-24-2013 04:36 PM
Title page does not "translate" as TOC item Caleń0 Sigil 19 10-19-2012 11:42 AM
Title page does not "translate" as TOC item Caleń0 Conversion 3 10-18-2012 08:11 PM


All times are GMT -4. The time now is 11:26 AM.


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