Last Head Number

From Wiki
Revision as of 14:58, 18 January 2010 by Aharder (talk | contribs) (New page: 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 them. <...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To access the last head number in a document one can use:

\somestructureheadnumber[][]

The following example from the mailing list demonstrates how to use them.

\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]
  }
}