Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-19-2012, 05:56 AM   #1
Tom Wiser
Junior Member
Tom Wiser began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: Sony
how to generate nested toc.ncx with more than 6 levels?

According to HTML (h1-h6) Sigil generats the toc.ncx up to 6 levels. But I need 9 levels (h1-h6, p.h7-p.h9). Is there any workaround to display this hierarchy in the ncx-file?
Tom Wiser is offline   Reply With Quote
Old 06-19-2012, 06:25 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
I cannot find a limit in the specification for the allowed number of nestings. So, 9 levels are possible (be aware that some reading systems will only show 2 or 3).
As you know, it is not possible by using the HTML headers. Usually it makes a lot of sense to use those headers, but for headers level 7 to 9 you need something else. You already mentioned that.
However, you have to do that manually. Sigil will only create a ToC with headers for several very good reasons. Levels 7 to 9 you have to add manually.
You might want to consider creating a separate XHTML as ToC with links and identify that in the metadata as being a ToC.
It would probably be possible to script with sed to automate this on Linux (outside Sigil), but I am no sed expert.

So, within Sigil you have to do it manually.
Toxaris is offline   Reply With Quote
Advert
Old 06-19-2012, 07:45 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You might use h6.h7-h6.h9 instead of p.h7-p.h9, that way at least Sigil would include them in the TOC, and then you only need to alter the nesting level (which I guess must be done manually).
Jellby is offline   Reply With Quote
Old 06-25-2012, 03:50 AM   #4
Tom Wiser
Junior Member
Tom Wiser began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: Sony
Thanks for the hints! h6.h7-h6.hx works fine. Although altering lots of nesting levels can be hard.
Tom Wiser is offline   Reply With Quote
Old 06-11-2017, 09:43 AM   #5
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Tom Wiser View Post
Thanks for the hints! h6.h7-h6.hx works fine. Although altering lots of nesting levels can be hard.
Ich versteh das nicht so genau. Wo in Sigil muss ich diese h6.h7-h6.hx eintragen? Kann mir das jemand an einem beispiel zeigen?

Ja, ich habe auch manchmal Bücher mit mehr als 6 Stufen. Wäre toll, wenn man das wenigstens manuell machen könnte. Ein plugin wäre auch ne Idee. Aber davon kann man wohl träumen.
Also english versteh ich natürlich schon. Wenn jemand english antwortet, das ist ok.
famfam is offline   Reply With Quote
Advert
Old 06-11-2017, 09:55 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by famfam View Post
Ich versteh das nicht so genau. Wo in Sigil muss ich diese h6.h7-h6.hx eintragen? Kann mir das jemand an einem beispiel zeigen?

Ja, ich habe auch manchmal Bücher mit mehr als 6 Stufen. Wäre toll, wenn man das wenigstens manuell machen könnte. Ein plugin wäre auch ne Idee. Aber davon kann man wohl träumen.
Also english versteh ich natürlich schon. Wenn jemand english antwortet, das ist ok.
English please.
JSWolf is offline   Reply With Quote
Old 06-11-2017, 11:49 AM   #7
KevinH
Sigil Developer
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
From Google Translate:

Quote:
Ich versteh das nicht so genau. Wo in Sigil muss ich diese h6.h7-h6.hx eintragen? Kann mir das jemand an einem beispiel zeigen?

Ja, ich habe auch manchmal Bücher mit mehr als 6 Stufen. Wäre toll, wenn man das wenigstens manuell machen könnte. Ein plugin wäre auch ne Idee. Aber davon kann man wohl träumen.
Also english versteh ich natürlich schon. Wenn jemand english antwortet, das ist ok.
I do not understand it so well. Where in Sigil do I have to enter this h6.h7-h6.hx? Can someone show me an example?

Yes, I also sometimes have books with more than 6 levels. Would be great, if one could make at least manually. A plugin would also ne idea. But one can dream of it.
So I understand, of course, already. If someone answers english, that is ok.

