Changes

Jump to navigation Jump to search
415 bytes added ,  14:50, 8 June 2020
m
no edit summary
To access the last head number in a document one can use: <texcode>\somestructureheadnumbersomeheadnumber[…][…]</texcode> The following example from the mailing list demonstrates how to use it.
<texcode>
\dorecurse {5} {
\chapter{Test #1\recurselevel} first: \somestructureheadnumbersomeheadnumber[chapter][first] \par current: \somestructureheadnumbersomeheadnumber[chapter][current] \par last: \somestructureheadnumbersomeheadnumber[chapter][last]
\dorecurse {3} {
\section{Test #1\recurselevel} first: \somestructureheadnumbersomeheadnumber[section][first] \par current: \somestructureheadnumbersomeheadnumber[section][current] \par last: \somestructureheadnumbersomeheadnumber[section][last]
}
}
</texcode>
 
For using inside a Metapost-environment you can use the expandable version:
<texcode>\somenamedheadnumber{…}{…}</texcode>
 
Willi's comment on 15-06-2011:
Sinds Context 13 june 2011 the name <texcode>\somestructureheadnumber</texcode> is replaced by <texcode>\someheadnumber</texcode>. This is in line with Hans' plans to get rid of the 'structure' part inside interface-names dealing with internal counters.
 
[[Category:Basics]]
[[Category:Tools]]

Navigation menu