[texhax] First and last value of custom counter in header

Aleksandar Zec zealeksanman at gmail.com
Sun May 9 14:08:09 CEST 2010


Dear TeX list,

I think that what I am going to ask is not answered in any archived
post I could find regarding "dictionary-style headers".

I have pages typed in multicols{2}, full of little items numbered with
a custom counter (which is increased by 1 after each item):

\thecnt text     \thecnt text
\thecnt text     \thecnt text
\thecnt text     \thecnt text
\thecnt text     \thecnt text

How can I produce a fancyhdr string that shows the first and the last
\thecnt that appeared on the current page, in the form (first--last),
like this:

first--last
--------------------------
\thecnt text     \thecnt text
\thecnt text     \thecnt text
\thecnt text     \thecnt text
\thecnt text     \thecnt text

Many thanks,
Aleks


More information about the texhax mailing list