I want to have a document with chapters and headed sections. I discovered hierarchical references like <$hn_level1> and with this I do get chapters and first level headed subsections to number as I want: 1 XXX, 1.1 XXX-1 1.2 XXX-2 etc and then for the next chapter: 2 YYY, 2.1 YYY-1 etc, after I compile.
I will be having many figures in the technical book I am writing and I would like the figures to be numbered consecutively in a chapter like Figure 1.1, Figure 1.2, … Figure 1.n and then have the base figure number reset for each new chapter: Figure 2.1, Figure 2.2 etc BUT not reset with each new subsection. BTW this is how the Scrivener manual handles its figures. With <$hn> style I can reset the figure number at the beginning of a new subsection but I don’t want that. I also don’t want the figure number for the figure to include the subsection number like Figure 1.2.1 – just top-level chapter number and the consecutive figure numbers per chapter. I have replacement patterns like:
!fig($@) Figure <$hn_level1>.<$n:figure:$@>
#fig($@) Figure <$hn_level1>.<$n#figure:$@>
but this uses the current hierarchical number where the figure reference occurs rather than the $hn
where the figure was first included. So I can’t make valid backwards references to a figure included in a previous subsection and chapter.
Any help appreciated, thanks.
Can this be done at the Scrivener level with compile settings as appropriate? I can auto-number figures consecutively from 1 to the total number of figures included in the manuscript but I want a simple sub-hierarchy like I describe here.
FWIW I am compiling to docx using the built-in docx compile settings (a few tweaks) but not the Markdown docx compiler due other formatting glitches, some of which I have posted about in this forum previously.
I just visited:
https://forum.literatureandlatte.com/t/hierarchical-numbering-for-cross-references/29132
and there may be a convoluted way to get the effect that I want – will check back here if I can solve using the approach given there. @AmberV was a respondent in that thread and I always learn good stuff by following along.