Last edited by KevinH; 06-11-2017 at 11:51 AM.
KevinH is offline   Reply With Quote
Old 06-11-2017, 12:03 PM   #8
KevinH
Sigil Developer
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
I think the basic idea is for anything you want to be equivalent to an h7, you make its tag an "h6" and add the attribute class="h7". For an equivalent to an "h8", you make the tag an "h6" and add class="h8", etc

You can then add css classes h7 and h8 to make the text appear smaller. When you build the toc, it will have every heading but you will have to manually edit it to properly nest those with the classes h7, h8, etc.

And in German from Google translate:
Quote:
Ich denke, die Grundidee ist für alles, was Sie wollen, um ein H7 gleich sein, Sie machen seinen Tag ein "h6" und fügen Sie die Attribut class = "h7". Für ein Äquivalent zu einem "h8", machst du das Tag ein "h6" und füge class = "h8", etc.

Sie können dann die CSS-Klassen h7 und h8 hinzufügen, um den Text kleiner zu machen. Wenn du den toc baust, wird es jede Überschrift haben, aber du musst es manuell bearbeiten, um die mit den Klassen h7, h8 usw. richtig zu verschachteln.

Last edited by KevinH; 06-11-2017 at 12:06 PM.
KevinH is offline   Reply With Quote
Old 06-12-2017, 09:47 AM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Sigil provides the make TOC tool that uses Headers as the key.

Calibre (the main GUI) and the Calibre editor, have a TOC tool that can use additional methods (or mixed criteria, just not in a single pass).
FWIW the Calibre editor is available from the commandline, so there is no need to put the book in the Library.

I use both Sigil and Calibre Editor. They do different things (and some of the same, just differently ) . Choose your tools, for the task at hand
theducks is offline   Reply With Quote
Old 06-12-2017, 12:01 PM   #10
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by famfam View Post
Where in Sigil do I have to enter this h6.h7-h6.hx? Can someone show me an example?
I'm assuming that Jellby referred to h6 tags with custom class names. For example:

Code:
<h6 class="h7">heading 7</h7>
<h6 class="h8">heading 8</h8> 
<h6 class="h9">heading 9</h6>
Of course, you'll need to define them in the main stylesheet. For example:

Code:
h6.h7 { 
    font-size: .67em;
}
 
h6.h8 { 
    font-size: .67em;
}
 
h6.h9 { 
    font-size: .67em;
}

Quote:
Originally Posted by famfam View Post
Yes, I also sometimes have books with more than 6 levels. Would be great, if one could make at least manually.
While (X)HTML only supports 6 headings, there doesn't seem to be a nesting limit as far as the IDPF is concerned and Sigil will also display more than 6 heading levels.
Since it's much easier to edit the TOC section of an epub3 nav document, you might want convert your epub2 book to an epub3 book with Sigil.

Here's an example epub3 nav doc TOC section with more than 6 headings:
Spoiler:
Code:
    <nav epub:type="toc" id="toc">
      <h1>Table of Contents</h1>
      <ol>
        <li>
          <a href="../Text/Section0001.xhtml">Heading 1</a>
          <ol>
            <li>
              <a href="../Text/Section0002.xhtml">Heading 2</a>
              <ol>
                <li>
                  <a href="../Text/Section0003.xhtml">Heading 3</a>
                  <ol>
                    <li>
                      <a href="../Text/Section0004.xhtml">Heading 4</a>
                      <ol>
                        <li>
                          <a href="../Text/Section0005.xhtml">Heading 5</a>
                          <ol>
                            <li>
                              <a href="../Text/Section0006.xhtml">Heading 6</a>
                              <ol>
                                <li>
                                  <a href="../Text/Section0007.xhtml">Heading 7</a>
                                  <ol>
                                    <li>
                                      <a href="../Text/Section0008.xhtml">Heading 8</a>
                                    </li>
                                  </ol>
                                </li>
                              </ol>
                            </li>
                          </ol>
                        </li>
                      </ol>
                    </li>
                  </ol>
                </li>
              </ol>
            </li>
          </ol>
        </li>
      </ol>
    </nav>

