MakeIndex:由于页码为十二进制而拒绝条目

MakeIndex:由于页码为十二进制而拒绝条目

我最近将页码改为十二进制(见这里)。makeidx 包根本不喜欢这样。事实上,我的索引根本就不存在了:

已完成 (0 项已接受,341 项已拒绝)。Kyroledorn Yartolikor.ind 中未写任何内容。抄本已写在 Kyroledorn Yartolikor.ilg 中。

更改之前一切都正常,所以这是这里唯一的问题。其他问题暗示 makeidx 对页码的更改有一些限制,但我没有找到解决这个问题的方法。有什么想法吗?

作为代码示例,我在上述问题的代码示例中添加了一个索引,就像我在其他文件中所做的一样。

\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
    \item admire.
    \end{enumerate}
    \section{Just a random section}
    \subsection{with a subsection}
    \subsubsection{and a subsubsection}
    These all work just finde with dozenal numbers aswell but I think the code is already long enough. And as you see, subsubsections usually don't have numbers at all.
    \printindex 
    \end{document}

相关内容