12-21-2013, 03:00 PM | #1 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
ToC Editor functions
@kovid,
This isn't strictly-speaking about the ebook Editor but the TOC Editor, but as they are so closely related, I hope I can get away with it whilst editing functionality is still fresh in the mind
|
12-21-2013, 03:51 PM | #2 | |
Well trained by Cats
Posts: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
This may be a common problem ( I have seen it other places) Not Tested Try changing it to Lower First, Then do whatever case trick. |
|
Advert | |
|
12-21-2013, 05:00 PM | #3 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
There isn't a 'change to lowercase' option in the ToC Editor, is there?
As you say, I have seen lots of software where the Title Case feature is flawed, e.g. AUTHOR’S NOTE gets changed to Author’S Note, but I haven't seen a 'no change' one before. Whilst giving the ebook Editor a good working over this week, I've been cleaning up a lot of Scandinavian crime novels, so this particular bug-ette has appeared quite a lot. |
12-21-2013, 11:58 PM | #4 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1) https://github.com/kovidgoyal/calibr...e5594270233db6
2) Sure, open a bug report for it so I dont forget |
12-22-2013, 12:31 AM | #5 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
For #2: Sigil uses the title attribute to override the title in the ToC.
|
Advert | |
|
12-22-2013, 12:56 AM | #6 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
12-22-2013, 01:00 AM | #7 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
12-22-2013, 01:01 AM | #8 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
12-22-2013, 01:18 AM | #9 | |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Sigil likes to remember any tweaks in the Generate ToC process so as to save you the bother next time. I think it's nice. And I checked it out, Sigil does NOT read the alt tag when generating the ToC. |
|
12-22-2013, 01:29 AM | #10 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Why would you generate the toc more than once? Sigil's toc editor is rather underpowered and it can only generate tocs from headings/files, which is what makes all that rigamarole necessary. In calibre, you generate the toc once and if you later need to make changes to it, you do it in the very capable toc editor.
|
12-22-2013, 01:35 AM | #11 | |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
I suppose alt attribute makes a lot more sense here, since it should be there anyway to let people know there's a chapter there. Or just bulk rename. I couldn't see the forest for all the trees in the way. |
|
12-22-2013, 06:25 AM | #12 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Last edited by kovidgoyal; 12-22-2013 at 06:31 AM. |
12-22-2013, 09:38 AM | #13 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@kovid,
Fantastic I look forward to trying both of them next Friday. What's particularly impressive is that could add item #2 in only 9 lines of code! The power of a well-designed application, I guess. I wonder who did that |
12-22-2013, 09:45 AM | #14 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I've learned a lot in the last seven years of working on calibre. The code I write now is a lot tighter than it used to be. For instance, the entire Edit Book feature (apart from the code to explode and rebuild azw3) is only 11K lines.
|
12-22-2013, 11:20 AM | #15 |
Well trained by Cats
Posts: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Kovid
Sigil's feature of using title="Alternate Title", WHEN PRESENT, seems reasonable -- A chapter heading: Chapter 1 with a subheading (possibly with different CSS styling) on a second line: Lost in the Code I have used so REGEX to construct the title="\1 : \2", which Sigil picked up in the TOC generation Chapter 1 : Lost in the Code -- When using Image based titles. As you noted using alt= is probably not a great idea as there may be lots of other images that don't belong in the TOC but still have an alt= Using the sometimes hidden: <h3 title="Chapter 1"> </h3> is a easy workaround for a mixed methods book In all case, my preference is towards helper tools rather than fully automatic features. I frequently regenerate a TOC (until I get it just right! ). This may be why I lean towards using the single markup method |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Toc Editor alteration | brewt | Sigil | 5 | 09-05-2012 09:24 PM |
Sigil Toc editor | Enesco | Sigil | 16 | 09-23-2010 07:41 AM |
How does the TOC editor work? | Kivgaen | Sigil | 31 | 06-25-2010 11:28 AM |
Problem with TOC editor | alecE | Sigil | 2 | 10-29-2009 02:30 AM |
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 02:25 PM |