Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2016, 06:33 PM   #1
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Epub3 and TOC and calibre Editor

For info: my 'production calibre' is currently v2.58 but I can also run from source v2.59.

Regarding TOC and EPUB3 ... If an epub is marked as EPUB3 (in <package> attribute version) but it has previously had its TOC nav.xhtml manually removed (whether this be right or wrong) but DOES have a TOC NCX - what is supposed to happen when you open that epub in the calibre Editor, the TOC editor and the Viewer?

When running from source v2.59:
My observation is that when the 'nav-less epub3' is opened in the Editor, the TOC panel is empty. The TOC editor also shows as empty even though I know the NCX is correct. Opening the same epub in the Viewer shows the TOC correctly.

When running v2.58: the 'nav-less epub3' shows the TOC correctly in all three, Editor, TOC editor and Viewer.

I make no judgement on whether v2.59 is correct or not but if this is the way it's going to be from here onwards I'd like to know because I'll need to do some (maybe a lot) of remedial work to fix my nav-less epub3s.

I tried a quick test of manually changing the opf <package> version attribute from 3.0 to 2.0 then save/reopen. At first glance this appears to fix the immediate problem but it may not be the sensible fix.

Thoughts, please.

Last edited by jackie_w; 06-22-2016 at 06:51 PM.
jackie_w is offline   Reply With Quote
Old 06-22-2016, 07:12 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Kovid is currently working on various bits and pieces of basic EPUB3 (metadata) support. See the Changelog for v2.59 which included some EPUB3 Nav support, and various

I doubt it is deliberate, whatever the problem is.

I don't do EPUB3 so I can't test it... but do you see the same problem when you checkout the v2.59.0 release tag? Or did this occur in between v2.59.0 and HEAD?

Last edited by eschwartz; 06-22-2016 at 07:15 PM.
eschwartz is offline   Reply With Quote
Old 06-22-2016, 07:24 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by eschwartz View Post
Kovid is currently working on various bits and pieces of basic EPUB3 (metadata) support. See the Changelog for v2.59 which included some EPUB3 Nav support, and various

I doubt it is deliberate, whatever the problem is.
I don't have a copy of 'production v2.59' just the 'run from source' version which I updated a couple of hours ago. I saw the What's New section for 2.59 which is why I raised the issue because I assumed the EPUB3/TOC stuff was a completed new feature.

Quote:
Originally Posted by eschwartz View Post
Or did this occur in between v2.59.0 and HEAD?
I'd answer this if I understood the question
jackie_w is offline   Reply With Quote
Old 06-22-2016, 08:04 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Test the tagged release version:
Code:
git checkout v2.59.0
Get back to the latest source:
Code:
git checkout master
In "git" speak the HEAD ref refers to "whichever commit you are currently on". Which is generally the master branch.
eschwartz is offline   Reply With Quote
Old 06-22-2016, 08:22 PM   #5
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: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC the ToC detection for EPUB 3 should handle nav less files correctly (although such files are invalid as per the epub 3 spec). If that is not the case, attach one of these files and I will look into it.
kovidgoyal is offline   Reply With Quote
Old 06-22-2016, 08:40 PM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kovidgoyal View Post
IIRC the ToC detection for EPUB 3 should handle nav less files correctly (although such files are invalid as per the epub 3 spec). If that is not the case, attach one of these files and I will look into it.
Attached is a scrambled EPUB3 with its nav.xhtml intact.

To reproduce the problem:
  • Open in Editor. TOC pane looks OK.
  • Run Check - shows 'The file nav.xhtml is not referenced'
  • Delete nav.xhtml from Miscellaneous section.
  • Re-run Check - No errors. Editor's TOC pane still looks OK.
  • Save file. Re-open file in Editor or TOC editor. TOC pane empty.
Attached Files
File Type: epub EPUB3_with_nav_scrambled.epub (1.18 MB, 514 views)
jackie_w is offline   Reply With Quote
Old 06-22-2016, 08:52 PM   #7
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: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...d853bcb927c84e
kovidgoyal is offline   Reply With Quote
Old 06-22-2016, 09:45 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Thank you

I see a missing nav now gives a level 3 error, so I won't be deleting any more nav files.
jackie_w is offline   Reply With Quote
Old 06-23-2016, 11:03 AM   #9
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@kovid, Just a follow-up...

To fix the nav-less epub3's I can use the convenient new feature of opening the TOC editor and saving which will create a new nav file, nav.html

A new line is added to the OPF manifest
Code:
<item href="nav.html" id="nav" media-type="text/html" properties="nav"/>
However, running a Check immediately afterwards shows
Code:
WARNING: The file nav.html is not referenced****[nav.html]
WARNING: The file nav.html has a mimetype that does not match its extension****[package.opf]
I'm not particularly bothered about the first WARNING but I feel a compulsion to run auto-fix to correct the second which changes the manifest item media-type to
Code:
<item href="nav.html" id="nav" media-type="application/xhtml+xml" properties="nav"/>
Is it possible to create the nav file with the correct media-type, please?
jackie_w is offline   Reply With Quote
Old 06-23-2016, 11:11 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: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...109683a3a624b0
kovidgoyal is offline   Reply With Quote
Old 06-23-2016, 11:45 AM   #11
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Thanks
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bug - Calibre 2.51, Win10 x64] ToC Editor cannot move titles Katsunami Calibre 19 02-14-2016 11:49 PM
GUI Ideas for ePub3 MetaData Editor KevinH Sigil 3 12-02-2015 01:58 PM
Editor: ToC Editor: Start entry macnab69 Editor 2 06-25-2014 11:15 AM
Book Editor TOC Editor Isue? weberr Editor 2 04-17-2014 11:13 AM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM


All times are GMT -4. The time now is 12:50 AM.


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