I would like to page number my document using base 12 but also to number AMS theorems, sections, equations… the same way. What would be the best solution?

I found this working code to use binary for page numbering:


Maybe should I use the dozenal package in some way. Thank you in advance.


enter image description here


\def\btwelve#1{\expandafter\@btwelve\csname c@#1\endcsname}

\def\btwelvedigits#1{\ifcase\numexpr#1\relax 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or A\or B\or[\number#1]\fi}


\setcounter{page}{5} \thepage

\setcounter{page}{10} \thepage

\setcounter{page}{11} \thepage

\setcounter{page}{12} \thepage

\setcounter{page}{17} \thepage

\setcounter{page}{18} \thepage

\setcounter{page}{19} \thepage

\setcounter{page}{24} \thepage

\setcounter{page}{25} \thepage


This can easily be adapted to any base *just replace 11, 12 and 6 in the calculation).


Same idea as in the question using a flexible base:

  • Do you know how to extend this to AMS theorems counters? – Suponell Jun 24 '18 at 11:14

\usepackage[typeone]{dozenal} will do that for you: all standard counters are redefined to use the special symbols (compatible with Computer Modern fonts).

  • Thanks! It works very well for standard counters but nor for AMS theorems. – Suponell Jun 24 '18 at 11:18

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.