Of course you could also edit the toc.ncx file of an epub2 book.
For more information, see the attached epub2 and epub3 sample files.

In the future, please post German questions in the German MR forum or at least include a Google translated version of your post.
Attached Files
File Type: epub heading_test_epub2.epub (4.5 KB, 206 views)
File Type: epub heading_test_epub3.epub (5.0 KB, 178 views)

Last edited by Doitsu; 06-12-2017 at 02:04 PM.
Doitsu is offline   Reply With Quote
Old 06-15-2017, 05:50 AM   #11
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Thank you. That a first step. I experimented with the heading_test_epub2.epub. And I succeeded: I could add Heading 9, 10, 11 etc. and it looks well in the toc-table
But as KevinH mentioned:
<You can then add css classes h7 and h8 to make the text appear smaller. When you build the toc, it will have every heading but you will have to manually edit it to properly nest those with the classes h7, h8, etc.>
It seems to be tricky for me to do that with alternating levels like:
h1, h2, h3, h4, h5, h6, h7 ... h1, h2, h3, h3, ... h7, h7, h7, h8, h7, h7 etc.
Could you please make an example with more levels and more alternating ones?
I have a book with many levels and I tried to change the toc manually, but without succes with nested headings.
Must one do the whole toc manually or only change the levels over level 6?
famfam is offline   Reply With Quote
Old 06-15-2017, 11:53 AM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
If you use the approach recommended here the auto-toc ("Generate Table Of Contents Ctrl+T") function of Sigil will create a toc.ncx out of the following html example but all of your h6.hx tags will only be nested to the 6th level. You would need to manually adjust the nesting (as simple as highlighting and dragging into the previous navpoint). To nest varying levels would only require one to drag the lower-level navpoint inside the previous higher level navpoint.

example html:
Spoiler:
Code:
<body>
<h1>level 1</h1>
<h2>level 2</h2>
<h3>level 3</h3>
<h4>level 4</h4>
<h5>level 5</h5>
<h6>level 6</h6>
<h6 class="h7">level 7</h6>
<h6 class="h8">level 8</h6>
<h6 class="h9">level 9</h6>
<h5>level 5</h5>
<h4>level 4</h4>
<h3>level 3</h3>
<h2>level 2</h2>
</body>
The auto toc will detect all the hx tags up to level h6 as shown in the 1st attached image:

