-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathengnum.sty
88 lines (88 loc) · 2.69 KB
/
engnum.sty
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
\typeout{ TeX or LaTeX sub-style EngNum <93-Jul-22 jh>}
%
% EngNum.sty
% Changes numbers 0-20 into English words.
%
% USAGE
% Include this file (in LaTeX you can say \documentstyle[..,engnum,..]{..})
% Then
% Chapter \engnum{4} produces Chapter four
% Chapter \engnum{14} produces Chapter fourteen
% Chapter \engnum{24} produces Chapter 24
% Chapter \Engnum{4} produces Chapter Four
%
% INSTALLATION
% Put this where your TeX looks for style files. In emTeX that is probably
% c:\emtex\texinputs\engnum.sty.
%
% REMARKS
% 1) Obviously one way to expand this style is to add the ability to do
% large numbers. But my style guide says numbers 20 or larger should be
% written in digits.
% 2) I used this style to change chapter titles from Chapter 1 to Chapter One.
% I changed the LaTeX art10.sty file to:
% \input{engnum.sty} %93-Jul-22 jh: new line
% \def\@makechapterhead#1{%
% \vspace*{50\p@}%
% {\parindent \z@\raggedright
% \ifnum \c@secnumdepth >\m@ne
% \huge\bf \@chapapp{} \Englishnumber{\thechapter} %93-Jul-22 jh: change
% \par
% \vskip 20\p@ \fi
% \Huge \bf
% #1\par
% \nobreak
% \vskip 40\p@
% }}
%
% BUGS
% 1) No attempt to deal with negatives. I only use it in the chapter title.
%
% HISTORY
% 93-Jul-22 jim hefferon Written.
%
\def\englishnumber#1{\ifcase#1
zero\or
one\or
two\or
three\or
four\or
five\or
six\or
seven\or
eight\or
nine\or
ten\or
eleven\or
twelve\or
thirteen\or
fourteen\or
fifteen\or
sixteen\or
seventeen\or
eighteen\or
nineteen\else
\number#1\fi}
\def\Englishnumber#1{\ifcase#1
Zero\or
One\or
Two\or
Three\or
Four\or
Five\or
Six\or
Seven\or
Eight\or
Nine\or
Ten\or
Eleven\or
Twelve\or
Thirteen\or
Fourteen\or
Fifteen\or
Sixteen\or
Seventeen\or
Eighteen\or
Nineteen\else
\number#1\fi}
\endinput