TOC Table of Contents Format

mi
mickputley
Posts: 30
Joined: Sat Dec 23, 2017 1:13 am
Platform: Mac

Fri Dec 29, 2017 6:36 am Post

Thanks for Scrivener 3. Like so many it took me a while to adjust, but loving it. How do I format the TOC. Specifically how to configure wether the chapter number is called out or not i.e. "Chapter One - The Start" or just "The Start" and is there a way to switch the formatting to "preserve" formatting like you can with text in a scene. My real problem is that with a typical e-reader using font sizes that 'most' people would pick, my chapter lines in the TOC are spilling into two lines like...

Chapter Five - The Mysterious
Magician.

I realize that extreme font size used by some readers makes this wrapping inevitable, but I want it to look more elegant for 'most readers'
Thanks

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

Fri Dec 29, 2017 8:27 am Post

Someone else might have a better solution, but...

1. Apply a CSS class name to the relevant section layout

2. Style your CSS class name from step 1 as you want

3. Use the Document Title Links panel to include or exclude title prefixes (such as the chapter number or anything else the user has defined)

1 TOC CSS Style.jpg
1 TOC CSS Style.jpg (244.65 KiB) Viewed 327 times


2 Set Style Details.jpg
2 Set Style Details.jpg (317.63 KiB) Viewed 327 times


3 Include or Exclude Prefixes.jpg
3 Include or Exclude Prefixes.jpg (189.31 KiB) Viewed 327 times

mi
mickputley
Posts: 30
Joined: Sat Dec 23, 2017 1:13 am
Platform: Mac

Sun Dec 31, 2017 12:43 am Post

Hmmm when I add 'toc' to the CSS class Name in the settings tab of the layout 'table of contents' and then go to the 'Sales section, I do not see toc listed. What am I doing wrong?

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

Sun Dec 31, 2017 8:29 am Post

Hi

If you set a class that doesn't exist, you will need to create that style using the plus button on the top right of the styles menu (in compile).

If you open the sample project attached and look at the 'Ebook Copy' settings under project formats, you can see a style called toc which I have styled in a large red font just for the sake of clarity. When compiled, the TOC takes on the styling from this toc style, although with something like an ebook, you are confined by the reader's reading device and the stylings/fonts it can support.

When compiled to ePub, for example, the TOC in the sample project will appear in a large red font, but the default of Palatino can be overridden by the settings on the reader's device.

This is what I have been doing to style contents. Someone else might know of/have a better solution.

Scrivener Test.zip
(100.78 KiB) Downloaded 22 times

mi
mickputley
Posts: 30
Joined: Sat Dec 23, 2017 1:13 am
Platform: Mac

Mon Jan 01, 2018 8:17 pm Post

Thanks!