auto created .ncx:
Spoiler:
Code:
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
  <head>
    <meta name="dtb:uid" content="urn:uuid:bfea96a5-cd70-48c3-896b-c6861ae9b526"/>
    <meta name="dtb:depth" content="6"/>
    <meta name="dtb:totalPageCount" content="0"/>
    <meta name="dtb:maxPageNumber" content="0"/>
  </head>
  <docTitle>
    <text>[No data]</text>
  </docTitle>
  <navMap>
    <navPoint id="navPoint-1" playOrder="1">
      <navLabel>
        <text>level 1</text>
      </navLabel>
      <content src="Text/Section0001.xhtml"/>
      <navPoint id="navPoint-2" playOrder="2">
        <navLabel>
          <text>level 2</text>
        </navLabel>
        <content src="Text/Section0001.xhtml#sigil_toc_id_1"/>
        <navPoint id="navPoint-3" playOrder="3">
          <navLabel>
            <text>level 3</text>
          </navLabel>
          <content src="Text/Section0001.xhtml#sigil_toc_id_2"/>
          <navPoint id="navPoint-4" playOrder="4">
            <navLabel>
              <text>level 4</text>
            </navLabel>
            <content src="Text/Section0001.xhtml#sigil_toc_id_3"/>
            <navPoint id="navPoint-5" playOrder="5">
              <navLabel>
                <text>level 5</text>
              </navLabel>
              <content src="Text/Section0001.xhtml#sigil_toc_id_4"/>
              <navPoint id="navPoint-6" playOrder="6">
                <navLabel>
                  <text>level 6</text>
                </navLabel>
                <content src="Text/Section0001.xhtml#sigil_toc_id_5"/>
              </navPoint>
              <navPoint id="navPoint-7" playOrder="7">
                <navLabel>
                  <text>level 7</text>
                </navLabel>
                <content src="Text/Section0001.xhtml#sigil_toc_id_6"/>
              </navPoint>
              <navPoint id="navPoint-8" playOrder="8">
                <navLabel>
                  <text>level 8</text>
                </navLabel>
                <content src="Text/Section0001.xhtml#sigil_toc_id_7"/>
              </navPoint>
              <navPoint id="navPoint-9" playOrder="9">
                <navLabel>
                  <text>level 9</text>
                </navLabel>
                <content src="Text/Section0001.xhtml#sigil_toc_id_8"/>
              </navPoint>
            </navPoint>
            <navPoint id="navPoint-10" playOrder="10">
              <navLabel>
                <text>level 5</text>
              </navLabel>
              <content src="Text/Section0001.xhtml#sigil_toc_id_9"/>
            </navPoint>
          </navPoint>
          <navPoint id="navPoint-11" playOrder="11">
            <navLabel>
              <text>level 4</text>
            </navLabel>
            <content src="Text/Section0001.xhtml#sigil_toc_id_10"/>
          </navPoint>
        </navPoint>
        <navPoint id="navPoint-12" playOrder="12">
          <navLabel>
            <text>level 3</text>
          </navLabel>
          <content src="Text/Section0001.xhtml#sigil_toc_id_11"/>
        </navPoint>
      </navPoint>
      <navPoint id="navPoint-13" playOrder="13">
        <navLabel>
          <text>level 2</text>
        </navLabel>
        <content src="Text/Section0001.xhtml#sigil_toc_id_12"/>
      </navPoint>
    </navPoint>
  </navMap>
</ncx>
The auto created .ncx will appear as shown in the 2nd attached image.

manually corrected .ncx:
Spoiler:
Code:
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
  <head>
    <meta name="dtb:uid" content="urn:uuid:bfea96a5-cd70-48c3-896b-c6861ae9b526"/>
    <meta name="dtb:depth" content="6"/>
    <meta name="dtb:totalPageCount" content="0"/>
    <meta name="dtb:maxPageNumber" content="0"/>
  </head>
  <docTitle>
    <text>[No data]</text>
  </docTitle>
  <navMap>
    <navPoint id="navPoint-1" playOrder="1">
      <navLabel>
        <text>level 1</text>
      </navLabel>
      <content src="Text/Section0001.xhtml"/>
      <navPoint id="navPoint-2" playOrder="2">
        <navLabel>
          <text>level 2</text>
        </navLabel>
        <content src="Text/Section0001.xhtml#sigil_toc_id_1"/>
        <navPoint id="navPoint-3" playOrder="3">
          <navLabel>
            <text>level 3</text>
          </navLabel>
          <content src="Text/Section0001.xhtml#sigil_toc_id_2"/>
          <navPoint id="navPoint-4" playOrder="4">
            <navLabel>
              <text>level 4</text>
            </navLabel>
            <content src="Text/Section0001.xhtml#sigil_toc_id_3"/>
            <navPoint id="navPoint-5" playOrder="5">
              <navLabel>
                <text>level 5</text>
              </navLabel>
              <content src="Text/Section0001.xhtml#sigil_toc_id_4"/>
              <navPoint id="navPoint-6" playOrder="6">
                <navLabel>
                  <text>level 6</text>
                </navLabel>
                <content src="Text/Section0001.xhtml#sigil_toc_id_5"/>
                <navPoint id="navPoint-7" playOrder="7">
                  <navLabel>
                    <text>level 7</text>
                  </navLabel>
                  <content src="Text/Section0001.xhtml#sigil_toc_id_6"/>
                  <navPoint id="navPoint-8" playOrder="8">
                    <navLabel>
                      <text>level 8</text>
                    </navLabel>
                    <content src="Text/Section0001.xhtml#sigil_toc_id_7"/>
                    <navPoint id="navPoint-9" playOrder="9">
                      <navLabel>
                        <text>level 9</text>
                      </navLabel>
                      <content src="Text/Section0001.xhtml#sigil_toc_id_8"/>
                    </navPoint>
                  </navPoint>
                </navPoint>              
              </navPoint>
            </navPoint>
            <navPoint id="navPoint-10" playOrder="10">
              <navLabel>
                <text>level 5</text>
              </navLabel>
              <content src="Text/Section0001.xhtml#sigil_toc_id_9"/>
            </navPoint>
          </navPoint>
          <navPoint id="navPoint-11" playOrder="11">
            <navLabel>
              <text>level 4</text>
            </navLabel>
            <content src="Text/Section0001.xhtml#sigil_toc_id_10"/>
          </navPoint>
        </navPoint>
        <navPoint id="navPoint-12" playOrder="12">
          <navLabel>
            <text>level 3</text>
          </navLabel>
          <content src="Text/Section0001.xhtml#sigil_toc_id_11"/>
        </navPoint>
      </navPoint>
      <navPoint id="navPoint-13" playOrder="13">
        <navLabel>
          <text>level 2</text>
        </navLabel>
        <content src="Text/Section0001.xhtml#sigil_toc_id_12"/>
      </navPoint>
    </navPoint>
  </navMap>
