Export document titles to become Table of Contents?


I am re-creating an out-of-print genealogy book inside Scrivener. (We own the copyright, we are attempting to re-publish it as a PDF.) I have it arranged inside Scrivener. I would like the title of each Scrivener document (a hundred or so documents) to (a) become the Table of Contents, and (b) become a section title at the top of each page.

So far as I can tell, I need to copy and paste the document title into the top of each document body, and assign that title a style that Microsoft Word can key-on for creating the Table of Contents. Then compile the book for .doc output. Is there an easier way? How do I style or otherwise mark the title at the top of each document body?

So far, I am highly impressed with the ease of slinging around 2500 pages’ worth of material.

Ed Barnard
Cannon Falls MN

Aha. I’ll try the techniques in Chapter 24 of the Scrivener PDF Manual. That may be all that I need!

So far, the best bet seems to be to include titles in the compile, and turn them a different color. Then, in Microsoft Word, click on a title, and in the styles thing, click on the button to select all text with a similar style. Then change the selected text (the titles) to Header 1. Then, when I insert a Table of Contents, it does get generated.

That’s a good trick, and one that I have used in the past with Mellel. Use an obvious formatting attribute for special styles, and then do a search and apply to convert them to a proper stylesheet format.

If you table of contents is static you could try playing around with Scrivener’s ToC feature, which you will find in the Final Phases part of the manual as well. It is going to generate an RTF list of title names and page numbers, so it isn’t dynamic—but if you do not intend to edit the structure of a document in Word, that could be quicker than messing with styles.

Thank you AmberV!

Unfortunately this solution is only partially working for me. The compile step is inconsistently choosing the font family for both titles and text. Sometimes it’s based on Times New Roman (what I want), and sometimes it’s based on Optima. Obviously a basic setting somewhere that I missed, or applied too late in the game.

Unless I misunderstood the documentation, the RTF Table of Contents won’t work for me. I am not changing the ordering of anything, but will be adding additional pages. I’ll have scanned images of the pages I couldn’t recover, and of illustrations. Well, come to think of it, I know exactly how many pages, I could insert place-holders to keep the pagination correct at compile time.

So, this poses two follow-on questions:

  1. How do I get consistent font family on compile (except front matter, which I have ticked Compile As-Is)?
  2. Is there any way to insert the illustrations (scanned-in photographs) as part of the compile?

Thanks again.

Actually that should be fine. The ToC works by adding markers into your text at the header (or first line of a section). These markers are then referenced in the ToC list as markers, not as static page numbers. Scrivener remains wholly unaware of page count the entire time. These numbers are only showing up as page numbers in Word because they are dynamically tracking that location. Thus, if you add content in between headings, these numbers should update.

On the first matter: you are adjusting this in the Formatting pane? If you change the title font and colour there, that should be what you get in the RTF. I can’t think of anything else that would be impacting this. The way to get a consistent style is to make sure all of the elements in the formatting preview window are styled likewise.

Your illustrations should already be inserted into the text where they should appear. Just drag them in from the Finder or Binder if they are already in the project. For high-res final art you might want to use Edit/Insert/Image Linked to File instead, which will keep project size down by using placeholders, and use to the final large images on compile.

Also make sure you don’t have some documents accidentally marked “compile as-is” since that means the formatting you set in the compile options won’t apply to those.

Thank you! I found the font problem was that I needed to specify it in 9 places and hadn’t done so (title, note, text, in each of folders, documents, document). Finishing this out with Scrivener got me complete in a weekend, when I was expecting months more work.

It sounds like I can avoid Microsoft Word entirely. All I need is a basic PDF result but it needs to include scanned images. Sounds like I can do that! Microsoft Word chokes pretty badly the 2,900 pages of text, but Scrivener remains instantly responsive.

You can really speed up that process in the formatting pane by just hitting Cmd-A in the preview area and doing bulk changes. You can change the font face for everything at once that way, without messing up the individual size, weight, alignment, and other properties. The next trick for making all of this easier is to use copy and paste to copy formatting between types and levels. It’s a good idea to get the broad strokes decided first, before you start tweaking each level individually, as pasting will paste everything.

Anyway, glad to hear you can avoid Word! I have a feeling more people will be able to say that with this new compiler.