diff options
author | Karl Berry <karl@freefriends.org> | 2015-01-28 22:27:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-01-28 22:27:37 +0000 |
commit | 801a929a29f38ec92e3a8cea4c6a4bfa7d1653f5 (patch) | |
tree | 6a447ad290cc89c7ec93f6290d480f7709d595f1 /Master/texmf-dist/source/fonts | |
parent | 1de583ae717a259979d5bd0be6576b0dd4d4f83e (diff) |
dozenal (28jan15)
git-svn-id: svn://tug.org/texlive/trunk@36157 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/fonts')
-rw-r--r-- | Master/texmf-dist/source/fonts/dozenal/dozenal.dtx | 277 |
1 files changed, 167 insertions, 110 deletions
diff --git a/Master/texmf-dist/source/fonts/dozenal/dozenal.dtx b/Master/texmf-dist/source/fonts/dozenal/dozenal.dtx index 4024348b6bb..bb2f417396b 100644 --- a/Master/texmf-dist/source/fonts/dozenal/dozenal.dtx +++ b/Master/texmf-dist/source/fonts/dozenal/dozenal.dtx @@ -24,7 +24,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{dozenal}[2015/01/01 v5.1 support for dozenal fonts] +%<package>\ProvidesPackage{dozenal}[2015/01/27 v5.2 support for dozenal fonts] %<*driver> \documentclass{ltxdoc} @@ -40,7 +40,7 @@ \end{document} %</driver> % \fi -% \title{The \texttt{dozenal} Package, v5.1} +% \title{The \texttt{dozenal} Package, v5.2} % \author{Donald P.\ Goodman III} % \date{\today} % @@ -51,11 +51,11 @@ % numerical system. It redefines all basic \LaTeX\ % counters, provides a command for converting arbitrary % decimal numbers into dozenal, and provides new, real -% Metafont characters for ten and eleven, though the +% \MF\ characters for ten and eleven, though the % commands for producing them can be redefined to produce % any figure. As of v2.0, it also includes Type 1 versions -% of the fonts, used automatically whenever T1 encoding is -% selected for the document. This package uses the |\basexii| +% of the fonts, selected (as of v5.0) with the |typeone| +% package option. This package uses the |\basexii| % algorithm by David Kastrup. % \end{abstract} % @@ -93,17 +93,50 @@ % fine with the more common body fonts, as well. % % This document was typeset in accordance with the \LaTeX\ -% \textsc{docstrip} utility. +% \textsc{docstrip} utility, which allows automatic +% extraction of source code and documentation from the same +% source. % -% \section{Usage} -% \label{sect:usage} +% \section{Basic Functionality} +% \label{sect:func} % -% The |dozenal| package provides four new commands (though -% I can only take credit for two of them). The first, and -% by far the most important given the purpose and content of -% this package, is |\basexii|\DescribeMacro{\basexii}. This -% is a very simple command which takes the following -% structure: +% The |dozenal| package performs several basic tasks, which +% are the core of its functionality. A brief listing of +% them will help the user understand the options available, +% which are explained later on in this document. +% +% \begin{itemize} +% \item Provides commands for converting decimal numbers to +% dozenal and back again. (The ``back again,'' conversion +% of dozenal back to decimal, only works in limited +% circumstances.) +% \item Provides default characters for the two transdecimal +% digits, ``\x'' for ten and ``\e'' for eleven; these +% correspond to the accepted Unicode standard digits +% ``turned digit two'' and ``turned digit three,'' which +% have been approved for inclusion in Unicode, and are +% expected to be part of the official standard sometime in +% 1200 (2016.). These characters copy-paste as ``X'' and +% ``E,'' the (somewhat) standard ASCII representations of +% these two digits. However, other characters can easily be +% substituted if desired. +% \item Redefines the counters in standard \LaTeX\ document +% classes (such as |article|, |book|, and so forth) to use +% dozenal rather than decimal. This behavior can be shut +% off if desired. +% \end{itemize} +% +% That covered, we can now move on to how these features are +% exploited by the user. +% +% \section{Base Conversion} +% \label{sect:numconv} +% +% The |dozenal| package provides several new commands for +% base conversion. The first, and by far the most important +% given the purpose and content of this package, is +% |\basexii|\DescribeMacro{\basexii}. This is a very simple +% command which takes the following structure: % \begin{quote} % \cs{basexii}\marg{number}\marg{ten symbol}\marg{eleven symbol} % \end{quote} @@ -125,6 +158,7 @@ % algorithm on comp.text.tex; it is included here with his % kind and generous permission. % +% \label{page:dozens} % That one would want to use the same ten and eleven symbols % throughout a document seems a reasonable assumption; % therefore, I have provided a simplified version of the @@ -133,59 +167,6 @@ % converted; the ten and eleven symbols used are those % produced by the commands |\x| and |\e|, to which we'll get % in a moment. -% -% |\x|\DescribeMacro{\x}\ and |\e|\DescribeMacro{\e}\ are the -% commands used to quickly and easily access the symbols for -% ten and eleven without having to use active characters -% (the \TeX\ gurus will know what that means; if you don't -% know, that's okay; you don't need to to use this package -% effectively). In any case, |\x| and |\e| default to using -% the special dozenal characters that are part of this -% package; they could be easily redefined if for some reason -% you don't like the Pitman characters (which this package, -% and the Dozenal Society of Great Britain, prefer), in the -% following manner: -% \begin{quote} -% |\renewcommand\x{X}| -% \end{quote} -% Or whichever characters you like to use. If you prefer -% the Dozenal Society of America's proposed characters (a -% stylized X and E), then this package will disappoint you. -% May I suggest |$\chi$| ($\chi$) and |$\xi$| ($\xi$) as a -% stopgap while you locate or produce real characters of -% your own? Sorry; I'm an American myself, but I much -% prefer the Pitman characters for a variety of reasons -% (feel free to email me if you care), and creating fonts in -% \MF, even small and inconsequential ones like this, is too -% much work for characters that I don't even like. -% -% The |dozenal| package also redefines all the standard -% \LaTeX\ counters, such as |section| and |enumii|. If -% you've defined your own counters, you'll need to define -% them yourself; however, this is an easy matter: -% \begin{quote} -% |\renewcommand\thecounter{\basexii{\arabic{counter}}{\x}{\e}}| -% \end{quote} -% For example. Of course, you can fill in the |\x| and |\e| -% with whatever you want (though it would make more sense to -% simply redefine |\x| and |\e|, so that all the counters -% 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|). -% -% The |typeone|\DescribeMacro{typeone}\ option forces -% |dozenal| to provide Postscript Type 1 fonts rather than -% \MF\ bitmaps to \TeX. Both of these are produced from the -% same font files, though, so the difference is very slight. % % Finally, as of v5.0, we can convert numbers back to % decimal from dozenal, if we wish. We do this with the @@ -196,7 +177,7 @@ % the number are 0--9, |\x|, and |\e|. Second, these will % only work with \emph{unexpanded} |\x| and |\e|. If you % don't know what this means, then good for you; \TeX\ -% programmers will sympathize. +% programmers will envy you. % % To illustrate these limitations, let's define a new % counter and dozenize it. Here, we define the counter and @@ -245,14 +226,47 @@ % So |\basex| is of limited utility, but it's a nice tool to % add to the box. % -% \section{The Fonts} +% \section{Dozenal Characters and Fonts} % \label{sect:fonts} % +% \subsection{Shorthands for Dozenal Characters} +% \label{sub:shorthands} +% +% To make use of the |\dozens| shorthand discussed +% earlier,\footnote{See supra, Section \ref{sect:numconv}, +% at page \pageref{page:dozens}.} you need to have the +% commands |\x| and |\e| defined. Fortunately, this package +% does that for you. +% +% |\x|\DescribeMacro{\x}\ and |\e|\DescribeMacro{\e}\ are +% the commands used to quickly and easily access the symbols +% for ten and eleven. They default to using the special +% dozenal characters that are part of this package; they +% could be easily redefined if for some reason you don't +% like the Pitman characters (which are soon to be included +% in Unicode) in the following manner: +% \begin{quote} +% |\renewcommand\x{X}| +% \end{quote} +% Or whichever characters you like to use. If you prefer +% the Dozenal Society of America's proposed characters (a +% stylized X and E), then this package will disappoint you. +% May I suggest |$\chi$| ($\chi$) and |$\xi$| ($\xi$) as a +% stopgap while you locate or produce real characters of +% your own? Sorry; I'm an American myself, but I much +% prefer the Pitman characters for a variety of reasons +% (feel free to email me if you care), and creating fonts in +% \MF, even small and inconsequential ones like this, is too +% much work for characters that I don't even like. +% +% \subsection{The \texttt{dozenal} Fonts} +% \label{sub:dozfonts} +% % 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 +% Computer Modern fonts; they work passably well with % Times-type fonts and with kpfonts, and possibly with % others. % @@ -293,24 +307,56 @@ % command, which takes one argument: the number, 1--6, % which you want to put in tallies. Entering ``X'' or ``E'' % will yield ``\x'' or ``\e'' respectively. Other -% characters will produce nothing. Any character produced -% by |\tally| is a \MF\ bitmap, not an outline, even if your -% document is otherwise producing outlines. +% characters will produce nothing. +% +% The fonts are all prefixed |dozch|, if for some reason +% direct access to them is needed. +% +% \section{Package Options} +% \label{sect:packopts} +% +% The |dozenal| package redefines all the standard +% \LaTeX\ counters, such as |section| and |enumii|. If +% you've defined your own counters, you'll need to dozenize +% them yourself; however, this is an easy matter: +% \begin{quote} +% |\renewcommand\thecounter{\basexii{\arabic{counter}}{\x}{\e}}| +% \end{quote} +% For example. Of course, you can fill in the |\x| and |\e| +% with whatever you want (though it would make more sense to +% simply redefine |\x| and |\e|, so that all the counters +% would use the same characters), or you could use the +% |\dozens| command instead. Whatever your pleasure might +% be. +% +% If you \emph{don't} want all the counters to be redefined, +% or if you're using a class which doesn't include basic +% \LaTeX\ counters, you'll want to use the |nocounters| +% option. 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|). +% +% The |dozenal| fonts were designed in \MF, and they are +% distributed in both \MF-generated bitmaps and autotraced +% Postscript Type1 fonts. The +% |typeone|\DescribeMacro{typeone}\ option forces |dozenal| +% to provide Postscript Type 1 fonts rather than \MF\ +% bitmaps to \TeX. Both of these are produced from the same +% font files, though, so the difference is very slight. +% However, the Type1 fonts do generally look better on +% screen; the |typeone| option will probably be used most of +% the time that |dozenal| itself is used. % -% 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} % -% 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 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. +% Make sure that we have fixltx2e loaded, so that the +% |\TextorMath| magic will work. % \begin{macrocode} \RequirePackage{fixltx2e} % \end{macrocode} @@ -328,6 +374,10 @@ \DeclareOption{nocounters}{% \def\nocounters{}% }% +% \end{macrocode} +% Now we define the |typeone| option, which forces the use +% of the Type 1 versions of the dozenal fonts. +% \begin{macrocode} \newif\iftypeone\typeonefalse \DeclareOption{typeone}{\typeonetrue} \ProcessOptions\relax @@ -341,35 +391,42 @@ % This includes definitions for both T1 and OT1 encodings, % so it will work with either. % \begin{macrocode} -\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 }{} -\ifpdf - \pdfmapfile{=fdz.map} -\fi -\DeclareFontFamily{T1}{dozch}{} -\DeclareFontShape{T1}{dozch}{m}{n}{<-> fdzr8r }{} -\DeclareFontShape{T1}{dozch}{bx}{n}{<-> fdzb8r }{} -\DeclareFontShape{T1}{dozch}{m}{sl}{<-> fdzs8r }{} -\DeclareFontShape{T1}{dozch}{bx}{sl}{<-> fdzbo8r }{} -\DeclareFontShape{T1}{dozch}{m}{it}{<-> fdzso8r }{} -\DeclareFontShape{T1}{dozch}{bx}{it}{<-> fdzbi8r }{} -%\newcommand\doz[1]{{\fontfamily{dozch}\selectfont #1}} \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}}% \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}}% \fi% \newcommand\x{\TextOrMath{\protect\doz{{X}}}{\X}}% |