</ncx>
The manually corrected .ncx will appear as shown in the 3rd attached image. (note: this is how it appears in Sigil - no guarantee how other devices/apps will display it)

Once the .ncx is manually corrected then you could use the "Create HTML Table Of Contents" tool from Sigil and it will create a correctly organized/tagged html file.

auto generated HTML-TOC:
Spoiler:
Code:
<body>
  <div class="sgc-toc-title">
    Table of Contents
  </div>

  <div class="sgc-toc-level-1">
    <a href="../Text/Section0001.xhtml">level 1</a> 

    <div class="sgc-toc-level-2">
      <a href="../Text/Section0001.xhtml#sigil_toc_id_1">level 2</a> 

      <div class="sgc-toc-level-3">
        <a href="../Text/Section0001.xhtml#sigil_toc_id_2">level 3</a> 

        <div class="sgc-toc-level-4">
          <a href="../Text/Section0001.xhtml#sigil_toc_id_3">level 4</a> 

          <div class="sgc-toc-level-5">
            <a href="../Text/Section0001.xhtml#sigil_toc_id_4">level 5</a> 

            <div class="sgc-toc-level-6">
              <a href="../Text/Section0001.xhtml#sigil_toc_id_5">level 6</a> 

              <div class="sgc-toc-level-7">
                <a href="../Text/Section0001.xhtml#sigil_toc_id_6">level 7</a> 

                <div class="sgc-toc-level-8">
                  <a href="../Text/Section0001.xhtml#sigil_toc_id_7">level 8</a> 

                  <div class="sgc-toc-level-9">
                    <a href="../Text/Section0001.xhtml#sigil_toc_id_8">level 9</a>
                  </div>
                </div>
              </div>
            </div>
          </div>

          <div class="sgc-toc-level-5">
            <a href="../Text/Section0001.xhtml#sigil_toc_id_9">level 5</a>
          </div>
        </div>

        <div class="sgc-toc-level-4">
          <a href="../Text/Section0001.xhtml#sigil_toc_id_10">level 4</a>
        </div>
      </div>

      <div class="sgc-toc-level-3">
        <a href="../Text/Section0001.xhtml#sigil_toc_id_11">level 3</a>
      </div>
    </div>

    <div class="sgc-toc-level-2">
      <a href="../Text/Section0001.xhtml#sigil_toc_id_12">level 2</a>
    </div>
  </div>
</body>

You would then need to manually change the additional levels to indent/format them further by adjusting the css file created for the html toc.("sgc-toc.css")

example sgc-toc.css:
Spoiler:
Code:
div.sgc-toc-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 1em;
    text-align: center; font-family:serif
}

div.sgc-toc-level-1 {margin-left: 0em;}

div.sgc-toc-level-2 {margin-left: 2em;}

