MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Trying to make an Inline TOC (https://www.mobileread.com/forums/showthread.php?t=82867)

crutledge 05-07-2010 03:29 PM

Trying to make an Inline TOC
 
I am trying to implement an inline TOC in Sigil to use to build IMP and LRF files. Since each Chapter Heading already has an anchor for the Epub TOC, I have tried to link to them.


Link in Inline TOC
<div>
<a href="#Ch2"><span class="sgc-6">Chapter 2. The Beginning Of Troubles.</span></a>
</div>

Anchor in Chapter Heading
<h2 id="heading_id_2"><a id="Ch2">Chapter 2. The Beginning Of Troubles</a></h2>

CSS definition
span.sgc-6 {color: #000000}

After an entire morning trying to run this down, I'm bamboozeld. Where have I strayed from the path of virtue?:(

I imagine that the problem is multiple HTML files in the document but I don't know what to do.

Charlie

december 05-08-2010 06:47 PM

Unfortunately Sigil's only installed on my laptop, so I can't test the hypothesis from this public computer, but (assuming you have your chapter text in a different .xhtml "chapter" than the TOC itself) I think the problem lies in the ID specification. In other words, if I wanted the "#Ch2" tag to point to the "Ch2" anchor name, that would only work *within* the specific .xhtml page I'm working in (i.e., it only points to anchor tags within your TOC "chapter"). If you want to point to a different page outside the TOC, you'll need to specify the name of the file in which the anchor is located. Does that make sense?

I'd need to tinker with Sigil for a bit to figure out exactly how to specify that file path, but it's going to be a few days before final exams are over and I'll have time to play in earnest. If nobody else has answered here with a solution by then, I'll definitely let you know what I found.

crutledge 05-09-2010 06:46 AM

1 Attachment(s)
Quote:

Originally Posted by december (Post 902788)
Unfortunately Sigil's only installed on my laptop, so I can't test the hypothesis from this public computer, but (assuming you have your chapter text in a different .xhtml "chapter" than the TOC itself) I think the problem lies in the ID specification. In other words, if I wanted the "#Ch2" tag to point to the "Ch2" anchor name, that would only work *within* the specific .xhtml page I'm working in (i.e., it only points to anchor tags within your TOC "chapter"). If you want to point to a different page outside the TOC, you'll need to specify the name of the file in which the anchor is located. Does that make sense?

I'd need to tinker with Sigil for a bit to figure out exactly how to specify that file path, but it's going to be a few days before final exams are over and I'll have time to play in earnest. If nobody else has answered here with a solution by then, I'll definitely let you know what I found.


Same problem here. I finally figured it out. Attached is a Sigil file with Inline Toc.
Charlie


All times are GMT -4. The time now is 06:57 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.