Section5 pages
Chapter functions
Docly provided helper functions to create chapter counters working on multiple levels.
Chinit(name)Creates a chapter counter with the specified name and sets it to "0". An existing variable with this name is overwritten. The counter is a…Chstep(name)Adds 1 to the last number of the counter: "2" becomes "3", and "2.0" becomes "2.1". A counter that does not exist yet starts at "0", so the…Chdestep(name)Subtracts 1 from the last number of the counter: "2.3" becomes "2.2". The counter is a text value of numbers separated by dots, such as…Chpush(name)Adds a new level to the counter by appending ".0": "2" becomes "2.0", and the next chstep gives "2.1". The counter is a text value of…Chpop(name)Removes the last level of the counter: "2.1" becomes "2". Removing the only level leaves an empty value. The counter is a text value of…