<$hn> not working when treat compile group as entire draft

When I use the <$hn> tag in my prefix for folders and documents, it works fine when I use choose a single folder (that contains documents) as my compile group, until I choose the option to “treat compile group as entire draft.” Then, the number for the top level folder doesn’t appear, even though the subdocument numbering works fine.

I tried this for higher level folders as well, and had the same result. The top-level folder title didn’t get numbered, but the subfolders and subdocuments worked perfectly. Any idea what’s going on here? I’m using Mac OS X 10.11.1 (El Capitan) and Scrivener 2.7. Thanks!

Here’s what my compile output looks like:

Here are a few shots of my compile settings:
<$hn> prefix added to all folders (did the same for all documents)

Treating the compile group as the entire draft

Hi Gwen,

The problem is that when you turn on the setting to treat the compile group as the whole draft, Compile just pretends that the selected compile group is the Draft folder and treats it exactly the same as it would the Draft folder. For hierarchical numbering, that means that only documents inside the compile group will work, because the compile group itself is outside of that numbering system. This is why you don’t get hierarchal numbering working properly in the compile group document if you choose to include it in this case.

I’ve been looking at the code trying to think of a way around this limitation, but it’s not a simple fix, because hierarchical numbering is actually quite a complex operation, since it can’t just be built from the binder structure but also has to take account of any documents that are omitted from the Compile, only counting those that are included. It’s complicated further by the number of settings that can affect it. (Changing it would also make the assumption that it was desirable to in effect bump everything down a level if that one option was ticked.)

All the best,
Keith

Ah, makes sense. It seems to me like the easiest fix then, is to choose a compile group one level up and then deselect the top folder on the Contents pane (along with anything else I don’t want included). Thanks for the quick reply!