1 | %% |
---|
2 | %% This is file `fc-english.def', |
---|
3 | %% generated with the docstrip utility. |
---|
4 | %% |
---|
5 | %% The original source files were: |
---|
6 | %% |
---|
7 | %% fmtcount.dtx (with options: `fc-english.def,package') |
---|
8 | %% Copyright (C) 2005 Nicola Talbot, all rights reserved. |
---|
9 | %% If you modify this file, you must change its name first. |
---|
10 | %% You are NOT ALLOWED to distribute this file alone. You are NOT |
---|
11 | %% ALLOWED to take money for the distribution or use of either this |
---|
12 | %% file or a changed version, except for a nominal charge for copying |
---|
13 | %% etc. |
---|
14 | %% \CharacterTable |
---|
15 | %% {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 |
---|
16 | %% 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 |
---|
17 | %% Digits \0\1\2\3\4\5\6\7\8\9 |
---|
18 | %% Exclamation \! Double quote \" Hash (number) \# |
---|
19 | %% Dollar \$ Percent \% Ampersand \& |
---|
20 | %% Acute accent \' Left paren \( Right paren \) |
---|
21 | %% Asterisk \* Plus \+ Comma \, |
---|
22 | %% Minus \- Point \. Solidus \/ |
---|
23 | %% Colon \: Semicolon \; Less than \< |
---|
24 | %% Equals \= Greater than \> Question mark \? |
---|
25 | %% Commercial at \@ Left bracket \[ Backslash \\ |
---|
26 | %% Right bracket \] Circumflex \^ Underscore \_ |
---|
27 | %% Grave accent \` Left brace \{ Vertical bar \| |
---|
28 | %% Right brace \} Tilde \~} |
---|
29 | \ProvidesFile{fc-english}[2005/04/29] |
---|
30 | \newcommand{\@ordinalMenglish}[1]{% |
---|
31 | \@orgargctr=#1\relax |
---|
32 | \@ordinalctr=#1% |
---|
33 | \@modulo{\@ordinalctr}{100}% |
---|
34 | \ifnum\@ordinalctr=11 |
---|
35 | \the\@orgargctr\fmtord{th}% |
---|
36 | \else |
---|
37 | \ifnum\@ordinalctr=12 |
---|
38 | \the\@orgargctr\fmtord{th}% |
---|
39 | \else |
---|
40 | \ifnum\@ordinalctr=13 |
---|
41 | \the\@orgargctr\fmtord{th}% |
---|
42 | \else |
---|
43 | \@modulo{\@ordinalctr}{10}% |
---|
44 | \ifcase\@ordinalctr |
---|
45 | \the\@orgargctr\fmtord{th}% case 0 |
---|
46 | \or \the\@orgargctr\fmtord{st}% case 1 |
---|
47 | \or \the\@orgargctr\fmtord{nd}% case 2 |
---|
48 | \or \the\@orgargctr\fmtord{rd}% case 3 |
---|
49 | \else |
---|
50 | \the\@orgargctr\fmtord{th}% default case |
---|
51 | \fi |
---|
52 | \fi |
---|
53 | \fi |
---|
54 | \fi |
---|
55 | } |
---|
56 | \let\@ordinalFenglish=\@ordinalMenglish |
---|
57 | \providecommand{\andname}{and} |
---|
58 | |
---|
59 | \newcommand{\@@unitstringenglish}[1]{% |
---|
60 | \ifcase#1\relax |
---|
61 | zero% |
---|
62 | \or one% |
---|
63 | \or two% |
---|
64 | \or three% |
---|
65 | \or four% |
---|
66 | \or five% |
---|
67 | \or six% |
---|
68 | \or seven% |
---|
69 | \or eight% |
---|
70 | \or nine% |
---|
71 | \fi |
---|
72 | } |
---|
73 | |
---|
74 | \newcommand{\@@tenstringenglish}[1]{% |
---|
75 | \ifcase#1\relax |
---|
76 | \or ten% |
---|
77 | \or twenty% |
---|
78 | \or thirty% |
---|
79 | \or forty% |
---|
80 | \or fifty% |
---|
81 | \or sixty% |
---|
82 | \or seventy% |
---|
83 | \or eighty% |
---|
84 | \or ninety% |
---|
85 | \fi |
---|
86 | } |
---|
87 | |
---|
88 | \newcommand{\@@teenstringenglish}[1]{% |
---|
89 | \ifcase#1\relax |
---|
90 | ten% |
---|
91 | \or eleven% |
---|
92 | \or twelve% |
---|
93 | \or thirteen% |
---|
94 | \or fourteen% |
---|
95 | \or fifteen% |
---|
96 | \or sixteen% |
---|
97 | \or seventeen% |
---|
98 | \or eighteen% |
---|
99 | \or nineteen% |
---|
100 | \fi |
---|
101 | } |
---|
102 | |
---|
103 | \newcommand{\@@Unitstringenglish}[1]{% |
---|
104 | \ifcase#1\relax |
---|
105 | Zero% |
---|
106 | \or One% |
---|
107 | \or Two% |
---|
108 | \or Three% |
---|
109 | \or Four% |
---|
110 | \or Five% |
---|
111 | \or Six% |
---|
112 | \or Seven% |
---|
113 | \or Eight% |
---|
114 | \or Nine% |
---|
115 | \fi |
---|
116 | } |
---|
117 | |
---|
118 | \newcommand{\@@Tenstringenglish}[1]{% |
---|
119 | \ifcase#1\relax |
---|
120 | \or Ten% |
---|
121 | \or Twenty% |
---|
122 | \or Thirty% |
---|
123 | \or Forty% |
---|
124 | \or Fifty% |
---|
125 | \or Sixty% |
---|
126 | \or Seventy% |
---|
127 | \or Eighty% |
---|
128 | \or Ninety% |
---|
129 | \fi |
---|
130 | } |
---|
131 | |
---|
132 | \newcommand{\@@Teenstringenglish}[1]{% |
---|
133 | \ifcase#1\relax |
---|
134 | Ten% |
---|
135 | \or Eleven% |
---|
136 | \or Twelve% |
---|
137 | \or Thirteen% |
---|
138 | \or Fourteen% |
---|
139 | \or Fifteen% |
---|
140 | \or Sixteen% |
---|
141 | \or Seventeen% |
---|
142 | \or Eighteen% |
---|
143 | \or Nineteen% |
---|
144 | \fi |
---|
145 | } |
---|
146 | |
---|
147 | \newcommand{\@@numberstringenglish}[1]{% |
---|
148 | \ifnum#1>99999 |
---|
149 | \PackageError{fmtcount}{Out of range}% |
---|
150 | {This macro only works for values less than 100000}% |
---|
151 | \else |
---|
152 | \ifnum#1<0 |
---|
153 | \PackageError{fmtcount}{Negative numbers not permitted}% |
---|
154 | {This macro does not work for negative numbers, however |
---|
155 | you can try typing "minus" first, and then pass the modulus of |
---|
156 | this number}% |
---|
157 | \fi |
---|
158 | \fi |
---|
159 | \@strctr=#1\relax \divide\@strctr by 1000\relax |
---|
160 | \ifnum\@strctr>9 |
---|
161 | \divide\@strctr by 10 |
---|
162 | \ifnum\@strctr>1 |
---|
163 | \@tenstring{\@strctr}% |
---|
164 | \@strctr=#1 \divide\@strctr by 1000\relax |
---|
165 | \@modulo{\@strctr}{10}% |
---|
166 | \ifnum\@strctr>0 -\@unitstring{\@strctr}\fi |
---|
167 | \else |
---|
168 | \@strctr=#1\relax |
---|
169 | \divide\@strctr by 1000 |
---|
170 | \@modulo{\@strctr}{10}% |
---|
171 | \@teenstring{\@strctr}% |
---|
172 | \fi |
---|
173 | \ \@thousand% |
---|
174 | \else |
---|
175 | \ifnum\@strctr>0 \@unitstring{\@strctr}\ \@thousand\fi |
---|
176 | \fi |
---|
177 | \@strctr=#1\relax \@modulo{\@strctr}{1000}% |
---|
178 | \divide\@strctr by 100 |
---|
179 | \ifnum\@strctr>0 |
---|
180 | \ifnum#1>1000 \ \fi\@unitstring{\@strctr}\ \@hundred% |
---|
181 | \fi |
---|
182 | \@strctr=#1\relax \@modulo{\@strctr}{100}% |
---|
183 | \ifnum#1>100 \ifnum\@strctr>0 \ \andname\ \fi\fi |
---|
184 | \ifnum\@strctr>19 |
---|
185 | \divide\@strctr by 10 |
---|
186 | \@tenstring{\@strctr}% |
---|
187 | \@strctr=#1\relax \@modulo{\@strctr}{10}% |
---|
188 | \ifnum\@strctr>0 |
---|
189 | -\@unitstring{\@strctr}% |
---|
190 | \fi |
---|
191 | \else |
---|
192 | \ifnum\@strctr<10 |
---|
193 | \ifnum\@strctr=0 |
---|
194 | \ifnum#1<100 \@unitstring{\@strctr}\fi |
---|
195 | \else |
---|
196 | \@unitstring{\@strctr}% |
---|
197 | \fi |
---|
198 | \else |
---|
199 | \@modulo{\@strctr}{10}% |
---|
200 | \@teenstring{\@strctr}% |
---|
201 | \fi |
---|
202 | \fi |
---|
203 | } |
---|
204 | |
---|
205 | \newcommand{\@numberstringMenglish}[1]{% |
---|
206 | \let\@unitstring=\@@unitstringenglish |
---|
207 | \let\@teenstring=\@@teenstringenglish |
---|
208 | \let\@tenstring=\@@tenstringenglish |
---|
209 | \def\@hundred{hundred}\def\@thousand{thousand}% |
---|
210 | \@@numberstringenglish{#1}} |
---|
211 | |
---|
212 | \let\@numberstringFenglish=\@numberstringMenglish |
---|
213 | |
---|
214 | \newcommand{\@NumberstringMenglish}[1]{% |
---|
215 | \let\@unitstring=\@@Unitstringenglish |
---|
216 | \let\@teenstring=\@@Teenstringenglish |
---|
217 | \let\@tenstring=\@@Tenstringenglish |
---|
218 | \def\@hundred{Hundred}\def\@thousand{Thousand}% |
---|
219 | \@@numberstringenglish{#1}} |
---|
220 | |
---|
221 | \let\@NumberstringFenglish=\@NumberstringMenglish |
---|
222 | \newcommand{\@@unitthstringenglish}[1]{% |
---|
223 | \ifcase#1\relax |
---|
224 | zeroth% |
---|
225 | \or first% |
---|
226 | \or second% |
---|
227 | \or third% |
---|
228 | \or fourth% |
---|
229 | \or fifth% |
---|
230 | \or sixth% |
---|
231 | \or seventh% |
---|
232 | \or eighth% |
---|
233 | \or ninth% |
---|
234 | \fi |
---|
235 | } |
---|
236 | |
---|
237 | \newcommand{\@@tenthstringenglish}[1]{% |
---|
238 | \ifcase#1\relax |
---|
239 | \or tenth% |
---|
240 | \or twentieth% |
---|
241 | \or thirtieth% |
---|
242 | \or fortieth% |
---|
243 | \or fiftieth% |
---|
244 | \or sixtieth% |
---|
245 | \or seventieth% |
---|
246 | \or eightieth% |
---|
247 | \or ninetieth% |
---|
248 | \fi |
---|
249 | } |
---|
250 | |
---|
251 | \newcommand{\@@teenthstringenglish}[1]{% |
---|
252 | \ifcase#1\relax |
---|
253 | tenth% |
---|
254 | \or eleventh% |
---|
255 | \or twelfth% |
---|
256 | \or thirteenth% |
---|
257 | \or fourteenth% |
---|
258 | \or fifteenth% |
---|
259 | \or sixteenth% |
---|
260 | \or seventeenth% |
---|
261 | \or eighteenth% |
---|
262 | \or nineteenth% |
---|
263 | \fi |
---|
264 | } |
---|
265 | |
---|
266 | \newcommand{\@@Unitthstringenglish}[1]{% |
---|
267 | \ifcase#1\relax |
---|
268 | Zeroth% |
---|
269 | \or First% |
---|
270 | \or Second% |
---|
271 | \or Third% |
---|
272 | \or Fourth% |
---|
273 | \or Fifth% |
---|
274 | \or Sixth% |
---|
275 | \or Seventh% |
---|
276 | \or Eighth% |
---|
277 | \or Ninth% |
---|
278 | \fi |
---|
279 | } |
---|
280 | |
---|
281 | \newcommand{\@@Tenthstringenglish}[1]{% |
---|
282 | \ifcase#1\relax |
---|
283 | \or Tenth% |
---|
284 | \or Twentieth% |
---|
285 | \or Thirtieth% |
---|
286 | \or Fortieth% |
---|
287 | \or Fiftieth% |
---|
288 | \or Sixtieth% |
---|
289 | \or Seventieth% |
---|
290 | \or Eightieth% |
---|
291 | \or Ninetieth% |
---|
292 | \fi |
---|
293 | } |
---|
294 | |
---|
295 | \newcommand{\@@Teenthstringenglish}[1]{% |
---|
296 | \ifcase#1\relax |
---|
297 | Tenth% |
---|
298 | \or Eleventh% |
---|
299 | \or Twelfth% |
---|
300 | \or Thirteenth% |
---|
301 | \or Fourteenth% |
---|
302 | \or Fifteenth% |
---|
303 | \or Sixteenth% |
---|
304 | \or Seventeenth% |
---|
305 | \or Eighteenth% |
---|
306 | \or Nineteenth% |
---|
307 | \fi |
---|
308 | } |
---|
309 | |
---|
310 | \newcommand{\@@ordinalstringenglish}[1]{% |
---|
311 | \@strctr=#1\relax |
---|
312 | \ifnum#1>99999 |
---|
313 | \PackageError{fmtcount}{Out of range}% |
---|
314 | {This macro only works for values less than 100000 (value given: \number\@strctr)}% |
---|
315 | \else |
---|
316 | \ifnum#1<0 |
---|
317 | \PackageError{fmtcount}{Negative numbers not permitted}% |
---|
318 | {This macro does not work for negative numbers, however |
---|
319 | you can try typing "minus" first, and then pass the modulus of |
---|
320 | this number}% |
---|
321 | \fi |
---|
322 | \fi |
---|
323 | \@strctr=#1\relax \divide\@strctr by 1000\relax |
---|
324 | \ifnum\@strctr>9 |
---|
325 | \divide\@strctr by 10 |
---|
326 | \ifnum\@strctr>1\relax |
---|
327 | \@tenstring{\@strctr}% |
---|
328 | \@strctr=#1\relax |
---|
329 | \divide\@strctr by 1000\relax |
---|
330 | \@modulo{\@strctr}{10}% |
---|
331 | \ifnum\@strctr>0 -\@unitstring{\@strctr}\fi |
---|
332 | \else |
---|
333 | \@strctr=#1\relax \divide\@strctr by 1000\relax |
---|
334 | \@modulo{\@strctr}{10}% |
---|
335 | \@teenstring{\@strctr}% |
---|
336 | \fi |
---|
337 | \@strctr=#1\relax \@modulo{\@strctr}{1000}% |
---|
338 | \ifnum\@strctr=0\ \@thousandth\else\ \@thousand \fi |
---|
339 | \else |
---|
340 | \ifnum\@strctr>0\relax |
---|
341 | \@unitstring{\@strctr}% |
---|
342 | \@strctr=#1\relax \@modulo{\@strctr}{1000}% |
---|
343 | \ifnum\@strctr=0\ \@thousandth\else\ \@thousand\fi |
---|
344 | \fi |
---|
345 | \fi |
---|
346 | \@strctr=#1\relax \@modulo{\@strctr}{1000}% |
---|
347 | \divide\@strctr by 100 |
---|
348 | \ifnum\@strctr>0 |
---|
349 | \ifnum#1>1000 \ \fi\@unitstring{\@strctr}% |
---|
350 | \@strctr=#1\relax \@modulo{\@strctr}{100}% |
---|
351 | \ifnum\@strctr=0\ \@hundredth\else\ \@hundred\fi |
---|
352 | \fi |
---|
353 | \@strctr=#1\relax \@modulo{\@strctr}{100}% |
---|
354 | \ifnum#1>100 \ifnum\@strctr>0\ and \fi\fi |
---|
355 | \ifnum\@strctr>19 |
---|
356 | \@tmpstrctr=\@strctr |
---|
357 | \divide\@strctr by 10 |
---|
358 | \@modulo{\@tmpstrctr}{10}% |
---|
359 | \ifnum\@tmpstrctr=0 \@tenthstring{\@strctr}\else \@tenstring{\@strctr}\fi |
---|
360 | \@strctr=#1\relax \@modulo{\@strctr}{10}% |
---|
361 | \ifnum\@strctr>0 |
---|
362 | -\@unitthstring{\@strctr}% |
---|
363 | \fi |
---|
364 | \else |
---|
365 | \ifnum\@strctr<10 |
---|
366 | \ifnum\@strctr=0 |
---|
367 | \ifnum#1<100 \@unitthstring{\@strctr}\fi |
---|
368 | \else |
---|
369 | \@unitthstring{\@strctr}% |
---|
370 | \fi |
---|
371 | \else |
---|
372 | \@modulo{\@strctr}{10}% |
---|
373 | \@teenthstring{\@strctr}% |
---|
374 | \fi |
---|
375 | \fi |
---|
376 | } |
---|
377 | |
---|
378 | \newcommand{\@ordinalstringMenglish}[1]{% |
---|
379 | \let\@unitthstring=\@@unitthstringenglish |
---|
380 | \let\@teenthstring=\@@teenthstringenglish |
---|
381 | \let\@tenthstring=\@@tenthstringenglish |
---|
382 | \let\@unitstring=\@@unitstringenglish |
---|
383 | \let\@teenstring=\@@teenstringenglish |
---|
384 | \let\@tenstring=\@@tenstringenglish |
---|
385 | \def\@hundred{hundred}\def\@thousand{thousand}% |
---|
386 | \def\@hundredth{hundredth}\def\@thousandth{thousandth}% |
---|
387 | \@@ordinalstringenglish{#1}} |
---|
388 | |
---|
389 | \let\@ordinalstringFenglish=\@ordinalstringMenglish |
---|
390 | |
---|
391 | \newcommand{\@OrdinalstringMenglish}[1]{% |
---|
392 | \let\@unitthstring=\@@Unitthstringenglish |
---|
393 | \let\@teenthstring=\@@Teenthstringenglish |
---|
394 | \let\@tenthstring=\@@Tenthstringenglish |
---|
395 | \let\@unitstring=\@@Unitstringenglish |
---|
396 | \let\@teenstring=\@@Teenstringenglish |
---|
397 | \let\@tenstring=\@@Tenstringenglish |
---|
398 | \def\@hundred{Hundred}\def\@thousand{Thousand}% |
---|
399 | \def\@hundredth{Hundredth}\def\@thousandth{Thousandth}% |
---|
400 | \@@ordinalstringenglish{#1}} |
---|
401 | |
---|
402 | \let\@OrdinalstringFenglish=\@OrdinalstringMenglish |
---|
403 | |
---|
404 | \endinput |
---|
405 | %% |
---|
406 | %% End of file `fc-english.def'. |
---|