<$toc> placeholder not working in Scrivener 3

User avatar
Silverdragon
Posts: 751
Joined: Mon Jul 29, 2013 2:52 pm
Platform: Mac + iOS
Location: Tarzana, California, USA
Contact:

Sat Dec 02, 2017 5:20 am Post

From the manual:
Screenshot 2017-12-01 20.58.31.png
Screenshot 2017-12-01 20.58.31.png (125.5 KiB) Viewed 2496 times

What I get in my .mobi output:
Screenshot 2017-12-01 21.06.53.png
Screenshot 2017-12-01 21.06.53.png (19.89 KiB) Viewed 2496 times
So you know where I'm coming from:
  • I'm a user, not an L&L employee.
  • Mac Scrivener 3.1.1, MacBook Air 11, MacOS 10.13.6 (High Sierra)
  • IOS Scrivener 1.1.5, iPhone 6s, iPad Air 2, iOS 12.1

User avatar
Bridey
Posts: 390
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Sat Dec 02, 2017 10:03 am Post

I tried this, having read your post, and got the same result.

Managed to make it work with either:

1. Marking the <$toc> with Preserve Formatting.

OR

2. Creating a unique section type for the <$toc> page and then assigning a simple text section layout to that section type in the compile settings.

Both of the methods above worked to produce a proper table of contents, but the Kindle app on macOS plonked the contents at the start of the book, even though I had set the <$toc> to be the final page. Don't have a Kindle device to try it on.

User avatar
KB
Site Admin
Posts: 20323
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Sun Dec 03, 2017 10:32 pm Post

I’ve fixed this for the next update.
Best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Ci
CindyWho
Posts: 1
Joined: Sun Dec 03, 2017 8:34 pm
Platform: Mac

Sun Dec 03, 2017 11:33 pm Post

I haven't figured out how to make a post of on own instead of in a thread. I just upgraded and now I can't find one of the manuscripts I was working on and getting very afraid. I know that Scrivener automatically saves, but after the upgrade I can't seem to find the file that I've been working on for a past few months. Any ideas?

User avatar
Silverdragon
Posts: 751
Joined: Mon Jul 29, 2013 2:52 pm
Platform: Mac + iOS
Location: Tarzana, California, USA
Contact:

Mon Dec 04, 2017 12:11 am Post

Thanks so much, Keith! @CINDYWHO, Have you tried File > Find All Projects in Spotlight ?
So you know where I'm coming from:
  • I'm a user, not an L&L employee.
  • Mac Scrivener 3.1.1, MacBook Air 11, MacOS 10.13.6 (High Sierra)
  • IOS Scrivener 1.1.5, iPhone 6s, iPad Air 2, iOS 12.1

Si
Sigerson
Posts: 1
Joined: Sun Jan 06, 2013 6:45 am
Platform: Mac

Tue Jan 09, 2018 11:07 pm Post

I'm having this problem as well when compiling for ePub. I am using version 3.0.1.I've tried the to suggestions above without success. My goal is simple. I want to move the toC to a different location. I've created the page, added the code, clicked create HTML ToC, but all I get is the ToC appearing at the start of the ePub document and a page with the code <$toc> where I would like the ToC to appear

User avatar
KB
Site Admin
Posts: 20323
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Wed Jan 10, 2018 10:34 am Post

Is <$toc> the only text in an otherwise blank document, does it have a section break before and after it, and does the title of the document containing the <$toc> code match the title given to the ToC page in the Compile settings? All of those must be true for the <$toc> tag to be used.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

pt
ptmkenny
Posts: 37
Joined: Fri May 04, 2018 8:43 am
Platform: Mac + Windows

Fri May 04, 2018 8:48 am Post

I'm having trouble moving the Table of Contents.

Here is what I've done:

Scrivener: 3.0.2 for Mac
Under "Draft", I added a folder called "TT". I then added a "New Text" entitled "TT" and cut-and-paste

Code: Select all

<$toc>
inside this text. I selected the text and chose "No style" from the menu to make sure that there was no formatting applied.

Then, when I went to File-> Compile, under "Table of Contents", "Generate HTML ToC" is the only item that is checked. For the title, I have entered "TT".

On the compile settings tab, "TT" the folder is set to "Heading", while "TT" the text is set to "Section".

When I compile, however, I just see the tag "<$toc>"; no replacement occurs.

pt
ptmkenny
Posts: 37
Joined: Fri May 04, 2018 8:43 am
Platform: Mac + Windows

Sat May 12, 2018 4:55 am Post

I'm still having trouble with this. I made a new project with the "Novel" template and added a blank document entitled "ToC", then set the Table of Contents title to "ToC" in the compile settings (compiling as KF8). However, when I open the compiled .mobi file in the Kindle app on my Mac, the table of contents tag is displayed as-is instead of being converted into the table of contents. What am I doing wrong? (Project attached.)
Attachments
NovelTemplate.scriv.zip
(421.75 KiB) Downloaded 55 times

User avatar
KB
Site Admin
Posts: 20323
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon May 14, 2018 1:12 pm Post

Hi,

Although your "ToC" file is blank in the binder, it is not blank after Compile - because it's using the "Scene" Section Type, which is assigned the "Section Text" layout, it is inserted straight after the "Chapter Two" title. So the exported section has the "Chapter Two" title followed by "<$toc>". So, you will want to set the "ToC" document to use a different "Section Type" (e.g. "Table of Contents" and then, in Compile, set assign the "As-Is" or "Section Break" section layout to it (note that the "Table of Contents" section layout is intended for use with creating your own ToC, not with the "<$toc>" placeholder). This is why the "List of Placeholders..." text recommends you set up Compile to place a page break before the ToC document.

Essentially the <$toc> flag is a way you telling Scrivener where you want the auto-generated ToC to appear. It is not a way of customising its appearance - for that you need to create the table of contents manually using Scrivener links.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."