summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oldstyle/oldstyle.dtx
blob: ec40bfabf79d1f3634c6fd9adacd70a0959f9b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
% \iffalse meta-comment
%
% Copyright 1995,1999 The University of Cambridge and Robin Fairbairns.
% All rights reserved.
% 
% This file is distributed under the conditions of the LaTeX Project
% Public Licence; see the file lppl.txt in the LaTeX distribution for
% details.
%
% \fi
% \CheckSum{22}
%
% \section*{Document Preambles}
%
%    \begin{macrocode}
%<*!(driver|Ucmm)>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%</!(driver|Ucmm)>
%<Ucmm>    \ProvidesFile{Ucmm.fd}%
%<oldstyle>\ProvidesPackage{oldstyle}%
%<*driver>
           \ProvidesFile{oldstyle.dtx}%
%</driver>
           [1999/05/17 v0.2 Oldstyle numerals font definitions]
%    \end{macrocode}
% \iffalse (we don't want to typeset this rubbish)
%
%<*driver>
\documentclass{ltxdoc}
\GetFileInfo{oldstyle.dtx}
\usepackage{oldstyle}
\title{The file \texttt{oldstyle.dtx} for use with
      \LaTeXe.\thanks{This file has version
           number \fileversion, dated \filedate.}}
\date{Printed \today}
\author{Robin Fairbairns}
\begin{document}
\maketitle
 \DocInput{oldstyle.dtx}
\end{document}
%</driver>
% \fi
%
%
% \section{Introduction}
%
% This file contains the external font information needed to load the
% |cmmi| and |cmmib| fonts for use to produce oldstyle numbers in
% \LaTeX{} text, together with a trivial \LaTeXe{} package to
% enable them to be used in LaTeX text.
%
% The package |oldstyle| implements two commands (one in \LaTeX~2.09
% style~--- |\oldstyle|~--- and one in \LaTeXe{} style~--- |\textos|).
%
% The numbers look like this:
%
% \begin{center}\sf
%   \begin{tabular}{ll}
%   Command & Typeset text \\
%   \hline
%   |0123456789| & \textrm{0123456789} \\
%                & (normal numbers) \\
%   |\textos{0123456789}| & \textos{0123456789} \\
%   |\textbf{0123456789}| & \textbf{\textrm{0123456789}} \\
%                         & (normal boldface) \\
%   |\textbf{%|           &                   \\
%   |  \textos{0123456789}}| & \textbf{\textos{0123456789}}
%   \end{tabular}
% \end{center}
%
% These macros do not currently address the use of old-style numerals
% from the {\small TS}1 encoding.  I do have macros for doing such a
% thing, but haven't yet integrated them with this environment.
%
% \StopEventually{}
%
% \section{The \texttt{.fd} file}
%
% The |.fd| file specifies a version of the font family |cmm| in |U|
% encoding.  This is the best I could think of (only the digits are
% oldstyle numbers, after all).
%
% I have done what I believe to be the \emph{proper}, and made
% oldstyle a new font shape, but I'm not (yet) sure about the `name'
% (|os|) I've given it.  Hence, this release is still only preliminary.
% 
%    \begin{macrocode}
%<*Ucmm>
\DeclareFontFamily{U}{cmm}{\skewchar\font'177}
\DeclareFontShape{U}{cmm}{m}{os}
    { <5> <6> <7> <8> <9> gen * cmmi
      <10><10.95>cmmi10
      <12><14.4><17.28><20.74><24.88>cmmi12
      }{}
\DeclareFontShape{U}{cmm}{b}{os}{%
      <5> <6> <7> <8> <9> gen * cmmib
      <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> cmmib10
      }{}
\DeclareFontShape{U}{cmm}{bx}{os}
   {<-> ssub * cmm/b/os}{}
%</Ucmm>
%    \end{macrocode}
%
% \section{The \texttt{.sty} file}
%
% The package is also trivial.  It defines an oldstyle family and then
% declares commands to use it.
%
%    \begin{macrocode}
%<*oldstyle>
\DeclareOldFontCommand {\oldstyle}{\usefont{U}{cmm}{m}{os}}%
                                  {\mathos}
\DeclareTextFontCommand{\textos}{\oldstylefamily}
\DeclareMathAlphabet   {\mathos}{U}{cmm}{m}{os}
%    \end{macrocode}
%
% A series of constructs follows that enable the above to work; the
% constructs are mostly copied from the source of \LaTeXe{} itself.
%    \begin{macrocode}
\DeclareRobustCommand\oldstylefamily{%
            \not@math@alphabet\osshape\mathos
            \usefont{U}{cmm}\f@series{os}}
%</oldstyle>
%    \end{macrocode}
%
% \Finale
%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%
% \endinput