Thanks to duodecimal page number I don't have to ask how to get duodecimal page numbers and I managed to get duodecimal chapter numbers with that method too. But how do I change the sections, subsections, … to be also shown in duodecimal values?
\usepackage{xparse}
\ExplSyntaxOn
\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 } { ↊ } %I use XeLaTex, so these sings are no problem at all ;)
\tl_replace_all:Nnn \l_duodec_string_tl { b } { ↋ }
\tl_use:N \l_duodec_string_tl
}
\ExplSyntaxOff
\renewcommand{\thepage}{\basetwelve{\arabic{page}}}
\renewcommand{\thepart}{\basetwelve{\arabic{part}}}
\renewcommand{\thechapter}{\basetwelve{\arabic{chapter}}}
\renewcommand{\thesection}{\basetwelve{\arabic{section}}}
This leads to sections numbered without the chapter number (1,2,3 instead of 5.1,5.2,5.3...). How do I get the standard numbering just with duodecimal values? I tried it with
\makeatletter
\renewcommand*{\p@section}{\thechapter.}
\renewcommand*{\p@subsection}{\p@section}
\renewcommand*{\p@subsubsection}{\p@section}
\renewcommand*{\p@paragraph}{\p@section}
\renewcommand*{\p@subparagraph}{\p@section}
\makeatother
to maintain parenting but with no results.
To be clear, I want all automatic numbering (pages, chapters etc, pictures, tables…) to be in duodecimal values in the end, without changing the format. Thank you!
\renewcommand{\thesection}{\thechapter.\basetwelve{\arabic{section}}}– David Carlisle Dec 23 '18 at 09:51\thechapter.and\thechapter .are identical input to TeX (the space is not tokenised so the definitions would be identical whether or not there is a space, not just act the same way – David Carlisle Dec 23 '18 at 11:09\renewcommand{\thesubsection}{\thechapter.\thesection.\basetwelve{\arabic{subsection}}}But just\renewcommand{\thesubsection}{\thesection.\basetwelve{\arabic{subsection}}}otherwise the number of the chapter will appear twice because it is in the section AND subsectioncode wich results in a very long and redundant numbering xD – DonMeles Dec 23 '18 at 11:10