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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
|
% \iffalse meta-comment
%
% File: alphalph.dtx
% Version: 2011/05/13 v2.4
% Info: Convert numbers to letters
%
% Copyright (C) 1999, 2006-2008, 2010, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. This version of this license is in
% http://www.latex-project.org/lppl/lppl-1-3c.txt
% and the latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% This Current Maintainer of this work is Heiko Oberdiek.
%
% The Base Interpreter refers to any `TeX-Format',
% because some files are installed in TDS:tex/generic//.
%
% This work consists of the main source file alphalph.dtx
% and the derived files
% alphalph.sty, alphalph.pdf, alphalph.ins, alphalph.drv,
% alphalph-test1.tex, alphalph-test2.tex, alphalph-test3.tex.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/alphalph.dtx
% CTAN:macros/latex/contrib/oberdiek/alphalph.pdf
%
% Unpacking:
% (a) If alphalph.ins is present:
% tex alphalph.ins
% (b) Without alphalph.ins:
% tex alphalph.dtx
% (c) If you insist on using LaTeX
% latex \let\install=y\input{alphalph.dtx}
% (quote the arguments according to the demands of your shell)
%
% Documentation:
% (a) If alphalph.drv is present:
% latex alphalph.drv
% (b) Without alphalph.drv:
% latex alphalph.dtx; ...
% The class ltxdoc loads the configuration file ltxdoc.cfg
% if available. Here you can specify further options, e.g.
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
% Programm calls to get the documentation (example):
% pdflatex alphalph.dtx
% makeindex -s gind.ist alphalph.idx
% pdflatex alphalph.dtx
% makeindex -s gind.ist alphalph.idx
% pdflatex alphalph.dtx
%
% Installation:
% TDS:tex/generic/oberdiek/alphalph.sty
% TDS:doc/latex/oberdiek/alphalph.pdf
% TDS:doc/latex/oberdiek/test/alphalph-test1.tex
% TDS:doc/latex/oberdiek/test/alphalph-test2.tex
% TDS:doc/latex/oberdiek/test/alphalph-test3.tex
% TDS:source/latex/oberdiek/alphalph.dtx
%
%<*ignore>
\begingroup
\catcode123=1 %
\catcode125=2 %
\def\x{LaTeX2e}%
\expandafter\endgroup
\ifcase 0\ifx\install y1\fi\expandafter
\ifx\csname processbatchFile\endcsname\relax\else1\fi
\ifx\fmtname\x\else 1\fi\relax
\else\csname fi\endcsname
%</ignore>
%<*install>
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
\Msg{* Package: alphalph 2011/05/13 v2.4 Convert numbers to letters (HO)}
\Msg{************************************************************************}
\keepsilent
\askforoverwritefalse
\let\MetaPrefix\relax
\preamble
This is a generated file.
Project: alphalph
Version: 2011/05/13 v2.4
Copyright (C) 1999, 2006-2008, 2010, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
http://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of
LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
This Current Maintainer of this work is Heiko Oberdiek.
The Base Interpreter refers to any `TeX-Format',
because some files are installed in TDS:tex/generic//.
This work consists of the main source file alphalph.dtx
and the derived files
alphalph.sty, alphalph.pdf, alphalph.ins, alphalph.drv,
alphalph-test1.tex, alphalph-test2.tex, alphalph-test3.tex.
\endpreamble
\let\MetaPrefix\DoubleperCent
\generate{%
\file{alphalph.ins}{\from{alphalph.dtx}{install}}%
\file{alphalph.drv}{\from{alphalph.dtx}{driver}}%
\usedir{tex/generic/oberdiek}%
\file{alphalph.sty}{\from{alphalph.dtx}{package}}%
\usedir{doc/latex/oberdiek/test}%
\file{alphalph-test1.tex}{\from{alphalph.dtx}{test1}}%
\file{alphalph-test2.tex}{\from{alphalph.dtx}{test2,etex}}%
\file{alphalph-test3.tex}{\from{alphalph.dtx}{test2,noetex}}%
\nopreamble
\nopostamble
\usedir{source/latex/oberdiek/catalogue}%
\file{alphalph.xml}{\from{alphalph.dtx}{catalogue}}%
}
\catcode32=13\relax% active space
\let =\space%
\Msg{************************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{* alphalph.sty}
\Msg{*}
\Msg{* To produce the documentation run the file `alphalph.drv'}
\Msg{* through LaTeX.}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{*}
\Msg{************************************************************************}
\endbatchfile
%</install>
%<*ignore>
\fi
%</ignore>
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{alphalph.drv}%
[2011/05/13 v2.4 Convert numbers to letters (HO)]%
\documentclass{ltxdoc}
\usepackage{alphalph}[2011/05/13]
\makeatletter
\newalphalph{\fnsymbolwrap}[wrap]{\@fnsymbol}{}
\newcommand*{\fnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1%
\or *%
\or \dagger
\or \ddagger
\or \mathsection
\or \mathparagraph
\else
\@ctrerr
\fi
}%
}
\makeatother
\newalphalph{\fnsymbolmult}[mult]{\fnsymbolsingle}{}
\usepackage{amsmath}
\DeclareMathOperator{\opDiv}{div}
\DeclareMathOperator{\opMod}{mod}
\newcommand*{\Def}{%
\ensuremath{%
\mathrel{\mathop{:}}=%
}%
}
\usepackage{holtxdoc}[2011/11/22]
\begin{document}
\DocInput{alphalph.dtx}%
\end{document}
%</driver>
% \fi
%
% \CheckSum{1218}
%
% \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 \~}
%
% \GetFileInfo{alphalph.drv}
%
% \title{The \xpackage{alphalph} package}
% \date{2011/05/13 v2.4}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
%
% \begin{abstract}
% The package provides methods to represent numbers with a limited
% set of symbols. Both \hologo{LaTeX} and \hologo{plainTeX} are supported.
% \end{abstract}
%
% \tableofcontents
%
% \section{Documentation}
%
% \subsection{Introduction}
% \hologo{LaTeX} counters can be represented in different ways
% by using presentation commands:
% \begin{quote}
% \cs{arabic}, \cs{roman}, \cs{Roman},\\
% \cs{alph}, \cs{Alph}, \cs{fnsymbol}
% \end{quote}
% The ranges of supported counter values are more or less
% restricted. Only \cs{arabic} can be used with any counter
% value \hologo{TeX} supports.
% \begin{quote}
% \catcode`\|=12 %
% \begin{tabular}{@{}l|l|l|l@{}}
% Presentation & Supported & Ignored & Error message\\
% command & domain & values & ``Counter too large''\\
% \hline
% \cs{arabic}
% & \ttfamily -MAX..MAX & &\\
% \cs{roman}, \cs{Roman}
% & \ttfamily 1..MAX & \ttfamily -MAX..0 &\\
% \cs{alph}, \cs{Alph}
% & \ttfamily 1..26 & 0 & \ttfamily -MAX..-1, 27..MAX\\
% \cs{fnsymbol}
% & \ttfamily 1..9 & 0 & \ttfamily -MAX..-1, 10..MAX\\
% \hline
% \end{tabular}\\[1ex]
% \texttt{MAX} = \texttt{2147483647}
% \end{quote}
% Ordinal numbers are often used in documents: numbering
% of chapters, sections, figures, footnotes and so on.
% The layouter chooses \cs{Alph} for chapter numbers
% and \cs{fnsymbol} for footnotes. But what can be done
% if there are more than 26 chapters or more than 10 footnotes?
% This package \xpackage{alphalph} allows to define new
% presentation commands. They rely on a existing command
% and define presentations for values greater the limits.
% Three different methods are provided by the package.
% In the following use cases they are presentated.
%
% \subsection{Use cases}
%
% \subsubsection{Number system based on symbols}
%
% Asume you are writing a book and your lecturer demands
% that chapter numbers must be letters. But you have already
% 30 chapters and you have only 26 letters?
%
% In the decimal system the situation would be clear.
% If you run out of digits, you are using more digits
% to represent a number. This method can be also be used
% for letters. After chapter 26 with |Z| we us |AA|, |AB|, |AC|, and |AD|
% for the remaining chapters.
%
% Happily this package already defines this presentation command:
%\begin{quote}
%\begin{verbatim}
%\usepackage{alphalph}
%\renewcommand*{\thechapter}{%
% \AlphAlph{\value{chapter}}%
%}
%\end{verbatim}
%\end{quote}
% \cs{AlphAlph} generates:
% \AlphAlph{1}, \AlphAlph{2}, \AlphAlph{3}, \dots,
% \AlphAlph{26}, \AlphAlph{27}, \AlphAlph{28}, \dots
%
% The other presentation command is \cs{alphalph} for lowercase letters.
%
% \subsubsection{Wrap symbols around}
%
% Nine footnote symbols are quite a few.
% Too soon the symbols are consumed
% and \hologo{LaTeX} complains with the error ``Counter too large''.
% However, it could be acceptable to start again with the symbols
% from the beginning, especially if there are less than nine symbols
% on a page.
% This could be achieved by a counter reset.
% But finding the right place can be difficult or needs manual
% actions. Also a
% unique counter value can be desirable (e.g. for generating
% unique anchor/link names).
% Package \xpackage{alphalph} allows you to define
% a macro that implements a ``wrap around'', but letting
% the value of the counter untouched:
%\begin{quote}
%\begin{verbatim}
%\usepackage{alphalph}
%\makeatletter
%\newalphalph{\fnsymbolwrap}[wrap]{\@fnsymbol}{}
%\makeatother
%\renewcommand*{\thefootnote}{%
% \fnsymbolwrap{\value{footnote}}%
%}
%\end{verbatim}
%\end{quote}
% \cs{fnsymbolwrap} generates:
% \fnsymbolwrap{1}~(1), \fnsymbolwrap{2}~(2), \fnsymbolwrap{3}~(3), \dots,
% \fnsymbolwrap{9}~(9), \fnsymbolwrap{10}~(10), \fnsymbolwrap{11}~11, \dots
%
% \subsubsection{Multiple symbols}
%
% \Hologo{LaTeX}'s standard set of footnote symbols contains doubled
% symbols at the higher positions. Could this principle
% be generalized?
% Yes, but first we need a clean footnote symbol list without
% doubled entries, example:
%\begin{quote}
%\begin{verbatim}
%\usepackage{alphalph}
%\makeatletter
%\newcommand*{\fnsymbolsingle}[1]{%
% \ensuremath{%
% \ifcase#1%
% \or *%
% \or \dagger
% \or \ddagger
% \or \mathsection
% \or \mathparagraph
% \else
% \@ctrerr
% \fi
% }%
%}
%\makeatother
%\newalphalph{\fnsymbolmult}[mult]{\fnsymbolsingle}{}
%\renewcommand*{\thefootnote}{%
% \fnsymbolmult{\value{footnote}}%
%}
%\end{verbatim}
%\end{quote}
% The own definition of \cs{fnsymbolsingle} has the
% advantage that this list can easily modified.
% Otherwise you can use \cs{@fnsymbol} directly,
% because it uses the same first five symbols.
%\begin{quote}
%\begin{verbatim}
%\usepackage{alphalph}
%\makeatletter
%\newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}
%\makeatother
%\renewcommand*{\thefootnote}{%
% \fnsymbolmult{\value{footnote}}%
%}
%\end{verbatim}
%\end{quote}
% \cs{fnsymbolmult} generates:
% \fnsymbolmult{1}~(1), \fnsymbolmult{2}~(2), \fnsymbolmult{3}~(3),
% \fnsymbolmult{4}~(4), \fnsymbolmult{5}~(5), \fnsymbolmult{6}~(6),
% \dots, \fnsymbolmult{16}~16, \fnsymbolmult{17}~17, \dots
%
% \bigskip
% The same method can also be used for the chapter problem
% in the first discussed use case:
%\begin{quote}
%\begin{verbatim}
%\usepackage{alphalph}
%\makeatletter
%\newalphalph{\AlphMult}[mult]{\@Alph}{26}
%\makeatother
%\renewcommand*{\chapter}{%
% \AlphMult{\value{chapter}}%
%}
%\end{verbatim}
%\end{quote}
% \cs{AlphMult} then generates AA, BB, CC, and DD for chapters 27--30.
%
% \subsection{Glossary}
%
% \begin{description}
% \item[Counter presentation command] is a macro that
% expects a \hologo{LaTeX} counter name as argument.
% Numbers cannot be used. Examples:
% \cs{arabic}, \cs{alph}, \cs{fnsymbol}.
% \item[Number presentation command] is a macro that
% expects a number as argument. A number is anything
% that \hologo{TeX} accepts as number including \cs{value}.
% Examples: \cs{alphalph}, \cs{AlphAlph}, \cs{alphalph@alph}
%
% However, \cs{alph} or \cs{fnsymbol} are not number
% presentation commands because they expect a counter
% name as argument. Happily \hologo{LaTeX} counter presentation
% commands internally uses number presentation commands
% with the same name, but prefixed by `@'. Thus
% \cs{@alph}, \cs{@fnsymbol} are number presentation commands.
% \item[Symbols provider] is a command that can be used
% to get a list of symbols. For example, \cs{@Alph}
% provides the 26 uppercase letters from `A' to `Z'.
% Basically a symbol provider is a number presentation
% command, usually with a limited range.
% \item[Number of symbols] is the number of the
% last symbol slot of a symbol provider. Thus \cs{@Alph}
% generates 26 symbols, \cs{@fnsymbol} provides 9 symbols.
% \end{description}
%
% \subsection{Package usage}
%
% The package \Package{alphalph} can be used with both \hologo{plainTeX}
% and \hologo{LaTeX}:
% \begin{description}
% \item[\hologo{plainTeX}:] |\input alphalph.sty|
% \item[\hologo{LaTeX2e}:] |\usepackage{alphalph}|\\
% There aren't any options.
% \end{description}
%
% \subsection{User commands}
%
% \begin{declcs}{AlphAlph} \M{number}\\
% \cs{alphalph} \M{number}
% \end{declcs}
% Both macros are number presentation commands that
% expects a number as argument. \hologo{LaTeX} counters
% are used with \cs{value}.
%
% The macros represents a number by letters.
% First single letters |A..Z| are used, then
% two letters |AA..ZZ|, three letters |AAA...ZZZ|, \dots
% follow.
%
% Macro \cs{AlphAlph} uses uppercase letters,
% \cs{alphalph} generates the lowercase variant.
% \begin{quote}
% \catcode`\|=12
% \def\entry#1{
% \texttt{#1}
% & \texttt{\AlphAlph{#1}}
% & \texttt{\alphalph{#1}}
% }
% \begin{tabular}{@{}l|l|l@{}}
% \meta{number} & \verb|\AlphAlph{|\meta{number}\verb|}|
% & \verb|\alphalph{|\meta{number}\verb|}|\\
% \hline
% \entry{1}\\
% \entry{2}\\
% \entry{26}\\
% \entry{27}\\
% \entry{30}\\
% \entry{2000}\\
% \entry{3752127}\\
% \entry{10786572}\\
% \entry{2147483647}\\
% \end{tabular}
% \end{quote}
%
% \begin{declcs}{newalphalph}
% \M{cmd}
% |[|\meta{method}|]|
% \M{symbols provider}
% \M{number of symbols}
% \end{declcs}
% Macro \cs{newalphalph} defines \meta{cmd} as new
% number presentation command. Like \cs{newcommand} an error
% is thrown, if macro \meta{cmd} already exists.
%
% The \meta{method} is one of |alph|, |wrap|, or |mult|.
% The default is |alph|.
%
% As symbol provider a number presentation command
% can be used, e.g. \cs{@fnsymbol}, \cs{@Alph}, or
% \cs{alphalph@alph}.
%
% The last argument is the number of symbols.
% If the argument is empty, then \cs{newalphalph} tries
% to find this number itself. \hologo{LaTeX}'s number presentation
% commands throw an error message, if the number is too large.
% This error message is put in a macro \cs{@ctrerr}.
% Thus \cs{newalphalph} calls the symbol provider and tests
% a number by typesetting it in a temporary box. The error
% macro \cs{@ctrerr} is catched, it proofs that the number
% is not supported. Also if the width of the result is zero
% the number is considered as unavailable.
%
% The empty argument is useful for potentially variable lists.
% However if the end cannot be detected, then the number of
% symbols must be given. This is also a lot faster. Therefore don't
% let the argument empty without reason.
%
% \subsection{Programmer commands}
%
% \begin{declcs}{alphalph@Alph} \M{number}\\
% \cs{alphalph@alph} \M{number}
% \end{declcs}
% They are basically the same as \cs{@Alph} and \cs{@alph}.
% Some languages of package \xpackage{babel} redefine
% \hologo{LaTeX}'s macros to include some font setup that
% breaks expandibility. Therefore \cs{AlphAlph} and \cs{alphalph}
% are based on \cs{alphalph@Alph} and \cs{alphalph@alph} to get
% the letters. The behaviour of these symbol providers for numbers
% outside the range |1..26| is undefined.
%
% \subsection{Design principles}
%
% \subsubsection{Number presentation commands}
%
% All number presentation commands that this package defines
% (including \cs{alphalph} and \cs{AlphAlph}) have the following
% properties:
% \begin{itemize}
% \item They are fully expandable. This means that they can safely
% \begin{itemize}
% \item be written to a file,
% \item used in moving arguments (\hologo{LaTeX}: they are \emph{robust}),
% \item used in a \cmd{\csname}-\cmd{\endcsname} pair.
% \end{itemize}
% \item If the argument is zero or negative, the commands expand
% to nothing like \cmd{\romannumeral}.
% \item The argument is a \hologo{TeX} number. Anything that would be
% accepted by \cmd{\number} is a valid argument:
% \begin{itemize}
% \item explicite constants,
% \item macros that expand to a number,
% \item count registers, \hologo{LaTeX} counter can used
% via \cmd{\value}, e.\,g.:\\
% |\alphalph{\value{page}}|
% \item \dots
% \end{itemize}
% \item \hologo{eTeX}'s numeric expressions are supported, if \hologo{eTeX} is
% available. Then \cs{numexpr} is applied to the argument.
% Package \cs{calc}'s expressions are not supported.
% That would violate the expandibility.
% \end{itemize}
%
% \subsubsection{General usability}
%
% \begin{description}
% \item[\hologo{TeX} format:]
% The package does not depend on \hologo{LaTeX}, it can also be used
% by \hologo{plainTeX}, for example.
% \item[\hologo{eTeX}:] \eTeX is supported, the macros are shorter and
% faster. But \eTeX's extensions are not requirements.
% Without \hologo{eTeX}, just the implementation changes. The properties
% remain unchanged.
% \end{description}
%
% \StopEventually{
% }
%
% \section{Implementation}
% \subsection{Begin\texorpdfstring{ of package}{}}
% \begin{macrocode}
%<*package>
% \end{macrocode}
% Reload check, especially if the package is not used with \LaTeX.
% \begin{macrocode}
\begingroup\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
\endlinechar=13 %
\catcode35=6 % #
\catcode39=12 % '
\catcode44=12 % ,
\catcode45=12 % -
\catcode46=12 % .
\catcode58=12 % :
\catcode64=11 % @
\catcode123=1 % {
\catcode125=2 % }
\expandafter\let\expandafter\x\csname ver@alphalph.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
\def\empty{}%
\ifx\x\empty % LaTeX, first loading,
% variable is initialized, but \ProvidesPackage not yet seen
\else
\expandafter\ifx\csname PackageInfo\endcsname\relax
\def\x#1#2{%
\immediate\write-1{Package #1 Info: #2.}%
}%
\else
\def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
\fi
\x{alphalph}{The package is already loaded}%
\aftergroup\endinput
\fi
\fi
\endgroup%
% \end{macrocode}
% Package identification:
% \begin{macrocode}
\begingroup\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
\endlinechar=13 %
\catcode35=6 % #
\catcode39=12 % '
\catcode40=12 % (
\catcode41=12 % )
\catcode44=12 % ,
\catcode45=12 % -
\catcode46=12 % .
\catcode47=12 % /
\catcode58=12 % :
\catcode64=11 % @
\catcode91=12 % [
\catcode93=12 % ]
\catcode123=1 % {
\catcode125=2 % }
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1#2#3[#4]{\endgroup
\immediate\write-1{Package: #3 #4}%
\xdef#1{#4}%
}%
\else
\def\x#1#2[#3]{\endgroup
#2[{#3}]%
\ifx#1\@undefined
\xdef#1{#3}%
\fi
\ifx#1\relax
\xdef#1{#3}%
\fi
}%
\fi
\expandafter\x\csname ver@alphalph.sty\endcsname
\ProvidesPackage{alphalph}%
[2011/05/13 v2.4 Convert numbers to letters (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \begin{macrocode}
\begingroup\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
\endlinechar=13 %
\catcode123=1 % {
\catcode125=2 % }
\catcode64=11 % @
\def\x{\endgroup
\expandafter\edef\csname AlPh@AtEnd\endcsname{%
\endlinechar=\the\endlinechar\relax
\catcode13=\the\catcode13\relax
\catcode32=\the\catcode32\relax
\catcode35=\the\catcode35\relax
\catcode61=\the\catcode61\relax
\catcode64=\the\catcode64\relax
\catcode123=\the\catcode123\relax
\catcode125=\the\catcode125\relax
}%
}%
\x\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
\endlinechar=13 %
\catcode35=6 % #
\catcode64=11 % @
\catcode123=1 % {
\catcode125=2 % }
\def\TMP@EnsureCode#1#2{%
\edef\AlPh@AtEnd{%
\AlPh@AtEnd
\catcode#1=\the\catcode#1\relax
}%
\catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{43}{12}% +
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{59}{12}% ;
\TMP@EnsureCode{60}{12}% <
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{124}{12}% |
\edef\AlPh@AtEnd{\AlPh@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Package loading}
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input infwarerr.sty\relax
\input intcalc.sty\relax
\else
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{intcalc}[2007/09/09]%
\fi
% \end{macrocode}
%
% \subsection{\hologo{eTeX} detection}
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname numexpr\endcsname\relax
\catcode124=9 % '!': ignore
\catcode43=14 % '+': comment
\else
\catcode124=14 % '!': comment
\catcode43=9 % '+': ignore
\fi
% \end{macrocode}
%
% \subsection{Help macros}
%
% \begin{macro}{\AlPh@Error}
% \begin{macrocode}
\def\AlPh@Error#1{%
\begingroup
\escapechar=92 % backslash
\@PackageError{alphalph}{#1}\@ehc
\endgroup
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AlPh@IfDefinable}
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname @ifdefinable\endcsname\relax
\def\AlPh@IfDefinable#1#2{%
\ifcase\ifx#1\@undefined\else\ifx#1\relax\else1\fi\fi0 %
#2%
\else
\AlPh@Error{%
Command \string#1 already defined%
}%
\fi
}%
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\else
% \end{macrocode}
% \begin{macro}{\AlPh@IfDefinable}
% \begin{macrocode}
\let\AlPh@IfDefinable\@ifdefinable
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\fi
% \end{macrocode}
%
% \begin{macro}{\@ReturnAfterElseFi}
% \begin{macro}{\@ReturnAfterFi}
% The following commands moves the `then' and `else' part respectively
% behind the |\if|-construct. This prevents a too deep |\if|-nesting
% and so a \hologo{TeX} capacity error because of a limited input stack size.
% I use this trick in several packages, so I don't prefix these internal
% commands in order not to have the same macros with different names.
% (It saves memory.)
% \begin{macrocode}
\long\def\@ReturnAfterElseFi#1\else#2\fi{\fi#1}
\long\def\@ReturnAfterFi#1\fi{\fi#1}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@gobblefour}
% \Hologo{LaTeX} defines commands for eating arguments.
% Define \cs{@gobblefour} if it is not defined (\hologo{plainTeX}).
% \begin{macrocode}
\expandafter\ifx\csname @gobblefour\endcsname\relax
\long\def\@gobblefour#1#2#3#4{}%
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{AlPh@IfOptArg}
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname kernel@ifnextchar\endcsname\relax
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname @ifnextchar\endcsname\relax
\def\AlPh@IfOptArg#1#2{%
\def\AlPh@TempA{#1}%
\def\AlPh@TempB{#2}%
\futurelet\AlPh@Token\AlPh@IfOptArgNext
}%
\let\AlPh@BracketLeft=[%]
\def\AlPh@IfOptArgNext{%
\ifx\AlPh@Token\AlPh@BracketLeft
\expandafter\AlPh@TempA
\else
\expandafter\AlPh@TempB
\fi
}%
\else
\def\AlPh@IfOptArg{\@ifnextchar[}%]
\fi
\else
\def\AlPh@IfOptArg{\kernel@ifnextchar[}%]
\fi
% \end{macrocode}
% \end{macro}
%
% \subsection{Symbol provider}
%
% \subsubsection{Alphabet}
%
% The output of \cs{alphalph} and \cs{AlphAlph} should be
% usable as part of command names (see \cs{@namedef}, \cs{csname}, \dots).
% Unhappily some languages of package \xpackage{babel}
% redefine \hologo{LaTeX}'s \cs{@alph} and \cs{@Alph} in a manner that
% they cannot be used in expandable context any more.
% Therefore package \xpackage{alphalph} provides its own
% commands.
%
% \begin{macro}{\alphalph@Alph}
% \begin{macro}{\alphalph@alph}
% The two commands \cmd{\AlPh@Alph} and \cmd{\AlPh@alph} convert a
% number into a letter (uppercase and lowercase respectivly).
% The character |@| is used as an error symbol,
% if the number isn't in the range of 1 until 26.
% Here we need no space after the number |#1|, because the error
% symbol |@| for the zero case stops scanning the number.
% This error symbol should not appear anywhere (except for bugs).
% \begin{macrocode}
\def\alphalph@Alph#1{%
\ifcase#1%
@%
\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\or M%
\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z%
\else
\AlPh@ctrerr
@%
\fi
}
\def\alphalph@alph#1{%
\ifcase#1%
@%
\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m%
\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z%
\else
\AlPh@ctrerr
@%
\fi
}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\AlPh@ctrerr}
% Macro \cs{AlPh@ctrerr} is used as hook for the algorithm
% to get the available number of symbols.
% \begin{macrocode}
\def\AlPh@ctrerr{}
% \end{macrocode}
% \end{macro}
%
% \subsection{Finding number of symbols}
%
% \begin{macro}{\AlPh@GetNumberOfSymbols}
% \noindent
% |#1|: symbols provider
% \begin{macrocode}
\def\AlPh@GetNumberOfSymbols#1{%
\AlPh@TestNumber1!{#1}%
\ifAlPh@Unavailable
\def\AlPh@Number{0}%
\AlPh@Error{No symbols found}%
\else
\def\AlPh@Number{1}%
\AlPh@ExpSearch2!{#1}%
\fi
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ifAlPh@Unavailable}
% \begin{macrocode}
\let\ifAlPh@Unavailable\iffalse
\def\AlPh@Unavailabletrue{%
\global\let\ifAlPh@Unavailable\iftrue
}
\def\AlPh@Unavailablefalse{%
\global\let\ifAlPh@Unavailable\iffalse
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@TestNumber}
% |#1|: number to be tested\\
% |#2|: symbols provider
% \begin{macrocode}
\def\AlPh@TestNumber#1!#2{%
\AlPh@Unavailablefalse
\begingroup
\setbox0=\hbox{%
\begingroup % color
\let\@ctrerr\AlPh@Unavailabletrue
\let\AlPh@ctrerr\AlPh@Unavailabletrue
#2{#1}%
\endgroup
}%
\ifdim\wd0=0pt %
\AlPh@Unavailabletrue
\fi
\endgroup
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@ExpSearch}
% |#1|: number to be tested\\
% |#2|: symbols provider
% \begin{macrocode}
\def\AlPh@ExpSearch#1!#2{%
\let\AlPh@Next\relax
\AlPh@TestNumber#1!{#2}%
\ifAlPh@Unavailable
\expandafter\AlPh@BinSearch\AlPh@Number!#1!{#2}%
\else
\def\AlPh@Number{#1}%
\ifnum#1>1073741823 %
\AlPh@TestNumber2147483647!{#2}%
\ifAlPh@Unavailable
\AlPh@BinSearch#1!2147483647!{#2}%
\else
\def\AlPh@Number{0}%
\AlPh@Error{%
Maximal symbol number not found%
}%
\fi
\else
\def\AlPh@Next{%
\expandafter\AlPh@ExpSearch\number\intcalcShl{#1}!{#2}%
}%
\fi
\fi
\AlPh@Next
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@BinSearch}
% |#1|: available number\\
% |#2|: unavailable number, |#2| $>$ |#1|\\
% |#3|: symbols provider
% \begin{macrocode}
\def\AlPh@BinSearch#1!#2!#3{%
\expandafter\AlPh@ProcessBinSearch
\number\intcalcShr{\intcalcAdd{#1}{#2}}!%
#1!#2!{#3}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@ProcessBinSearch}
% |#1|: number to be tested, |#2| $\leq$ |#1| $\leq$ |#3|\\
% |#2|: available number\\
% |#3|: unavailable number\\
% |#4|: symbols provider
% \begin{macrocode}
\def\AlPh@ProcessBinSearch#1!#2!#3!#4{%
\let\AlPh@Next\relax
\ifnum#1>#2 %
\ifnum#1<#3 %
\AlPh@TestNumber#1!{#4}%
\ifAlPh@Unavailable
\def\AlPh@Next{%
\AlPh@BinSearch#2!#1!{#4}%
}%
\else
\def\AlPh@Next{%
\AlPh@BinSearch#1!#3!{#4}%
}%
\fi
\else
\def\AlPh@Number{#2}%
\fi
\else
\def\AlPh@Number{#2}%
\fi
\AlPh@Next
}
% \end{macrocode}
% \end{macro}
%
% \subsection{Methods}
%
% The names of method macros start with \cs{AlPh@Method}.
% These macros do the main job in converting a number to
% its representation.
% A method command is called with three arguments.
% The first argument is the number of symbols. The
% second argument is the basic macro for converting
% a number with limited number range. The last parameter
% is the number that needs converting.
%
% \subsubsection{Common methods}
%
% \begin{macro}{\AlPh@CheckPositive}
% \noindent
% |#1|: number to be checked
% |#2|: continuation macro\\
% |#3|: number of symbols (hidden here)\\
% |#4|: symbol provider (hidden here)
% \begin{macrocode}
\def\AlPh@CheckPositive#1!#2{%
\ifnum#1<1 %
\expandafter\@gobblefour
\fi
#2{#1}%
}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Method `alph'}
%
% \begin{macro}{\AlPh@Method@alph}
% \noindent
% |#1|: number of symbols\\
% |#2|: symbols provider\\
% |#3|: number to be converted
% \begin{macrocode}
\def\AlPh@Method@alph#1#2#3{%
\expandafter\AlPh@CheckPositive
| \number#3!%
+ \the\numexpr#3!%
\AlPh@ProcessAlph
{#1}{#2}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@ProcessAlph}
% |#1|: current number\\
% |#2|: number of symbols\\
% |#3|: symbols provider
% \begin{macrocode}
\def\AlPh@ProcessAlph#1#2#3{%
\ifnum#1>#2 %
\@ReturnAfterElseFi{%
\expandafter\AlPh@StepAlph\number
\intcalcInc{%
\intcalcMod{\intcalcDec{#1}}{#2}%
}%
\expandafter!\number
\intcalcDiv{\intcalcDec{#1}}{#2}%
!{#2}{#3}%
}%
\else
\@ReturnAfterFi{%
#3{#1}%
}%
\fi
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@StepAlph}
% |#1|: current last digit\\
% |#2|: new current number\\
% |#3|: number of symbols\\
% |#4|: symbols provider
% \begin{macrocode}
\def\AlPh@StepAlph#1!#2!#3#4{%
\AlPh@ProcessAlph{#2}{#3}{#4}%
#4{#1}%
}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Method `wrap'}
%
% \begin{macro}{\AlPh@Method@wrap}
% \noindent
% |#1|: number of symbols\\
% |#2|: symbols provider\\
% |#3|: number to be converted
% \begin{macrocode}
\def\AlPh@Method@wrap#1#2#3{%
\expandafter\AlPh@CheckPositive
| \number#3!%
+ \the\numexpr#3!%
\AlPh@ProcessWrap
{#1}{#2}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AlPh@ProcessWrap}
% |#1|: number to be converted\\
% |#2|: number of symbols\\
% |#3|: symbols provider
% \begin{macrocode}
\def\AlPh@ProcessWrap#1#2#3{%
\ifnum#1>#2 %
\@ReturnAfterElseFi{%
\expandafter\AlPh@StepWrap\number
\intcalcInc{\intcalcMod{\intcalcDec{#1}}{#2}}%
!{#3}%
}%
\else
\@ReturnAfterFi{%
#3{#1}%
}%
\fi
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@StepWrap}
% |#1|: final number\\
% |#2|: symbols provider
% \begin{macrocode}
\def\AlPh@StepWrap#1!#2{%
#2{#1}%
}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Method `mult'}
%
% After the number of symbols is exhausted,
% repetitions of the symbol are used.
% \begin{gather*}
% x \Def \text{number to be converted}\\
% n \Def \text{number of symbols}\\
% r \Def \text{repetition length}\\
% s \Def \text{symbol slot}\\
% r = ((x - 1) \div n) + 1\\
% s = ((x - 1) \mod n) + 1
% \end{gather*}
% \begin{macro}{\AlPh@Method@mult}
% \noindent
% |#1|: number of symbols\\
% |#2|: symbols provider\\
% |#3|: number to be converted
% \begin{macrocode}
\def\AlPh@Method@mult#1#2#3{%
\expandafter\AlPh@CheckPositive
| \number#3!%
+ \the\numexpr#3!%
\AlPh@ProcessMult
{#1}{#2}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AlPh@ProcessMult}
% |#1|: number to be converted\\
% |#2|: number of symbols\\
% |#3|: symbols provider
% \begin{macrocode}
\def\AlPh@ProcessMult#1#2#3{%
\ifnum#1>#2 %
\@ReturnAfterElseFi{%
\expandafter\AlPh@StepMult\romannumeral
\intcalcInc{\intcalcDiv{\intcalcDec{#1}}{#2}}%
000%
\expandafter!\number
\intcalcInc{\intcalcMod{\intcalcDec{#1}}{#2}}%
!{#3}%
}%
\else
\@ReturnAfterFi{%
#3{#1}%
}%
\fi
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@StepMult}
% |#1#2|: repetitions coded as list of character `m'\\
% |#3|: symbol slot\\
% |#4|: symbols provider
% \begin{macrocode}
\def\AlPh@StepMult#1#2!#3!#4{%
\ifx\\#2\\%
\else
\@ReturnAfterFi{%
\AlPh@StepMult#2!#3!{#4}%
}%
\fi
#4{#3}%
}
% \end{macrocode}
% \end{macro}
%
% \subsection{User interface}
%
% \begin{macro}{\newalphalph}
% Macro \cs{newalphalph} had three arguments in versions below 2.0.
% For the new method argument we use an optional argument an first
% position.\\
% |#1|: cmd\\
% |[#2]|: method name: |alph| (default), |wrap|, |mult|\\ % hash-ok
% |#3|: symbols provider\\
% |#4|: number of symbols
% \begin{macrocode}
\AlPh@IfDefinable\newalphalph{%
\def\newalphalph#1{%
\AlPh@IfOptArg{%
\AlPh@newalphalph{#1}%
}{%
\AlPh@newalphalph{#1}[alph]%
}%
}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@newalphalph}
% |#1|: cmd
% |#2|: method name\\
% |#3|: symbols provider\\
% |#4|: number of symbols
% \begin{macrocode}
\def\AlPh@newalphalph#1[#2]#3#4{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname AlPh@Method@#2\endcsname\relax
\AlPh@Error{%
Unknown method %
| `#2'%
+ `\detokenize{#2}'%
}%
\else
\ifx\\#4\\%
\AlPh@GetNumberOfSymbols{#3}%
\ifcase\AlPh@Number
\else
\begingroup
\escapechar=92 % backslash
\@PackageInfo{alphalph}{%
Number of symbols for \string#1 is \AlPh@Number
}%
\endgroup
\expandafter\AlPh@NewAlphAlph
\csname AlPh@Method@#2\expandafter\endcsname
\AlPh@Number!{#1}{#3}%
\fi
\else
\expandafter\AlPh@NewAlphAlph
\csname AlPh@Method@#2\expandafter\endcsname
| \number#4!%
+ \the\numexpr#4!%
{#1}{#3}%
\fi
\fi
}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AlPh@NewAlphAlph}
% |#1|: method macro\\
% |#2|: number of symbols\\
% |#3|: cmd\\
% |#4|: symbols provider
% \begin{macrocode}
\def\AlPh@NewAlphAlph#1#2!#3#4{%
\AlPh@IfDefinable#3{%
\ifnum#2>0 %
\def#3{#1{#2}{#4}}%
\else
\AlPh@Error{%
Definition of \string#3 failed,\MessageBreak
because number of symbols (#2) is not positive%
}%
\fi
}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AlphAlph}
% \begin{macrocode}
\newalphalph\AlphAlph\alphalph@Alph{26}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\alphalph}
% \begin{macrocode}
\newalphalph\alphalph\alphalph@alph{26}
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\AlPh@AtEnd%
%</package>
% \end{macrocode}
%
% \section{Test}
%
% \subsection{Catcode checks for loading}
%
% \begin{macrocode}
%<*test1>
% \end{macrocode}
% \begin{macrocode}
\catcode`\{=1 %
\catcode`\}=2 %
\catcode`\#=6 %
\catcode`\@=11 %
\expandafter\ifx\csname count@\endcsname\relax
\countdef\count@=255 %
\fi
\expandafter\ifx\csname @gobble\endcsname\relax
\long\def\@gobble#1{}%
\fi
\expandafter\ifx\csname @firstofone\endcsname\relax
\long\def\@firstofone#1{#1}%
\fi
\expandafter\ifx\csname loop\endcsname\relax
\expandafter\@firstofone
\else
\expandafter\@gobble
\fi
{%
\def\loop#1\repeat{%
\def\body{#1}%
\iterate
}%
\def\iterate{%
\body
\let\next\iterate
\else
\let\next\relax
\fi
\next
}%
\let\repeat=\fi
}%
\def\RestoreCatcodes{}
\count@=0 %
\loop
\edef\RestoreCatcodes{%
\RestoreCatcodes
\catcode\the\count@=\the\catcode\count@\relax
}%
\ifnum\count@<255 %
\advance\count@ 1 %
\repeat
\def\RangeCatcodeInvalid#1#2{%
\count@=#1\relax
\loop
\catcode\count@=15 %
\ifnum\count@<#2\relax
\advance\count@ 1 %
\repeat
}
\def\RangeCatcodeCheck#1#2#3{%
\count@=#1\relax
\loop
\ifnum#3=\catcode\count@
\else
\errmessage{%
Character \the\count@\space
with wrong catcode \the\catcode\count@\space
instead of \number#3%
}%
\fi
\ifnum\count@<#2\relax
\advance\count@ 1 %
\repeat
}
\def\space{ }
\expandafter\ifx\csname LoadCommand\endcsname\relax
\def\LoadCommand{\input alphalph.sty\relax}%
\fi
\def\Test{%
\RangeCatcodeInvalid{0}{47}%
\RangeCatcodeInvalid{58}{64}%
\RangeCatcodeInvalid{91}{96}%
\RangeCatcodeInvalid{123}{255}%
\catcode`\@=12 %
\catcode`\\=0 %
\catcode`\%=14 %
\LoadCommand
\RangeCatcodeCheck{0}{36}{15}%
\RangeCatcodeCheck{37}{37}{14}%
\RangeCatcodeCheck{38}{47}{15}%
\RangeCatcodeCheck{48}{57}{12}%
\RangeCatcodeCheck{58}{63}{15}%
\RangeCatcodeCheck{64}{64}{12}%
\RangeCatcodeCheck{65}{90}{11}%
\RangeCatcodeCheck{91}{91}{15}%
\RangeCatcodeCheck{92}{92}{0}%
\RangeCatcodeCheck{93}{96}{15}%
\RangeCatcodeCheck{97}{122}{11}%
\RangeCatcodeCheck{123}{255}{15}%
\RestoreCatcodes
}
\Test
\csname @@end\endcsname
\end
% \end{macrocode}
% \begin{macrocode}
%</test1>
% \end{macrocode}
%
% \section{Macro tests}
%
% \begin{macrocode}
%<*test2>
\NeedsTeXFormat{LaTeX2e}
\nofiles
\documentclass{article}
%<*noetex>
\makeatletter
\let\saved@numexpr\numexpr
\newcommand*{\DisableNumexpr}{%
\let\numexpr\@undefined
}
\newcommand*{\RestoreNumexpr}{%
\let\numexpr\saved@numexpr
}
\DisableNumexpr
%</noetex>
\usepackage{alphalph}[2011/05/13]
%<noetex>\RestoreNumexpr
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
\newcommand*{\TestCmd}[3]{%
\setbox0=\hbox{%
%<noetex> \DisableNumexpr
\edef\TestString{#1{#2}}%
\expandafter\Expect\expandafter{\TestString}{#3}%
\edef\TestString{#1{#2} }%
\expandafter\Expect\expandafter{\TestString}{#3 }%
}%
\Expect*{\the\wd0}{0.0pt}%
}
\makeatletter
\newalphalph\LaTeXAlphAlph\@Alph{26}
\newalphalph\LaTeXalphalph\@alph{26}
\newalphalph\AlphWrap[wrap]\alphalph@Alph{26}
\newalphalph\alphwrap[wrap]\alphalph@alph{26}
\newalphalph\LaTeXAlphWrap[wrap]\@Alph{26}
\newalphalph\LaTeXalphwrap[wrap]\@alph{26}
\def\LastSymbol#1{%
\ifx\\#1\\%
\else
\@LastSymbol#1\@nil
\fi
}
\def\@LastSymbol#1#2\@nil{%
\ifx\\#2\\%
#1%
\else
\@LastSymbol#2\@nil
\fi
}
\makeatother
\newcommand*{\TestAlph}[2]{%
\uppercase{\TestCallCmd\AlphAlph{#2}}{#1}%
\lowercase{\TestCallCmd\alphalph{#2}}{#1}%
\uppercase{\TestCallCmd\LaTeXAlphAlph{#2}}{#1}%
\lowercase{\TestCallCmd\LaTeXalphalph{#2}}{#1}%
\edef\WrapString{\LastSymbol{#2}}%
\expandafter\TestAlphWrap\expandafter{\WrapString}{#1}%
}
\newcommand*{\TestAlphWrap}[2]{%
\uppercase{\TestCallCmd\AlphWrap{#1}}{#2}%
\lowercase{\TestCallCmd\alphwrap{#1}}{#2}%
\uppercase{\TestCallCmd\LaTeXAlphWrap{#1}}{#2}%
\lowercase{\TestCallCmd\LaTeXalphwrap{#1}}{#2}%
}
\newcommand*{\TestCallCmd}[3]{%
\TestCmd#1{#3}{#2}%
}
\begin{qstest}{AlphSymbols}{alphalph, AlphAlph, symbols}
\TestAlph{1}{a}%
\TestAlph{2}{b}%
\TestAlph{3}{c}%
\TestAlph{4}{d}%
\TestAlph{5}{e}%
\TestAlph{6}{f}%
\TestAlph{7}{g}%
\TestAlph{8}{h}%
\TestAlph{9}{i}%
\TestAlph{10}{j}%
\TestAlph{11}{k}%
\TestAlph{12}{l}%
\TestAlph{13}{m}%
\TestAlph{14}{n}%
\TestAlph{15}{o}%
\TestAlph{16}{p}%
\TestAlph{17}{q}%
\TestAlph{18}{r}%
\TestAlph{19}{s}%
\TestAlph{20}{t}%
\TestAlph{21}{u}%
\TestAlph{22}{v}%
\TestAlph{23}{w}%
\TestAlph{24}{x}%
\TestAlph{25}{y}%
\TestAlph{26}{z}%
\end{qstest}
\begin{qstest}{AlphRange}{alphalph, range}
\TestAlph{0}{}%
\TestAlph{-1}{}%
\TestAlph{-2147483647}{}%
\TestAlph{27}{aa}%
\TestAlph{28}{ab}%
\TestAlph{52}{az}%
\TestAlph{53}{ba}%
\TestAlph{78}{bz}%
\TestAlph{79}{ca}%
\TestAlph{702}{zz}%
\TestAlph{703}{aaa}%
\TestAlph{2147483647}{fxshrxw}%
\end{qstest}
\makeatletter
\newcommand*{\myvocals}[1]{%
\ifcase#1X\or A\or E\or I\or O\or U\else Y\fi
}
\makeatother
\newalphalph\vocalsvocals\myvocals{5}
\newcommand*{\TestVocals}{%
\TestCmd\vocalsvocals
}
\begin{qstest}{vocals}{vocals}
\TestVocals{0}{}%
\TestVocals{1}{A}%
\TestVocals{2}{E}%
\TestVocals{3}{I}%
\TestVocals{4}{O}%
\TestVocals{5}{U}%
\TestVocals{6}{AA}%
\TestVocals{7}{AE}%
\TestVocals{8}{AI}%
\TestVocals{9}{AO}%
\TestVocals{10}{AU}%
\TestVocals{11}{EA}%
\TestVocals{24}{OO}%
\TestVocals{25}{OU}%
\TestVocals{26}{UA}%
\TestVocals{29}{UO}%
\TestVocals{30}{UU}%
\TestVocals{31}{AAA}%
\TestVocals{155}{UUU}%
\TestVocals{156}{AAAA}%
\TestVocals{2147483647}{AIIOOEEIOIIUOE}%
\end{qstest}
\makeatletter
\newalphalph\AlphMult[mult]{\alphalph@Alph}{26}
\newalphalph\alphmult[mult]{\alphalph@alph}{26}
\newalphalph\LaTeXAlphMult[mult]{\@Alph}{26}
\newalphalph\LaTeXalphmult[mult]{\@alph}{26}
\makeatother
\newcommand*{\TestMult}[2]{%
\uppercase{\TestCallCmd\AlphMult{#2}}{#1}%
\lowercase{\TestCallCmd\alphmult{#2}}{#1}%
\uppercase{\TestCallCmd\LaTeXAlphMult{#2}}{#1}%
\lowercase{\TestCallCmd\LaTeXalphmult{#2}}{#1}%
}
\begin{qstest}{mult}{mult}
\TestMult{0}{}%
\TestMult{-1}{}%
\TestMult{-2147483647}{}%
\TestMult{1}{a}%
\TestMult{2}{b}%
\TestMult{26}{z}%
\TestMult{27}{aa}%
\TestMult{28}{bb}%
\TestMult{52}{zz}%
\TestMult{53}{aaa}%
\TestMult{54}{bbb}%
\TestMult{259}{yyyyyyyyyy}%
\TestMult{260}{zzzzzzzzzz}%
\TestMult{261}{aaaaaaaaaaa}%
\TestMult{262}{bbbbbbbbbbb}%
\end{qstest}
\def\myvocalsB#1{%
\ifcase#1\or A\or E\or I\or O\or U\fi
}
\begin{qstest}{symbolnum}{symbolnum}
\makeatletter
\def\Test#1#2{%
\let\TestCmd\relax
\newalphalph\TestCmd{#1}{}%
\Expect*{\AlPh@Number}{#2}%
}%
\Test\@alph{26}%
\Test\@Alph{26}%
\Test\@fnsymbol{9}%
\Test\myvocalsB{5}%
\Test\alphalph@alph{26}%
\Test\alphalph@Alph{26}%
\end{qstest}
\begin{qstest}{list}{list}
\makeatletter
\def\catch#1\relax{%
\def\FoundList{\catch#1}%
}%
\def\Test[#1]#2#3#4{%
\let\testcmd\relax
\newalphalph\testcmd[{#1}]{\catch}{#2}%
\testcmd{#3}|\relax
\expandafter\Expect\expandafter{\FoundList}{#4|}%
%
\let\SavedCatch\catch
\def\catch{\noexpand\catch\noexpand\foo}%
\edef\Result{#4|}%
\@onelevel@sanitize\Result
\let\catch\SavedCatch
\let\testcmd\relax
\newalphalph\testcmd[{#1}]{\catch\foo}{#2}%
\testcmd{#3}|\relax
\@onelevel@sanitize\FoundList
\Expect*{\FoundList}*{\Result}%
}%
\Test[alph]{26}{3}{\catch{3}}%
\Test[alph]{26}{12}{\catch{12}}%
\Test[alph]{26}{27}{\catch{1}\catch{1}}%
\Test[alph]{26}{78}{\catch{2}\catch{26}}%
\Test[wrap]{26}{7}{\catch{7}}%
\Test[wrap]{26}{14}{\catch{14}}%
\Test[wrap]{26}{80}{\catch{2}}%
\Test[wrap]{26}{700}{\catch{24}}%
\Test[mult]{26}{4}{\catch{4}}%
\Test[mult]{26}{17}{\catch{17}}%
\Test[mult]{26}{54}{\catch{2}\catch{2}\catch{2}}%
\end{qstest}
\begin{document}
\end{document}
%</test2>
% \end{macrocode}
%
% \section{Installation}
%
% \subsection{Download}
%
% \paragraph{Package.} This package is available on
% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}:
% \begin{description}
% \item[\CTAN{macros/latex/contrib/oberdiek/alphalph.dtx}] The source file.
% \item[\CTAN{macros/latex/contrib/oberdiek/alphalph.pdf}] Documentation.
% \end{description}
%
%
% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
% are also available in a TDS compliant ZIP archive. There
% the packages are already unpacked and the documentation files
% are generated. The files and directories obey the TDS standard.
% \begin{description}
% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}]
% \end{description}
% \emph{TDS} refers to the standard ``A Directory Structure
% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
% with \xfile{texmf} in their name are usually organized this way.
%
% \subsection{Bundle installation}
%
% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
% TDS tree (also known as \xfile{texmf} tree) of your choice.
% Example (linux):
% \begin{quote}
% |unzip oberdiek.tds.zip -d ~/texmf|
% \end{quote}
%
% \paragraph{Script installation.}
% Check the directory \xfile{TDS:scripts/oberdiek/} for
% scripts that need further installation steps.
% Package \xpackage{attachfile2} comes with the Perl script
% \xfile{pdfatfi.pl} that should be installed in such a way
% that it can be called as \texttt{pdfatfi}.
% Example (linux):
% \begin{quote}
% |chmod +x scripts/oberdiek/pdfatfi.pl|\\
% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/|
% \end{quote}
%
% \subsection{Package installation}
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
% \docstrip\ archive. The files are extracted by running the
% \xfile{.dtx} through \plainTeX:
% \begin{quote}
% \verb|tex alphalph.dtx|
% \end{quote}
%
% \paragraph{TDS.} Now the different files must be moved into
% the different directories in your installation TDS tree
% (also known as \xfile{texmf} tree):
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% alphalph.sty & tex/generic/oberdiek/alphalph.sty\\
% alphalph.pdf & doc/latex/oberdiek/alphalph.pdf\\
% test/alphalph-test1.tex & doc/latex/oberdiek/test/alphalph-test1.tex\\
% test/alphalph-test2.tex & doc/latex/oberdiek/test/alphalph-test2.tex\\
% test/alphalph-test3.tex & doc/latex/oberdiek/test/alphalph-test3.tex\\
% alphalph.dtx & source/latex/oberdiek/alphalph.dtx\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
% \ifdim\wd0>\linewidth
% \begingroup
% \advance\linewidth by\leftmargin
% \advance\linewidth by\rightmargin
% \edef\x{\endgroup
% \def\noexpand\lw{\the\linewidth}^^A
% }\x
% \def\lwbox{^^A
% \leavevmode
% \hbox to \linewidth{^^A
% \kern-\leftmargin\relax
% \hss
% \usebox0
% \hss
% \kern-\rightmargin\relax
% }^^A
% }^^A
% \ifdim\wd0>\lw
% \sbox0{\small\t}^^A
% \ifdim\wd0>\linewidth
% \ifdim\wd0>\lw
% \sbox0{\footnotesize\t}^^A
% \ifdim\wd0>\linewidth
% \ifdim\wd0>\lw
% \sbox0{\scriptsize\t}^^A
% \ifdim\wd0>\linewidth
% \ifdim\wd0>\lw
% \sbox0{\tiny\t}^^A
% \ifdim\wd0>\linewidth
% \lwbox
% \else
% \usebox0
% \fi
% \else
% \lwbox
% \fi
% \else
% \usebox0
% \fi
% \else
% \lwbox
% \fi
% \else
% \usebox0
% \fi
% \else
% \lwbox
% \fi
% \else
% \usebox0
% \fi
% \else
% \lwbox
% \fi
% \else
% \usebox0
% \fi
% \end{quote}
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
% TDS installing feature, then some files can already be in the right
% place, see the documentation of \docstrip.
%
% \subsection{Refresh file name databases}
%
% If your \TeX~distribution
% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh
% these. For example, \teTeX\ users run \verb|texhash| or
% \verb|mktexlsr|.
%
% \subsection{Some details for the interested}
%
% \paragraph{Attached source.}
%
% The PDF documentation on CTAN also includes the
% \xfile{.dtx} source file. It can be extracted by
% AcrobatReader 6 or higher. Another option is \textsf{pdftk},
% e.g. unpack the file into the current directory:
% \begin{quote}
% \verb|pdftk alphalph.pdf unpack_files output .|
% \end{quote}
%
% \paragraph{Unpacking with \LaTeX.}
% The \xfile{.dtx} chooses its action depending on the format:
% \begin{description}
% \item[\plainTeX:] Run \docstrip\ and extract the files.
% \item[\LaTeX:] Generate the documentation.
% \end{description}
% If you insist on using \LaTeX\ for \docstrip\ (really,
% \docstrip\ does not need \LaTeX), then inform the autodetect routine
% about your intention:
% \begin{quote}
% \verb|latex \let\install=y\input{alphalph.dtx}|
% \end{quote}
% Do not forget to quote the argument according to the demands
% of your shell.
%
% \paragraph{Generating the documentation.}
% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
% the documentation. The process can be configured by the
% configuration file \xfile{ltxdoc.cfg}. For instance, put this
% line into this file, if you want to have A4 as paper format:
% \begin{quote}
% \verb|\PassOptionsToClass{a4paper}{article}|
% \end{quote}
% An example follows how to generate the
% documentation with pdf\LaTeX:
% \begin{quote}
%\begin{verbatim}
%pdflatex alphalph.dtx
%makeindex -s gind.ist alphalph.idx
%pdflatex alphalph.dtx
%makeindex -s gind.ist alphalph.idx
%pdflatex alphalph.dtx
%\end{verbatim}
% \end{quote}
%
% \section{Catalogue}
%
% The following XML file can be used as source for the
% \href{http://mirror.ctan.org/help/Catalogue/catalogue.html}{\TeX\ Catalogue}.
% The elements \texttt{caption} and \texttt{description} are imported
% from the original XML file from the Catalogue.
% The name of the XML file in the Catalogue is \xfile{alphalph.xml}.
% \begin{macrocode}
%<*catalogue>
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE entry SYSTEM 'catalogue.dtd'>
<entry datestamp='$Date$' modifier='$Author$' id='alphalph'>
<name>alphalph</name>
<caption>Convert numbers to letters.</caption>
<authorref id='auth:oberdiek'/>
<copyright owner='Heiko Oberdiek' year='1999,2006-2008,2010,2011'/>
<license type='lppl1.3'/>
<version number='2.4'/>
<description>
Provides commands <tt>\alphalph</tt> and <tt>\AlphAlph.</tt> They
are like <tt>\number</tt> but the expansion consists of lowercase
and uppercase letters respectively (1 to a, 26 to z, 27 to aa, 52
to zz, 53 to ba, 702 to zz, 703 to aaa, etc.). Can be used as a
replacement for LaTeX's <tt>\@alph</tt> and <tt>\@Alph</tt>
macros.
<p/>
The package is part of the <xref refid='oberdiek'>oberdiek</xref>
bundle.
</description>
<documentation details='Package documentation'
href='ctan:/macros/latex/contrib/oberdiek/alphalph.pdf'/>
<ctan file='true' path='/macros/latex/contrib/oberdiek/alphalph.dtx'/>
<miktex location='oberdiek'/>
<texlive location='oberdiek'/>
<install path='/macros/latex/contrib/oberdiek/oberdiek.tds.zip'/>
</entry>
%</catalogue>
% \end{macrocode}
%
% \begin{History}
% \begin{Version}{1999/03/19 v0.1}
% \item
% The first version was built as a response to a
% \URL{\link{question}}^^A
% {http://groups.google.com/group/comp.text.tex/msg/17a74cd721641038}^^A
% of \NameEmail{Will Douglas}{william.douglas@wolfson.ox.ac.uk}
% and the
% \URL{\link{request}}^^A
% {http://groups.google.com/group/comp.text.tex/msg/8f9768825640315f}^^A
% of \NameEmail{Donald Arsenau}{asnd@reg.triumf.ca},
% published in the newsgroup
% \href{news:comp.text.tex}{comp.text.tex}:
% \URL{``\link{Re: alph counters \textgreater\ 26}''}^^A
% {http://groups.google.com/group/comp.text.tex/msg/cec563eef8bf65d0}
% \item
% Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt})
% \end{Version}
% \begin{Version}{1999/04/12 v1.0}
% \item
% Documentation added in dtx format.
% \item
% \hologo{eTeX} support added.
% \end{Version}
% \begin{Version}{1999/04/13 v1.1}
% \item
% Minor documentation change.
% \item
% First CTAN release.
% \end{Version}
% \begin{Version}{1999/06/26 v1.2}
% \item
% First generic code about \cmd{\ProvidesPackage} improved.
% \item
% Documentation: Installation part revised.
% \end{Version}
% \begin{Version}{2006/02/20 v1.3}
% \item
% Reload check (for \hologo{plainTeX})
% \item
% New DTX framework.
% \item
% LPPL 1.3
% \end{Version}
% \begin{Version}{2006/05/30 v1.4}
% \item
% \cs{newalphalph} added.
% \end{Version}
% \begin{Version}{2007/04/11 v1.5}
% \item
% Line ends sanitized.
% \end{Version}
% \begin{Version}{2007/09/09 v2.0}
% \item
% New implementation that uses package \cs{intcalc}.
% This removes the dependency on \hologo{eTeX}.
% \item
% \cs{newalphalph} is extended to support new methods `wrap' and 'multi'.
% \item
% Documentation rewritten.
% \end{Version}
% \begin{Version}{2008/08/11 v2.1}
% \item
% Code is not changed.
% \item
% URLs updated from \texttt{www.dejanews.com}
% to \texttt{groups.google.com}.
% \end{Version}
% \begin{Version}{2010/03/01 v2.2}
% \item
% Compatibility with \hologo{iniTeX}.
% \end{Version}
% \begin{Version}{2010/04/18 v2.3}
% \item
% Documentation fixes (Martin M\"unch).
% \end{Version}
% \begin{Version}{2011/05/13 v2.4}
% \item
% Documentation fixes (Jim Diamond) and using package
% \xpackage{hologo} for the documentation.
% \item
% Catalogue file added.
% \end{Version}
% \end{History}
%
% \PrintIndex
%
% \Finale
\endinput
|