Debian Codegraph @

texmf-dist/source/latex/oldstyle/oldstyle.dtx

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