I’m running Scrivener for Windows v.184.108.40.206 and attempting to generate the Table of Contents as per the help doc.
I highlight all the tree nodes I need in the outliner view, use Edit->Copy Special->Copy Documents as ToC. I create a new text file (directly under Manuscript, as I’m writing in the Novel template) and paste the links there. They appear nicely formatted with a variable amount of … to separate the name of a section from the page number and line the page number placeholders (<$p>) on the right. So far so good.
Then I hit Compile, add the ToC page in via “Add Front Matter” and compile the PDF. The compiled ToC page has 2 issues:
- The number of … is for some reason trimmed to the same amount of dots after each section name, meaning that the page numbers are no longer aligned to the right.
- The page numbers themselves are wrong - they do not reflect the appropriate section page numbers, but instead the current page number the ToC line is on - so if ToC starts on page 1, all page numbers on that first page are 1, and whatever sections wrap to page 2 have page number 2.
Does anyone have an idea what I could be doing wrong? I appreciate any help.
First, make sure that your contents document is set to compile as-is, so that its formatting isn’t overridden during compile; that would mess up the tabs aligning the page numbers. You can set the document to compile as-is either from the inspector or in the Contents section of the compile window.
For the page numbers themselves to compile properly, you’ll need to be compiling to PDF using the Microsoft Office converter, which is only available if you’ve got Office 2007-2013 installed. You can set by going to Tools > Options and in the Import/Export section clicking “Export Converters…”. Choose “PDF” from the drop-down on the left and then “Microsoft Office” from the right.
If you don’t have a supported version of Word installed to make those converters available, try compiling to RTF and then using a Save as PDF option from whatever word processor you regularly use.
Thank you. I do not have MS Office, I have Open Office, so I have marked the ToC to compile “as is” and tried compiling to RTF. The padding formatting in the resulting RTF is preserved. The section titles link to their respective pages. However, the page numbers are not there – looks like <$p> tags are not resolving…
Since OpenOffice doesn’t work with the page numbering tags, you can use OO’s table of contents feature to create the TOC there before printing to PDF. To do this, use Scrivener’s compile formatting to give unique formatting to the titles of each level you want in the TOC. In OpenOffice, you should be able to create styles from that formatting to use with its Index/Table feature to generate the TOC.
This post goes into more detail about the process. It uses Word rather than OpenOffice, so the specific features mentioned there will be a little different in OpenOffice–for instance OO’s TOC tool is under Insert > Indexes and Tables > Indexes and Tables…