summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/fonts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-09-25 21:39:05 +0000
committerKarl Berry <karl@freefriends.org>2014-09-25 21:39:05 +0000
commit0479b864babd4e35db77c2ea310686717da5fc8e (patch)
treeab3324900d4ceed9f5e4d5e8f990c6e175b2af48 /Master/texmf-dist/source/fonts
parent494fcb97cf7e15db2a8d2624cf785fbf2e8214d0 (diff)
drm (25sep14)
git-svn-id: svn://tug.org/texlive/trunk@35256 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/fonts')
-rw-r--r--Master/texmf-dist/source/fonts/drm/drm.dtx112
1 files changed, 98 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/fonts/drm/drm.dtx b/Master/texmf-dist/source/fonts/drm/drm.dtx
index 4d58118b949..4809973fe84 100644
--- a/Master/texmf-dist/source/fonts/drm/drm.dtx
+++ b/Master/texmf-dist/source/fonts/drm/drm.dtx
@@ -24,7 +24,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<package>\ProvidesPackage{drm}[2015/01/01 v2.1 support for dozenal fonts]
+%<package>\ProvidesPackage{drm}[2015/01/01 v2.2 support for dozenal fonts]
%<*driver>
\documentclass{ltxdoc}
@@ -69,7 +69,8 @@
\vskip,\vbox,\ifnodefault,\fi,\ifnodefaulttext,\fi,
\ifnodefaultmath,\fi,\ifsymbolsonly,\fi,\newlength,
\counterA,\counterB,\newcount,\r@@t,\z@,\DeclareMathRadical,
- \DeclareRobustCommand,\bBigg@,\@ifnextchar,\@sqrt}
+ \DeclareRobustCommand,\bBigg@,\@ifnextchar,\@sqrt,\@makefnmark,
+ \@thefnmark}
\begin{document}
\DocInput{drm.dtx}
@@ -77,7 +78,7 @@
%</driver>
% \fi
%
-% \title{The \texttt{drm} Font Package, v2.1}
+% \title{The \texttt{drm} Font Package, v2.2}
% \author{Donald P.\ Goodman III}
% \date{\today}
%
@@ -91,10 +92,11 @@
% used for simple display purposes, and its significant body
% of symbols can stand on its own. It comes complete with
% textual (``old-style'') and lining figures, and even has
-% \emph{small-caps figures}. It also comes with
-% extensible decorative rules to be used with ornaments from
-% itself or other fonts, along with an extremely flexible
-% ellipsis package. A set of decorative initials is planned.
+% \emph{small-caps figures}, along with superior and
+% inferior figures. It also comes with extensible
+% decorative rules to be used with ornaments from itself or
+% other fonts, along with an extremely flexible ellipsis
+% package. A set of decorative initials is planned.
% \end{abstract}
%
% \tableofcontents
@@ -763,12 +765,12 @@
% there is a surprisingly large variety of ways to write
% them.
%
-% There are, at the very least, five separate kinds of
+% There are, at the very least, seven separate kinds of
% figures: textual, lining, tabular textual, tabular
-% lining, and small caps. This last is for some reason
-% rather rare, and strictly speaking there could be tabular
-% and non-tabular versions of them, as well, but I've never
-% encountered them.
+% lining, small caps, superior, and inferior. Small caps
+% figures are for some reason rather rare, and strictly
+% speaking there could be tabular and non-tabular versions
+% of them, as well, but I've never encountered them.
%
% \emph{Textual figures}, also called \emph{old-style
% figures}, \emph{lowercase figures}, or even
@@ -850,6 +852,56 @@
% you need textual figures, typeset them in normal roman
% text.
%
+% Finally, DRM provides \emph{superior} and \emph{inferior}
+% figures. These are figures which are specially designed
+% to appear in superscripted or subscripted text,
+% respectively. These avoid text color and spacing problems
+% from forming superior figures merely from scaling and
+% raising normal figures. They look like the following:
+%
+% \begin{center}
+% \LARGE\liningthree\textdrmsupfigs{0123456789} \\
+% \liningthree\textdrminffigs{0123456789}
+% \end{center}
+%
+% By default, in DRM (unless one of the |nodefault| options
+% has been selected) footnote markers are made with superior
+% figures. Otherwise, superior figures must be selected
+% with either \DescribeMacro{\drmsupfigs}|\drmsupfigs|, or
+% the option with a single argument,
+% \DescribeMacro{\textdrmsupfigs}|\textdrmsupfigs|.
+% (Inferior numerals are selected with
+% \DescribeMacro{\drminffigs}|\drminffigs| and the
+% single-argument option,
+% \DescribeMacro{\textdrminffigs}|\textdrminffigs|.)
+% Inferior figures are typically useful for chemical
+% formul\ae, but may conceivably find other uses, as well.
+%
+% These special superior figures do end up looking
+% significantly better than merely superscripted-and-scaled
+% footnote labels:
+%
+% \begin{center}
+% \begin{tabular}{c|c}
+% \LARGE\drmelip this fact.$^6$ As\drmelip &
+% \LARGE\drmelip this fact.\textdrmsupfigs{6} As\drmelip \\
+% \end{tabular}
+% \end{center}
+%
+% The superscripted and scaled version is too large, drawing
+% more attention to itself than warranted (the purpose of a
+% footnote is, after all, to provide citation without
+% interrupting the flow of the text), not to mention that it
+% protrudes above the height of the capitals and ascenders,
+% making itself even more conspicuous; and the symbol itself
+% is too thin, with lines almost spindly. The superior
+% figure, on the right, tops off at the height of the
+% ascenders, and is specially designed to have lines of the
+% same width as the body font.\footnote{Or as near as is
+% possible and attractive, anyway; the conscious design is
+% better than the automatic solution.} This ensures an
+% overall better appearance when these figures are used.
+%
% \subsection{Symbols and Ornaments}
% \label{sub:symbols}
%
@@ -1669,6 +1721,16 @@
\DeclareFontFamily{T1}{drm}{}
\DeclareFontFamily{TS1}{drm}{}
\DeclareFontFamily{LGR}{drm}{}
+\DeclareFontFamily{U}{drmsups}{}
+\DeclareFontFamily{U}{drminfs}{}
+\DeclareFontShape{U}{drminfs}{m}{n}{ <-7> drminf6
+ <7> drminf7 <8> drminf8 <9> drminf9 <10-12> drminf10
+ <12-13> drminf12 <14-17> drminf14 <17-24> drminf17
+ <24-> drminf24 }{}
+\DeclareFontShape{U}{drmsups}{m}{n}{ <-7> drmfigs6
+ <7> drmfigs7 <8> drmfigs8 <9> drmfigs9 <10-12> drmfigs10
+ <12-13> drmfigs12 <14-17> drmfigs14 <17-24> drmfigs17
+ <24-> drmfigs24 }{}
\DeclareFontShape{T1}{drm}{m}{n}{ <-7> drm6 <7> drm7 <8> drm8
<9> drm9 <10-12> drm10 <12-13> drm12 <14-17> drm14
<17-24> drm17 <24-> drm24 }{}
@@ -1720,18 +1782,36 @@
\DeclareFontShape{LGR}{drm}{m}{n}{<-> drmgrk10 }{}
% \end{macrocode}
% Now, set the default text font as DRM unless |nodefault|
-% or |nodefaulttext| has been specified.
+% or |nodefaulttext| has been specified. Also redefine the
+% default footnote counters to use superior figures rather
+% than automatically scaled figures.
% \begin{macrocode}
\ifnodefault\else\ifnodefaulttext\else
\renewcommand\encodingdefault{T1}
\renewcommand\familydefault{drm}
+ \def\f@@n@te{footnote}
+ \def\@makefnmark{%
+ \hbox{\drmsupfigs\@thefnmark}
+ }%
\fi\fi
% \end{macrocode}
+% Give ourselves a shortcut to access the short-tailed
+% letter ``q,'' just in case we need it.
+% \begin{macrocode}
+\def\drmshortq{{\usefont{T1}{drm}{m}{n}\char'137}}
+% \end{macrocode}
+% That gives us the satisfying ``\drmshortq'' rather than
+% the ``Q'' we would otherwise get. Useful for circumstance
+% when the ``Q'' is followed by characters which hang
+% below the baseline, or in a dropped initial.
+%
% Now we move on to define commands for the more unusual
% shapes, since \LaTeXe\ doesn't have them built in. We
% start with \texttc{titling small caps}, then move on to
% \textui{upright italics}. We also define |\textgrk| and
-% |\grktext|, for typesetting in Greek characters.
+% |\grktext|, for typesetting in Greek characters. Finally,
+% we also define the commands to produce the superior and
+% inferior figures.
% \begin{macrocode}
\def\tcshape{\fontshape{tc}\selectfont}
\def\texttc#1{{\tcshape#1}}
@@ -1743,6 +1823,10 @@
\def\textui#1{{\uishape#1}}
\def\grktext{\fontencoding{LGR}\selectfont}
\def\textgrk#1{{\grktext#1}}
+\def\drmsupfigs{\usefont{U}{drmsups}{m}{n}}
+\def\textdrmsupfigs#1{{\drmsupfigs#1}}
+\def\drminffigs{\usefont{U}{drminfs}{m}{n}}
+\def\textdrminffigs#1{{\drminffigs#1}}
% \end{macrocode}
% Next, we define the weights. We know that |\textbf| will
% give us normal boldface, and that |\textmd| will return us