New user having difficulties with Compile

New user, working with the evaluation version (Windows, I would like to create some technical documentation and compile it to EPUB and PDF formats. There have been several mishaps. Surely the cause is my lack of experience — failure to set certain options correctly. The problems include:

  • Scrivener Links that work correctly within Scrivener do not become links in the output files (PDF or EPUB).

  • The compile to EPUB format creates a ‘flat’ TOC structure, rather than the hierarchical display one sees in the Binder. The documentation contains, so far, four levels within the Binder.

  • Compiling to PDF never produces a table-of-contents (bookmarks, in PDF parlance).

Any advice that would help get me past these hurdles would be greatly appreciated.

I find the Compile user interface sort of perplexing. So far, the documentation I’ve read covers the basics of it, but surely there’s a lot more than “the basics.” Is there any book or web site that goes into considerable depth about the present Windows version’s Compile feature?

Is it that Scrivener links simply don’t work (with EPUB output) in the Windows version yet? (No joy yet with further attempts today.)

Yes, none of this is possible directly from compile. Scrivener links at the moment do not compile; they’re for internal use only. We do have plans to optionally convert them during compile for formats that support internal links, such as ebooks and RTF (and PDF, depending if this is doable with the PDF tools we’re using for export), but at the moment you’ll need to build the link structure post-compile, e.g. compile to Word and create the table of contents there, then save to PDF. The table of contents is currently generated automatically during compile to ebook formats but is just a straightforward list of titles, so I recommend Sigil as an easy-to-use free ePUB editor to tweak the formatting. Once we’re able to convert Scrivener links during the compile process, we’ll be able to provide more options for building a custom TOC for ebooks and other compile formats.

Thanks for your reply. I do have Sigil here, though I’ve only scratched the surface – Calibre, likewise. Sigil definitely seems to be the better tool for search/replace; but I’ve come to appreciate Calibre’s abilities to manipulate a TOC – similar in its way to Scrivener’s outlining feature in the Binder. Makes creating TOC hierarchies relatively easy. Then again, it’s back to Sigil for easier CSS editing. Keeps a person busy. Then again, perhaps a documentation project like this is best carried out in InDesign. (And I’d better stop talking like that. Now I’m scaring myself. :slight_smile: Thanks again.

could you provide a bit more info regarding compiling to Word and building the TOC there before saving to PDF. Or were you saying that Sigil tweaking would be more straightforward? I know it would help me a great deal when I approach the Createspace process in a few weeks.

Re: could you provide a bit more info regarding compiling to Word and building the TOC there before saving to PDF. Or were you saying that Sigil tweaking would be more straightforward? I know it would help me a great deal when I approach the Createspace process in a few weeks.

Yes, that would be very helpful information. Also, if people reading this thread have opinions about whether TOC adjustments are actually easier in Sigil, versus Calibre, I would find that information helpul as well.

When you compile, you can assign different formatting for the document titles at different levels of the outline, which you can then use as hooks for assigning styles in Word, allowing you to easily create a hierarchical table of contents.

For a detailed example, open the tutorial project (from the Help menu or the Getting Started category of the New Project window). You’ll see the project hierarchy involves “Part” folders with “Step” subdocuments, and even sub-documents in Step 5. Open File > Compile and from the “Format As” menu, select “Original” to start with the most basic settings. Expand the dialog if necessary by clicking the blue arrow button, then click on the Formatting tab.

The table at the top shows the different document types and binder levels that compile will distinguish for formatting. Level 1 items are immediate children of the Draft folder; Level 2 are their children; Level 3 their children, and so on. The + following the number indicates that the formatting for that row will apply to binder items of that type at that level and deeper, so formatting for the Folder 1+ row would apply to all folders at the first level, second level, etc.–i.e. all the folders in the Draft.

In the Draft structure of the tutorial, all the Part folders are at level 1, the Step documents and document group (Step 5) are level 2, and the sub-items of Step 5 are level 3. To create a hierarchical table of contents, we’ll want to distinguish titles from Level 1, Level 2, and Level 3. We won’t care about the difference between the document group at level 2 and the single documents at level 2.

To set this up, start by checking the boxes in the “Title” column to include the title of each item in compile. Then select the folder row and click the “Modify” button to bring up a dialog where you can change the formatting for the selected elements (title and text, in this case). Click into the “Title” text and then use the format bar to change the font and size to something unique (click the A button to open the font panel). For instance, set it to Comic Sans size 20.

Click OK to close that dialog (and OK to close the message about the formatting change), then repeat the process with the next row from the table in the top, the document groups. The project doesn’t have any level 1 doc groups, but the formatting you set for “Level 1+” will apply to all the further levels for each, so it will affect the level 2 doc group just like we want. To be more specific, though, you could create a new “Level 2+” row for doc groups by selecting the level 1+ row and then clicking the “+” button in the upper right. Since we’re formatting the level 2 headers, use a different format for the title than you used for the level 1 folders.

Finally, click into the last row, the single documents. The binder has single documents at level 2 and also at level 3, and you’ll need to use different title formatting for each of those. So, click the “+” button in the upper right twice to add another two levels for that document type. Now Level 1, Level 2, and Level 3+ can be formatted individually. Click the Level 2 row and apply the same formatting to the title as you used for the document group, then apply a third format to the title of the Level 3+ row.

Compile to .doc (or other Word-compatible format) and open in Word. (I’m using 2010, so your commands may be worded or located slightly differently.) What you want to do here is apply the Word heading styles 1, 2, and 3 to the titles of level 1, 2, and 3 documents, then generate an automatic table of contents based on those header levels. To do this, Select the “Part 1” text at the top, right-click and choose Styles > Select Text with Similar Formatting, then apply the Heading 1 style to all the selected text (e.g. from the context menu or Quick Style Gallery). Then select the Step 1 text and repeat, assigning Heading 2, and finally jump to the “5a” document title, select it and all text with similar formatting, and apply Heading 3. Now you can use Table of Contents tool (under References on the ribbon) to build a hierarchical TOC off the headings and you’re done.

Although that was a lengthy walk-through, in practice, once you see what you’re doing, it doesn’t take long to format the different levels of titles in compile, and once you’ve done it, the settings are saved with the project and don’t need to be redone. You can also save the settings as a compile preset to make them available to other projects.