In a document, is it possible to change the base in which the numeration is written? The default numeration is decimal, but I would like to use an octal or hexadecimal numeration for instance.

Also, when I use a document class 'book' or 'report', how can I set a negative numeration before the main text? What I mean by this is that instead of small latin numeration (i, ii, iii, iv, ...) I would like the pages to decrease with a negative sign in front. Is there a way to do so?


Each counter is usually printed with a macro named \thecounter where counter is the counter name, i.e. the page number is stored in the page counter and the \thepage macro is used to typeset it. The chapters use the chapter counter etc. If you want to change the base of the displayed number simple redefine this macro(s) using \renewcommand. The pgf package provides macros to display numbers in octal and hexadecimal.

If you want to start the page numbers with a negative or any other number simply set the page counter to this number using \setcounter{page}{<number>}. This should be best done in the preamble.


Use the fmtcount package and tinker with the page counter.













There is now the moreenum package that allows you to do binary, octal and hexadecimal enumeration. For example:

\item one
\item two
\item three

(moreenum automatically loads enumitem so I used enumitem's start option to illustrate that this really is hex numbering, rather than having a list of >9 items...)

  • I've noticed that the original question was not about enumerate environments. But I will leave the answer here, since this shows up when searching for enumeration – Seamus Sep 29 '11 at 14:43

As fmtcount does not work together with lastpage or totpages I had to find another solution:


\input binhex


\foreach \x in {0,...,4} {


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.