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 08-15-2019, 11:43 PM   #1
Keybounce
Enthusiast
Keybounce began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Aug 2019
Device: kindle (various)
Help needed with ToC editor

I attempted to use the ToC editor to add some new ToC entries inside an existing chapter.

I wound up with 28 different links all to the same place.

Quote:
<navPoint id="num_12" playOrder="12">
<navLabel>
<text>sub-3</text>
</navLabel>
<content src="OEBPS/file0022.xhtml#toc_1"/>
</navPoint>
<navPoint id="num_13" playOrder="13">
<navLabel>
<text>sub-4</text>
</navLabel>
<content src="OEBPS/file0022.xhtml#toc_1"/>
</navPoint>
<navPoint id="num_14" playOrder="14">
<navLabel>
<text>sub-5</text>
</navLabel>
<content src="OEBPS/file0022.xhtml#toc_1"/>
</navPoint>
To make matters worse, #toc_1 is at the start of the file, not where any of the places I clicked and verified the ever increasing percentage of the way through number.

So, what's the proper way to use this?

What I did:
Point to the entry at the start of chapter 22
New entry inside this entry.
Search for "~~~"
Target that with the mouse.
Verify that I was at the "div" tag that contained the ~~~.
Verify that each one had a larger percentage of the way through.
Save each one (the first ~~~, the second ~~~, the third ~~~, etc).

Wind up with ... not what I expected.
Keybounce is offline   Reply With Quote
Old 08-16-2019, 05:34 AM   #2
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You need unique (per file, at a minimum) Anchors at the mid points in a file to land on. (id="blah-blah")
theducks is offline   Reply With Quote
Advert
Old 08-16-2019, 07:42 PM   #3
Keybounce
Enthusiast
Keybounce began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Aug 2019
Device: kindle (various)
Dang. I was expecting that it would insert anchors as needed for the ToC to reference.
Keybounce is offline   Reply With Quote
Old 08-16-2019, 08:10 PM   #4
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by Keybounce View Post
Dang. I was expecting that it would insert anchors as needed for the ToC to reference.
It sounds like you did it right, and here is what I got when I just tried it:

Before inserting an entry: <p class="p_text_body">A bunch of stuff

After Inserting an entry: <p class="p_text_body" id="toc_3">A bunch of stuff

Did you give each entry a name before you hit OK?

EDIT: So I tried a few on your book and got this in the .ncx file:

Code:
<navLabel>
        <text>[BREATH] 001 - Enter, Part 1</text>
      </navLabel>
      <content src="chapter-1.html"/>
      <navPoint id="num_5" playOrder="5">
        <navLabel>
          <text>~1</text>
        </navLabel>
        <content src="chapter-1.html#toc_1"/>
      </navPoint>
      <navPoint id="num_6" playOrder="6">
        <navLabel>
          <text>~2</text>
        </navLabel>
        <content src="chapter-1.html#toc_2"/>
      </navPoint>
      <navPoint id="num_7" playOrder="7">
        <navLabel>
          <text>~3</text>
        </navLabel>
        <content src="chapter-1.html#toc_3"/>
      </navPoint>
    </navPoint>
The #toc_1, etc., were added automatically. I named the entries ~1, ~2, ~3. Here's how it looks in the Calibre viewer ToC panel:
Attached Thumbnails
Click image for larger version

Name:	tocexample.jpg
Views:	135
Size:	10.3 KB
ID:	172973  

Last edited by retiredbiker; 08-16-2019 at 09:58 PM.
retiredbiker is offline   Reply With Quote
Old 09-01-2019, 05:19 PM   #5
Keybounce
Enthusiast
Keybounce began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Aug 2019
Device: kindle (various)
So what happened that mine inserted the *same* anchor for every point, while yours inserted different anchors for every point?
Keybounce is offline   Reply With Quote
Advert
Old 09-01-2019, 06:16 PM   #6
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: 31,047
Karma: 60358908
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 Keybounce View Post
So what happened that mine inserted the *same* anchor for every point, while yours inserted different anchors for every point?
Every file can use the same anchor name
file1#mid1.html
file2#mid1.html

It is the files name that is the uniqueness in this case.
Many of us avoid this simply because it is easier to spot missing items if they are sequences. Not because it is required
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editor: ToC Editor: Start entry macnab69 Editor 2 06-25-2014 11:15 AM
Book Editor TOC Editor Isue? weberr Editor 2 04-17-2014 11:13 AM
Using Sigil and the calibre editor: DiapDealer's help needed roger64 Sigil 4 02-20-2014 11:19 PM
TOC-Editor: TOC according to file names? samy2 Calibre 6 02-08-2014 12:12 PM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM


All times are GMT -4. The time now is 11:19 AM.


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