div.sgc-toc-level-3 {margin-left: 4em;}

div.sgc-toc-level-4 {margin-left: 6em;}

div.sgc-toc-level-5 {margin-left: 8em;}

div.sgc-toc-level-6 {margin-left: 10em;}

/* Additional levels  */

div.sgc-toc-level-7 {margin-left: 12em;}
div.sgc-toc-level-8 {margin-left: 14em;}
div.sgc-toc-level-9 {margin-left: 16em;}


Of course, you would also have to style/format these classes in your regular css sheet so that they display properly within your document.

sample css:
Spoiler:
Code:
h1, h2, h3, h4, h5, h6 {display:block; text-align:center; text-indent:0; margin:1em 0; page-break-after:avoid; font-style:normal; font-weight:bold; font-family:sans-serif}

h1    {font-size:1.7em; margin-top:0; text-transform:uppercase}
h2    {font-size:1.4em; text-transform:uppercase}
h3    {font-size:1.3em}
h4    {font-size:1.1em; font-weight:normal; font-style:italic}
h5    {font-size:1.1em; font-style:italic}
h6    {font-size:1.1em}
h6.h7 {font-size:1.1em; text-decoration:underline}
h6.h8 {font-size:1.1em; text-decoration:underline; color:red}
h6.h9 {font-size:1.1em; text-decoration:underline; color:blue}


Cheers,
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	252
Size:	38.8 KB
ID:	157324   Click image for larger version

Name:	Capture2.JPG
Views:	210
Size:	18.1 KB
ID:	157325   Click image for larger version

Name:	Capture3.JPG
Views:	234
Size:	19.5 KB
ID:	157326  

Last edited by Turtle91; 06-15-2017 at 11:56 AM.
Turtle91 is offline   Reply With Quote
Old 06-16-2017, 08:53 AM   #13
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: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Just wondering what kind of book requires this many headings. Typically anything nested beyond 5 or 6 levels would be better organized in a different way.
Tex2002ans is offline   Reply With Quote
Old 06-16-2017, 09:17 AM   #14
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Tex2002ans View Post
Just wondering what kind of book requires this many headings. Typically anything nested beyond 5 or 6 levels would be better organized in a different way.
Anothe question is: What device (correctly) supports a TOC that deep?
theducks is offline   Reply With Quote
Old 08-20-2017, 09:35 AM   #15
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Tex2002ans View Post
Just wondering what kind of book requires this many headings. Typically anything nested beyond 5 or 6 levels would be better organized in a different way.
What you mean by better organized in a different way? When the book already has that many levels? I found one with easily 10 to 12 levels. Sure, thats not the rule, thats a special case. But shith happens. Befor you can better organize better the work of the author, you have to read hundreds of pages. And thats not enough. You even have to understand a complicated analytic text about other complicated texts. The best way seems, to accept the way, the author organized his text (for better understanding), in the first run. After that, you can trie to organize it better, if you've unterstood, what you've red.
But in the first run, we have to accept, what the author did, because, he normally understands better than his reader.

But again, how, do you think, could it be possible, to organize better a long text with 10 levels down to 6 levels? Any idea about that?

And a last question to sigil:
Whats the reason, to the 6 levels limitation? Is it so complicated to double the nummer auf levels? What is the problem? Sorry about my question, but I have no idea about that.
famfam is offline   Reply With Quote
Reply

Tags
ncx toc levels


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindler previewer not recognizing toc.ncx file, my html toc, or the start point... petercrowell Kindle Formats 2 05-01-2012 08:14 AM
Does Apple iBooks support nested TOC.ncx? st_albert ePub 5 08-24-2011 02:21 PM
Syntax for toc.ncx Levels 1 and 2? NewDay ePub 7 04-04-2011 04:09 PM
Use Regex to Code an Inline TOC, from an External TOC's .ncx File mostlynovels ePub 2 03-16-2011 12:15 PM
NCX creation -- nested or not, css classes illustrata ePub 3 08-25-2010 08:56 AM


All times are GMT -4. The time now is 10:23 PM.


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