# MakeIndex: entries rejected because of duodecimal page numbers

I recently changed the page numbers to duodecimal ones (see here). The package makeidx didn't like that at all. In fact my index isn't written at all anymore:

done (0 entries accepted, 341 rejected). Nothing written in Kyroledorn Yartolikor.ind. Transcript written in Kyroledorn Yartolikor.ilg.

Everything worked before the change, so this is the only problem here. Other questions imply that makeidx has some restrictions regarding alterations in the page numbers but I didn't find a solution for this problem. Any ideas?

As a code example I added an index into the code sample from the question above, exactly as I did it in my other file.

\documentclass[11pt,a4paper,final]{book}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{makeidx}
\makeindex
\usepackage{graphicx} % I need this to rotate my numbers...
\usepackage{xparse} % this is the magic package...
\ExplSyntaxOn % for the missing numbers after 9 the package uses "a" and "b",
% but I want to use "↊" and "↋" as defined by the Dozenal
% Society of Great Britain. The following lines do that for me:

\NewDocumentCommand{\basetwelve}{m}
{ \duodec_convert:n { #1 } }

\tl_new:N \l_duodec_string_tl
\cs_new_protected:Npn \duodec_convert:n #1
{
\tl_set:Nx \l_duodec_string_tl { \int_to_base:nn { #1 } { 12 } }
\tl_replace_all:Nnn \l_duodec_string_tl { a } { \rotatebox[origin=c]{180}{2} }
% I rotate the numbers, because standard fonts don't contain ↊ and ↋.
\tl_replace_all:Nnn \l_duodec_string_tl { b } { \rotatebox[origin=c]{180}{3} }
\tl_use:N \l_duodec_string_tl
}
\ExplSyntaxOff

\renewcommand{\thepage}{\basetwelve{\arabic{page}}}
\renewcommand{\thepart}{\basetwelve{\arabic{part}}}
\renewcommand{\thechapter}{\basetwelve{\arabic{chapter}}}
% No problems so far...
% This is how you get numbering formatted as chapter.section:
\renewcommand{\thesection}{\thechapter.\basetwelve{\arabic{section}}}
\renewcommand{\thesubsection}{\thesection.\basetwelve{\arabic{subsection}}}
% Dont put \thechapter here, it is already contained in \thesection!!!
\renewcommand{\thefigure}{\basetwelve{\arabic{figure}}}
% As I told you, I wanted to change the figcaptions too.
% But I don't need the chapter's number here.
\renewcommand{\labelenumi}{\basetwelve{\arabic{enumi}}.}
% And this is my first dozenal enumeration with a dot behind the number.

%let's see, if it works:
\begin{document}
\part{Quick demonstration}
\chapter{Here we go!}
Just scroll down...
\chapter{I}
\chapter{need}
\chapter{lots}
Whoops, nearly there...
\newpage
On this and on the following page you see the dozenal page numbers! \index{dozenal page number}
\chapter{of}
See? It works! \index{working!}
\chapter{pages}
\chapter{and}
\chapter{chapters}
\chapter{for}
\chapter{dozenal}
This is the dozenal number  \rotatebox[origin=c]{180}{2}, equal to $10_{(10)}$.
\chapter{numbers.}
This is the second dozenal number: \rotatebox[origin=c]{180}{3}, it is just a turned 3 and equal to $11_{(10)}$.
\section{What are these symbols?!}
I use fonts like Times New Roman, they have symbols \index{symbols} like \rotatebox[origin=c]{180}{2} and \rotatebox[origin=c]{180}{3} integrated as Unicode glyphs U+218A and U+218B. They are just rotated numbers too, basicly. These numbers are defined by the Dozenal Society of Great Britain and I like them. If you complie with XeLaTeX you can just copy and paste these signs: ↊ and ↋ (in this font they will probably be invisible).

\section{Why so many chapters?}
I need more than 12 pages and chapters for the numbers \index{numbers}  \rotatebox[origin=c]{180}{2} and \rotatebox[origin=c]{180}{3} to appear.

\section{Enumeration}
\begin{enumerate}
\item Just
\item a
\item very
\item short
\item demonstration
\item of
\item a
\item dozenal
\item enumeration
\item for
\item you
\item to

• no as I say print them in duodecimal, makindex can apply formatting to numbers so you can have them bold or italic or whatever in this case you want to fomat them something like \duodecimal{12} to print the number twelve in duodecimal so that's typically appending |duodecimal to the \index entry, depending on your makindex style. – David Carlisle Jan 28 '19 at 21:17
• no should be something like \indexentry{Fkeritandi|basetwelve }{17} so that just a number appears in the final argument, makeindex can then use the number and will just move the |basetwelve to \basetwelve{..} after it has finished sorting. – David Carlisle Jan 28 '19 at 21:33