Part, Chapter, Section Numbering

I believe i understand section numbering and variables but i can not seem to make my book have appropriate technical section numbers.

Basically, i want, in chapter 6, to see

Chapter 6 TITLE
6.1 Introduction to TITLE
6.2 Details 1 about TITLE
6.2.1 Sub Details
6.2.2 Sub Details
6.3 Details 2 about TITLE
6.4 Conclusion of TITLE

i can get the sections numbered, but how can i get the chapter number (i am using <$n>) to show up in later sections WITHOUT incrementing it… The variables seem to be always incremented when used and i just want to display the current part/chapter whatever number without it working.

This is a very normal display mode - pretty much EVERY technical book uses the .. type numbering of titles but the section on placeholder tags does not seem to be able to explain this…


There are a few ways to do this, some quite flexible (the placeholder system is documented in the Help menu), but in your case, wouldn’t using the basic <$hn> (Hierarchical Numbering) be all you need?

<$hn> was an option, but i really need more control. There is an existing variable $n and i just want to print it instead of doing an “autoincrement and print” it. Is <$hn> the only way to make a heirarchy?

The manuscript is divided into parts/chapters/sections and i want to display . in the section heading. part1 has chapters 1-4, part2 has chapters 5-16 etc… <$hn> will display chapter 2 section 3 as 1.2.3 instead of 2.3 I could rewrite to make this work but the book is defined the way i want it… any thoughts on how this could be done without flattening the book out by removing the parts?

Auto-numbers can be keyworded so you can refer back to them – which sounds like the basic facility you need to roll your own hierarchical numbering. The form is <$n:tag:keyword>. The tag links different “channels” of autonumbering together; the keywording labels a particular one so it can be referenced (rather than incremented) later. There is also a facility for forward reference – not relevant here.

So i think you are wanting something like this:

Chapter <$n:chapter:mykey> TITLE
<$n:chapter:mykey>.<$rst><$n:section> Introduction to TITLE
<$n:chapter:mykey>.<$n:section> Details 1 about TITLE
<$n:chapter:mykey>.<$n:section:mysubkey>.<$rst><$n:subsection> Sub Details
<$n:chapter:mykey>.<$n:section:mysubkey>.<$n:subsection> Sub Details
<$n:chapter:mykey>.<$n:section> Details 2 about TITLE
<$n:chapter:mykey>.<$n:section> Conclusion of TITLE
Chapter <$n:chapter:mynextkey> TITLE

More prosaic than one might really like, but doable.


P.S. I am just making this all up from my reading of the documentation on placeholder codes.