auto number folders when compiling (Scriv 3)

Can it be done? This strikes me as being a useful feature to have.


In fact, many of the stock project templates will do this by default. :slight_smile:

But let’s say you’ve started with Blank, so you’ve got a pretty vanilla setup for compile:

  1. Load File ▸ Compile….
  2. In the left column you select your Format. This determines the look and feel of the document. A good simple example to explore with is the “Modern” setting, so click that.
  3. Scroll through the various layout designs this format provides, in the middle column. Most likely your project won’t be set up to use any of them (hence the yellow warning at the top if you see it), so to set it up, click Assign Section Layouts… below the scrolling preview area.
  4. Pick a type of document that should have a numbered heading on the left (“Heading” in the stock default will include folders), and then select the preview tile you want to use on the right.
  5. Click “OK”, and ensure that in the right hand “Contents” pane you have some “Headings” in the Section Type column.
  6. Run a test compile to PDF or Print preview.

There is a whole lot more to it than that of course—you can modify and create these Formats themselves. Right-click on the “Modern” Format back in the main compile overview area to duplicate & edit it, then go into the Section Layouts pane and do precisely what you want in terms of formatting, numbering and so forth. Refer to the Help ▸ List of All Placeholder Tags… reference for auto-numbering.

I can get to Step 6 OK, but as far as where to put the auto-number codes I’m in the dark.

Say for the first demonstration you chose the “Chapter Heading” section layout to test with. This one ignores the folder name, and simply prints “Chapter One”, “Chapter Two” and so on. To see how we do that, edit the Format and in the Section Layouts pane, take a look at the settings for the “Chapter Heading” layout.

  • The Formatting pane just shows you a preview of the result—and of course here is where you can change the font, spacing, size and such things.
  • The Title Options tab is where you will most often want to insert things like generic words such as “Chapter” and the auto-number tokens. There you will find “Chapter <$t:chapter>”, in this specific example.

Could you give me a screenshot of this bit, as I can’t find it at all. Thanks/

The documentation goes over all of this in detail, with screenshots. I’m not precisely clear on which part you are looking for, so here are a few good places to look:

  • §24.2, Section Layouts, is the general topic here. It begins with a description of the pane itself, how it correlates with the preview tiles in the overview screen (§24.2.1), and general management of Layouts themselves.
  • §24.2.3, Changing How a Layout Works, is where we start to look at the adjustment of individual Layout options, with a full run-down on each tab.
  • As mentioned before, the “Title Options” tab is where such things as numbering can be affixed to the title. This tab starts on page 605, with illustrations (see Figure 24.5 and 24.6) showing examples just like what you’re looking to do—adding numbers: which fields end up where in the output and so on. The provided examples here are also included as a test compile format in the Extras Pack (details in Appendix F).

If, for some reason, I wanted to import a Scriv2 format into Scriv3 what format would it be in, because I’ve just tried and ended up with a .plist file, which wasn’t recognised as a valid format.

I’m trying to find a workaround that will work for me, and I appreciate your patience with me.

Yes, you can import v2 settings (even straight out of the project if it was upgraded from v2). We have a simple 4-step checklist located in 23.2.8, Importing Legacy Presets, pg. 552.

But if you’re a veteran of the v2 compiler, you might be interested in this tutorial. It was written specifically to go over the changes to the compile system, to help point you to where things are now that you used in the past.