From 952cdbd76083e59340d090f6155499d4df1097d7 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 20 May 2013 21:59:18 +0000
Subject: dozenal (20may13)

git-svn-id: svn://tug.org/texlive/trunk@30592 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/dozenal/dozenal.sty | 84 ++++++++++++++++++++++++-
 1 file changed, 82 insertions(+), 2 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/dozenal/dozenal.sty')

diff --git a/Master/texmf-dist/tex/latex/dozenal/dozenal.sty b/Master/texmf-dist/tex/latex/dozenal/dozenal.sty
index c7a73460df2..4b81f53e146 100644
--- a/Master/texmf-dist/tex/latex/dozenal/dozenal.sty
+++ b/Master/texmf-dist/tex/latex/dozenal/dozenal.sty
@@ -177,6 +177,63 @@
 % would use the same characters), or you could use the
 % |\dozens| command instead.  Whatever your pleasure might
 % be.
+%
+% The |nocounters|\DescribeMacro{nocounters}\ option to the
+% package prevents the redefinition of these counters.  The
+% effect of this is that the commands of the package
+% (|\basexii|, |\dozens|, etc.) are made available, but
+% all the counters will still be in decimal.  This permits
+% using dozenal characters in an otherwise decimal document;
+% it also proves useful in dozenal document in which these
+% counters are undefined (e.g., |minimal|).
+%
+% \section{The Fonts}
+% \label{sect:fonts}
+%
+% The fonts provided by the dozenal package are essentially
+% complete fonts which contain only the Pitman dozenal
+% characters; these are \x\ for ten and \e\ for eleven.
+% These characters are designed to blend well with the
+% Computer Modern fonts; they work passable well with
+% Times-type fonts and with kpfonts, and possibly with
+% others.
+%
+% The characters also come in all the appropriate shapes and
+% sizes; a few examples follow.
+%
+% \begin{center}
+% \begin{tabular}{lccc}
+% {} & Roman & \textit{Italic} & \textbf{Boldface} \\
+% \footnotesize Footnotesize & \footnotesize\x\ \e & \footnotesize\itshape
+% 	\x\ \e & \footnotesize\bfseries \x \e \\
+% \normalsize Normalsize & \normalsize\x\ \e & \normalsize\itshape
+% 	\x\ \e & \normalsize\bfseries \x \e \\
+% \LARGE LARGE & \LARGE\x\ \e & \LARGE\itshape
+% 	\x\ \e & \LARGE\bfseries \x \e \\
+% \Huge Huge & \Huge\x\ \e & \Huge\itshape
+% 	\x\ \e & \Huge\bfseries \x \e \\
+% \end{tabular}
+% \end{center}
+% 
+% They will work in paragraph or math mode without
+% distinction.
+% 
+% As of v4.0, |dozenal| also includes fonts for tally marks
+% specifically designed for use in the dozenal base.  In many
+% European countries tallies are kept in a very similar way;
+% this font demonstrates a way that such tally marks can be
+% made consistent as well as dozenal.
+% 
+% \begin{center}
+% \begin{tabular}{cccccc}
+% 1 & 2 & 3 & 4 & 5 & 6 \\
+% \Huge\tally{1} & \Huge\tally{2} & \Huge\tally{3} & \Huge\tally{4} & \Huge\tally{5} & \Huge\tally{6} \\
+% \end{tabular}
+% \end{center}
+%
+% The fonts are called |dozch|, if for some reason direct
+% access to them is needed.  The Type 1 versions are
+% prefixed |fdz|; e.g., |fdzr8a|.
 % 
 % \section{Implementation}
 % \label{sect:code}
@@ -184,7 +241,7 @@
 % First, we name the package that we provide.  This is
 % not exactly the most difficult part of the code.
 %    \begin{macrocode}
-\ProvidesPackage{dozenal}[2012/05/13 v3.3 support for dozenal fonts]
+\ProvidesPackage{dozenal}[2012/05/13 v4.0 support for dozenal fonts]
 %    \end{macrocode}
 % Now we need to make sure that we have fixltx2e loaded, so
 % that the |\TextorMath| magic will work.
@@ -196,6 +253,17 @@
 %    \begin{macrocode}
 \RequirePackage{ifpdf}
 %    \end{macrocode}
+% Now we declare the option ``nocounters'', which prevents
+% |dozenal| from redefining all the counters.  This prevents
+% errors in document classes which don't have these counters,
+% such as |minimal|.  Defines the command |\nocounters| if
+% and only if the options is named.
+%    \begin{macrocode}
+\DeclareOption{nocounters}{%
+	\def\nocounters{}%
+}%
+\ProcessOptions\relax
+%    \end{macrocode}
 % We then define the font that we're using for our
 % \MF-produced Pitman characters.  Incidentally, we also
 % define the command |\doz|, though I can't foresee any
@@ -206,7 +274,7 @@
 % so it will work with either.
 %    \begin{macrocode}
 \DeclareFontFamily{OT1}{dozch}{}
-\DeclareFontShape{OT1}{dozch}{m}{n}{<-7> dozchars6 <7> dozchars7 <8> dozchars8 <9> dozchars9 <10-11> dozchars10 <12-16> dozchars12 <17-> dozchars17  }{}
+\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 }{}
@@ -230,6 +298,12 @@
 \DeclareMathSymbol{\X}{\mathord}{dozens}{88}
 \DeclareMathSymbol{\E}{\mathord}{dozens}{69}
 %    \end{macrocode}
+% Put in some additional code for the tally marks.
+%    \begin{macrocode}
+\newcommand\tally[1]{%
+	\doz{#1}%
+}%
+%    \end{macrocode}
 % Then we define our command which will produce the dozenal
 % numbers from decimal sources.  This algorithm was taken
 % directly from the publicly available archives of
@@ -255,7 +329,12 @@
 % otherwise, in documents where |\mainmatter| is defined but
 % not used, the counters will not be redefined.  This way,
 % they're redefined in all cases.
+% 
+% This also takes care of ensuring that the counters are
+% only redefined if the ``nocounters'' options was
+% \emph{not} specified.
 %    \begin{macrocode}
+\@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}}}
@@ -311,6 +390,7 @@
 \renewcommand\thesubsubsection{\thesubsection.\basexii{\value{subsubsection}}{\x}{\e}}
 } % end if it's defined
 }}
+}{} % end redefinition of counters block
 %    \end{macrocode}
 % And that's the end.  Thanks for reading, 
 % folks; please email me with any suggestions or improvements.
-- 
cgit v1.2.3

