Difference between revisions of "Last Head Number"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | To access the last head number in a document one can use: <texcode>\somestructureheadnumber[…][…]</texcode> The following example from the mailing list demonstrates how to use it. | + | To access the last head number in a document one can use: |
+ | <texcode>\somestructureheadnumber[…][…]</texcode> | ||
+ | The following example from the mailing list demonstrates how to use it. | ||
<texcode> | <texcode> | ||
Line 15: | Line 17: | ||
} | } | ||
</texcode> | </texcode> | ||
+ | |||
+ | For using inside a Metapost-environment you can use the expandable version: | ||
+ | <texcode>\somenamedheadnumber{…}{…}</texcode> |
Revision as of 16:43, 19 January 2010
To access the last head number in a document one can use:
\somestructureheadnumber[…][…]
The following example from the mailing list demonstrates how to use it.
\dorecurse {5} { \chapter{Test #1} first: \somestructureheadnumber[chapter][first] \par current: \somestructureheadnumber[chapter][current] \par last: \somestructureheadnumber[chapter][last] \dorecurse {3} { \section{Test #1} first: \somestructureheadnumber[section][first] \par current: \somestructureheadnumber[section][current] \par last: \somestructureheadnumber[section][last] } }
For using inside a Metapost-environment you can use the expandable version:
\somenamedheadnumber{…}{…}