[NTG-context] Omitting part number in chapter numbers
simon.collier1988 at protonmail.com
Wed Feb 20 02:01:49 CET 2019
I would like to have a TOC that looks basically as follows when stripped down to the essentials:
I don't want the part number to be "part" of the chapter number (no 2.1, just 1, for example).
This behaviour should apply both to the titles in the text and in the TOC..
With the code:
\definestructureresetset[default][1,0,1] % reset part and section, but not chapter, from wiki
I can make chapter numbers flow independently of parts, which is nice.
But the numbering for chapters is like 1.1, 1.2, and 2.3, which is a good default, but not what I want.
Is there any way to omit part number and get only the chapter number displayed?
In wiki there is something that is almost suitable, namely setting:
But this does not work for TOC, returning just zeros (and seems like also an extra zero is spilled on TOC, overall pretty hackish solution).
When nothing seemed to work, I also tried to use an ugly macro that uses lua to format the argument #1 in the numbercommand nicely with the help of string functions,
but it turned out the actual parameter #1 in numbercommand is something other than just a string with numbers and dots.
If someone knows what it is, or how to find out, please point me to the right direction to better understand the system. Currently I'm unable to even print it to the terminal in order to see what actual characters are there, the following code outputting the length (seems to be 19 at least for me) works just fine as well as printing the string itself to the document.
userdata = userdata or
The idea seemed pretty standard and is used in many books, so maybe I've just completely missed the right way to approach this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ntg-context