How to compile outline just to specified level?

Hi, I have a manuscript that’s got a deep outline structure. All of the files are documents - I haven’t used folders. Is there a way to compile just the outline, and specify that I just want to go to a certain depth - say the second level or third level of the outline - without going through and manually checking each box?

If not, is there a way to compile an outline including just folders? I could go through and change all the files to folders at the level I normally want to compile, though that’s less than ideal since the level I want may change.

Thanks in advance for any advice anyone can offer!

Yes, you can set this up in the compile formatting pane. For the sake of example, let’s say you just want to compile the titles of the top two levels of documents.

In compile formatting, you want to add levels to the table for as many levels as you want to compile plus one deeper. Since you don’t have any folders, you don’t need to do anything with that level, but for each of the other two, select the row and then click the “+” button a couple times so you get “Level 1”, “Level 2”, and “Level 3+” for each of them. (If you know that everything you’re compiling has subdocuments, you need only do this for the middle document groups row, but there’s no harm in doing both just to be sure.)

For the Level 1 and Level 2 rows, tick the box for the title column. For the Level 3+ row, leave all the columns empty. If you select either Level 3+ row, the preview area should be blank. Thus, even though you have binder documents of level 3 and greater marked to be included in compile, no part of them will actually compile. Only the titles of documents and document groups at the first two levels will compile.

Perfect. Thank you!

I assume that this is for older versions than 3, as I don’t see things like you say.
I guess I had it done in version 3. I’ll put it here just to be sure that is the best way to do it, and so other people can find it here.

Go to Project Settings, and on Section Types I create a “hide” type, for example. Just there, in Default Types by Structure I select the folder (or files, or file groups) and with the “+” I create as many levels as I want. Then, I assing the “hide” setion type to the document type level I whish. Save it.

Go to compile, to edit the outline format I am using, and in Section Layouts I create “Hide layout”, for example, and I leave all the columns empty. Save it, go to Assing Section Layouts, and assign the “Hide layout” to the “Hide” section type.

It works for me.
But as I see that it’s quite more complicated than you explained, I wish to know if this is the right way to it.


Yes, that’s generally the way I’d do it. The key point is that the section type or types of the items you want to hide on compile is distinct, so that you can then assign it the “hide layout” section layout during compile.

If all the documents at a certain level and deeper are of the same type, you can set that up simply in the Default Type by Structure Settings as you describe, essentially how this used to be done in compile for Scrivener 2. But if the types of documents you currently want to hide aren’t all the same, you don’t need to force them into the same section type for the sake of compile. You could have both a “notes” section type and a “references” section type that are both given “hide layout” in a particular compile format, for instance. Then later should you want to compile “notes” and “scenes”, you’d just choose a different compile format or assign the notes type a different layout without needing to go back through your project and change the type of every notes document.

Ok, great, thanks.

I understand that the second way you are saying is more to hide several types, but not at a certain level, is it?

I mean, if I have “references” and “notes”, to use your example, and I aplly directly the “hide layout” it would hid all the “references” and “notes” in any level. Is it?

Thanks again

Yes; the section layouts don’t care about what level something is at, only what section type it is. So excluding certain levels of the hierarchy from compile would depend on those levels having section types that are set to an empty layout in compile, and you wouldn’t want those types used on other, higher-level items. But say level four of your binder structure is a combination of “notes” and “references” documents, you could still use both those types and then just set both of them to the same empty layout.

The big difference affecting this between Scrivener versions 2 and 3 is that the levels and section types have been separated from the compile settings and so give you more flexibility. In version 2, the only way you could define or identify items in compile was by the sort of item they were (folder, document group, or single document) and what depth in the hierarchy they were. Now in version 3, you use the section type to define what happens to an item in compile, and you can make any item any section type you want. So you could have three single files all at level two but give them three different section types and therefore compile them with three different section layouts. And you might have a few other items of different sorts and levels sharing one of those section types and so compiling the same way.

But with the Default Types by Structure settings, you can easily assign section types based on the item type and depth, just the way this used to be set up in compile, so you can still do it that way and get the level-based. And if you have a few exceptions where an item at a certain level is a different type from the others, you can accommodate that when you compile to exclude or include it depending on your needs.

Amazing, thank you very much for all your explanation.

I only used version 3 but it looks like a lot better.
To be true I am quite amazed with Scrivener.