07-05-2011, 06:47 PM | #1 |
Grand Sorcerer
Posts: 5,883
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
generating tocs
this seems odd to me. and hard to describe, too. here goes:
i convert to epub a nicely formatted file, but that doesn't have a toc with the express purpose of generating a toc. when i open the epub in sigil: 1. sometimes a toc appears in the right window (good, all done) 2. sometimes there's no toc in the right window, but there is one set up in the toc generator window. (tell it ok, good, all done) 3. sometimes neither of the above happen and i must tag the chhapter headings by hand. (slow and tedious, but ok, good, all done) 4. sometimes the same as #3 happens, but when i put my cursor next to the chapter heading text and click for a level, nothing happens. often this happens on odd numbered chapters whereas the even numbered ones create fine. |
07-05-2011, 07:33 PM | #2 |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
#3, Place the cursor in the Middle, then select header #
If the original code is a mish-mash of Spans and junk, I have sometime had to highlight the text and Select Remove formatting on the format menu |
07-05-2011, 09:26 PM | #3 |
Grand Sorcerer
Posts: 5,883
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
hmmm....
that's the odd thing, let's say chapter 1 (called simply '1') has accepted the status of a heading 2, but the code in '2' is exactly the same as was '1', but nothing happens when i choose heading 2 (or any other level). so there's because of the single character status of '2' there's no place we can call the middle. oddly also, i can save the epub and reopen it and then '2' will accept heading 2 status. or alternately i can go in a change the code manually.
|
07-05-2011, 09:49 PM | #4 | |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Yes, I have see Sigil not do things that it did fine the day before (or earlier in the book ) There is no 'pattern' to reproduce, so it can't be reported (with an expectation of other than 'Can't Duplicate') |
|
07-05-2011, 10:36 PM | #5 |
Grand Sorcerer
Posts: 5,883
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
hmmm...
well i'd like a demo of you placing the cursor anywhere except at the ends of a number 1!
|
07-05-2011, 11:22 PM | #6 | |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Make it 2 chars by adding a space in there But why not switch to CV and S&R? <p class="something">(\d+)</p> <h3 class="something">\1</h3> The something class sometimes centers and otherwise styles the heading, so I usually review and leave it in place |
|
07-06-2011, 12:10 PM | #7 | |
Grand Sorcerer
Posts: 5,883
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
er...CV and S&R?
Quote:
huh...search for a cover letter? i've stored your code snippet for future use. |
|
07-06-2011, 01:40 PM | #8 | |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
07-06-2011, 05:17 PM | #9 |
Grand Sorcerer
Posts: 5,883
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
yup
|
07-13-2011, 02:42 PM | #10 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: iPhone
|
The thing that drives me nuts about Sigil is that I would like to do the exact opposite. I would like to prevent it from generating a ToC. I've already gone through and edited the ToC file by hand, so that I have exactly what I want. Unfortunately, whenever I open the ePub in Sigil, it overwrites the old ToC and replace it with its own, based on the h1, h2, etc. codes. Is there any way I can suppress the ToC generation?
|
07-13-2011, 03:39 PM | #11 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Why would you like to prevent the TOC? If you don't want it, don't use it. On most readers you have specifically call up the TOC.
You can make an empty TOC though. If you bring up the TOC editor, you can indicate which chapter you don't want to have in your TOC. |
07-13-2011, 03:52 PM | #12 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: iPhone
|
What I'm saying is that Sigil keeps overwriting the .ncx file that I've manually modified to be in the structure that I like. One of the problems with using heading tags is that they also stylize the text, rather than just marking it.
|
07-13-2011, 04:48 PM | #13 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Firstly, you can set the heading styles to be whatever you want in the CSS--as "styled" or not as you choose. Anyone who's hand-crafting his ncx certainly knows how to do that, gotta be kid's play for you. Secondly, just from an html/css/epub/xhtml standard, when crafting epubs, people should think about what an element is, rather than what it looks like. I've lost track of how many crappy books I've seen because somebody used a heading style to create something that isn't a structural element. Not saying this is you--just using this as an opportunity to spout a bit about something irksome. Despite Microsoft's "hijacking" of headers 1-6 to be stylistic elements, rather than structural, headers still serve an actual structural purpose in a document/epub, and should be used for TOC's, IMHO. (This is not to say that one mightn't have other items, like a Table of Illustrations, that needs something else to create it...but I've found 6 header styles to be plenty even for the most complex book and TOC, myself, and we've done hundreds of books of all types). Thirdly, use Sigil in beta, 0.4-something, which gives you the option to keep your existing ncx or to create a new one from headers. It won't overwrite your carefully hand-crafted ncx unless you tell it to. Now, note: the beta is buggy; but it might work nicely for you, given your issue. HTH, Hitch |
|
07-13-2011, 06:28 PM | #14 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
To keep your old TOC while using the released 3.4 version of Sigil look here https://www.mobileread.com/forums/sho...d.php?t=117809
|
07-19-2011, 12:46 AM | #15 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: iPhone
|
Thanks very much, Hitch and DaleDe. I'll check out that software.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting TOCs at front of Kindle book? | TravellingTwo | Kindle Developer's Corner | 3 | 04-22-2011 12:48 AM |
best way to generate TOCs: 4 scenarios? | hapax legomenon | Workshop | 6 | 11-03-2008 06:21 PM |
Kindle Question 1: TOCs | brewt | Amazon Kindle | 2 | 07-29-2008 06:40 PM |
Are Nested TOCs Possible? | VikingDave | Sony Reader | 11 | 12-28-2007 07:58 PM |