%%
%% This is file `dozenal.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% dozenal.dtx  (with options: `package')
%% This is a generated file.
%% 
%% This document is copyright 2015 by Donald P. Goodman, and is
%% released publicly under the LaTeX Project Public License.  The
%% distribution and modification of this work is constrained by the
%% conditions of that license.  See
%% http://www.latex-project.org/lppl.txt
%% for the text of the license.  This document is released
%% under version 1.3 of that license, and this work may be distributed
%% or modified under the terms of that license or, at your option, any
%% later version.
%% 
%% This work has the LPPL maintenance status 'maintained'.
%% 
%% The Current Maintainer of this work is Donald P. Goodman
%% (dgoodmaniii@gmail.com).
%% 
%% This work consists of the files listed in dozenalfilelist.txt.

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{dozenal}[2015/01/29 v5.3 support for dozenal fonts]
\RequirePackage{fixltx2e}
\RequirePackage{ifpdf}
\DeclareOption{nocounters}{%
\def\nocounters{}%
}%
\newif\iftypeone\typeonefalse
\DeclareOption{typeone}{\typeonetrue}
\ProcessOptions\relax
\iftypeone%
\ifpdf
\pdfmapfile{=dozenal.map}
\fi
\DeclareFontFamily{T1}{dozch}{}
\DeclareFontShape{T1}{dozch}{m}{n}{<-6> dozchars6
<7> dozchars7 <8> dozchars8 <9> dozchars9 <10-11>
dozchars10 <12-16> dozchars12 <17-> dozchars17  }{}
\DeclareFontShape{T1}{dozch}{b}{n}{<-> dozchb10 }{}
\DeclareFontShape{T1}{dozch}{bx}{n}{<-6> dozchbx6
<7> dozchbx7 <8> dozchbx8 <9> dozchbx9 <10-11>
dozchbx10 <12-> dozchbx12 }{}
\DeclareFontShape{T1}{dozch}{m}{sl}{<-8> dozchsl8
<9> dozchsl9 <10-11> dozchsl10 <12-> dozchsl12 }{}
\DeclareFontShape{T1}{dozch}{bx}{sl}{<-> dozchbxsl10 }{}
\DeclareFontShape{T1}{dozch}{m}{it}{<-7> dozchit7
<8> dozchit8 <9> dozchit9 <10-11> dozchit10
<12-> dozchit12 }{}
\DeclareFontShape{T1}{dozch}{bx}{it}{<-> dozchbxi10 }{}
\def\doz#1{{\fontfamily{dozch}\fontencoding{T1}\selectfont #1}}%
\DeclareSymbolFont{dozens}{T1}{dozch}{m}{n}
\else%
\DeclareFontFamily{OT1}{dozch}{}
\DeclareFontShape{OT1}{dozch}{m}{n}{<-6> dozchars6
<7> dozchars7 <8> dozchars8 <9> dozchars9 <10-11>
dozchars10 <12-16> dozchars12 <17-> dozchars17  }{}
\DeclareFontShape{OT1}{dozch}{b}{n}{<-> dozchb10 }{}
\DeclareFontShape{OT1}{dozch}{bx}{n}{<-6> dozchbx6
<7> dozchbx7 <8> dozchbx8 <9> dozchbx9 <10-11>
dozchbx10 <12-> dozchbx12 }{}
\DeclareFontShape{OT1}{dozch}{m}{sl}{<-8> dozchsl8
<9> dozchsl9 <10-11> dozchsl10 <12-> dozchsl12 }{}
\DeclareFontShape{OT1}{dozch}{bx}{sl}{<-> dozchbxsl10 }{}
\DeclareFontShape{OT1}{dozch}{m}{it}{<-7> dozchit7
<8> dozchit8 <9> dozchit9 <10-11> dozchit10
<12-> dozchit12 }{}
\DeclareFontShape{OT1}{dozch}{bx}{it}{<-> dozchbxi10 }{}
\def\doz#1{{\fontfamily{dozch}\fontencoding{OT1}\selectfont #1}}%
\DeclareSymbolFont{dozens}{OT1}{dozch}{m}{n}
\fi%
\newcommand\x{\TextOrMath{\protect\doz{{X}}}{\doz@X}}%
\newcommand\e{\TextOrMath{\protect\doz{{E}}}{\doz@E}}%
\DeclareMathSymbol{\doz@X}{\mathord}{dozens}{88}
\DeclareMathSymbol{\doz@E}{\mathord}{dozens}{69}
\newcommand\tally[1]{%
\doz{#1}%
}%
\def\basexii#1#2#3{\ifcase\numexpr(#1)\relax
0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or#2\or#3\else
\expandafter\basexii\expandafter{\number\numexpr((#1)-6)/12}{#2}{#3}\expandafter\basexii\expandafter{\number\numexpr(#1)-((#1)-6)/12*12}{#2}{#3}\fi}
\newcommand\dozens[1]{\basexii{#1}{\x}{\e}}
\newcount\b@charcount
\def\gobblechar{\let\char= }
\def\assignthencheck{\afterassignment\checknil\gobblechar}
\def\countunlessnil{%
\ifx\char\nil \let\next=\relax%
\else%
\let\next=\auxcountchar%
\advance\b@charcount by1%
\fi%
\ifx\char\backslash\advance\b@charcount by-1\fi%
\next%
}%
\def\auxcountchar{%
\afterassignment\countunlessnil\gobblechar%
}%
\def\countchar#1{\def\xx{#1}\b@charcount=0\expandafter\auxcountchar\xx\nil}
\def\gobble#1{}%
\newcount\@numdigs%
\newcount\@decmult%
\newcount\@loopindex\@loopindex=1%
\newcount\@decnum\@decnum=0%
\newcount\@digit\@digit=1%
\def\basex#1{%
\countchar{#1}\@numdigs=\b@charcount%
\@decmult=1\@loopindex=1%
\loop\ifnum\@loopindex<\@numdigs%
\multiply\@decmult by12%
\advance\@loopindex by1%
\repeat%
\@loopindex=0%
\def\isten{x}\def\iselv{e}\def\isquote{\backslash}%
\edef\@doznum{\detokenize{#1}\relax}%
\@decnum=0%
\loop\ifnum\@loopindex<\@numdigs%
\def\@firstchar{\expandafter\@car\@doznum\@nil}%
\if\@firstchar\@backslashchar
\edef\@doznum{\@removefirstdig{\@doznum}}%
\else
\if\@firstchar\isten\def\@firstchar{10}\fi
\if\@firstchar\iselv\def\@firstchar{11}\fi
\advance\@loopindex by1%
\@digit=\@firstchar%
\edef\@doznum{\@removefirstdig{\@doznum}}%
\multiply\@digit by\@decmult%
\advance\@decnum by\@digit%
\divide\@decmult by12%
\fi
\repeat
\the\@decnum%
}
\def\@removefirstdig#1{%
\expandafter\expandafter\expandafter\gobble\expandafter\string#1%
}
\@ifundefined{nocounters}{%
\@ifundefined{c@page}{}{%
\renewcommand\thepage{\basexii{\value{page}}{\x}{\e}}}
\@ifundefined{c@footnote}{}{%
\renewcommand\thefootnote{%
\basexii{\value{footnote}}{\x}{\e}}}
\@ifundefined{c@part}{}{%
\renewcommand\thepart{%
\basexii{\value{part}}{\x}{\e}}}
\@ifundefined{c@subparagraph}{}{%
\renewcommand\thesubparagraph{%
\basexii{\value{subparagraph}}{\x}{\e}}}
\@ifundefined{c@paragraph}{}{%
\renewcommand\theparagraph{%
\basexii{\value{paragraph}}{\x}{\e}}}
\@ifundefined{c@equation}{}{%
\renewcommand\theequation{%
\basexii{\value{equation}}{\x}{\e}}}
\@ifundefined{c@figure}{}{%
\renewcommand\thefigure{%
\basexii{\value{figure}}{\x}{\e}}}
\@ifundefined{c@table}{}{%
\renewcommand\thetable{%
\basexii{\value{table}}{\x}{\e}}}
\@ifundefined{c@table}{}{%
\renewcommand\thempfootnote{%
\basexii{\value{mpfootnote}}{\x}{\e}}}
\@ifundefined{c@enumi}{}{%
\renewcommand\theenumi{%
\basexii{\value{enumi}}{\x}{\e}}}
\@ifundefined{c@enumii}{}{%
\renewcommand\theenumii{%
\basexii{\value{enumii}}{\x}{\e}}}
\@ifundefined{c@enumiii}{}{%
\renewcommand\theenumiii{%
\basexii{\value{enumiii}}{\x}{\e}}}
\@ifundefined{c@enumiv}{}{%
\renewcommand\theenumiv{%
\basexii{\value{enumiv}}{\x}{\e}}}
\@ifundefined{c@chapter}{%
\renewcommand\thesection{%
\basexii{\value{section}}{\x}{\e}}
\renewcommand\thesubsection{%
\thesection.\basexii{\value{subsection}}{\x}{\e}}
\renewcommand\thesubsubsection{%
\thesubsection.\basexii{\value{subsubsection}}{\x}{\e}}
}{
\renewcommand\thechapter{%
\basexii{\value{chapter}}{\x}{\e}}
\renewcommand\thesection{%
\thechapter.\basexii{\value{section}}{\x}{\e}}
\renewcommand\thesubsection{%
\thesection.\basexii{\value{subsection}}{\x}{\e}}
\renewcommand\thesubsubsection{%
\thesubsection.\basexii{\value{subsubsection}}{\x}{\e}}
}
\@ifundefined{mainmatter}{}{%
\g@addto@macro\mainmatter{%
\@ifundefined{c@page}{}{%
\renewcommand\thepage{\basexii{\value{page}}{\x}{\e}}}
\@ifundefined{c@footnote}{}{%
\renewcommand\thefootnote{\basexii{\value{footnote}}{\x}{\e}}}
\@ifundefined{c@part}{}{%
\renewcommand\thepart{\basexii{\value{part}}{\x}{\e}}}
\@ifundefined{c@subparagraph}{}{%
\renewcommand\thesubparagraph{%
\basexii{\value{subparagraph}}{\x}{\e}}}
\@ifundefined{c@paragraph}{}{%
\renewcommand\theparagraph{%
\basexii{\value{paragraph}}{\x}{\e}}}
\@ifundefined{c@equation}{}{%
\renewcommand\theequation{%
\basexii{\value{equation}}{\x}{\e}}}
\@ifundefined{c@figure}{}{%
\renewcommand\thefigure{%
\basexii{\value{figure}}{\x}{\e}}}
\@ifundefined{c@table}{}{%
\renewcommand\thetable{%
\basexii{\value{table}}{\x}{\e}}}
\@ifundefined{c@table}{}{%
\renewcommand\thempfootnote{%
\basexii{\value{mpfootnote}}{\x}{\e}}}
\@ifundefined{c@enumi}{}{%
\renewcommand\theenumi{%
\basexii{\value{enumi}}{\x}{\e}}}
\@ifundefined{c@enumii}{}{%
\renewcommand\theenumii{%
\basexii{\value{enumii}}{\x}{\e}}}
\@ifundefined{c@enumiii}{}{%
\renewcommand\theenumiii{%
\basexii{\value{enumiii}}{\x}{\e}}}
\@ifundefined{c@enumiv}{}{%
\renewcommand\theenumiv{%
\basexii{\value{enumiv}}{\x}{\e}}}
\@ifundefined{c@chapter}{
\renewcommand\thesection{%
\basexii{\value{section}}{\x}{\e}}
\renewcommand\thesubsection{%
\thesection.\basexii{\value{subsection}}{\x}{\e}}
\renewcommand\thesubsubsection{%
\thesubsection.\basexii{\value{subsubsection}}{\x}{\e}}
}{
\renewcommand\thechapter{%
\basexii{\value{chapter}}{\x}{\e}}
\renewcommand\thesection{%
\thechapter.\basexii{\value{section}}{\x}{\e}}
\renewcommand\thesubsection{%
\thesection.\basexii{\value{subsection}}{\x}{\e}}
\renewcommand\thesubsubsection{%
\thesubsection.\basexii{\value{subsubsection}}{\x}{\e}}
} % end if it's defined
}
}
}{} % end redefinition of counters block
\endinput
%%
%% End of file `dozenal.sty'.
