Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2020, 03:22 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Editing TOC Text

I converted all Hx's to Upper and then Title Case using the Regex function from the User's manual after being reminded that it was there.

There were a few words that were not correct and required manual correction which I noticed when updating the TOC

1. Acronyms - "MRI" became "Mri" after the Title Case. Same for "UFOs" became "Ufos". (expected)

2. Heading text in Quotes - <h1>This is "Impossible"</h1> became <h1>This is "impossible"</h1> (lower case i)(unexpected)

3. These sorts of things ae easy to see in the TOC edit window, and I thought I could fix the source text by editing the TOC entry, since it says "Double click on an entry to change the text". BUT it only changes the TOC entry, not the source text.

Would seem to me that

a. The Title Case function should / could ignore leading non-letter characters, or at least puncuation

b. Editing the TOC text would also update the source text, or at least provide a way to jump to the source for the TOC entry

Thanks
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	188
Size:	18.8 KB
ID:	179402  

Last edited by phossler; 05-21-2020 at 05:07 PM.
phossler is offline   Reply With Quote
Old 05-21-2020, 11:22 PM   #2
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: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As far as I know, the titlecase function does ignore acronyms (all-upper case words). It does not ignore words in quotes, and its not clear to me it should.

As for editing source text, there is no such thing as source text. A toc entry could just point to a body tag aor an empty div, or not be the same as the heading text deliberately.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-22-2020, 10:44 AM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
1. Title Case does ignore acronyms unless everything is in Upper Case; then it title cases everything (which is ok since how would it know it's an acronym)

Agree that it should not ignore words in quotes (wasn't exactly what I meant)

However, it works differently if Smarten Punctuation has been run, since while it handles a leading ASCII 34 correctly, leading curly quotes have a different result (Before-Quotes.jpg and After-Quotes.jpg)


https://manual.calibre-ebook.com/edit.html#id18

2. When I do the above from the User Manual to get the green line and right click (TOC.jpg) I get options to [Reload], [Save Page], and [View Page Source], but I can't get anything to happen when I click them.

I was expecting that [View Page Source] would open the edit window to that point


3. TOC View (TOC View.jpg) does link to the edit window which conveniently allows me to fix/change the TOC source, but it's not clear what [Refresh] does.

[Edit] does open the TOC editor and I can rebuild/refresh using that
Attached Thumbnails
Click image for larger version

Name:	Before-Quotes.JPG
Views:	187
Size:	69.2 KB
ID:	179415   Click image for larger version

Name:	After-Quotes.JPG
Views:	191
Size:	69.6 KB
ID:	179416   Click image for larger version

Name:	TOC.JPG
Views:	200
Size:	150.6 KB
ID:	179417   Click image for larger version

Name:	TOC View.JPG
Views:	193
Size:	144.5 KB
ID:	179418  
phossler is offline   Reply With Quote
Old 05-22-2020, 10:55 AM   #4
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: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1. I'm afraid I dont care enough about this. There is no well defined behavior for wordsin quotes, so the fact that it behaves differently for different types of quotes is not of great interest.

2. The right click menu is just accidental and shouldn't be there at all.

3. Refresh simpy reloads the ToC View, useful if you have edited the ncx/nav by hand.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing in TOC pane AlanHK Sigil 11 02-16-2018 01:28 AM
After editing TOC, ncx goes missing jackiegan Sigil 2 06-26-2014 06:05 AM
editing the autogenerated ToC BeccaPrice Sigil 9 06-10-2013 11:18 AM
Editing toc exaltedwombat Sigil 4 10-14-2012 01:57 PM
editing toc of a mobi thomass Kindle Formats 1 04-20-2011 08:44 AM


All times are GMT -4. The time now is 03:11 PM.


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