summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/oldstyle
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/oldstyle
Initial commit
Diffstat (limited to 'macros/latex/contrib/oldstyle')
-rw-r--r--macros/latex/contrib/oldstyle/oldstyle.dtx144
-rw-r--r--macros/latex/contrib/oldstyle/oldstyle.ins25
-rw-r--r--macros/latex/contrib/oldstyle/oldstyle.pdfbin0 -> 71672 bytes
3 files changed, 169 insertions, 0 deletions
diff --git a/macros/latex/contrib/oldstyle/oldstyle.dtx b/macros/latex/contrib/oldstyle/oldstyle.dtx
new file mode 100644
index 0000000000..ec40bfabf7
--- /dev/null
+++ b/macros/latex/contrib/oldstyle/oldstyle.dtx
@@ -0,0 +1,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
diff --git a/macros/latex/contrib/oldstyle/oldstyle.ins b/macros/latex/contrib/oldstyle/oldstyle.ins
new file mode 100644
index 0000000000..2483e15845
--- /dev/null
+++ b/macros/latex/contrib/oldstyle/oldstyle.ins
@@ -0,0 +1,25 @@
+\def\batchfile{oldstyle.ins}
+\input docstrip.tex
+
+\keepsilent
+\askforoverwritefalse
+
+\generate{\file{Ucmm.fd}{\from{oldstyle.dtx}{Ucmm}}%
+ \file{oldstyle.sty}{\from{oldstyle.dtx}{oldstyle}}}
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space Ucmm.fd, oldstyle.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file}
+\Msg{* `oldstyle.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endinput
diff --git a/macros/latex/contrib/oldstyle/oldstyle.pdf b/macros/latex/contrib/oldstyle/oldstyle.pdf
new file mode 100644
index 0000000000..3bc9ebde28
--- /dev/null
+++ b/macros/latex/contrib/oldstyle/oldstyle.pdf
Binary files differ