View Single Post
Old 07-06-2020, 12:28 PM   #43
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 179
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
Quote:
Originally Posted by slowsmile View Post
@Mister L...I've just downloaded the plugin again and tried it out on 3 different epubs and it worked fine. It uses the file headings from the toc.ncx file to find the xhtml file headings. When I tested the plugin, it always found the xhtml headings and always inserted the title attribute with the correct NCX heading name without a problem.
Arg, I downloaded it again just to be sure and reinstalled it but it still didn't add any titles at all.

I set a checkpoint to compare the before and after, it appears to modify the indentations of all the tags and unexpectedly moved around a few unrelated things in the doctype but I don't see any modifications to the titles.

Here's a screencap of the diff of one file.

Quote:
Originally Posted by slowsmile View Post
Things to try:

1. Download the plugin again. I did hurriedly change it a couple of times after initially uploading over small things that I wasn't happy with in the plugin. So I changed the plugin and re-uploaded several times. Trouble is I don't know when you downloaded the plugin. So best to download the plugin again to be sure that you have the latest working version. I'm sorry about that but I was tired of making new plugins versions for every small plugin change.
No worries. I downloaded and installed again just to be sure.


Quote:
Originally Posted by slowsmile View Post
2. Before you run the plugin you should always generate a new epub NCX file by using Tools > Table of Contents > Generate Table of Contents. Doing that will make sure that all the appropriate and correct html headings(containing any h1 to h6 tags) will be in the toc.ncx file. Then try running the plugin after that. Basically what I'm saying here is that if you have no heading names in your toc.ncx file then the plugin won't be able to find any headings in the xhtml files.
Good god no this is absolutely what you should NOT do!! The reason for the plugin is to preserve the titles from the existing toc BEFORE you regenerate the toc! I need this plugin for the files where the toc has been modified by hand and cannot be regenerated automatically without significant losses. If you regenerate the toc before you run the plugin, then you've already lost all the previous formatting that you wanted to keep thanks to the plugin! The ncx is definitely populated with the correct heading names, however they do not match the headings in the html files. That's why I want to copy them from the ncx back to the html files, before making any changes which require regenerating the toc.

Quote:
Originally Posted by slowsmile View Post
3. Last point, be sure that you don't have any double quotes or apostrophe's in your NCX headings. In test I found the ''' html entity in an NCX heading name with an apostrophe. That html entity will prevent that heading being found using my plugin. I got this problem despite having no entries in Edit > Preferences > Preserve Entities(which surprised me). Also neither the Reformat > Mend.. nor Mend and prettify... will fix that html entity problem in the NCX file but you can fix it easily enough by manually deleting the html entity and re-typing the apostrophe as proper text into the relevant NCX heading name.
There are some apostrophes but all as Unicode characters, no html entities at all in the ncx.

Quote:
Originally Posted by slowsmile View Post
...And I promise no further plugin changes until after I get your next reply...


Would it help you if I gave you my sample file to use as a test case? Then you could see exactly the conditions I am talking about. I can't give it to you as it is because of copyright but maybe if I make an extract of just a few chapters and borkify the text that seems like it should be okay.
Attached Thumbnails
Click image for larger version

Name:	diff.png
Views:	532
Size:	104.7 KB
ID:	180440  
Mister L is offline   Reply With Quote