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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2018, 10:30 AM   #1
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 475
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
<docTitle> and <dc:title>

I start most of my epubs by copying an existing file and then replacing text, images, etc, especially when they're in a series.

So I started with "Old Title" (an epub2) and was making "New Title".
Imported new text and images then did a TOC, then edited the metadata.

All looked fine. Searched for "Old Title" in the html and the OPF; no mentions left.

I went to ePub3-itizer to make a file for iBooks. It wanted to save the file as "Old Title-epub3.epub". Of course I could rename it, but I wondered where the hell it was getting that name from.

The OPF:
<dc:title>New Title</dc:title>

I used Sigil's tool Metadata editor, changed the title (which as expected, changed the above line in OPF); still ePub3-itizer thought it was "Old Title".

Of course, there was one file I hadn't looked in: the NCX. And there it was:

<docTitle>
<text>Old Title</text>
</docTitle>


So:
1) Why is this here at all? What uses this, aside from ePub3-itizer?
2) Why doesn't the Metadata editor update <docTitle> as well as the OPF <dc:title>?
And/or show there is a discrepancy?

Neither the "Well-Formed Check" nor Epubcheck raises a flag at them mismatching

I found that if I used Tool/Generate TOC, the title was updated in the NCX to match the OPF. But also of course it would make a completely new TOC, and I'd lose any manual edits. But I would not even have known it was necessary if ePub3-itizer hadn't brought it to my attention, since I always use the TOC editor rather than the code directly.

Last edited by AlanHK; 12-11-2018 at 11:53 AM.
AlanHK is offline   Reply With Quote
Old 12-11-2018, 12:12 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,171
Karma: 6101597
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by AlanHK View Post
Of course, there was one file I hadn't looked in: the NCX. And there it was:

<docTitle>
<text>Old Title</text>
</docTitle>


So:
1) Why is this here at all? What uses this, aside from ePub3-itizer?
Looks like <docTitle> in the NCX was a carryover from DTBook:

https://web.archive.org/web/20170601...5.html#NCXElem

Quote:
<docTitle>
Description: The title of the document, presented as text and, optionally, in audio or image renderings, for presentation to the reader.
Declaration: <!ELEMENT docTitle (text, audio?, img?)>
Syntax: <docTitle ...attributes... > ...content... </docTitle>
Attributes:
id (ID, IMPLIED): Optional unique identifier.
Valid inside: <ncx>
Comments: There is no required relationship between the content of docTitle in the NCX and the content of the doctitle element in the textual content file, if it exists.
Quote:
Originally Posted by AlanHK View Post
Neither the "Well-Formed Check" nor Epubcheck raises a flag at them mismatching
If you read that Comment above, the specs say <docTitle> doesn't necessarily have to match.

And according to the MobileRead Wiki page on NCX:

Quote:
For DTBook (but not needed for ePub) a title similar to the entry shown above in the TOC section will be shown for the Document Title and Document Author could also be shown. The author entry can be repeated if there is more than one author.

Code:
<docTitle><text>The Book Title</text></docTitle>
<docAuthor><text>The Authors name</text></docAuthor>
I assume DTBook readers use this info, or these entries would be be used by EPUB->DAISY tools.

Quote:
Originally Posted by AlanHK View Post
I found that if I used Tool/Generate TOC, the title was updated in the NCX to match the OPF. But also of course it would make a completely new TOC, and I'd lose any manual edits.
You could also use Tools > Table of Contents > Edit Table of Contents.

This wouldn't regenerate a TOC based on the book's <h#>, but runs some basic cleanup on the toc.ncx file (along with updating the <docTitle>).

(What sort of manual edits are you making in the toc.ncx in the first place?)

Last edited by Tex2002ans; 12-11-2018 at 12:15 PM.
Tex2002ans is offline   Reply With Quote
Old 12-12-2018, 01:10 AM   #3
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 475
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by Tex2002ans View Post
If you read that Comment above, the specs say <docTitle> doesn't necessarily have to match.
I didn't say they did.
But not matching can only lead to problems, as I encountered.

Quote:
Originally Posted by Tex2002ans View Post
You could also use Tools > Table of Contents > Edit Table of Contents
That's useful. I thought I had to "Generate" a new one to fix it.

Which makes the Metadata Editor's failure to update the title in the NCX seem even odder.

Quote:
Originally Posted by Tex2002ans View Post
(What sort of manual edits are you making in the toc.ncx in the first place?)
For instance, combining different level heads (e.g., Title and Author, h2 and h3).
AlanHK is offline   Reply With Quote
Old 12-12-2018, 12:26 PM   #4
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 3,299
Karma: 1958102
Join Date: Nov 2009
Device: many
There is no failure in the metadata editor. It works as designed for editing the metadata tag contents inside the OPF. If you want to edit the NCX or the TOC, use those features.

By the way, under epub3, you can supply many different dc:title metadata elements so using that to update the ncx or toc makes little sense.

Quote:
Originally Posted by AlanHK View Post
I didn't say they did.
But not matching can only lead to problems, as I encountered.


That's useful. I thought I had to "Generate" a new one to fix it.

Which makes the Metadata Editor's failure to update the title in the NCX seem even odder.


For instance, combining different level heads (e.g., Title and Author, h2 and h3).
KevinH is offline   Reply With Quote
Old 12-13-2018, 12:48 AM   #5
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 475
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by KevinH View Post
There is no failure in the metadata editor.
Don't take it personally.

Just a suggestion: as the TOC editor already silently updates the title in the NCX to match the OPF title, why not also do it in the Metadata editor? It IS metadata, just not in the OPF.

There is no earthly reason you would want them to be different, they were in my file only because I was unaware there was a title in the NCX at all.

Quote:
Originally Posted by KevinH View Post
By the way, under epub3, you can supply many different dc:title metadata elements so using that to update the ncx or toc makes little sense.
I'm mainly talking about epub2, in epub3 it's a legacy thing.

Anyway, in epub3, the "Generate NCX from NAV" tool does indeed create/change the <docTitle>entry in the NCX from the OPF <dc:Title>.
AlanHK is offline   Reply With Quote
Old 12-13-2018, 06:25 AM   #6
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: 20,126
Karma: 103978634
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by AlanHK View Post
Don't take it personally.
Stop with the passive-aggressive nonsense. Nothing Kevin said in his post even remotely suggested that he was taking anything personally. I on the other hand...
DiapDealer is online now   Reply With Quote
Old 12-14-2018, 12:49 AM   #7
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 475
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by DiapDealer View Post
Stop with the passive-aggressive nonsense. Nothing Kevin said in his post even remotely suggested that he was taking anything personally. I on the other hand...
I made a suggestion, it was seen as a criticism.

And when I try to explain that, you take offence. I was NOT trying to make a veiled attack. I'm not stupid enough to ask for help and insult the person at the same time. Put it down to lack of diplomacy, not malice.
AlanHK 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
Metadata Plugboard to change title of same-title books in series for Kobo Touch il_mix Library Management 5 03-15-2018 04:59 PM
RegEx-Putting pub. date after first sentence in title if two or more sentenced title font332 Library Management 0 08-17-2017 08:49 AM
Edit Book: Handling of 'umlaut' in <title>Wilde Schw�ne</title> chaot Editor 3 04-26-2016 12:34 PM
Title bulk edit match - to remove series info from title Rob557 Library Management 30 12-09-2014 06:06 AM
Pubit!/Add Title Previewer shows ellipsis in title bar schooner1892 General Discussions 0 09-15-2012 07:04 PM


All times are GMT -4. The time now is 07:22 AM.


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