Section type by Structure based on Compile structure?

I’m trying to compile a small subset of my full manuscript to share with a colleague, my problem is that I have the section types to be set by structure, which I love and it’s really handy. However it doesn’t work as well when I only want to compile a small part which is made up of level four and five folders.

When I compile the entire document I want to have these sections as subsections, but in a small document they shouldn’t be section etc, they should just be section 1 and 2 etc.

Is there a way that the "section type by structure’ function can use the Compiled structure, rather than the binder structure? That way if i compile only a level 5 folder and it’s subdocuments the compiler will see it as a level 1 folder rather than a level 5 folder.

Remember that the Section Layouts are assigned by the Compile Format. So the sub-sub-sub-Section type can have a different layout in the Excerpt Compile Format than it does when compiled as part of the whole draft.


It sounds like you’d benefit from using the secondary option available, when compiling a subset of the Draft, Treat compile group as complete manuscript:


As noted in the user manual:

Unfortunately, I do have that option selected already and it doesn’t seem to have an effect.

I’m not sure if this is the case because I don’t think I can test is, but as I’m compiling to LaTex I need to also compile the front and back matter documents which contain the required preamble etc. could this be cause it to still see my documents as 4th level?

Oh, so LaTeX is what you’re using, and thus it is generating the numbering—and that would make sense with the “0” then, since it will start at 0 unless you have a chapter break somewhere. You can control that if you need to, but it seems to me the bigger problem is the \section vs \subsection vs \subsubsection matter? These kinds of details are useful to know at the top, by the way. :slight_smile: Those using Scrivener to generate the text rather than LaTeX would have to hand-code the numbering system with placeholders and such, and so it is a bit more complicated up front for them.

It would be helpful to know how things end up as LaTeX in your output. I have no idea how you are generating LaTeX for instance—or if you even are. For all I know you’ve got \subsubsection{Something} typed into the editor by hand, and no amount of compile settings or moving the thing around in the outline is going to change the fact that it is a subsubsection. :slight_smile: (But if that is what you are doing, consider Replacements as a solution.)

If you are using Layouts to print LaTeX sectional codes (for example, via the Title Prefix / Suffix features), then I think Katherine’s suggestion above is still relevant: you just need to duplicate your Format and create a custom mapping that offsets the structure a bit.


sorry for not specifying that I was using LaTex, in the compiler the Section layouts pane inputs the \section, \subsection and \subsubsection code using the relevant document and folder titles. I’ve not edited this, I know I could create a few new compile formats to cover the different cases I have (2nd level folder is a section vs 3rd level folder is a section etc.) but I thought there must be a way for it to automatically work it out each time I compile.

Really, ultimately I think the best answer is the preamble itself. If the idea is that a subsubsection should use “x.x” numbering instead of “x.x.x.x” numbering, and start at 1 instead of 0, that’s a matter for the preamble—you can make subsections print as “Cats.1” if you really want. :slight_smile: Pushing Types in Scrivener (automatically or no), or using Formats to push what is rightfully a \subsubsection into a \section are both forms of the same thing, and analogous to selecting h3 in HTML, because the font size looks better than h1. In the case of HTML, the right way is to use CSS to make h1 look the way you want so that the document outline isn’t artificial. From what it sounds like, that’s the same thing here, unless these things really do become genuine chapters and sections (or whatever) when you compile them this way—then that’s another matter.

So how I’d solve it is by throwing a file into an alternate Front Matter folder (for subset compiling) that rewrites the numbering methods for subsections and subsubsections. How to do that precisely depends on the class and packages you use of course, but this works with a stock Memoir setup:

[size=80]Example implementation, using the General Non-Fiction (LaTeX) template.[/size]

% Set up numbering for subset compilations % \renewcommand{\thesubsection}{\arabic{subsection}} \renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}