summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lucold/lucold.sty
blob: 1426b8cbe4a6344be139826940e0b290941ba8b7 (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lucold}[1999/05/25 Old-Style Digits for Lucida fonts]

% Author: Maurizio Loreti, aka MLO or (HAM) I3NOO
% Work:   University of Padova - Department of Physics
%         Via F. Marzolo, 8 - 35131 PADOVA - Italy
% Phone:  +39 (049) 827-7216   FAX: +39 (049) 827-7102
% EMail:  loreti@padova.infn.it
% WWW:    http://wwwcdf.pd.infn.it/~loreti/mlo.html
%
% $Id: lucold.sty,v 1.1 1999/05/25 12:16:26 loreti Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Options for \usepackage{lucold} :
%
% text (notext) : switch (do not switch) all text numerals to
%                 old-style digits;
% math (nomath) : switch (do not switch) all math numerals
%                 to old-style digits.
%
% The default: \usepackage{lucold} is equivalent to
%              \usepackage[text,nomath]{lucold} .
%
% Since I think that it has no sense to require old-style
% digits in math and not in text, with [notext,math] a
% warning is printed and the setup is changed to [text,math].

\newif\ifluc@ldtext
\newif\ifluc@ldmath

\DeclareOption{text}{\luc@ldtexttrue}
\DeclareOption{notext}{\luc@ldtextfalse}
\DeclareOption{math}{\luc@ldmathtrue}
\DeclareOption{nomath}{\luc@ldmathfalse}

\ExecuteOptions{text,nomath}
\ProcessOptions

\ifluc@ldmath
\ifluc@ldtext\relax\else%
  \luc@ldtexttrue\PackageWarningNoLine{lucold}{Old style
  digits in math and not in text? Ugh!\MessageBreak
  Also the `text' option has been set}\fi

\DeclareMathSymbol{0}{\mathalpha}{letters}{'060}
\DeclareMathSymbol{1}{\mathalpha}{letters}{'061}
\DeclareMathSymbol{2}{\mathalpha}{letters}{'062}
\DeclareMathSymbol{3}{\mathalpha}{letters}{'063}
\DeclareMathSymbol{4}{\mathalpha}{letters}{'064}
\DeclareMathSymbol{5}{\mathalpha}{letters}{'065}
\DeclareMathSymbol{6}{\mathalpha}{letters}{'066}
\DeclareMathSymbol{7}{\mathalpha}{letters}{'067}
\DeclareMathSymbol{8}{\mathalpha}{letters}{'070}
\DeclareMathSymbol{9}{\mathalpha}{letters}{'071}
\fi

\ifluc@ldtext
\renewcommand{\rmdefault}{hlos}
\fi

\endinput