general thoughts

The main plan is to give the same or similar result as now, but with a lot less work, and hopefully the markup is more readable. However, further thought has provoked the second concept with test2 and may sacrifice readabilty for flexibility.
All of tis could be a challenge, because somehow if it is a number then it is indented and prepended to a series of numbers automatically. Such as 1. then 1.1, 1.2, 1.3, and supposing a second 1, then it would continue from 1.3, to 1.3.1, 1.3.2 etc. Turning any text into a link is easy. Formatting text is easy enough. I think there are ways to test for numerics versus alphanumeric/letters.
Also, since there is the chance that a link and the link text may be different, I need to figure out how to handle that. This is a challenging wrinkle, since I am trying not to use named variables, and a series of up to 20 seems realistic for each chapter even if it has a second level used such as 1.3.1 mentioned above.

Best case, is that some parts of this can be re-used for a spiffy nav header function, and also for pre-numbering figure numbers for images- since they begin with the chapter or chapter and sub-chapter decimals.