summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx
blob: b37bec6bd9dbcf5b1b8e2a19a4b5e5dd172cb42f (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
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
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
% \iffalse
%   (This is a META-COMMENT.)
%
%   This is file `cdpbundl.dtx'.
%
%   This file is part of a work named "C.D.P. Bundle".
%
%   Copyright (C) 1999-2015 by Gustavo MEZZETTI
%                             <gustavo.mezzetti@istruzione.it>.
%
%   The C.D.P. Bundle may be distributed and/or modified under the
%   conditions of the LaTeX Project Public License, either version 1.3
%   of this license or (at your option) any later version.
%   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.
%
%   The C.D.P. Bundle has the LPPL maintenance status
%     "author-maintained".
%
%   The file `manifest.txt' that comes along with this file specifies
%   what the C.D.P. Bundle consists of; more precisely, it explains how
%   the locutions "Work" and "Compiled Work", used in the LaTeX Project
%   Public License, are to be interpreted in the case of this work.
%
%   Note that the distribution of this file alone is "distribution of
%   only part of the Work" in the sense of the LaTeX Project Public
%   License, and is not allowed.
%
%   (End of the META-COMMENT.)
% \fi
%
% \def\filename{cdpbundl.dtx}
% \def\fileversion{0.36}
% \def\filedate{2015/02/08}
% \def\docdate {2015/04/01}
% \def\doclongdate{April~1, 2015}
%
% \CheckSum{4984}
%
% \DeclareRobustCommand*{\Bundle}{C.D.P. Bundle}
%
% \changes{0.30}{2001 Jul 01}{First release of the \Bundle}
% \changes{0.31}{2001 Dec 01}{Added support for the \protect\opz{usePS}
%   option in the \protect\packlass{\protect\cdpaddon} package}
% \changes{0.32}{2002 Jul 01}{Removed support for the \protect\opz{usePS}
%   option in the \protect\packlass{\protect\cdpaddon} package}
% \changes{0.33}{2005 Jan 01}{Reorganized code of the
%   \protect\packlass{\protect\articoletteracdp} class and of the
%   \protect\packlass{\protect\cdpaddon} package to make it compatible
%   with the \protect\packlass{\protect\HyperRef} package}
% \changes{0.34}{2006 Jan 01}{Improved interaction with the
%   \protect\packlass{\protect\HyperRef} package}
% \changes{0.34}{2006 Jan 01}{Corrected positioning of floats
%   in float pages}
% \changes{0.34}{2006 Jan 01}{Added \protect\texttt{\protect\bslash place}
%   command}
% \changes{0.35}{About 2013}{Never publicly released.  Some of the changes 
%   listed below for vers.~0.36 were actually introduced in this version.}
% \changes{0.36}{2015 Feb 08}{Added \protect\texttt{\protect\bslash
%   OpeningSequence} command and related macros, in part.\ 
%   the \protect\texttt{\protect\bslash ChosenMakeOpening} hook.}
% \changes{0.36}{2015 Feb 08}{Added \protect\texttt{\protect\bslash
%   ClosingSequence} command and related macros, in particular
%   \protect\texttt{\protect\bslash ChosenMakeClosing} and
%   \protect\texttt{\protect\bslash ChosenMakeSignature}.}
% \changes{0.36}{2015 Feb 08}{Eventually added functionality to the
%   \protect\packlass{\protect\cdpaddon} package to support user-defined
%   letterheads.}^^A
% \changes{0.36}{2015 Feb 08}{Added \protect\relax the
%   \protect\opz{signaturerule} option, and its related stuff
%   (the \protect\texttt{\protect\bslash signaturerule} command,
%   the \protect\texttt{\protect\bslash signaturerulewidth} parameter),
%   to support rules that mark where to sign by hand.}
% \changes{0.36}{2015 Feb 08}{Delegated to a new command
%   (\protect\texttt{\protect\bslash foldingtagrule}) the task of drawing 
%   the sign that shows where the sheet is to be folded.}
% \changes{0.36}{2015 Feb 08}{Removed the \protect\packlass{\protect\adiseal}
%   package and the \protect\packlass{\protect\lettcdpadi} document class.}
% \changes{0.36}{2015 Feb 08}{Tidied up in several points the code of the
%   \protect\packlass{\protect\cdpaddon} package.}
% \changes{0.36}{2015 Feb 08}{Added \protect\packlass{\protect\cdpbabel}
%   package and related language definition files for English and Italian.}
%
%% \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         \~}
%
% \MakeShortVerb{\"}
% \DeleteShortVerb{\|}
%
% \DoNotIndex{\begin,\end,\def,\let,\else,\fi,\@ifdefinable,\@empty}
% \DoNotIndex{\newcommand,\renewcommand}
% \DoNotIndex{\newenvironment,\renewenvironment}
% \DoNotIndex{\z@,\z@skip,\p@,\@ne,\tw@,\thr@@,\@m,\@M,\m@ne}
% \DoNotIndex{\setlength,\setcounter,\addtolength}
% \DoNotIndex{\expandafter,\do,\relax,\advance,\multiply,\divide}
% \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions}
% \DoNotIndex{\",\.,\@}
%
% \IndexPrologue{
%   \section{\indexname}
%   Numbers in italics refer to the page where the corresponding entry
%   is described, the ones underlined to the code line of the
%   definition, the rest to the code lines where the entry is used.
% }
% \setcounter{IndexColumns}{2}
%
% \GlossaryPrologue{\section{Change History}}
%
% \setcounter{StandardModuleDepth}{1}
%
% \newcommand*{\DS}{\textsf{DocStrip}}
% \renewcommand*{\partname}{Part}
% \newcommand*{\cdpbundl}{cdpbundl}
% \newcommand*{\letteracdp}{letteracdp}
% \newcommand*{\articoletteracdp}{articoletteracdp}
% \newcommand*{\adiseal}{adiseal}
% \newcommand*{\lettcdpadi}{lettcdpadi}
% \newcommand*{\cdpaddon}{cdpaddon}
% \newcommand*{\cdpbabel}{cdpbabel}
% \newcommand*{\babel}{babel}
% \newcommand*{\HyperRef}{hyperref}
% \newcommand*{\pictee}{pict2e}
% \newcommand*{\epsfig}{epsfig}
% \newcommand*{\cdpnamesenglish}{cdpnamesenglish.ldf}
% \newcommand*{\cdpnamesitalian}{cdpnamesitalian.ldf}
% \newcommand*{\example}{cdpshues-example.def}
% \newcommand*{\epson}{epson-stylus-740.def}
% \newcommand*{\hplj}{hp-laserjet-4500.def}
% \newcommand*{\cdpshues}{cdpshues.cfg}
% \newcommand*{\textoken}[1]{\(\langle\mbox{\normalfont #1}\rangle\)}
% \newcommand*{\param}[1]{\(\mbox{\##1}\leftarrow {\,}\)}
% \makeatletter
% \newcommand*{\myspecialindex}[2]
%    {\special@index{#1\actualchar#2\encapchar main}}
% \makeatother
% \newcommand*{\counterindex}[1]{\myspecialindex{#1}{{\string\ttfamily
%    \space #1} (counter)}\index{counters:\levelchar{\protect\ttfamily
%    #1}\encapchar usage}}
% \newcommand*{\optuseindex}[1]{\SortIndex{#1}{\protect\opz{#1}^^A
%    (option)\encapchar usage}\index{options:\levelchar
%    \protect\opz{#1}\encapchar usage}}
% \newcommand*{\opz}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\iopz}[1]{$\mbox{\opz{#1}}\optuseindex{#1}}
% \newcommand*{\eopz}[1]{\mathbin{|}\mbox{\opz{#1}}\optuseindex{#1}}
% \newcommand*{\fopz}{$}
% \newcommand*{\packlass}[1]{{\normalfont\sffamily #1}}
% \newcommand*{\filedir}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\env}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\cnt}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\sty}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\eqref}[1]{(\ref{#1})}
% \newcommand*{\strongemph}[1]{\textbf{#1}}
% \newcommand*{\zerolistvertspaces}{^^A
%   \setlength{\parskip}{0pt}^^A
%   \setlength{\topsep}{\parskip}^^A
%   \setlength{\partopsep}{\parskip}^^A
% }
% \newcommand*{\closeofsentencespace}{\spacefactor \sfcode `. \space}
%
% \DeclareFixedFont{\lhnss}{T1}{cmss}{m}{n} {12}
% \DeclareFixedFont{\lhbss}{T1}{cmss}{m}{n} {17}
% \DeclareFixedFont{\lhrm} {T1}{cmr} {m}{n} {9}
% \DeclareFixedFont{\lhit} {T1}{cmr} {m}{it}{9}
% \DeclareFixedFont{\lhtt} {T1}{cmtt}{m}{n} {9}
%
%
%
% \title{
%    The \Bundle\thanks{This file has version
%    \fileversion, release date \filedate;
%    last documentation update: \docdate.
%    Copyright \copyright~1999--2015 by G.~Mezzetti
%    (see page~\pageref{S:Copy}).}
% }
% \author{G. Mezzetti}
% \date{\doclongdate}
%
% \makeatletter
%   \@ifundefined{hypersetup}{}{
%     \hypersetup{
%       pdftitle        = {The C.D.P. Bundle},
%       pdfauthor       = {G. Mezzetti},
%       pdfsubject      = {Documentation of the C.D.P. Bundle},
%       pdfkeywords     = {letter, letterhead},
%       pdfcreationdate = {D:20150401120000},
%       pdfmoddate      = {D:20150401120000}
%     }
%   }
% \makeatother
%
% \maketitle
%
% \begin{abstract}
%    A bundle of \LaTeX\ (former \LaTeXe) classes and packages is
%    described, which was used by the \emph{Coordinamento dei Dottorandi e
%    dei Dottori di Ricerca dell'Universit\`{a} di Padova} (a free and
%    informal association of Ph.D.  students and Ph.D.'s at the
%    university of Padua, Italy) to write its ``official'' letters.
%    These classes and packages took care of formatting the letters as
%    required by the standards of this association; in particular, they
%    made it very easy to include its seal, both in black-and-white and
%    in color, at the top of pages.
% \end{abstract}
%
% \tableofcontents
% \listoffigures
%
% \clearpage
% \begingroup
%
%    \setlength{\parskip}{\medskipamount}
%    \setlength{\parindent}{0pt}
%
% \section*{Copyright notice}
%    \label{S:Copy}
%    \vspace{-\parskip}
%
%    Copyright \copyright~1999--2015 by Gustavo \textsc{Mezzetti}.  All
%    rights are reserved, except as noted below.
%
%    This document has been produced by feeding to a \LaTeX\ typesetting
%    engine the file \filedir{\filename} version \fileversion\ (\docdate).
%    This file is part of a work named ``\Bundle''.
%
%    The \Bundle\ may be distributed and/or modified under the
%    conditions of the \LaTeX\ Project Public License, either version~1.3
%    of this license or (at your option) any later version.  The latest
%    version of this license is in
%    \begin{list}{\setlength{\topsep}{0pt}}\item\relax
%      \ttfamily
%      http://www.latex-project.org/lppl.txt
%    \end{list}
%    and version~1.3 or later is part of all distributions of \LaTeX\
%    version 2005/12/01 or later.
%
%    The \Bundle\ has the LPPL maintenance status ``author-maintained''.
%
%    The file \filedir{manifest.txt} included in the \Bundle\ 
%    specifies what the \Bundle\ consists of; more precisely,
%    it explains how the locutions ``Work'' and ``Compiled Work'',
%    used in the \LaTeX\ Project Public License, are to be interpreted
%    in the case of this work.
%
%    Permission is granted to make new printed copies of this document,
%    by any means (\emph{e.g.}, photocopying, direct printing from the
%    electronic version, and so on).
%
%    Note, though, that distribution of this document alone is
%    ``distribution of only part of the Work'' in the sense of the
%    \LaTeX\ Project Public License, and should therefore be avoided:
%    please distribute, in addition, the source file \filedir{\filename}
%    together with all other files listed in \filedir{manifest.txt},
%    as explained in the file \filedir{manifest.txt} itself and also in
%    Subsection~\ref{sS:License} on page~\pageref{sS:License}, to which you
%    are referred for more information.
%
% \section*{Author's address}
%    \vspace{-\parskip}
%
%    The recommended way to contact the author is by e-mail; his address is:
%
%    \begin{list}{\setlength{\topsep}{0pt}}\item\relax
%      \href{mailto:gustavo.mezzetti@istruzione.it}
%        {\nolinkurl{gustavo.mezzetti@istruzione.it}}
%    \end{list}
%
%    Please include the \emph{exact} phrase \verb*|C.D.P. Bundle| in the
%    \emph{subject} of your message; otherwise, your message could be
%    thrown away by a mail filter.  In this regard, the weakness of the
%    laws concerning the protection of privacy forces me to explicitly
%    forbid the use of the above address for any kind of advertising,
%    marketing, polling, or similar commercial or statistical contact.
%
% \endgroup
%
%
%
% \setcounter{secnumdepth}{0}
%
%
%
% \clearpage
% \section{Introduction}
%
%    The \emph{Coordinamento dei Dottorandi e dei Dottori di Ricerca
%    dell'Universit\`a di Padova} (henceforth simply referred to as
%    ``\emph{Coordinamento}'') was a free association of Ph.D.'s and Ph.D.
%    students who took their degree, or were studying for it, at the
%    University of Padova (Padua), Italy.  Discussing its precise nature is
%    completely outside the scope of this document; the only thing that
%    concerns us here is that it wrote letters of a somewhat
%    ``official'' kind, which, for this reason, had to bear its letterhead
%    on the top of their first page.  The classes and packages herein described 
%    were used for preparing this kind of letters, automatically taking care of
%    printing the letterhead; but besides this, they incorporated much more
%    functionality than the standard \packlass{letter} \LaTeX\ class,
%    and it was precisely this additional functionality that proved useful
%    also in more general contexts, thus determining the adoption of the
%    \Bundle\ in (certain niches of) the \LaTeX\ community.
%
%    \subsection{Credits and disclaimer}
%
%    The \packlass{\letteracdp} document class was originally based on
%    the \packlass{letter} standard \LaTeX\ class.  During the time, it
%    went through so many deep revisions, that by now it retains
%    practically no relation with the original \packlass{letter} class;
%    but we want to acknowledge the ``historical'' source anyway.  The
%    \packlass{\articoletteracdp} document class uses some ideas borrowed
%    from the \packlass{article} standard \LaTeX\ class.
%
%    The author thanks heartfully Alessandro Ambrosi and Roberto
%    Strepparava, who tested the software and constantly stimulated
%    improvements and refinements, and Paolo Cojazzi, who, besides this,
%    also helped with the compression tools.
%
%    As usual with computer software, no warranty is given that
%    this code will work properly, or even that it will work at all.
%    Using this code can even result in loss of data and/or damages
%    to your disks and your storage media.
%    If you use this code, you do so exclusively at your own risk!
%
%    See Subsection~\ref{sS:License} and the \LaTeX\ Project Public
%    License for more information.
%
%    \subsection{About this document}
%
%    This document, like many documentation files distributed for
%    \LaTeX, is divided into two parts.
%
%    The first part, \emph{User's Manual}, should contain all the
%    documentation you need to succesfully \emph{use} the classes and
%    packages that this document presents; but unfortunately (for you!),
%    this document is still unfinished, so this information is \emph{not}
%    given here; instead, you are referred to some other sources (all
%    available through the world-wide web).  The only pieces of
%    information you will find in this part are how to install those
%    classes and packages and how to generate this documentation.  This
%    part, however, specifies to what extent, and under what conditions,
%    you are allowed to use and distribute the classes and packages
%    presented in this document.
%
%    The second part, \emph{Implementation}, can be omitted if you want
%    (explanations on how to omit it are given at the beginning of the
%    part itself), and contains information that concerns only
%    ``hackers'' who want to learn how the macros that this document
%    presents are \emph{implemented}.  Actually, this part contains the
%    complete listing of the \LaTeX\ code that implements the
%    macros---unfortunately, almost without comments---in the usual \DS\
%    format; if you are not a \LaTeX\ hacker, this part will not mean
%    anything to you.
%
%    \subsection{About this release: a provisional patch}
%
%    The \Bundle\ was essentially written between 1999 and 2000 (for
%    an Italian audience), and even at that time it contained code that was
%    already deprecated; even worse, its design was flawed since the
%    beginning, because it had been conceived for a specific and limited
%    application (the letters of the C.D.P., exactly), and was adapted for
%    more general use only as an afterthought.
%
%    A thorough redesign would therefore be needed; on the other hand, some
%    users have suggested, or asked for, improvements and additions, in
%    particular for what concerns the use of the bundle with other
%    languages besides Italian, that can be implemented rather easily by
%    means of provisional patches.  I~have already been deferring the
%    introduction of these comparatively harmless enhancements for five
%    years, waiting for the right moment to undertake the task of
%    redesigning the bundle from scratch, but now I~have resolved to simply 
%    patch up the existing version.
%
%    The macros presented in this document, therefore, are far from being 
%    optimal: no serious attempt has been made to remove ``fossil'' code, nor 
%    to bring it up to date with modern \LaTeX\ usage.  The only exception to 
%    this is a small change that has been made to the fonts used to print the 
%    letterhead of the \emph{Coordinamento}, switching them from OT1 encoding 
%    to~T1---because this just required hitting the \meta{DEL} key half a dozen 
%    of times!~^^A ( paren match
%    ;-)\closeofsentencespace Of course, nobody will 
%    care about this, since the least likely reason for which you might want to 
%    use the \Bundle\ is to produce that letterhead.\footnote{Note, however, 
%    that the ability to compose the letterhead of the \emph{Coordinamento} is 
%    still required in order to typeset the documentation given in the 
%    References.}  For this same 
%    motive, essentially, I~have also removed the \packlass{\adiseal} package 
%    and the \packlass{\lettcdpadi} document class, of which, probably, nobody 
%    besides me even remembers the purpose.
%
%    Though\marginpar{\hfill\strongemph{$*{*}*\;$WOW!!$\;*{*}*$}},
%    ^^A Yes, I know, I should use \textasteriskcentered...
%    \strongemph{good news} are coming for all those users who asked 
%    for a means to \strongemph{customize the letterhead} produced by the 
%    \Bundle: a reasonably viable method for doing so has been provided
%    at last!~:-D\closeofsentencespace  The method requires the use 
%    of the \packlass{\cdpaddon} package, passing in the new option 
%    \opz{customletterhead}.  You specify the contents of your custom head and 
%    foot by means of two new environments, called \env{customletterhead} and 
%    \env{customletterfoot}, respectively, which are similar, to a certain 
%    extent, to the \env{minipage} environment.  This should give you maximum 
%    freedom in designing the letterhead, whilst adopting an interface you are 
%    surely well familiar with.
%    See Subsection~\ref{sS:Customization} for more information.
%
%    Another nifty feature is the ability to draw a thin rule to guide your
%    hand in signing your letters: you ask for this behavior by passing the new
%    \opz{signaturerule} option to the \packlass{\letteracdp} document class.
%    See Subsection~\ref{sS:Options} for more information.
%
%    Sorry, but for now I~cannot offer any more.
%
%
%
% \setcounter{secnumdepth}{3}
%
%
%
% \clearpage
% \part{User's Manual}
%
% \section{About this part}
%
%    We shall only give instructions on how to install the bundle and
%    how to generate this documentation; partial instructions on how to use
%    the classes and packages contained in the bundle can be found
%    in several documents written by the author
%    \cite{tutti,esempi,etichette,novita,nts,ver028,cdpaddon,ver031,ver036},
%    but a systematic user's manual is no longer foreseen.~\mbox{:-(}^^A ) match
%    \closeofsentencespace
%    Note that including in this document the instructions on how to generate
%    the document itself may seem pretty useless, but actually isn't:
%    you might be reading a copy obtained from another person.
%
% \section{Installing the \Bundle\ and generating this documentation}
%
%    As usual for \LaTeX\ distributions, the \Bundle\ is
%    distributed in the form of a \filedir{.dtx} file, namely
%    \filedir{cdpbundl.dtx}, and an accompanying \filedir{.ins} file,
%    namely \filedir{cdpbundl.ins}.
%
%    \subsection{Installation}
%
%    To install the bundle, run \LaTeX\ (or plain \TeX) once on the file
%    \filedir{cdpbundl.ins}.  This will generate the following \LaTeX\
%    input files:
%    \begin{quote}
%      \ttfamily
%      \articoletteracdp.cls\\
%      \cdpaddon.sty\\
%      \cdpbabel.sty\\
%      \cdpnamesenglish\\
%      \cdpnamesitalian\\
%      \example\\
%      \cdpshues\\
%      \epson\\
%      \hplj\\
%      \letteracdp.cls
%    \end{quote}
%    To finish the installation, move them into a \LaTeX\ input
%    directory.  (If you want, you can discard one, more, or all of the
%    files whose name ends in \filedir{.def}, each of which contains color
%    definitions for the seal appropriate for a particular printer.  See
%    Subsection~\ref{sS:config} for information about how these files
%    are used for this purpose.) The above listing of all the files you
%    need to move is also displayed on the terminal at the end of the run
%    of the file \filedir{cdpbundl.ins}.  The documentation of your \TeX\
%    installation should tell you how to find the \LaTeX\ input
%    directory/ies, and probably also how to create new \LaTeX\ input
%    directories reserved to hold your private classes and packages.
%
%    Note that the TDS-compliant directory where the above files should be
%    put is
%    \begin{quote}
%      \texttt{tex/latex/cdpbundl/}
%    \end{quote}
%
%    \subsection{Configuring the \packlass{\cdpaddon} package}
%    \label{sS:config}
%
%    The \packlass{\cdpaddon} package is the part of the \Bundle\ 
%    that takes care of coloring the C.D.P.  seal, which appears in
%    black-and-white if you don't load this package.  Experience by trial
%    and error has shown that some configuration work may be necessary in
%    order to obtain (more or less) correctly-\null looking colors in the
%    seal.  This happens because different printers may render color hues
%    in different ways, sometimes producing surprising results.
%
%    The configuration mechanism works as follows.  For each printer
%    you plan to use there should be a definition file that specifies what
%    hues should be used to color the C.D.P.  seal.  To select which
%    file to load, the user indicates its name in an option passed to the
%    \packlass{\cdpaddon} package.  If the user gives no such indication,
%    the package reads from a configuration file the name of the default
%    definition file, and uses that file.  In both cases, if the
%    designated definition file cannot be read, the package issues a
%    warning and resorts, for the hues, to an emergency definition
%    (which, as you can expect, is not very pleasant to the eye).
%
%    \subsubsection{Writing color definition files}
%
%    The task of a color definition file is simply to define two colors
%    called "slight@col" and "strong@col" (when the definition file is
%    read, the "@"~characters are treated as ordinary letters):
%    "slight@col" is the color used to paint the inner of the D and of
%    the P in the seal, "strong@col" is the color used to draw the lines.
%    You define these colors by means of the "\definecolor" command: see
%    the \textsl{\LaTeX book} \cite[Section~7.3 and
%    Subsection~C.14.3]{LaTeXbook} for information on colors and the
%    "\definecolor" command.
%
%    The file \filedir{\example}, too, contains comments which explain
%    how to write new definition files for the \packlass{\cdpaddon}
%    package.  Indeed, this file is supplied only as a prototype: I suggest
%    that you write a new file by making a copy of it (with the
%    appropriate name) and modifying it with the help of the comments.
%    The colors defined in this file are just an example, and indeed they
%    are exactly the emergency colors used internally by the
%    \packlass{\cdpaddon} package when it cannot load a definition
%    file---that is, a completely useless definition!
%
%    The file \filedir{\example} uses the \texttt{named} color model,
%    but of course you can use any color model you want.  Indeed, it is
%    best to use ``direct'' color models like \texttt{rgb} or
%    \texttt{cmyk}, that allow you to drive the printer with precision:
%    after all, it is exactly for this purpose that you are writing the
%    file.  The other two definition files included in the \Bundle\ 
%    illustrate the use of these color models.
%
%    \subsubsection{Selecting a color definition file via an option}
%
%    The first way to select a particular color definition file among the
%    ones you have installed is to pass a suitable option to the
%    \packlass{\cdpaddon} package.  More precisely, the option name has
%    the form \opz{printer:}\( \langle\textit{bare file name}\rangle \),
%    all in a row without intervening spaces, where \(
%    \langle\textit{bare file name}\rangle \) is the name of the
%    definition file you want to load \emph{without} the extension
%    \filedir{.def}.  For example, to load a file called
%    \filedir{acme-wilejet.def}, you pass the option
%    \opz{printer:acme-wilejet}.  Explicitly, you would write
%    \begin{verbatim}\usepackage[printer:acme-wilejet]{cdpaddon}\end{verbatim}
%    to load the \packlass{\cdpaddon} package and the color definitions
%    suitable for the ACME WileJet printer (the printer preferred by
%    8~coyotes out of~10).  Similarly, to load the file
%    \filedir{\example} you would write
%    \begin{verbatim}\usepackage[printer:cdpshues-example]{cdpaddon}\end{verbatim}
%    and so on.  Of course, you can still specify, as well, the other
%    options listed in~\cite{cdpaddon}: for instance,
%    \begin{verbatim}\usepackage[hypertext,printer:acme-wilejet]{cdpaddon}\end{verbatim}
%    activates the hyperlinks and selects the colors for the
%    ACME WileJet printer.
%
%    When no \opz{printer:}\ldots\ option is specified, a default
%    definition file is loaded, as explained in the next section.  For
%    elegance, you can explicitly request this default definition file with
%    the \opz{printer:Default} option (note the capitalization).  Of
%    course, this implies that you cannot have a definition file called
%    \filedir{Default.def}; but \filedir{default.def} is absolutely OK,
%    and you can select it with \opz{printer:default}.  Moreover, the
%    \opz{printer:None} option forces the \packlass{\cdpaddon} package to
%    ignore the configuration file and to use the emergency, built-in
%    colors; again, \opz{printer:none}, instead, tries to load a color
%    definition file called \filedir{none.def}.
%
%    \subsubsection{Declaring the default color definition file}
%
%    Most users will have only one printer, and even those users who
%    have access to several printers will use one of them more often than
%    the others.  Therefore, it is wise to have a second way of selecting
%    a definition file, to be used when the user does not specify one.
%    This is done by indicating in a configuration file the name of a
%    default color definition file.  This configuration file is called
%    \filedir{\cdpshues}.
%
%    The \filedir{\cdpshues} file should contain only zero or one (but
%    preferably one!) "\DeclareCDPSealHuesDefault" command.  This command
%    may be used only here, and only once, since it deactivates itself
%    when executed, and also stops \LaTeX\ from reading any further in
%    the configuration file.  In its unique (mandatory) argument, one
%    puts the name, \emph{without} the extension \filedir{.def}, of the
%    default color definition file.  Do not include any other command in
%    your configuration file, because the effect of any other command is
%    undefined.
%
%    The \filedir{\cdpshues} file included in the \Bundle\ contains
%    comments that help you to modify it in order to declare your
%    personal default color definition file.  The recommended way of
%    doing this is:
%    \begin{enumerate}
%    ^^A ( paren match
%    \renewcommand*{\labelenumi}{\theenumi)}
%    \item
%    make a backup copy (good idea indeed!) of the original configuration
%    file under a convenient name, for example
%    \filedir{\cdpshues.original};
%    \item
%    modify the \filedir{\cdpshues} file following the advice given
%    in its comments;
%    \item
%    if you want, delete all comments from the (new version of the)
%    \filedir{\cdpshues} file, to save disk space.
%    \end{enumerate}
%
%    The obsolete version of the \packlass{\cdpaddon} package
%    documented in~\cite{cdpaddon} was not configurable: it was
%    programmed to read the color definitions from a file called
%    \filedir{cdpshues.def}, and this name was hard-coded in the package.
%    To maintain compatibility with this version, the file
%    \filedir{\cdpshues} included in the \Bundle\ designates as the
%    default color definition file exactly a file named
%    \filedir{cdpshues.def}.  Consequently, if you  install the supplied
%    files without making any change to them, the \packlass{\cdpaddon}
%    package will continue to exhibit the old behavior, reading the
%    legacy \filedir{cdpshues.def} file if you have one installed, and
%    adopting the emergency colors otherwise.  Note that no actual
%    \filedir{cdpshues.def} file is included in the \Bundle.
%
%    \subsection{Defining the captions for unsupported languages}
%
%    Like many other document classes and packages, the classes and
%    packages of the \Bundle\ mark up some portions of the output they
%    produce by adding certain descriptive strings, that, by default, are
%    written in Italian.  For example, when you have requested the
%    \sty{headings} page style, the name of the addressee, which is printed
%    atop pages, is preceded by the string ``\emph{A:}'' (=~``To:'');
%    similarly, when you issue the command "\tableofcontents" in a documents
%    that adopts the \packlass{\articoletteracdp} document class, the table it
%    produces is titled ``\emph{Sommario}'' (=~``Contents''); and so on.
%
%    When the \Bundle\ was used only by the members of the
%    \emph{Coordinamento}, the Italian defaults it provided for those captions
%    were, of course, quite adequate; as long as its use remained circumscribed
%    to the Italian \LaTeX\ community, they were still acceptable; but now, 
%    questions about how to adapt the \Bundle\ to foreign languages have 
%    begun to be asked in some Internet forums by users around the world,
%    pushing me to reconsider the matter.
%
%    Of course, the Italian captions are not (nor they have ever been)
%    ``hard-wired'' in the code: they are defined by macros that follow the
%    usual naming conventions ("\headtoname", "\contentsname", and so on).
%    Thus, it's only a matter of redefining these ``hooks'' to suit the target
%    language.  However, it would be desirable to have some standard
%    definitions set for each language; but unfortunately, this cannot be 
%    attained just by loading the \packlass{\babel} package, for two reasons.
%    In the first place, there are some captions that are specific to the
%    \Bundle\ and are therefore not cared for by the \packlass{\babel}
%    package: for example, the (optional) subject of a letter is preceded by
%    the expansion of "\subjectname" (which is ``\emph{Oggetto:}'' in Italian
%    and should be ``Subject:'' in English), a hook the
%    \packlass{\babel} package knows nothing about.  Secondarily, even for
%    those hooks that are standard, sometimes the definition provided by the
%    \packlass{\babel} package seems (at least to me) not adequate for a
%    letter; in particular, alas, if you load \packlass{\babel} with the
%    \opz{italian} option (as you ordinarily do when you are writing in
%    Italian), it actually \emph{cancels} the definitions preset by the
%    \Bundle, substituting for them strings that I~deem more suitable for
%    articles or books, for which they are indeed intended, than for letters
%    (for example, \( "\contentsname" \to \mbox{``\emph{Indice}''} \)
%    in \packlass{\babel}, instead of
%    \( "\contentsname" \to \mbox{``\emph{Sommario}''} \), as defined by the
%    \Bundle;
%    \( "\refname" \to \mbox{``\emph{Riferimenti bibliografici}''} \) 
%    in \packlass{\babel},
%    instead of \( "\refname" \to \mbox{``\emph{Testi citati}''} \), as
%    I~prefer; etc.).\footnote{I~do not insist on these captions being defined
%    in the way the \Bundle\ currently uses: if the \LaTeX\  community
%    thinks that such definitions are inadequate, I~have no objection at all,
%    of course, to changing them.}
%
%    To supply a \emph{provisional} solution to this problem, a new component 
%    has been added to the \Bundle: the \packlass{\cdpbabel} package.
%    The idea is that, when using one of the document classes of the
%    \Bundle, you load the \packlass{\cdpbabel} package \emph{instead of} 
%    \packlass{\babel}, and let the former load the latter on your behalf;
%    in this way, you offer it a chance to augment, or amend, the definitions 
%    made by \packlass{\babel} itself.  This solution might seem inelegant
%    (and admittedly it is), but the problem is more subtle than it may look
%    at first sight, involving also compatibility issues with existing
%    documents, and I~need to further investigate it.  Hopefully, a more
%    satisfactory  scheme will be found for future releases.\footnote{More
%    generally, it can be observed that the document classes of the
%    \Bundle\ rely too heavily on ancillary packages, and that this reconfirms
%    the ``patched-up'' nature of their design; just think of the entanglement
%    between the \packlass{\letteracdp} class and the \packlass{\cdpaddon}
%    package---a typical Italian \emph{pasticcio}, it should be admitted!}
%
%    In practice, all the \packlass{\cdpbabel} package has to do is (to load 
%    \packlass{\babel} and) to issue an 
%    "\addto{\captions"\meta{language}"}{"\ldots"}" command (or better, 
%    one such command for each required \meta{language}), with ``\ldots''
%    replaced by the appropriate redefinitions; the list, and the details,
%    of such redefintions are of course dictated by \meta{language},
%    so \packlass{\cdpbabel} takes them from what we will call a ``C.D.P.
%    language definition file''.  This is a text file that, by convention,
%    must be named \filedir{cdpnames}\meta{language}\filedir{.ldf},
%    where \meta{language} is the name of the corresponding language option
%    (for example,
%    \begin{verbatim}\usepackage[english,italian]{cdpbabel}\end{verbatim}
%    invokes both \filedir{\cdpnamesenglish} and  \filedir{\cdpnamesitalian},
%    in this order), and which must adhere to the format shown
%    in fig.~\ref{fig:cdpnames}.
%
%    \begin{figure}[tbp]
%      \fontsize{9}{11}\selectfont
%      \zerolistvertspaces
%      \begin{flushleft}
%        "\ProvidesFile{cdpnames"\meta{language}".ldf}["\meta{date \& version}"]"
%      \end{flushleft}
%      \begin{verbatim}
%
%\def\@cdpbabel@letter@names{%\end{verbatim}
%      \begin{flushleft}
%        "  \def\subjectname      {"\meta{Subject:}"}%"\\
%        "  \def\registeredname   {"\meta{Registered}"}%"\\
%        "  \def\registeredRRname {"\meta{Registered R.R.}"}%"\\
%        "  \def\andccname        {"\meta{cc (in addresses)}"}%"\\
%        "  \def\ccname           {"\meta{cc (at end of letters)}"}%"\\
%        "  \def\enclname         {"\meta{Encl:}"}%"\\
%        "  \def\PSname           {"\meta{P.S.:}"}%"\\
%        "  \def\headtoname       {"\meta{To:}"}%"\\
%        "  \def\lettername       {"\meta{Letter}"}%"
%      \end{flushleft}
%      \begin{verbatim}
%  % More captions could be added in the future.
%}
%\def\@cdpbabel@artlet@names{%\end{verbatim}
%      \begin{flushleft}
%        "  \def\contentsname     {"\meta{Contents}"}%"\\
%        "  \def\listfigurename   {"\meta{List of figures}"}%"\\
%        "  \def\listtablename    {"\meta{List of tables}"}%"\\
%        "  \def\refname          {"\meta{References}"}%"\\
%        "  \def\indexname        {"\meta{Index}"}%"\\
%        "  \def\figurename       {"\meta{Figure}"}%"\\
%        "  \def\tablename        {"\meta{Table}"}%"\\
%      \end{flushleft}
%      \begin{verbatim}
%  % More captions could be added in the future.
%}
%
%\endinput\end{verbatim}
%      \caption{Contents of a \filedir{cdpnames}\meta{language}\filedir{.ldf} 
%        file}
%      \label{fig:cdpnames}
%    \end{figure}
%
%    As you can see, a ``C.D.P. language definition file'' must define two 
%    macros, named "\@cdpbabel@letter@names" and "\@cdpbabel@artlet@names",
%    respectively: in the first you put the redefinitions that should be
%    added to "\captions"\meta{language} when only the \packlass{\letteracdp}
%    class has been loaded; in the second you list the additional redefinitions
%    that apply if the \packlass{\articoletteracdp} class is loaded too;
%    and that's all.  The listing shown in fig.~\ref{fig:cdpnames} details exactly
%    what hooks need to be redefined when switching to another language;
%    in principle, you must supply a suitable redefinition for each of them,
%    but of course, when a hook is already defined by the \packlass{\babel}
%    package in a way that you think suits, you may omit it from your list
%    (or, perhaps better, comment it out).  Look at the two provided files
%    for inspiration, and in particular at \filedir{\cdpnamesenglish} for the
%    intended meaning of the captions (which sould be quite obvious, however).
%
%    At present, the \Bundle\ ships with \emph{just two} such definition
%    files included, namely \filedir{\cdpnamesitalian} for Italian
%    and \filedir{\cdpnamesenglish} for English: for all other languages,
%    you'll have to write and install appropriate files yourself.
%    Needless to say, you are most welcome if, after doing so, you want to
%    contribute your work for inclusion in future releases of the
%    \Bundle.  Suggestions for amending the captions specified in the two
%    existing files are most welcome too; for Italian, it is also a matter of
%    updating the captions originally defined by the \packlass{\letteracdp}
%    and \packlass{\articoletteracdp} document classes so that they remain
%    ``in sync'' with those specified in the \filedir{\cdpnamesitalian} file.
%
%    It is hardly worth remarking that ``C.D.P. language definition files''
%    naturally belong to the same directory where the \Bundle\ is located, 
%    and \emph{not} to any directory of the \packlass{\babel} system!
%
%    One final word of clarification: two of the abovementioned captions,
%    namely "\ccname"
%    and "\andccname", look like they are the same, but they actually differ:
%    the latter is prepended to \emph{addresses} to which the letter is sent
%    as a ``carbon copy'', whilst the former is used when the names from those
%    addresses are enumerated again \emph{at the end} of a letter (in the same
%    place where enclosures are also listed).  In Italian, "\andccname"
%    should expand to ``\emph{e~p.~c.}'', but "\ccname" just to
%    ``\emph{P.~c.}''; hence, there is at least one language in which the
%    distinction is relevant.
%
%    \subsection{Documentation}
%
%    To produce this documentation, run \LaTeX\ three times (for the
%    table of contents to be correct) on the file \filedir{\cdpbundl.dtx}.
%    This won't produce the index and the change history, however: for
%    those, you have to run MakeIndex on the files \filedir{\cdpbundl.idx}
%    and \filedir{\cdpbundl.glo}, produced during the previous \LaTeX\
%    run, with the styles \filedir{gind.ist} and \filedir{gglo.ist},
%    respectively (these styles are part of the standard \LaTeX\
%    distribution); then pass \filedir{\cdpbundl.dtx} through \LaTeX\
%    twice more.
%
%    Starting with version 0.36 of the \Bundle, a (quite trivial!\@) makefile
%    that ``knows'' how to produce the documentation is offered along with the 
%    Bundle itself.  Although it is not a required part of the distribution
%    (as per LPPL\@), you may find that some distributors supply it all the
%    same (I~hope the CTAN\@ sites will do so).  With this makefile in the same 
%    directory as \filedir{\filename}, the shell command
%    \begin{quote}
%      \ttfamily
%      make doc
%    \end{quote}
%    will take all the necessary actions to produce the full documentation
%    (in PDF\@; the modifications you need to introduce into the makefile
%    in order to obtain DVI\@ output should be quite obvious, however).
%
%    The same makefile can also be used to extract the various class, package,
%    and ancillary (definition and configuration) files: simply issue the
%    command
%    \begin{quote}
%      \ttfamily
%      make code
%    \end{quote}
%    at the shell prompt; whereas
%    \begin{quote}
%      \ttfamily
%      make
%    \end{quote}
%    will \emph{both} extract the code files \emph{and} typeset the
%    documentation.  Type
%    \begin{quote}
%      \ttfamily
%      make help
%    \end{quote}
%    for more information.
%
% \section{How to use the \Bundle}
%
%    The \Bundle\ v.~0.36 contains two \LaTeX\ document classes,
%    namely \packlass{\letteracdp} and \packlass{\articoletteracdp},
%    and two helper \LaTeX\ packages, called \packlass{\cdpaddon}
%    and \packlass{\cdpbabel}, plus a certain number of definition
%    and configuration files related to these packages.
%    As already said, the actual purpose of this section is not
%    to explain you how to use these macro files, but only to give you
%    references to documents where you can find the explanations.
%
%    For instructions on how to use the \packlass{\letteracdp} class
%    the reader is referred to \cite{tutti,esempi,etichette,nts,ver028,ver031}.
%    Note, however, that the class is syntactically compatible with the
%    \packlass{letter} standard \LaTeX\ class, in the sense that a
%    document prepared for the \packlass{letter} class can be compiled
%    without errors with the \packlass{\letteracdp} class; but the output
%    will be different.
%
%    As a minimal reference, fig.~\ref{fig:input} illustrates the typical
%    structure of a simple input file for the \packlass{\letteracdp}
%    document class.
%
% \iffalse
%   Meta-comment: a <*gobble> guard is needed here to prevent the
%   DocStrip program from putting the lines beginning with "%%" in the
%   generated files.
%<*gobble>
% \fi
%    \begin{figure}[tbp]
%      \zerolistvertspaces
%      \begin{verbatim}\documentclass[boldsubject,italicsignature,smartindent]{letteracdp}
%% Of course, the above options are a matter of personal taste...
%\usepackage[T1]{fontenc} % as it is now customary
%% Since we are writing in English, we need to redefine some captions;
%% the following package automatically takes care of this:
%\usepackage[english]{cdpbabel}
%% Presently only two languages are supported: "english" and "italian".
%
%% Name, address and signature of the sender (the name is optional):
%\name{Revinu Jitis Drofnats}
%\address{
%    Revinu~J. \textsc{Drofnats}\\
%    Department of Farm Ecology\\
%    University of St.\,Anford\\
%    Haga Alto, CA~94321 (U.S.A.)
%}
%\signature{R.~J. Drofnats\\Professor}
%\date{February~8, 2015} % as usual, date is optional, default is \today
%\place{St.\,Anford}     % place where the letter is written (optional)
%
%% Uncomment the following declaration if you want running heads:
%% \pagestyle{headings}
%
%
%
%\begin{document}
%
%\begin{letterhead}[Brian~K. Reid]{
%    Prof.~Brian~K. \textsc{Reid}\\
%    Department of Electrical Engineering\\
%    Stanford University\\
%    Stanford, CA~94305 (U.S.A.)
%}[
%    This is the optional subject of the letter.
%]
%
%\opening{Dear Prof.~Reid,}
%
%this letter is typeset using a \texttt{letterhead} environment, so it
%will be printed with the letterhead of the \emph{Coordinamento} above
%it; if you don't want it, use the \texttt{letter} environment instead.
%You can also use the \texttt{foldedletterhead} environment in place
%of the \texttt{letterhead} environment (or \texttt{foldedletter} in
%place of \texttt{letter}) to obtain a letter prepared to be folded in
%three parts, as one usually does before putting it in an envelope.
%Experiment to see what happens.
%
%\closing{Sincerely,}
%
%\end{letterhead}
%
%\end{document}\end{verbatim}
%      \caption{A sample input file for the \packlass{\letteracdp}
%        document class}
%      \label{fig:input}
%    \end{figure}
% \iffalse
%</gobble>
% \fi
%
%    For instructions on how to use the \packlass{\articoletteracdp}
%    class, see~\cite{novita}.
%
%    For instructions on how to use the \packlass{\cdpaddon} package,
%    see~\cite{cdpaddon}.  Note, however, that this document describes an
%    obsolete version, which lacks the ability to deal with several color
%    definition files.  The use of the \packlass{\cdpaddon} package for 
%    customizing the letterhead, though, is covered in~\cite{ver036}.
%
%    For instructions on how to use the \packlass{\cdpbabel} package,
%    see~\cite{ver036}.
%
%    Please note that before using the \Bundle\ you must read the
%    following license to see whether its terms are acceptable for you,
%    especially for what concerns the lack of any warranty; if they are
%    not, don't use this program.
%
%    \subsection{License}
%    \label{sS:License}
%
%    The \Bundle\ is \emph{not} in the public domain: its author,
%    Gustavo \textsc{Mezzetti}, owns the copyright, and in general retains
%    all the rights therein; but as a special exception, the author
%    grants you the permissions indicated below.
%
%    \subsubsection{Distribution and/or modification}
%
%    The \Bundle\ may be distributed and/or modified under the
%    conditions of the \LaTeX\ Project Public License, either version~1.3
%    of this license or (at your option) any later version.  The latest
%    version of this license is in
%    \begin{quote}
%      \ttfamily
%      http://www.latex-project.org/lppl.txt
%    \end{quote}
%    and version~1.3 or later is part of all distributions of \LaTeX\
%    version 2005/12/01 or later.
%
%    The \Bundle\ has the LPPL maintenance status ``author-maintained''.
%
%    The file \filedir{manifest.txt} included in the \Bundle\ 
%    specifies what the \Bundle\ consists of; more precisely,
%    it explains how the locutions ``Work'' and ``Compiled Work'',
%    used in the \LaTeX\ Project Public License, are to be interpreted
%    in the case of this work.
%
%    \subsubsection{Use}
%
%    The use of the \Bundle\ is unrestricted, provided that you
%    accept the terms and conditions of the \LaTeX\ Project Public
%    License and of the following subsection for what concerns the absence
%    of any warranty.
%
%    \subsubsection{No warranty}
%
%    There is absolutely no warranty for the \Bundle.  The
%    Copyright Holder provides the \Bundle\ ``as is'', without
%    warranty of any kind, either expressed or implied, including, but
%    not limited to, the implied warranties of merchantability and
%    fitness for a particular purpose.  The entire risk as to the quality
%    and performance of the \Bundle\ is with you.  Should the
%    \Bundle\ prove defective, you assume the cost of all necessary
%    servicing, repair, or correction.
%
%    In no event will The Copyright Holder, or any other party who may
%    distribute and/or modify the \Bundle\ as permitted by the
%    \LaTeX\ Project Public License, be liable to you for damages,
%    including any general, special, incidental or consequential damages
%    arising out of any use of the \Bundle\ or out of inability to
%    use it (including, but not limited to, loss of data, data being
%    rendered inaccurate, or losses sustained by anyone as a result of any
%    failure of the \Bundle\ to operate with any other programs),
%    even if The Copyright Holder or said other party has been advised of
%    the possibility of such damages.
%
%    \subsection{Options of the \packlass{\letteracdp} class}
%    \label{sS:Options}
%
%    Of course, you load the \packlass{\letteracdp} class by means of the
%    usual "\documentclass" declaration, which allows you to specify
%    various options.  For some reason, the complete list of all the
%    options recognized by this class has never been given in any of the
%    previous documents containing instructions about it; so, we give it
%    here.
%
%    We shall now list all the options recognized by the
%    \packlass{\letteracdp} class, including the standard ones it can
%    understand.  If an option does not appear in the list given below,
%    then that option is not recognized by the \packlass{\letteracdp}
%    class, even if it is a standard one (that is, documented in the
%    \textsl{\LaTeX book}~\cite{LaTeXbook}).
%
%    We begin with the list of standard options.  Since they are
%    already described in the \textsl{\LaTeX book}~\cite{LaTeXbook}, we
%    describe only the options that behave differently from the standard;
%    the others are just listed without description.
%
%    \begin{description}
%
%    \item[\iopz{10pt}\eopz{11pt}\eopz{12pt}\fopz]
%
%    \item[\iopz{letterpaper}\eopz{legalpaper}\eopz{executivepaper}\eopz
%      {a4paper}\eopz{a5paper}\eopz{b5paper}\fopz]
%    \hfil\null\linebreak
%    Note that \packlass{\letteracdp} uses \opz{a4paper} as the default.
%
%    \item[\iopz{landscape}\fopz]
%
%    \item[\iopz{final}\eopz{draft}\fopz]
%
%    \item[\iopz{oneside}\eopz{twoside}\fopz]
%
%    \item[\iopz{onecolumn}\eopz{twocolumn}\fopz] The \opz{twocolumn}
%    option is recognized, but triggers an error; the \opz{onecolumn}
%    option is recognized, but it is ignored because in any case the
%    document is typeset in one-column mode.  Note, however, that
%    requesting \opz{onecolumn} as a global option could make sense:
%    precisely, it could serve to inform possible packages that the
%    document has only one column.  But, precisely for this reason, this
%    option is requested by default during the class initialization;
%    there is hence no reason to specify it, but it does no harm.
%
%    \item[\iopz{leqn}\fopz]
%
%    \item[\iopz{fleqn}\fopz]
%
%    \end{description}
%
%    We now list the option specific to the \packlass{\letteracdp} class.
%
%    \begin{description}
%
%    \item[\iopz{mediumsubject}\eopz{boldsubject}\fopz]
%    The \opz{mediumsubject} option requests that the subject of the
%    letters be typeset in medium weight, while the \opz{boldsubject}
%    option makes it appear in boldface type.  The default is
%    \opz{mediumsubject}.
%
%    \item[\iopz{uprightsignature}\eopz{italicsignature}\fopz]
%    The \opz{uprightsignature} option requests that the signature of the
%    letters be typeset in upright shape, while the \opz{italicsignature}
%    option makes it appear in italic shape.  The default is
%    \opz{uprightsignature}.
%
%    \item[\iopz{signaturerule}\eopz{nosignaturerule}\fopz]
%    Drawing or not a thin rule to mark the spot where you should sign a
%    letter is a matter of style that, as such, should apply to the whole
%    document; for this reason, this behavior is requested by menas of an
%    option, namely \opz{signaturerule}.  As you can guess, \opz{signaturerule}
%    causes the rule to be drawn, while \opz{nosignaturerule}, which is defined
%    for the sake of completeness, suppresses it.  Anyway, the rule is never
%    drawn inside a \env{signatureenv*} environment; this includes signatures
%    generated by the \mbox{$*$-form} of the "\closing" command.
%    You can adjust the width of the rule by modifying, with "\setlength",
%    the "\signaturerulewidth" rigid length.
%
%    \item[\iopz{noPS}\eopz{usePS}\fopz]
%    These two options are obsolete (to say the least!\@) and should
%    \emph{not} be used any longer.  If you want to improve the graphical
%    quality of the seal, simply load the \packlass{\pictee} package in
%    your document, along with the \packlass{\cdpaddon} package (of course, 
%    if you do so, PostScript or PDF\@ printing will be needed to produce the 
%    output).
%
%    \item[\iopz{indent}\eopz{noindent}\eopz{smartindent}\eopz{shortindent}\fopz]
%    These options are used to specify the paragraph indentation, but
%    only for letters; any portion of text that is not included in a
%    letter---but normally there is no such text---is not affected by
%    these options.  The \opz{indent} option sets the paragraph
%    indentation, for letters, to one tenth of the text width,
%    unless this amount looks too bad, in which case the indentation
%    is set to 2~picas.  The \opz{noindent} option completely
%    suppressess paragraph indentation within letters.  The \opz{smartindent}
%    option sets the paragraph indentation, for letters, to the width
%    of (the last line of) the salutation, unless this amount looks
%    too bad, in which case it behaves like \opz{indent}.  The \opz{shortindent}
%    option maintains also for letters the same indentation used for
%    text not included in letters (see below); its name, chosen to be
%    more easily remembered, is due to the fact that normally it involves
%    a shorter indentation than the default one.  The default is \opz{indent}.
%    I repeat that these options do not affect any text that should appear
%    outside of letters, whose paragraphs will be always indented by
%    2~em, where the unit of 1~em is taken from the main document font;
%    this is also the paragraph indentation for letters if the
%    \opz{shortindent} option is specified.  Paragraphs of
%    postscripts are never indented.
%
%    \item[\iopz{105x37labels}\eopz{70x37labels}\eopz{Avery5352labels}\fopz]
%    These options indicate the format of the address labels.  The
%    first two options indicate address labels of mm~105\,$\times$\,37
%    and mm~70\,$\times$\,37, respectively.  The third option
%    indicates the address labels used by the standard \packlass{letter}
%    class.  Note the uppercase letter in \opz{Avery5352labels}.  The
%    default is \opz{105x37labels}.
%
%    \end{description}
%
%    \subsection{Customizing the letterhead}
%    \label{sS:Customization}
%
%    A new, long-awaited feature is available at last: it is now possible, 
%    with reasonable ease, to customize the letterhead produced by the
%    \env{letterhead} environment.~:-D\closeofsentencespace
%    As a matter of fact, this customization has always been possible---the
%    \env{letterhead} environment would have been completely useless
%    otherwise---but instructions on how to carry it out were given uniquely
%    in documents that were only privately circulated; moreover, these
%    instructions required you to modify some of the internal commands of the
%    \Bundle.  What the present version does is to provide a reasonable user
%    interface for making these internal changes and (which is not less
%    important) to document this interface.
%
%    The customization of the letterhead basically involves the following three
%    steps:
%
%    \begin{enumerate}
%
%    \item
%    First of all, you need to load the \packlass{\cdpaddon} package,
%    which is part of the \Bundle, passing to it the (new) option
%    \opz{customletterhead}.
%
%    \item
%    The \packlass{\cdpaddon} package defines two environments, named
%    \env{customletterhead} and \env{customletterfoot}, respectively,
%    that can be used more or less like a \env{minipage} environment.
%    You should put, in any place before the first letter (not entirely exact,
%    but almost so: we'll refine this information underneath), a
%    \env{customletterhead} environment holding the
%    description of your letterhead.  Just pretend you are composing a
%    \env{minipage} with your letterhead inside.
%
%    \item
%    If you also want to customize the page footer (as it is ordinarily the
%    case), define its contents inside a similarly placed
%    \env{customletterfoot} environment.
%    If you omit this step, the footer will be empty.
%
%    \end{enumerate}
%
%    \DescribeEnv{customletterhead}^^A
%    \DescribeEnv{customletterfoot}^^A
%    More formally, the \packlass{\cdpaddon} package makes two new environments
%    available, named as stated above, that conform to the following syntax:
%
%    \begin{flushleft}
%      "\begin{customletterhead}{"\meta{wdth}"}"\quad
%        \meta{text}\quad
%      "\end{customletterhead}"\\
%      "\begin{customletterfoot}{"\meta{wdth}"}"\quad
%        \meta{text}\quad
%      "\end{customletterfoot}"
%    \end{flushleft}
%
%    Both these environments typeset \meta{text} in a \env{minipage} with
%    width \meta{wdth} and save the result in a box register specifically
%    reserved for this purpose (each environment has its own, dedicated
%    register); subsequently, if the \opz{customletterhead} option has been
%    specified, the contents of these box registers are used in place of the
%    header and footer ordinarily defined by the \packlass{\letteracdp}
%    document class.  Note that the \packlass{\cdpaddon} package defines the
%    \env{customletterhead} and \env{customletterfoot} environments in any
%    case, \emph{independently} of which options you pass to it.
%
%    The contents specified inside \env{customletterhead} and
%    \env{customletterfoot} will be horizontally centered in the header and
%    footer boxes, respectively; these boxes are defined by the page layout,
%    but normally their left and right edges coincide with those of the main
%    text.  If the \meta{wdth} you have specified for the contents themselves
%    exceeds the width available in the header\slash footer, they will stick
%    out by the same amount of space on both sides (in brief: the contents are
%    centered with "\hss" at both ends).  Normally, you pass "\textwidth" as
%    the \meta{wdth} parameter\footnote{I~have long been in doubt whether to make
%    \meta{wdth} an optional parameter, with default value equal to
%    \texttt{\bslash textwidth}; eventually, I~decided for a syntax that
%    parallels the syntax of the \env{minipage} environment, and should
%    therefore be obvious to remember.} and align things as you prefer
%    \emph{inside} the \env{minipage}, perhaps creating sub-boxes or using 
%    \env{picture}s.
%
%    Coming to vertical alignment, the boxes produced by the
%    \env{customletterhead}\slash\env{customletterfoot} environments are
%    ``smashed'' down to null height and depth;
%    for \env{customletterhead}, the bottom edge of the box
%    is aligned with the baseline of the header, whilst for
%    \env{customletterfoot} it is the top edge which is aligned
%    with the baseline of the footer.  If you want the contents of
%    \env{customletterhead} to sink below the baseline of the header,
%    simply backspace vertically at their end, \emph{i.e.},
%    use "\vspace{"\meta{dist}"}" with a negative \meta{dist},
%    and the bottom edge of your custom header will be placed exactly
%    \( \left|\meta{dist}\right| \) below the baseline of the header
%    as defined by the general page layout.
%    Similarly, a "\vspace{"\meta{dist}"}" with a negative \meta{dist}
%    placed at the beginning of your custom footer will rise its top edge
%    exactly \( \left|\meta{dist}\right| \) above the baseline of the footer
%    defined by the general page layout.
%
% \iffalse
%   Meta-comment: a <*gobble> guard is needed here to prevent the
%   DocStrip program from putting the lines beginning with "%%" in the
%   generated files.
%<*gobble>
% \fi
%    \begin{figure}[tbp]
%      \zerolistvertspaces
%      \begin{verbatim}\documentclass
%    [twoside,boldsubject,italicsignature,shortindent,signaturerule]
%    {letteracdp}[2015/01/20]
%\usepackage[T1]{fontenc}
%\usepackage[english]{cdpbabel}
%\usepackage[customletterhead]{cdpaddon}[2015/01/21]
%\usepackage{url,lipsum}
% 
%\address{
%    Gustavo \textsc{Mezzetti}\\
%    \protect\url{gustavo.mezzetti@istruzione.it}
%}
%\signature{Gustavo Mezzetti}
%\date{February~8, 2015}
%\place{Padova}
%
%
%
%% Definition of your letterhead occurs here:
%
%\begin{customletterhead}{\textwidth}
%    \centering \Huge
%    My Huge Centered Letterhead
%\end{customletterhead}
%\begin{customletterfoot}{\textwidth}
%    \raggedleft \tiny
%    \ruleacrossheadorfoot
%    My (almost unreadable) small print\\
%    flushed against the right margin.
%\end{customletterfoot}
%
%
%
%\begin{document}
%
%\begin{foldedletterhead}[Whom it may concern]
%    {To whom it may concern}
%    [My own letterhead, at last!]
%
%\makepresentation
%\maketopdate\relax
%
%\lipsum[1-2]
%
%\makesignature
%
%\end{foldedletterhead}
%
%\end{document}\end{verbatim}
%      \caption{How to customize the letterhead}
%      \label{fig:customletter}
%    \end{figure}
% \iffalse
%</gobble>
% \fi
%
%    Fig.~\ref{fig:customletter} shows a sample input file for a letter with
%    customized letterhead.  Note that, among the others, we load the
%    \packlass{\cdpaddon} package with the \opz{customletterhead} option.
%    Note also that the \env{customletterhead}\slash\env{customletterfoot}
%    environments \emph{can} be placed in the preamble; this makes it very easy
%    to create a definition file containing the description of your custom
%    letterhead, to be subsequently loaded in your source files,
%    or even to define your custom version of the \packlass{\letteracdp}
%    and \packlass{\articoletteracdp} document classes.  For example, the three
%    files \filedir{myletter.cls}, \filedir{myarticletter.cls}, and
%    \filedir{mylogo.def}, whose contents are listed in
%    fig.~\ref{fig:myletter}, \ref{fig:myarticletter}, and~\ref{fig:mylogo},
%    respectively, together define two new classes, called \packlass{myletter}
%    and \packlass{myarticletter}, that respectively parallel
%    \packlass{\letteracdp} and \packlass{\articoletteracdp}, but produce the
%    same letterhead as the file of 
%    fig.~\ref{fig:customletter}.\footnote{Please note that \packlass{myletter} 
%    also used to be (a great many years ago) the obsolete name of the 
%    \packlass{akletter} document class.  Instructing you to create a custom 
%    class by that name shouldn't cause you any trouble in
%    ^^A ( paren match
%    2015~:-), but I~want to inform you all the same of the potential name 
%    conflict.}
%
%    \begin{figure}[tbp]
%      \zerolistvertspaces
%      \begin{verbatim}\NeedsTeXFormat{LaTeX2e} % LaTeX2e is required!
%\ProvidesClass{myletter}
%              [2015/02/08 v0.01 (development)]
%\LoadClassWithOptions{letteracdp}[2015/01/20]
%\input{mylogo.def}
%\endinput\end{verbatim}
%      \caption{Contents of the \filedir{myletter.cls} file}
%      \label{fig:myletter}
%    \end{figure}
%
%    \begin{figure}[tbp]
%      \zerolistvertspaces
%      \begin{verbatim}\NeedsTeXFormat{LaTeX2e} % LaTeX2e is required!
%\ProvidesClass{myarticletter}
%              [2015/02/08 v0.01 (development)]
%\LoadClassWithOptions{articoletteracdp}[2015/01/20]
%\input{mylogo.def}
%\endinput\end{verbatim}
%      \caption{Contents of the \filedir{myarticletter.cls} file}
%      \label{fig:myarticletter}
%    \end{figure}
%
%    \begin{figure}[tbp]
%      \zerolistvertspaces
%      \begin{verbatim}\ProvidesFile{mylogo.def}[2015/02/08 v0.01 (development)]
%
%\RequirePackage[customletterhead]{cdpaddon}[2015/01/21]
%
%\begin{customletterhead}{\textwidth}
%    \centering \Huge
%    My Huge Centered Letterhead
%\end{customletterhead}
%\begin{customletterfoot}{\textwidth}
%    \raggedleft \tiny
%    \ruleacrossheadorfoot
%    My (almost unreadable) small print\\
%    flushed against the right margin.
%\end{customletterfoot}
%
%\endinput\end{verbatim}
%      \caption{Contents of the \filedir{mylogo.def} file}
%      \label{fig:mylogo}
%    \end{figure}
%
%    One final word: the \env{customletterhead}\slash\env{customletterfoot}
%    environments save their contents in their respective box registers by
%    means of a \emph{local} assignment, subject to ordinary scoping rules:
%    this can be useful if you want to change the letterhead for just a single
%    letter in a source file that contains many ones.
%
%    See~\cite{ver036} for more information.
%
% \StopEventually{
%    \setcounter{secnumdepth}{0}
%    \providecommand*\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace}
%
%    \clearpage
%    \begin{thebibliography}{99}
%    \addcontentsline{toc}{section}{\refname}
%
%    \bibitem{LaTeXbook}
%    L.~Lamport, \emph{\LaTeX---A Document Preparation System---User's
%       Guide and Reference Manual}, 2nd~edition, Addison-Wesley,
%       Reading, 1994.
%
%    \bibitem{tutti}
%    G.~Mezzetti, \emph{Breve presentazione d'una classe \LaTeX, denominata
%       \packlass{\letteracdp}, utile nella preparazione delle lettere del
%       Coordinamento}, technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/presentazione.tex}}
%
%    \bibitem{esempi}
%    \bysame, \emph{Esempi d'uso della classe \packlass{\letteracdp}},
%       technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/esempi.tex}}
%
%    \bibitem{etichette}
%    \bysame, \emph{Etichette degli indirizzi con la classe \packlass{\letteracdp}},
%       technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/etichett.tex}}
%
%    \bibitem{novita}
%    \bysame, \emph{Grandi novit\`{a} per \packlass{\letteracdp}:
%       arriva \packlass{\articoletteracdp}!}, technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/novita.tex}}
%
%    \bibitem{nts}
%    \bysame, \emph{Forse non tutti sanno che\ldots},
%       technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/nontuttisanno.tex}}
%
%    \bibitem{ver028}
%    \bysame, \emph{Annuncio delle versioni 0.28 della classe \packlass{\letteracdp}
%       e 0.08 della classe \packlass{\articoletteracdp}},
%       technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/ver0-28.tex}}
%
%    \bibitem{cdpaddon}
%    \bysame, \emph{Il pacchetto \packlass{\cdpaddon}},
%       technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/cdpaddonistr.tex}}
%
%    \bibitem{ver031}
%    \bysame, \emph{Annuncio della versione 0.31 del \emph{\Bundle}},
%       technical note downloadable from:\\
%       \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/ver0-31.tex}}
%
%    \bibitem{ver036}
%    \bysame, \href
%          {http://mirrors.ctan.org/macros/latex/contrib/cdpbundl/cdp-ver-0-36.pdf}
%          {\emph{The \Bundle\ version~0.36}},
%       available on CTAN\@ as part of the \href
%          {http://www.ctan.org/pkg/cdpbundl}
%          {\Bundle} vers.~0.36.
%
%    \end{thebibliography}
% }
%
%
%
% \clearpage
% \part{Implementation}
%
% \section{About this part}
%
%    This part is of interest only to \LaTeX\ hackers; to avoid
%    having this part printed, look in the file \filedir{\filename}
%    for a line that looks \emph{exactly} like this
%    \begin{verbatim}%% \OnlyDescription % uncomment to discard Implementation part\end{verbatim}
%    and remove the two leading percent signs ("%%").
%
% \section{A driver for this document}
%
%    This part of the file is \emph{not} included in any generated file:
%    it is simply the driver.
%    \begin{macrocode}
%<*driver>
%    \end{macrocode}
%
%    To begin with, we load the \packlass{ltxdoc} class and the 
%    \packlass{hypdoc} package.
%    \begin{macrocode}
\documentclass{ltxdoc}
\usepackage{hypdoc}
%    \end{macrocode}
%    We now set a few typesetting options.
%    First of all, we want a history listing and a full index, the latter
%    organized by line numbers.
%    \begin{macrocode}
\RecordChanges
\EnableCrossrefs
\CodelineIndex
%    \end{macrocode}
%    If you don't want to include the second part of this document,
%    \emph{Implementation}, uncomment the line containing the command
%    "\OnlyDescription".
%    \begin{macrocode}
%% \OnlyDescription % uncomment to discard Implementation part
%    \end{macrocode}
%    Finally, setting "\hfuzz" and "\vfuzz" to 0~points is only one
%    of the many neurotic symptoms of the author!
%    \begin{macrocode}
\hfuzz = 0pt
\vfuzz = 0pt
%    \end{macrocode}
%    Now input this same file, using \DS\ conventions.
%    \begin{macrocode}
\begin{document}
  \DocInput{cdpbundl.dtx}
%    \end{macrocode}
%    Then print the change list and the index.  We put these commands in
%    the driver, rather than in the comments of this file, because
%    producing the change list and the index is somewhat cumbersome, and some
%    users could prefer to omit them: such users should simply use a
%    different driver.
%    \begin{macrocode}
  \clearpage \PrintChanges
  \clearpage \PrintIndex
%    \end{macrocode}
%    When this file is read directly by \LaTeX\ without the intervention
%    of \DS, the following line will make \TeX\ stop
%    reading.
%    \begin{macrocode}
\end{document}
%    \end{macrocode}
%    End of driver module.
%    \begin{macrocode}
%</driver>
%    \end{macrocode}
%    \noindent\null\par
%
% \section{The code for the \packlass{\letteracdp} class}
%
%    This part of the file goes into \filedir{\letteracdp.cls}.
%    \begin{macrocode}
%<*letter>
%    \end{macrocode}
%    The reader must be warned that this is only a preliminary release
%    of this code: a thorough reorganization of the macros has already
%    been planned for future releases.  Instead of putting all the code
%    in a single file and giving it the form of a document class,
%    in future releases the code will be split into several files,
%    part of which will be packages, part definition and/or
%    configuation files, and so on.
%
%    \subsection{Identification}
%
%    I don't remember exactly why I asked for the June 1997 release
%    of \LaTeXe, but I am sure that there was a reason; so, let us
%    continue to ask for it.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1997/06/01] % LaTeX2e is required!
%    \end{macrocode}
%    The usual identification; the string \texttt{(**incomplete**)}
%    will eventually be removed, I hope!
%    \begin{macrocode}
\ProvidesClass{letteracdp}
              [2015/02/08 v0.36 (**incomplete**)]
%    \end{macrocode}
%    Print a copyright message on the terminal, just below the name
%    of the class.
%    \begin{macrocode}
\typeout{Copyright (C) 1999-2015 by Gustavo MEZZETTI,
  all rights reserved.}
%    \end{macrocode}
%
%    \begin{macro}{\@letteracdp}
%    Define a macro containing the name of the class; it will be used
%    in error and warning messages.  This is done for two reasons:
%    first of all, to save tokens in macro definitions, but also to
%    avoid the risk of mispelling the name of the class in some place.
%    \begin{macrocode}
\@ifdefinable\@letteracdp{\def\@letteracdp{letteracdp}}
%    \end{macrocode}
%    \end{macro}
%
%    \subsection{Initial code}
%
%    \begin{macro}{\Coordinamento}
%    Define the following macros near the beginning of the code, so it
%    will be easy to change them.  The first one is the full name of the
%    \emph{Coordinamento}:
%    \begin{macrocode}
\newcommand*\Coordinamento{%
  Coordinamento dei Dottorandi e dei Dottori di Ricerca
  dell'Universit{\char "E0} di Padova%
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\CoordinamentoWWW}
%    The second one is its web address:
%    \begin{macrocode}
\newcommand*\CoordinamentoWWW{%
  http://www.dei.unipd.it/\string~assdott/%
}
%    \end{macrocode}
%    \end{macro}
%
%    Declare the fonts used to print the letterhead and the footer;
%    they are declared as ``fixed fonts'' so that they are not
%    affected by options (\emph{e.g.}, \opz{12pt}), packages
%    (\emph{e.g.}, \opz{times}), and so on.
%    \begin{macro}{\@lh@nss}
%    Main font for letterhead is Computer Modern Sans Serif 12pt
%    (LetterHead\slash Normal Sans Serif):
%    \begin{macrocode}
\DeclareFixedFont\@lh@nss{T1}{cmss}{m}{n} {12}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@lh@bss}
%    A couple of initials are printed using a bigger font, that is,
%    Computer Modern Sans Serif 17pt (LetterHead\slash Bigger Sans
%    Serif):
%    \begin{macrocode}
\DeclareFixedFont\@lh@bss{T1}{cmss}{m}{n} {17}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@lh@rm}
%    Main font for footer: Computer Modern Roman 9pt
%    (LetterHead\slash RoMan):
%    \begin{macrocode}
\DeclareFixedFont\@lh@rm {T1}{cmr} {m}{n} {9}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@lh@it}
%    The words ``World Wide Web'' are printed in italics
%    (LetterHead\slash ITalics):
%    \begin{macrocode}
\DeclareFixedFont\@lh@it {T1}{cmr} {m}{it}{9}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@lh@tt}
%    And finally, the web address is printed in teletype font
%    (LetterHead\slash TeleType):
%    \begin{macrocode}
\DeclareFixedFont\@lh@tt {T1}{cmtt}{m}{n} {9}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@ptsize}
%    The following macro will be used later to decide which ``class
%    layout'' file to load.
%    \begin{macrocode}
\newcommand\@ptsize{}
%    \end{macrocode}
%    \end{macro}
%
%    A couple of useful commands that are missing from the \LaTeX\
%    kernel; we leave this explicative comment in the code too.
%    \begin{macrocode}
%% A couple of useful things that are missing from the LaTeX kernel:
%    \end{macrocode}
%    \begin{macro}{\@newrigidlength}
%    The first is similar to "\newlength", but allocates a
%    \textoken{dimen} rather than a \textoken{glue}.
%    \begin{macrocode}
\@ifdefinable\@newrigidlength{\def\@newrigidlength#1{%
  \@ifdefinable#1{\newdimen#1}%
}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@msetlength}
%    The second can be used to say, for instance,
%\begin{verbatim}
%\@msetlength{\someRubberLength}{2}{\anotherRubberLength}
%\end{verbatim}
%    to set "\someRubberLength" to twice the value of
%    "\anotherRubberLength", without destroying the stretch and
%    shrink components (recall that, on the contrary,
%\begin{verbatim}
%\setlength{\someRubberLength}{2\anotherRubberLength}
%\end{verbatim}
%    only sets the \emph{natural length} of "\someRubberLength" to
%    twice the \emph{natural length} of "\anotherRubberLength", and
%    both the stretch and shrink components of "\someRubberLength" to
%    zero).
%    \begin{macrocode}
\@ifdefinable\@msetlength{\def\@msetlength#1#2#3{%
  #1#3\multiply#1#2\relax
}}
%    \end{macrocode}
%    \end{macro}
%
%    A number of counter, lengths, etc.\ are defined here, at the
%    beginning of the class, to detect as soon as possible if any name
%    conflicts with an already defined one.  The idea is that, since the
%    class is pretty long, it is better to avoid to discover near the end
%    that it cannot be used because of a name that is already defined;
%    but of course, with the speed of modern computers this is not at all
%    a problem, so it is very likely that in future releases all
%    declarations will be moved to the place they naturally belong to.
%    Presently, however, they are almost all listed here; for many of
%    them, some explanations are given here, and a more precise description
%    is deferred until the spot where the corresponding entity is used.
%
%    \counterindex{letter}
%    First, we introduce a counter to keep track of the number of letters
%    produced.  \textbf{Warning:} {\em this counter is used also for
%    internal bookkeeping, so don't change its value unless you know what
%    you are doing!}
%    \begin{macrocode}
\newcounter{letter}
%    \end{macrocode}
%
%    \counterindex{emptyaddrlabels}
%    The following five counters are used in connection with the
%    address labels optionally printed at the end of a compiled file.
%    The \cnt{emptyaddrlabels} counter holds the number of labels to
%    leave blank when starting to print (the first sheet of) the address
%    labels; this is useful if some labels on the same sheet have already
%    been peeled off.
%    \begin{macrocode}
\newcounter{emptyaddrlabels}
%    \end{macrocode}
%    \counterindex{addrlabelrows}
%    A single sheet of address labels contains many labels.  For example,
%    in the well-known (in the U.S.) Avery 5352 format each sheet
%    contains ten labels, organized in two columns and five rows.  Other
%    formats contain different number of rows and columns of labels.  To
%    cope with all these different formats, the number of rows and
%    columns of labels is kept in two counters: \cnt{addrlabelrows} holds
%    the number of rows
%    \begin{macrocode}
\newcounter{addrlabelrows}
%    \end{macrocode}
%    \counterindex{addrlabelcolumns}
%    and \cnt{addrlabelcolumns} holds the number of columns.
%    \begin{macrocode}
\newcounter{addrlabelcolumns}
%    \end{macrocode}
%    \counterindex{label}
%    The \cnt{addrlabelrows} and \cnt{addrlabelcolumns} counters are
%    usually set once for all by the code provided in a suitable
%    "\DeclareOption" declaration, as the result of the user's request of
%    one of the options devoted to specifying the address label format
%    (\opz{105x37labels}, etc.).  In some exceptional circumstances, they
%    can also be reset by the user, but even in this case, once set they
%    are not changed any more.  They are therefore not real ``counters'',
%    but rather (style) parameters.  The following two counters, instead,
%    are ``real'', \emph{running} counters: they hold a running index
%    which identifies the current label.  The \cnt{label} counter holds
%    the index of a label inside a given letter
%    \begin{macrocode}
\newcounter{label}[letter]
%    \end{macrocode}
%    \counterindex{totallabel}
%    while the \cnt{totallabel} counter holds the global index of a
%    label, that is, the index of the label in the whole document.
%    \begin{macrocode}
\newcounter{totallabel}
%    \end{macrocode}
%    It is possible that a single letter has more than one label
%    associated, because sometimes letters are sent to more than one
%    addressee.
%
%    \counterindex{equation}
%    \counterindex{footnote}
%    \counterindex{mpfootnote}
%    In our document class, the letter is the main unit in which the
%    document is organized.  Therefore, we want that equations, footnotes,
%    and footnotes inside minipages be numbered within letters.
%    \begin{macrocode}
\@addtoreset{equation}{letter}
\@addtoreset{footnote}{letter}
\@addtoreset{mpfootnote}{letter}
%    \end{macrocode}
%
%    \begin{macro}{\@lh@left@margin}
%    The second type of parameters we are going to define are rigid
%    lengths (\textoken{dimen}'s).  The first two govern the position of
%    the CDP seal with respect to the text margins (see also
%    fig.~\ref{fig:plo} on page~\pageref{fig:plo}).  More precisely,
%    "\@lh@left@margin" is the horizontal distance from the left margin of
%    text to the \emph{right} edge of the seal\ldots
%    \begin{macrocode}
\@newrigidlength\@lh@left@margin
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@lh@right@margin}
%    \ldots and "\@lh@right@margin" is the distance from the right edge of
%    the rule found in the rightmost part of the letterhead to the right
%    margin of text.
%    \begin{macrocode}
\@newrigidlength\@lh@right@margin
%    \end{macrocode}
%    \end{macro}
%    A couple of lenghts used as internal registers, to hold
%    values that must be passed to certain macros---we shall explain
%    their use when we come to it.
%    \begin{macrocode}
\@newrigidlength\@block@inden
\@newrigidlength\@block@width
%    \end{macrocode}
%    \begin{macro}{\longindentation}
%    The following are style parameters used to govern the typesetting
%    of the addresses and of the signature.  Some of them, in turn, are
%    defined in terms of another, crucial style parameter, the so-called
%    ``long indentation''; this is the length by which items that appear
%    in the right-hand half of the letter should be indented: roughly, it
%    is equal to half the value of "\textsize", but it can be fine-tuned
%    at ``"\begin{document}"-time'' for better alignment with some parts
%    of the letterhead.
%    \begin{macrocode}
\@newrigidlength\longindentation
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\senderindentation}
%    The amount by which the sender address should be indented:
%    \begin{macrocode}
\@newrigidlength\senderindentation
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\senderwidth}
%    The width of the column in which the sender address should be
%    typeset:
%    \begin{macrocode}
\@newrigidlength\senderwidth
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addresseeindentation}
%    The indentation\ldots
%    \begin{macrocode}
\@newrigidlength\addresseeindentation
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addresseewidth}
%    \ldots and column width for the addresse address:
%    \begin{macrocode}
\@newrigidlength\addresseewidth
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\signatureindentation}
%    Indentation\ldots
%    \begin{macrocode}
\@newrigidlength\signatureindentation
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\signaturewidth}
%    \ldots and width for the signature:
%    \begin{macrocode}
\@newrigidlength\signaturewidth
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\signaturerulewidth}
%    The width of the rule drawn by the ``factory'' definition of
%    "\signaturerule" (which is backed up in "\CDPFactorySignatureRule"):
%    \begin{macrocode}
\@newrigidlength\signaturerulewidth
\setlength\signaturerulewidth{5cm}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\foldedheight}
%    There are macros that provide the ability to typeset letters that
%    are going to be folded before being put into the envelopes; these
%    macros ensure that no text is typeset astride of the folding.  The
%    vertical distance from the upper edge of the \emph{paper} (not of
%    the text) to the folding is kept in "\foldedheight".  A value of
%    zero or less (\emph{e.g.}, $-"\maxdimen"$) prohibits folded letters:
%    this can be useful for certain paper sizes, and for safety it is set
%    here as the default.  For paper sizes that allow folded letters, the
%    actual value of "\foldedheight" is set by the code given in the
%    relevant "\DeclareOption".
%    \begin{macrocode}
\@newrigidlength\foldedheight
  \setlength\foldedheight{-\maxdimen}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@folding@ht}
%    In general, the default setting of "\foldedheight" provided by the
%    option handling mechanism should be sufficient.  However, the user
%    is allowed to change the value of "\foldedheight", preferably in the
%    preamble, but also in the document body, if a certain simple
%    precaution is taken.  This can be useful if one wants to alter the
%    default behavior, \emph{e.g.}, to have letters that are two-folded
%    rather then three-folded, or to allow folded letters also when using
%    a paper format, like A5, that normally does not allow them.  Useful,
%    sure, but it rises a problem: the algorithm that decides where to
%    split the text between the part that must go above the folding and
%    the part that must go below it requires that the value of
%    "\foldedheight" lie within a certain range.  Obviously we cannot ask
%    the user to know what range is acceptable, so we adopt the following
%    solution: we define an ``internal backup'' of "\foldedheight",
%    called "\@folding@ht" for historical reasons; then, the user is
%    asked to call the macro "\checkfoldedheight" (see below) whenever
%    (s)he changes the value of "\foldedheight"; this macro checks the
%    new value and, if it is OK, copies it in the internal dimension
%    "\@folding@ht" (actually, after some scaling conversions), otherwise
%    it sets an internal flag which disables folded letters and issues a
%    warning.  A slight variant of "\checkfoldedheight", which differs
%    only in the warning produced, is called automatically at the
%    "\begin{document}", so the user is \emph{not} required to call
%    "\checkfoldedheight" if the changes to "\foldedheight" are made in
%    the preamble.
%    \begin{macrocode}
\@newrigidlength\@folding@ht
%    \end{macrocode}
%    \end{macro}
%    The following three dimensions will be described when we come to
%    the point where they are used.
%    \begin{macrocode}
\@newrigidlength\@lh@folding@ht
\@newrigidlength\@above@folding@margin
\@newrigidlength\@above@folding@shrink
%    \end{macrocode}
%
%    Now we pass to rubber lengths, \emph{i.e.}, \TeX's
%    \textoken{skip}'s.  The first two are something like internal
%    registers used to pass certain style parameters back and forth
%    between macros.
%    \begin{macrocode}
\newlength\@block@space
\newlength\@block@andspace
%    \end{macrocode}
%    \begin{macro}{\@below@folding@skip}
%    This is an internal style parameter which specifies the amount of
%    vertical blank space that should be left, in folded letters, between
%    the folding and the text that follows it.  It can be redefined in
%    packages or other classes, or, in an emergency, by the final user.
%    It is a rubber length, but in this class it is assigned, as we shall
%    see later, a value without stretch or shrink components.  Note that
%    the actual space left between the folding and the text will usually
%    be greater than, or at most equal to, the value of
%    "\@below@folding@skip", because lines of text are usually aligned to
%    integer multiples of half the "\baselineskip".
%    \begin{macrocode}
\newlength\@below@folding@skip
%    \end{macrocode}
%    \end{macro}
%
%    The following ten (rubber) length are style parameters that affect
%    the amount of vertical space left before and after certain building
%    blocks, like addresses and signature.  The user can freely change
%    them with "\setlength".  Note that all these spaces are added with
%    "\addvspace", so only the largest one survives if two of them occur
%    in a row.
%    \begin{macro}{\aboveaddressvspace}
%    The amount of vertical space above the sender's or addressee's
%    address:
%    \begin{macrocode}
\newlength\aboveaddressvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\andaddressvspace}
%    The amount of vertical space between two consecutive addresses
%    separated with "\and" or "\andcc":
%    \begin{macrocode}
\newlength\andaddressvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\belowaddressvspace}
%    The amount of vertical space below the sender's or addressee's
%    address:
%    \begin{macrocode}
\newlength\belowaddressvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\abovesubjectvspace}
%    The amount of vertical space above the subject:
%    \begin{macrocode}
\newlength\abovesubjectvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\presubjectvspace}
%    The amount of vertical space between the text specified with
%    "\presubject" (if any) and the main body of the subject:
%    \begin{macrocode}
\newlength\presubjectvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\belowsubjectvspace}
%    The amount of vertical space below the subject:
%    \begin{macrocode}
\newlength\belowsubjectvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\abovesignaturevspace}
%    The amount of vertical space above the signature:
%    \begin{macrocode}
\newlength\abovesignaturevspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\abovesignatureshortvspace}
%    The amount of vertical space above the signature when the
%    \mbox{$*$-form} of the "\makesignature" command is used (this
%    happens, for instance, when the \mbox{$*$-form} of the
%    "\closing" command is used):
%    \begin{macrocode}
\newlength\abovesignatureshortvspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\belowsignaturevspace}
%    The amount of vertical space below the signature:
%    \begin{macrocode}
\newlength\belowsignaturevspace
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\belowpresentationvspace}
%    The amount of vertical space below the presentation as a whole
%    (the presentation contains the sender address, the addressee
%    address, and the optional subject); this also ends the block of
%    these style parameters:
%    \begin{macrocode}
\newlength\belowpresentationvspace
%    \end{macrocode}
%    \end{macro}
%
%    Allocation of some other rigid lengths (\textoken{dimen}'s)
%    follows: these concern the layout of the sheets of address
%    labels that the user wants to employ.  To save a few keystrokes,
%    we define the "\do" macro to do the allocation and to initialize
%    the value of the allocated length to zero.
%    \begin{macrocode}
\def\do#1{\@newrigidlength #1\setlength #1\z@}
%    \end{macrocode}
%    Then we allocate and initialize the individual lengths.
%    \begin{macro}{\addrlabelsleftmargin}
%    This is the amount of horizontal space between the left edge of the
%    sheet of address labels and the left edge of the leftmost column of
%    labels on the sheet.
%    \begin{macrocode}
\do\addrlabelsleftmargin
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabelstopmargin}
%    This is the amount of vertical space between the top edge of the
%    sheet of address labels and the top edge of the upper row of labels
%    on the sheet.
%    \begin{macrocode}
\do\addrlabelstopmargin
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabelshsep}
%    This is the amount of horizontal space between two columns of labels
%    on the sheet.
%    \begin{macrocode}
\do\addrlabelshsep
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabelsvsep}
%    This is the amount of vertical space between two rows of labels on
%    the sheet.
%    \begin{macrocode}
\do\addrlabelsvsep
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabelborder}
%    Normally, you don't want to write into the labels starting from
%    their physical border: you want to leave a little margin between the
%    text inside the labels and their edges.  The amount of margin is
%    kept in this style parameter (sorry, no provision is made to specify
%    different margins in the two directions).
%    \begin{macrocode}
\do\addrlabelborder
%    \end{macrocode}
%    \end{macro}
%
%    The following four lengths don't have reasonable default values,
%    so they are not initialized here.  The code for each individual
%    address label option will initialize the first two, and the
%    other two are computed later.
%    \begin{macro}{\addrlabelwidth}
%    The (horizontal) width of a single address label.
%    \begin{macrocode}
\@newrigidlength\addrlabelwidth
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabelheight}
%    The (vertical) height of a single address label.
%    \begin{macrocode}
\@newrigidlength\addrlabelheight
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabeltrimwidth}
%    This is a computed value, that the user should regard as
%    read-only: it is the width of a single address label
%    ("\addrlabelwidth"), diminished by twice the width of the
%    border ("\addrlabelborder").
%    \begin{macrocode}
\@newrigidlength\addrlabeltrimwidth
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addrlabeltrimheight}
%    Analogous: "\addrlabelheight" diminished by twice
%    "\addrlabelborder".  This ends this block of code.
%    \begin{macrocode}
\@newrigidlength\addrlabeltrimheight
%    \end{macrocode}
%    \end{macro}
%
%    Now, we just declare a few names we are going to use.  The idea
%    is to trigger an error message if one of them is already defined.
%    \begin{macro}{\@cdp@reserved}
%    This is a reserved name that will be used as a
%    ``general-purpose'' container, much like "\reserved@a", etc.
%    \begin{macrocode}
\@ifdefinable\@cdp@reserved{}
%    \end{macrocode}
%    \end{macro}
%    Miscellaneous names, we shall describe them in a more
%    appropriate place.
%    \begin{macrocode}
\@ifdefinable\@empty@block{}
\@ifdefinable\@beginlabels{}
\@ifdefinable\@beginlabelgroup{}
\@ifdefinable\@mlabel{}
\@ifdefinable\@endlabelgroup{}
\@ifdefinable\@endlabels{}
\@ifdefinable\startaddrlabel{}
\@ifdefinable\startaddrlabel{}
\@ifdefinable\stopaddrlabel{}
\@ifdefinable\ifactuallabel{}
\@ifdefinable\ChosenMakeOpening{}
\@ifdefinable\ChosenMakeClosing{}
\@ifdefinable\ChosenMakeSignature{}
%    \end{macrocode}
%
%    \begin{macro}{\@lett@decl}
%    We define a token register used to save declarations to execute
%    when a letter begins (see below).
%    \begin{macrocode}
\@ifdefinable\@lett@decl{\newtoks\@lett@decl}
%    \end{macrocode}
%    \end{macro}
%
%    We finally arrive to something simple and clearly comprehensible.
%    We initialize the addresses, the signature, etc.  to empty strings.
%    To do that, we define the "\do" macro as follows:
%    \begin{macrocode}
\def\do#1{\@ifdefinable#1{\let#1\@empty}}
%    \end{macrocode}
%    \begin{macro}{\thesenderaddress}
%    The address of the sender, \emph{including her/his name}:
%    \begin{macrocode}
\do\thesenderaddress
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\thesendername}
%    The name of the sender (essentially, this is provided only for
%    compatibility with the \packlass{letter} standard \LaTeX\ class):
%    \begin{macrocode}
\do\thesendername
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\thesendersignature}
%    The signature of the sender:
%    \begin{macrocode}
\do\thesendersignature
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\thesenderlocation}
%    The room number, etc., of the sender:
%    \begin{macrocode}
\do\thesenderlocation
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\thesenderphone}
%    The phone number of the sender:
%    \begin{macrocode}
\do\thesenderphone
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\theaddresseeaddress}
%    The complete address of the addressee, \emph{including her/his
%    name, title, etc.}:
%    \begin{macrocode}
\do\theaddresseeaddress
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\theaddresseename}
%    The name of the addressee (used in page headings):
%    \begin{macrocode}
\do\theaddresseename
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\thesubject}
%    The subject of the letter:
%    \begin{macrocode}
\do\thesubject
%    \end{macrocode}
%    \end{macro}
%
%    There are also some internal macros that need to be initialized to
%    "\@empty".
%    \begin{macro}{\@subject@style}
%    The subject can be typeset either in medium weight or in
%    boldface.  This is achieved by inserting the "\@subject@style"
%    token in front of it: its default definition given here makes
%    this token a no-op (no font attributes are changed), but the code
%    that implements options like \opz{mediumsubject} or
%    \opz{boldsubject} can "\let" this token be equal to, say,
%    "\mdseries" or "\bfseries", to obtain the desired changes in the
%    font attributes.  If more than one attribute needed to be
%    changed (\emph{e.g.}, if somebody wanted to define a
%    \opz{bolditalicsubject} option), then "\def" should be used
%    instead of "\let"; for instance, one would write
%    \begin{verbatim}\def\@subject@style{\bfseries\itshape}\end{verbatim}
%    We don't make "\@subject@style" a token register because the
%    ``"\let" case'' is the most common.
%    \begin{macrocode}
\do\@subject@style
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@signature@style}
%    This is analogous to "\@subject@style", but for the signature.
%    The code for the \opz{uprightsignature} option "\let"s it equal to
%    "\upshape", and the code for the \opz{italicsignature} option to
%    "\itshape".
%    \begin{macrocode}
\do\@signature@style
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@place}
%    The place where the letter is written: starting from version~0.34,
%    this macro is used as the default value for the optional argument of
%    "\@makeopening", "\makedate", etc.  It is logically and functionally
%    analogous to "\@date".
%    \begin{macrocode}
\do\@place
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@begin@letter@hook}
%    This hook is executed when a letter starts, at the very end of the
%    process of setting up the ``letter-making'' environment, just
%    after the declarations stored in "\@lett@decl".  It may turn out to
%    be useful in packages and derived classes, and in fact it is used by
%    the \packlass{articoletteracdp} class.  It is not a token register
%    because it is envisioned that many independent segments of code
%    will want to store tokens in it, and this can easily be achieved
%    with the "\g@addto@macro" function, which requires that its
%    argument be a macro, not a token register.
%    \begin{macrocode}
\do\@begin@letter@hook
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@end@letter@hook}
%    This is analogous to "\@begin@letter@hook", but is executed at the
%    end of every ``letter-making'' environment, after its last page has
%    been finished off and ejected, but before writing to the
%    \filedir{.aux} file the information for the associated address labels.
%    Note that there is another hook, called "\stopletter" and described
%    later, which is executed \emph{before} ejecting the last page of
%    the letter.
%    \begin{macrocode}
\do\@end@letter@hook
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@begin@block@or@and@hook}
%    Vers.~0.36: new hook used in "\@block@everypar" to support signature
%    rules.
%    \begin{macrocode}
\do\@begin@block@or@and@hook
%    \end{macrocode}
%    \end{macro}
%
%    The following macros are defined only inside a \env{subject}
%    environment.  We want that they cause an error if used outside of that
%    environment, but we also want to be sure that their names are not
%    already defined.  We achieve this by calling "\@ifdefinable", and
%    then "\let"ting the relevant token be "\@undefined".
%    \begin{macrocode}
\def\do#1{\@ifdefinable#1{\let#1\@undefined}}
\do\presubject
\do\registered
\do\registeredRR
%    \end{macrocode}
%
%    The following are integer (numeric) style parameters: they are
%    initialized later, and contain several penalty values used to assist
%    \TeX\ in choosing sightful and meaningful page breaks, and also for
%    other purposes that will be explained later.  For now we content
%    ourselves with the simple allocation with "\newcount".
%    \begin{macrocode}
\def\do#1{\@ifdefinable#1{\newcount#1}}
%    \end{macrocode}
%    The first five parameters are actually ``constants'' analogous to
%    "\@lowpenalty", "\@medpenalty", and "\@highpenalty"; they are
%    typically assigned very high penalty values, and their names all
%    begin with "\@fold@" because they are used in connection with the
%    algorithm that takes care of ``folded presentations'' (explained
%    later).
%    \begin{macrocode}
\do\@fold@basepenalty
\do\@fold@lowpenalty
\do\@fold@medpenalty
\do\@fold@highpenalty
\do\@fold@toppenalty
%    \end{macrocode}
%    The real style parameters begin here.  Their values are assigned
%    later, in various spots of the code; indeed, the values assigned
%    vary according to certain circumstances, for example, they are
%    changed from the default when a ``presentation'' is entered.
%    We'll discuss all this later on.
%    \begin{macro}{\@b@frompenalty}
%    This is the penalty inserted at the beginning of a \env{sender}
%    environment---the environment used to typeset the sender address.
%    \begin{macrocode}
\do\@b@frompenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@i@frompenalty}
%    This is the penalty inserted before additional sender addresses
%    separated with "\and".
%    \begin{macrocode}
\do\@i@frompenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@e@frompenalty}
%    This is the penalty inserted at the end of a \env{sender}
%    environment.
%    \begin{macrocode}
\do\@e@frompenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@b@topenalty}
%    This is the penalty inserted at the beginning of an
%    \env{addressee} environment---the environment used to typeset the
%    addressee address.
%    \begin{macrocode}
\do\@b@topenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@i@topenalty}
%    This is the penalty inserted before additional addressee addresses
%    separated with "\and" or "\andcc".
%    \begin{macrocode}
\do\@i@topenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@e@topenalty}
%    This is the penalty inserted at the end of an \env{addressee}
%    environment.
%    \begin{macrocode}
\do\@e@topenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@b@subjpenalty}
%    This is the penalty inserted at the beginning of a \env{subject}
%    environment---the environment used to typeset the subject.
%    \begin{macrocode}
\do\@b@subjpenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@e@subjpenalty}
%    This is the penalty inserted at the end of a \env{subject}
%    environment.
%    \begin{macrocode}
\do\@e@subjpenalty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@e@prespenalty}
%    This is the penalty inserted at the end of a presentation as a
%    whole.
%    \begin{macrocode}
\do\@e@prespenalty
%    \end{macrocode}
%    \end{macro}
%    The following are two internal registers, used to pass penalty
%    values back and forth between macros.
%    \begin{macrocode}
\do\@i@penalty
\do\@e@penalty
%    \end{macrocode}
%    \begin{macro}{\@cdp@gencount}
%    We also take the opportunity to define a general-purpose numeric
%    register, used for short-term storage when needed.  This ends the
%    block of count registers.
%    \begin{macrocode}
\do\@cdp@gencount
%    \end{macrocode}
%    \end{macro}
%
%    Six internal switches are defined next.
%    \begin{macrocode}
\def\do#1{\@ifdefinable#1{\newif#1}}
%    \end{macrocode}
%    \begin{macro}{\if@use@eepic@}
%    The user can request, through the \opz{usePS} option, that the
%    \packlass{eepic} package be used to trace the lines that make up the
%    CDP seal, for better graphical result; the user's indication,
%    however, will be honored only if the \packlass{eepic} package is
%    available on the system (of course!).  This switch is set to ``true''
%    if the \packlass{eepic} package is present and should be used.
%    \begin{macrocode}
\do\if@use@eepic@
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\if@do@fold@}
%    This switch is ``true'' when folded letters are allowed, and
%    ``false'' when they are shunned; the setting is made by the
%    "\checkfoldedheight" command, and also at
%    ``"\begin{document}"-time''.
%    \begin{macrocode}
\do\if@do@fold@
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\if@making@labels@}
%    Prior to version~0.36, the code for generating the address labels (that
%    had been copied from the standard \packlass{letter} class) wrote to the
%    \filedir{.aux} file the data concerning the addresses even when no labels
%    were being produced.  This is totally useless.  Starting from
%    version~0.36, the following conditional has been introduced in order to
%    avoid this.
%    \begin{macrocode}
\do\if@making@labels@
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\if@signature@rule@}
%    True if a typeset signature should be surmounted by a ``signature rule''
%    intended to guide the signer's hand.  New in vers.~0.36 (2015 Feb~08).
%    \begin{macrocode}
\do\if@signature@rule@
%    \end{macrocode}
%    \end{macro}
%    The other two switches cannot be explained here.  They are defined
%    differently, without using "\newif", so that they are always changed
%    "\global"ly.
%    \begin{macrocode}
\@ifdefinable\if@new@block@{
  \def\@new@block@true {\global\let\if@new@block@\iftrue }
  \def\@new@block@false{\global\let\if@new@block@\iffalse}
}
\@ifdefinable\if@empty@and@{
  \def\@empty@and@true {\global\let\if@empty@and@\iftrue }
  \def\@empty@and@false{\global\let\if@empty@and@\iffalse}
}
%    \end{macrocode}
%
%    We need the following box registers to hold precompiled parts of
%    the letterhead and of the footer.
%    \begin{macro}{\@logo@box@base}
%    This holds the main part of the CDP seal; more precisely, that
%    part that appears both in the \ldots\sty{letterhead} and in the
%    \sty{logo}\ldots page styles.
%    \begin{macrocode}
\newsavebox\@logo@box@base
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@logo@box@addS}
%    This holds the part of the CDP seal that should be added to the
%    part contained in "\@logo@box@base" to obtain the seal as it appears
%    in the \sty{logo}\ldots page styles.
%    \begin{macrocode}
\newsavebox\@logo@box@addS
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@logo@box@addL}
%    This holds the part of the CDP seal that should be added to the
%    part contained in "\@logo@box@base" to obtain the seal embedded
%    in the \ldots\sty{letterhead} page styles.
%    \begin{macrocode}
\newsavebox\@logo@box@addL
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@oordinamento@box}
%    This holds the writing ``oordinamento dei Dottorandi di Padova''
%    that appears in the letterhead, with the initial~``C'' being
%    supplied by the seal.
%    \begin{macrocode}
\newsavebox\@oordinamento@box
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@name@and@WWW@box}
%    This holds the footer used in the \sty{firstletterhead} and
%    \sty{foldedletterhead} page styles, which contains the full name of
%    the \emph{Coordinamento} and its web address.  This ends the block
%    of box registers, too.
%    \begin{macrocode}
\newsavebox\@name@and@WWW@box
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\and}
%    It is possible to specify several addresses (both for the sender
%    and the addressee) as well as several signatures; the various parts
%    are separated by "\and" commands.  Strictly speaking, it is an error
%    to expand the token "\and" anywhere but inside the \env{sender},
%    \env{addressee}, and \env{signatureenv} environments (the
%    environments used to produce the sender address, the addressee
%    address, and the signature, repectively); hence, the correct thing
%    to do here would be to initialize "\and" to produce an error
%    message, and then redefine it in the various environments, as
%    required in each case.  But alas, the code for \packlass{\letteracdp}
%    is still incomplete, and this is one of the things I still have to
%    finish: I don't know exactly how to handle a misplaced "\and", so,
%    for now, I simply decide to ignore it.
%    \begin{macrocode}
\let\and\relax
%    \end{macrocode}
%    Of course, this definition will be changed inside the
%    abovementioned environments, where "\and" must have a special
%    meaning.
%    \end{macro}
%    \begin{macro}{\andcc}
%    Only inside an \env{addressee} environment, the token "\andcc" may
%    be used in place of "\and" to separate addresses of persons to which
%    the letter is sent as a carbon copy.  Its default definition,
%    however, is to act as "\and".
%    \begin{macrocode}
\@ifdefinable\andcc{\def\andcc{\and}}
%    \end{macrocode}
%    \end{macro}
%
%    We need to save the definitions, as initialized by the \LaTeX\
%    kernel, of a couple of macros.
%    \begin{macro}{\m@kel@bel}
%    Saved definition of "\makelabel".
%    \begin{macrocode}
\@ifdefinable\m@kel@bel{\let\m@kel@bel\makelabel}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@@vspace}
%    Saved definition of "\vspace".
%    \begin{macrocode}
\@ifdefinable\@@vspace{\let\@@vspace\vspace}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@indent@pref}
%    This is a multi-way switch used to implement the \opz{indent},
%    \opz{noindent}, etc.\ options, which govern the way in which
%    paragraphs of letters (except~P.S.) are indented.  The code associated
%    with the various options "\let"s this token equal to one of the
%    following keys, which will be interpreted later as specified:
%    \begin{description}
%      \item[F (for ``fixed indent'').]
%        Set "\parindent" to one tenth of "\textwidth", with a threshold
%        value of 2~pica (that is, "\parindent" will be at least 2~pica, even
%        if this is more than one tenth of "\textwidth").
%      \item[N (for ``no ident'').]
%        Set "\parindent" to 0~points.
%      \item[L (for ``leave indent'').]
%        The value of "\parindent" that was in effect outside of the
%        current \ldots\env{letter}\ldots\ environment is retained.
%      \item[O (sorry, I don't remember for what).]
%        Set "\parindent" to the width of the last line of the salutation
%        (\emph{i.e.}, the argument of "\opening" or "\makeopening"); if the
%        salutation is not given, this is the same as~``F''.
%
%        2015 Feb~08 (v.~0.36): I~have conjectured that the choice of the
%        letter~``O'' for this key could have been suggested by the initial of
%        ``opening'', meaning, as it were, ``indent by the extent of the 
%        opening''; but I~cannot remember of having thought of that.
%    \end{description}
%    The default setting is the same as the one implied by the
%    \opz{indent} option.
%    \begin{macrocode}
\@ifdefinable\@indent@pref{\let\@indent@pref F}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\voidisOK}
%    Sometimes, in a letter, you want to omit the sender or the
%    addressee address, or the signature, and it is annoying to see a
%    warning about an ``empty something'' that you left empty
%    deliberately.  For this reason, inside the environments that produce
%    the addresses and the signature you are allowed to use the command
%    "\voidisOK" to disable such warnings.  The idea is that you say
%    something like
%\begin{verbatim}
%\address{\voidisOK}
%\end{verbatim}
%    when you want to declare that the address has intentionally be
%    left void; when the address is actually typeset (and this happens
%    inside an \env{addressee} environment), the command "\voidisOK" will
%    be expanded, causing the warning to be suppressed.  As for the
%    command "\and", the right thing to do would be to define this
%    command only inside the environments in which it can be used; but
%    there are complications arising from the fact that the text
%    specified inside an "\address" declaration can be expanded also at
%    other times, for instance when typesetting the address labels.  For
%    this reason, we take the shortcut of "\let"ting this command equal
%    to "\@empty", so that it will be ignored when it occurs out of place.
%    (We do not "\let" it equal to "\relax" because the latter could
%    confuse an "\ignorespaces"; on the contrary, "\@empty" disappears
%    upon "\write" and "\mark" operations, and this is quite OK\@.) Where
%    appropriate, "\voidisOK" will be redefined to achieve the desired
%    effect.
%    \begin{macrocode}
\@ifdefinable\voidisOK{\let\voidisOK\@empty}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\subjectnamegap}
%    If present, the subject of a letter is typeset with hanging
%    indentation, preceded by the text contained in the command
%    "\subjectname" and separated from it by a certain amount of
%    horizontal white space: the width of this white space is specified
%    by the "\subjectnamegap" macro.  This is a macro and not a
%    \textoken{dimen} register to allow the length to be specified in
%    terms of the font-dependent units like ``em''.  Of course, the
%    hanging indentation includes this horizontal space; note,
%    however, that if "\subjectname" is empty than the
%    "\subjectnamegap" space is not taken into account.
%    \begin{macrocode}
\newcommand*\subjectnamegap{.5em}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\closingindentation}
%    As for the way of typesetting addresses, different countries have
%    different uses about how to indent the closing of the letter: for
%    instance, in Italy the closing is indented like any other, ordinary
%    paragraph, whilst in anglo-saxon letters it is indented by the same
%    amount by which the sender address is indented.  To cope with this,
%    the "\closingindentation" command is introduced, to hold the amount
%    of indentation for the closing: its default definition is
%    "\parindent", so that the closing is indented like an ordinary
%    paragraph, but a ``letter-making'' environment can redefine it,
%    if necessary.  It is a command and not a length, because the
%    value of "\parindent" can change, and actually does change, in
%    the sequel.
%    \begin{macrocode}
\newcommand*\closingindentation{\parindent}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\signaturealignment}
%    Different countries have different conventions also about how the
%    signature should be aligned; for instance, in the U.S.  the
%    signature is set ragged right, but with a hanging indentation equal
%    to the hanging indentation of the sender address, which in the U.S.
%    is printed on the right-hand half of the paper; in Italy, the
%    signature is more or less centered between the margins, and if it
%    contains more than one line, the lines are aligned at their
%    midpoint.  In order to accomodate the various conventions, the token
%    "\signaturealignment" is inserted at the beginning of the
%    \env{signatureenv} environment (the environment one uses to typeset
%    the signature); it is the responsability of the surrounding
%    \ldots\env{letter}\ldots\ environment to "\let" this token equal to
%    "\raggedright", "\centering", etc., as required by the particular
%    letter being produced.  This makes it easy, for instance, to define
%    an \env{asletter} (anglo-saxon letter) environment that prints
%    letters that obey the U.S.  conventions.  The default setting given
%    here has no special meaning: it just sets the signature ragged
%    right.
%    \begin{macrocode}
\newcommand*\signaturealignment{\raggedright}
%    \end{macrocode}
%    \end{macro}
%
%    \subsection{Declaration of options}
%
%    As a general rule, options pertaining to the same functional group
%    are declared in reverse order of desirability, the default option of
%    the group being declared last.  This ensures that if more than
%    one option of the same group is erroneously asked for by the
%    user, the ``most desirable'' one (whatever this means) is
%    executed last, thereby remaining in effect.
%
%    We begin with the options that support the usual page formats.
%    For each such option, the associated code sets appropriate values
%    for the "\paperheight" and "\paperwidth" parameters.  The code also
%    sets the "\foldedheight" parameter, which, as explained above,
%    contains the height at which the sheets of paper should be folded in
%    order to put them into an envelope; this parameter is set to more or
%    less one third of "\paperheight".  For some paper formats, folding
%    is not adequate: for them, folded letters are disabled by setting
%    "\foldedheight" to $-"\maxdimen"$.
%    \begin{macrocode}
\DeclareOption{executivepaper}
   {\setlength\paperheight {10.5in}%
    \setlength\paperwidth  {7.25in}%
    \setlength\foldedheight{3.5in}}
\DeclareOption{legalpaper}
   {\setlength\paperheight {14in}%
    \setlength\paperwidth  {8.5in}%
    \setlength\foldedheight{4.7in}}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}%
    \setlength\foldedheight{3.7in}}
\DeclareOption{b5paper}
   {\setlength\paperheight {250mm}%
    \setlength\paperwidth  {176mm}%
    \setlength\foldedheight{-\maxdimen}}
\DeclareOption{a5paper}
   {\setlength\paperheight {210mm}%
    \setlength\paperwidth  {148mm}%
    \setlength\foldedheight{-\maxdimen}}
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}%
    \setlength\foldedheight{100mm}}
%    \end{macrocode}
%
%    The \opz{landscape} option is implemented as usual, by
%    exchanging the values of "\paperheight" and "\paperwidth" (note that
%    this option is executed after any one of the options that sets the
%    paper dimensions); but we also disable folded letters by setting
%    "\foldedheight" to $-"\maxdimen"$, because usually one does not want
%    to fold a letter set in landscape orientation!
%    \begin{macrocode}
\DeclareOption{landscape}
   {\setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}%
    \setlength\foldedheight{-\maxdimen}}
%    \end{macrocode}
%
%    These are the usual options for setting the main font size: they are
%    copied from the standard \LaTeX\ classes.  See, \emph{e.g.}, the
%    documentation of the standard \packlass{letter} class for
%    explanations.
%    \begin{macrocode}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
%    \end{macrocode}
%
%    The way of implementing the \opz{oneside}\slash\opz{twoside}
%    options is again copied from the \packlass{letter} standard \LaTeX\
%    class.
%    \begin{macrocode}
\if@compatibility
  \DeclareOption{twoside}{%
    \@latexerr{No `twoside' layout for letters}\@eha
  }
\else
  \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
\fi
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
%    \end{macrocode}
%
%    The \opz{onecolumn}\slash\opz{twocolumn} options are not
%    declared in the \packlass{letter} standard \LaTeX\ class, but I prefer
%    to declare them.  The \opz{twocolumn} options causes an error,
%    because I have never seen letters typeset in two columns mode!
%    \begin{macrocode}
\DeclareOption{twocolumn}{%
  \@latexerr{No `twocolumn' layout for letters}\@eha
}
%    \end{macrocode}
%    The \opz{onecolumn} option is simply ignored, but it is
%    declared, so that it is removed from the list of unused options.
%    \begin{macrocode}
\DeclareOption{onecolumn}{}
%    \end{macrocode}
%
%    More options copied from the standard \LaTeX\ classes.
%    \begin{macrocode}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
%    \end{macrocode}
%
%    Now we have four options for setting the way in which the subject
%    of a letter (if present) and the signature are printed.  As
%    explained above, the setting is done by "\let"ting a conventional
%    token equal to one of the usual NFSS commands used to set individual
%    font attributes; if more than one attribute needed to be changed,
%    "\def" would be used instead of "\let", but fortunately this is not
%    necessary.
%
%    Options for the subject: it can be set in boldface type\ldots
%    \begin{macrocode}
\DeclareOption{boldsubject}{\let\@subject@style\bfseries}
%    \end{macrocode}
%    \ldots or in medium weight.
%    \begin{macrocode}
\DeclareOption{mediumsubject}{\let\@subject@style\mdseries}
%    \end{macrocode}
%
%    Options for the signature: it can be set in italic shape\ldots
%    \begin{macrocode}
\DeclareOption{italicsignature}{\let\@signature@style\itshape}
%    \end{macrocode}
%    \ldots or in upright (normal) shape.
%    \begin{macrocode}
\DeclareOption{uprightsignature}{\let\@signature@style\upshape}
%    \end{macrocode}
%
%    Vers.~0.36 (2015 Feb~08): new option \opz{signaturerule} requests that
%    each typeset signature be surmounted by a ``signature rule'' intended to
%    guide the signer's hand.  This, however, should not affect at all
%    signatures contained in a \env{signatureenv*} environment, the variant of
%    the \env{signatureenv} environment meant for situations in which the
%    letter is not going to be signed by hand.
%    \begin{macrocode}
\DeclareOption{signaturerule}{\@signature@rule@true}
%    \end{macrocode}
%    The \opz{nosignaturerule} option (also new in vers.~0.36) is the opposite 
%    of the above, and is the default.
%    \begin{macrocode}
\DeclareOption{nosignaturerule}{\@signature@rule@false}
%    \end{macrocode}
%    \emph{Remark:} the ability to draw a rule for handwritten signatures has
%    been explicitly requested by some users of the \Bundle, but I~deem the use
%    of such feature questionable, since only pupils in primary school need
%    rules to guide their writing.  Nevertheless, this practice is admittedly
%    ^^A ( paren match
%    fairly common in the business world~:-), so it has now been supported.
%
%    Next, we have the options used to tell whether PostScript
%    commands, inserted by means of the \packlass{eepic} package, should be
%    used, or not, to draw the CDP seal.  Here we simply set the internal
%    switch according to the user's request; if we later find that the
%    \packlass{eepic} package is not available, we shall force the switch
%    to false.
%    \begin{macrocode}
\DeclareOption{usePS}{\@use@eepic@true}
\DeclareOption{noPS}{\@use@eepic@false}
%    \end{macrocode}
%    (These mean ``use PostScript'' and ``don't use PostScript'',
%    respectively.)
%
%    Cheer up!  We are almost over!  (Just with the options, of
%    course!)  We are now to the options for the paragraph
%    indentation within letters.  They are implemented by setting an
%    internal multi-value switch to a conventional key; the meaning of
%    the keys has already been explained above.
%    \begin{macrocode}
\DeclareOption{smartindent}{\let\@indent@pref O}
\DeclareOption{shortindent}{\let\@indent@pref L}
\DeclareOption{noindent}{\let\@indent@pref N}
\DeclareOption{indent}{\let\@indent@pref F}
%    \end{macrocode}
%
%    The last three options deal with the format of the address
%    labels.  As already said, the format is specified by
%    initializing a number of \textoken{dimen} parameters which
%    specify the ``geometry'' of the sheet of address labels.  Many
%    of these parameters have a default value of 0~points: when this
%    default is appropriate, the parameter is not re-initialized in
%    the code given below.
%
%    We support the Avery 5352 address labels only for compatibility
%    with the standard \packlass{letter} class.  I have never seen a sheet
%    of these labels, and the code for the \opz{Avery5352labels}
%    option simply assigns values to the parameters in a way that tries to
%    imitate the geometry described by the code found in the
%    \packlass{letter} class.
%    \begin{macrocode}
\DeclareOption{Avery5352labels}{%
%    \end{macrocode}
%    We have 5~rows of labels.
%    \begin{macrocode}
  \setcounter{addrlabelrows}{5}%
%    \end{macrocode}
%    Each row contains 2~labels, \emph{i.e.}, we have two columns of
%    labels.
%    \begin{macrocode}
  \setcounter{addrlabelcolumns}{\tw@}%
%    \end{macrocode}
%    The left edge of the leftmost column is 35~points to the left of
%    the \TeX\ origin, which in turn is 1~inch from the left edge of
%    the paper.
%    \begin{macrocode}
  \setlength\addrlabelsleftmargin{-35\p@}%
  \addtolength\addrlabelsleftmargin{1in}%
%    \end{macrocode}
%    The top edge of the topmost row is 50~points above
%    the \TeX\ origin, which in turn is 1~inch from the top edge of
%    the paper.
%    \begin{macrocode}
  \setlength\addrlabelstopmargin{-50\p@}%
  \addtolength\addrlabelstopmargin{1in}%
%    \end{macrocode}
%    The two columns are separated by 26~points.
%    \begin{macrocode}
  \setlength\addrlabelshsep{26\p@}%
%    \end{macrocode}
%    Labels are 262~points wide by 2~inches high.
%    \begin{macrocode}
  \setlength\addrlabelwidth{262\p@}%
  \setlength\addrlabelheight{2in}%
}
%    \end{macrocode}
%
%    The code for the labels I had the opportunity to actually see and
%    measure is more elegant, and fits more naturally into the scheme.
%    The following is the setting for the 70\,$\times$\,37 labels (the
%    dimensions are given in~mm).
%    \begin{macrocode}
\DeclareOption{70x37labels}{%
%    \end{macrocode}
%    8~rows of labels.
%    \begin{macrocode}
  \setcounter{addrlabelrows}{8}%
%    \end{macrocode}
%    3~columns, \emph{i.e.}, 3~labels in each row.
%    \begin{macrocode}
  \setcounter{addrlabelcolumns}{\thr@@}%
%    \end{macrocode}
%    Labels are 70\,mm wide by 37\,mm high.
%    \begin{macrocode}
  \setlength\addrlabelwidth{70mm}%
  \setlength\addrlabelheight{37mm}%
%    \end{macrocode}
%    We leave 6\,mm of margin between the border of the labels and the
%    actual printing.
%    \begin{macrocode}
  \setlength\addrlabelborder{6mm}%
}
%    \end{macrocode}
%    The setting for the 105\,$\times$\,37 labels (the default) is
%    similar.
%    \begin{macrocode}
\DeclareOption{105x37labels}{%
  \setcounter{addrlabelrows}{8}%
  \setcounter{addrlabelcolumns}{\tw@}%
  \setlength\addrlabelwidth{105mm}%
  \setlength\addrlabelheight{37mm}%
  \setlength\addrlabelborder{6mm}%
}
%    \end{macrocode}
%
%    \subsection{Option processing}
%
%    Nothing special to note here.
%
%    \emph{Begin to think (v.~0.34):} should I change the defaults as
%    follows: \opz{boldsubject} in place of \opz{mediumsubject},
%    \opz{italicsignature} in place of \opz{uprightsignature},
%    \opz{shortindent} in place of \opz{indent}?
%
%    Ver.~0.36 (2015 Feb~08): not yet determined to change the default options.
%    Added \opz{nosignaturerule}.
%    \begin{macrocode}
\ExecuteOptions{%
  a4paper,10pt,oneside,onecolumn,final,%
  mediumsubject,uprightsignature,nosignaturerule,noPS,indent,%
  105x37labels%
}
\ProcessOptions\relax
%    \end{macrocode}
%
%    \subsection{Package loading}
%
%    In this version of the \Bundle, all the original code is
%    put in the file \filedir{\letteracdp.cls}, so in the normal operating
%    mode no packages need to be loaded.  This will change in future
%    releases: the code will be split among several packages, to allow
%    the final user to request only some features and not the others;
%    when this happens, this section will become much longer, in order to
%    load all those packages.  However, even now it could be necessary to
%    require the \packlass{eepic} package, if the user specified the
%    \opz{usePS} option.  At this stage, the presence of this option can
%    be tested for by means of the "\if@use@eepic@" switch.
%    \begin{macrocode}
\if@use@eepic@
%    \end{macrocode}
%    If the \packlass{eepic} package is not available, force the switch
%    to false and warn the user.
%    \begin{macrocode}
  \IfFileExists{eepic.sty}{%
    \RequirePackage{eepic}%
  }{%
    \@use@eepic@false
    \ClassWarningNoLine{\@letteracdp}{%
      Can't find the eepic package;\MessageBreak
      option usePS ignored (converted to noPS)%
    }%
  }%
\fi
%    \end{macrocode}
%
%    \subsection{Main code}
%
%    ^^A ( paren match
%    OK, boys, until now we have just set up a few things; now the real
%    fun begins.~\mbox{:-)}  Oh, well, actually it will begin in a few lines:
%    for now we have to do a little more bit of tedious work.~\mbox{:-(}
%    ^^A ) paren match
%
%    \subsubsection{More initializations}
%
%    Some of the following initializations could have been put in the
%    \emph{Initial code} section, but some others require that the code
%    for the options have already been executed.
%
%    \begin{macro}{\date}
%    We redefine "\date" in order to make the changes to the date local
%    instead of global: this is useful if one of the letters has a date
%    which is different from the other ones.  Since "\date" is a kernel
%    command, an explicative comment is left in % the code too.
%    \begin{macrocode}
%% Command \date redefined to make changes to date local.
\def\date#1{\def\@date{#1}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\place}
%    This command records the place where the letter is written (added
%    in version~0.34): it is analogous to "\date".  Starting from
%    version~0.34, this should be used instead of the optional argument
%    of "\opening", "\makedate", etc.\ (however, the optional argument of
%    those commands may still be used, for compatibility).  Note that the
%    comma is added automatically, but only if the argument of "\place"
%    is nonempty.
%    \begin{macrocode}
\newcommand*\place[1]{%
  \ifx \@empty #1\@empty % if #1 is empty
    \let\@place\@empty
  \else
    \def\@place{#1,}%
  \fi
}
%    \end{macrocode}
%    \end{macro}
%
%    Usual loading of the suitable \filedir{.clo} file; see the
%    documentation of, \emph{e.g.}, the standard \packlass{letter}
%    class for explanations about the following three lines of code.
%    \begin{macrocode}
\input{size1\@ptsize.clo}
\setlength\lineskip{\p@}
\setlength\normallineskip{\p@}
%    \end{macrocode}
%    \begin{macro}{\baselinestretch}
%    This command can be redefined by the final user to obtain
%    double-spaced, triple-spaced, etc.\ output.  See the
%    \textsl{\LaTeX book} \cite[Subsection~C.3.2]{LaTeXbook}.
%    \begin{macrocode}
\renewcommand*\baselinestretch{}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\thelabel}
%    The printed form of the \cnt{label} counter is changed to include
%    also the number of the letter it refers to.  Note that we do not
%    change "\p@label" (the prefix used only when printing
%    \emph{references} to the counter), but actually the command used to
%    print the counter itself.
%    \begin{macrocode}
\renewcommand*\thelabel{\theletter\@alph\c@label}
%    \end{macrocode}
%    \end{macro}
%
%    The following are the usual constants used to represent typical
%    penalty values; again, see the documentation of the standard
%    classes.
%    \begin{macrocode}
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
%    \end{macrocode}
%    We need five more constants of the same type, but with much
%    higher penalty values.  They are used in the algorithm that takes
%    care of folded letters.
%    \begin{macrocode}
\@fold@basepenalty 9000
\@fold@lowpenalty  9101
\@fold@medpenalty  9202
\@fold@highpenalty 9303
\@fold@toppenalty  9500
%    \end{macrocode}
%
%    We now initialize the style parameters that contain the penalties
%    inserted around the address blocks and the subject.  This values
%    will never be used in practice, because usually the address blocks
%    and the subject are wrapped up in a \ldots\env{presentation}
%    environment, and these environments completely redefine the values
%    of these style parameters.  The values given here will be used only
%    when a \env{sender}, \env{addressee}, or \env{subject} environment
%    is used without being wrapped in a presentation.  These values allow
%    a page break without penalty before each of the blocks and at the
%    end of the subject, mildly discourage a break after the address
%    blocks, and discourage rather strongly a break at an "\and" or
%    "\andcc" token.
%    \begin{macrocode}
\@b@frompenalty\z@
\@i@frompenalty\@highpenalty
\@e@frompenalty\@lowpenalty
\@b@topenalty\z@
\@i@topenalty\@highpenalty
\@e@topenalty\@lowpenalty
\@b@subjpenalty\z@
\@e@subjpenalty\z@
%    \end{macrocode}
%    Unlike the preceding ones, the following style parameter is not
%    redefined elsewhere.  It is the penalty inserted after
%    presentations, and since a presentation typically ends with the
%    subject, the following initialization seems quite natural.
%    \begin{macrocode}
\@e@prespenalty\@e@subjpenalty
%    \end{macrocode}
%
%    \subsubsection{Page layout}
%
%    The first thing one could begin to find interesting is the code
%    for setting up the page layout.  To help the reader to understand
%    what is going on, fig.~\ref{fig:plo} summarizes the basic page
%    layout parameters we are going to speak about.\footnote{If you are
%    reading directly the comments in the \filedir{.dtx} file, instead of
%    typesetting it with \LaTeX, you might find it difficult to follow
%    the forthcoming discussion.}  This figure shows the parameters used
%    in the case of an A5~sheet of paper: this allows to fit the entire
%    figure on the page without having to scale it.
%
%    \begin{figure}[tbp]
%      \centering
%      \setlength{\unitlength}{1mm}
%      \begin{picture}(108,200)(-10,0)
%        \thinlines
%        \put(-20,0)  {\line(1,0){148}}
%        \put(-20,210){\line(1,0){148}}
%        \put(-20,0)  {\line(0,1){210}}
%        \put(128,0)  {\line(0,1){210}}
%        \put(10,185){\makebox(88,10)[bl]{\makebox[88mm][s]{^^A
%          \kern -1cm
%          \setlength\unitlength{.625mm}^^A
%          \begin{picture}(32,16)(-3,7.87)
%            \thinlines
%            \put(8,16){\oval(10,10)[l]}
%            \put(8,11){\line(0,1){10}}
%            \put(9,11){\framebox(3,20){}}
%            \put(18,16){\oval(10,10)[r]}
%            \put(18,11){\line(0,1){10}}
%            \put(14,1){\framebox(3,20){}}
%            \thicklines
%            \put(8,16){\oval(16,16)[l]}
%            \put(8,8){\line(1,0){5}}
%            \put(13,24){\line(1,0){10}}
%            \put(8,16){\oval(14,14)[l]}
%            \put(8,9){\line(1,0){5}}
%            \put(13,23){\line(1,0){10}}
%            \put(18,8){\line(1,0){10}}
%            \put(18,9){\line(1,0){10}}
%          \end{picture}^^A
%          \lhnss oordinamento dei {\lhbss D}\kern-.033333em ottorandi di
%          {\lhbss P}\kern-.1em adova\enspace\hrulefill\kern-1cm
%        }}}
%        \put(10,40){\makebox(88,130)[tl]{\begin{minipage}[t]{88mm}
%          \vrule height 10pt depth 0pt width 0pt \relax
%          Text text text text text text text text text text text text
%          text text text text text text text text text text text text.
%        \end{minipage}}}
%        \put(10,25){\makebox(88,3.514598035146)[tl]{\parbox[t]{88mm}{^^A
%          \setlength{\parfillskip}{0pt}
%          \noindent\rule{0pt}{10pt}\kern-1cm\hrulefill\kern-1cm\par
%          \setlength{\baselineskip}{11pt}
%          \hbox to \hsize{\hss\lhrm
%            Coordinamento dei Dottorandi e dei Dottori di Ricerca
%            dell'Universit\`{a} di Padova
%          \hss}
%          \hbox to \hsize{\hss
%            \lhit World Wide Web:\/
%            \lhtt http://www.dei.unipd.it/\string~assdott/^^A
%          \hss}
%        }}}
%        \linethickness{0.1pt}
%        \put(-27,210){\line(1,0){17}}
%        \put(-27,195){\line(1,0){125}}
%        \put(-27,185){\line(1,0){142}}
%        \put(-27,170){\line(1,0){142}}
%        \put(-27,40) {\line(1,0){142}}
%        \put(-27,25) {\line(1,0){142}}
%        \put(10,25) {\line(0,1){192}}
%        \put(98,25) {\line(0,1){192}}
%        \put(20,185){\line(0,1){37}}
%        \put(5,215) {\vector(1,0){5}}
%        \put(10,215){\line(1,0){10}}
%        \put(55,215){\vector(-1,0){35}}
%        \put(55,215){\makebox(0,35)[br]{\strut\ttfamily\bslash @lh@left@margin}}
%        \put(63,215) {\vector(1,0){35}}
%        \put(63,215){\makebox(0,35)[bl]{\strut\ttfamily\bslash @lh@right@margin}}
%        \put(98,215){\line(1,0){10}}
%        \put(113,215){\vector(-1,0){5}}
%        \put(108,25){\line(0,1){197}}
%        \put(0,25)  {\line(0,1){12}}
%        \put(-5,30){\vector(1,0){5}}
%        \put(0,30) {\line(1,0){10}}
%        \put(45,30){\vector(-1,0){35}}
%        \put(45,30){\makebox(0,35)[br]{\strut\ttfamily\bslash @lh@right@margin}}
%        \put(-15,35){\vector(1,0) {15}}
%        \put(-5,35) {\vector(-1,0){15}}
%        \put(-10,35){\makebox(0,0)[b]{\strut $2\,\mbox{cm}$}}
%        \put(-20,200){\line(0,1){22}}
%        \put(-10,220){\vector(1,0) {30}}
%        \put(10,220) {\vector(-1,0){30}}
%        \put(0,220){\makebox(0,0)[b]{\strut $4\,\mbox{cm}$}}
%        \put(128,200){\line(0,1){22}}
%        \put(113,220){\vector(1,0) {15}}
%        \put(123,220){\vector(-1,0){15}}
%        \put(118,220){\makebox(0,0)[b]{\strut $2\,\mbox{cm}$}}
%        \put(113,195){\vector(0,1) {15}}
%        \put(113,200){\vector(0,-1){15}}
%        \put(113,197.5){\makebox(0,0)[l]{ $2.5\,\mbox{cm}$}}
%        \put(113,175){\vector(0,1) {10}}
%        \put(113,180){\vector(0,-1){10}}
%        \put(113,177.5){\makebox(0,0)[l]{ $1.5\,\mbox{cm}$}}
%        \put(113,30){\vector(0,1) {10}}
%        \put(113,35){\vector(0,-1){10}}
%        \put(113,32.5){\makebox(0,0)[l]{${}\ge1.5\,\mbox{cm}$}}
%        \put(113,10){\vector(0,1) {15}}
%        \put(113,15){\vector(0,-1){15}}
%        \put(113,12.5){\makebox(0,0)[l]{ $2.5\,\mbox{cm}$}}
%        \put(-25,200){\vector(0,1) {10}}
%        \put(-25,205){\vector(0,-1){10}}
%        \put(-25,202.5){\makebox(0,0)[r]{$\mbox{\ttfamily\bslash topmargin}+1\,\mbox{in}$ }}
%        \put(-25,189){\vector(0,1) {6}}
%        \put(-25,191){\vector(0,-1){6}}
%        \put(-25,190){\makebox(0,0)[r]{{\ttfamily\bslash headheight} }}
%        \put(-25,175){\vector(0,1) {10}}
%        \put(-25,180){\vector(0,-1){10}}
%        \put(-25,177.5){\makebox(0,0)[r]{{\ttfamily\bslash headsep} }}
%        \put(-25,100){\vector(0,1) {70}}
%        \put(-25,110){\vector(0,-1){70}}
%        \put(-25,105){\makebox(0,0)[r]{{\ttfamily\bslash textheight} }}
%        \put(-25,30){\vector(0,1) {10}}
%        \put(-25,35){\vector(0,-1){10}}
%        \put(-25,32.5){\makebox(0,0)[r]{{\ttfamily\bslash footskip} }}
%        \put(-10,100){\vector(1,0) {20}}
%        \put(0,100)  {\vector(-1,0){20}}
%        \put(-5,100) {\makebox(0,0)[b]{\parbox[b]{4cm}{\centering
%          \strut\texttt{\bslash oddsidemargin}\\
%          or\\
%          \texttt{\bslash evensidemargin}\\
%          ${}+1\,\mbox{in}$\strut
%        }}}
%        \put(48,100){\vector(1,0) {50}}
%        \put(60,100){\vector(-1,0){50}}
%        \put(54,100){\makebox(0,0)[b]{\strut\ttfamily\bslash textwidth}}
%      \end{picture}
%      \caption{Basic page layout parameters}
%      \label{fig:plo}
%    \end{figure}
%
%    Before discussing the page layout parameters, let us make a brief
%    digression to illustrate what we are trying to achieve and what
%    difficulties we need to solve.  We would like that the seal and
%    certain other details of the letterhead and the footer appeared in
%    fixed positions with respect to the physical edges of the sheet:
%    fig.~\ref{fig:plo} shows these fixed distances, explicitly given in
%    centimeters, among the others, indicated by their symbolic name.
%    This rises a little problem: we want to typeset the letterhead and
%    the footer as standard \LaTeX\ headers and footers, but the
%    subroutine for the header or the footer installed with a
%    "\ps@"\ldots\ declaration is called inside a box of width
%    "\textwidth" and aligned with the main body of text.  In other
%    words, when typesetting the header, or the footer, one has no direct
%    means to refer to the page boundaries: the only available reference
%    points are the margins of the main body of text.  For this reason,
%    it is necessary to precompute the offset from the text margins of
%    the various points that we want to appear in fixed positions.  For
%    instance, looking at fig.~\ref{fig:plo}: if we know that the left
%    margin of the text runs exactly at \( 3\,\mbox{cm} \) from the left
%    border of the sheet, and we want the left edge of the writing
%    ``oordinamento dei Dottorandi di Padova'' to lie at exactly \(
%    4\,\mbox{cm} \) from this border, we need to set the
%    "\@lh@left@margin" parameter to \( 1\,\mbox{cm} \), to indicate that
%    the left edge of the writing should lie \( 1\,\mbox{cm} \) to the
%    right of the left text margin.
%
%    But this is only half of the story; the other half is best
%    illustrated with an example.  Suppose you are typesetting on A4~paper,
%    using 10 points fonts (these are precisely the settings chosen by
%    default).  If you calculate the text margins and the text width
%    following the recommendations given by the authors of \LaTeX\ for
%    this particular combination of paper and font sizes, you will
%    discover that the left margin of the main text runs at, say, \(
%    4.2\,\mbox{cm} \) from the left border of the sheet.  (I~don't want
%    to compute the exact value just now, since this is only an example,
%    but I know that the actual value is very close to this, so the
%    example is meaningful.)  If, according to what we have just said, you
%    set "\@lh@left@margin" to \( -0.2\,\mbox{cm} \), you will end with
%    the writing ``oordinamento\ldots'' that fails to be aligned with the
%    main text by just \( 2\,\mbox{mm} \)---which is awful to see.
%    Clearly, in a case like this it is better to foresee that
%    "\@lh@left@margin" is going to receive a small value, and to adjust
%    the left margin of the main body of text to \( 4\,\mbox{cm} \), so
%    that "\@lh@left@margin" can be set to \( 0\,\mbox{pt} \).  This is
%    just what the class does, and the final visual effect is, let
%    me say, pretty good indeed\ldots
%
%    To sum up, the strategy for setting the page layout parameters is
%    the following:
%
%    \begin{enumerate}
%
%    \item\label{plostep1}
%    Compute the main text width and margins according to usual \LaTeX\
%    recommendations.
%
%    \item\label{plostep2}
%    Figure out whether the margins computed in step~\ref{plostep1} fall
%    too close to some of the points of the letterhead that we want to
%    stay in fixed position, and, if it is so, adjust them so that they
%    are exactly aligned with those positions.
%
%    \item\label{plostep3}
%    Allow the user to change the values computed in step~\ref{plostep2},
%    in case (s)he needs to set the margins to some special value.
%
%    \item\label{plostep4}
%     Compute the offset of those fixed points from one of the text
%    margin (\emph{e.g.}, "\@lh@left@margin" in the example above), using
%    whatever values for the margins are in effect after
%    step~\ref{plostep3}, in such a way to be able to correctly position
%    the abovementioned points using only the text margins as a reference.
%
%    \end{enumerate}
%
%    Of course, step~\ref{plostep3} occurs in the preamble; this means
%    that step~\ref{plostep4} must be performed during the
%    "\AtBeginDocument" hook.
%
%    As already said, the fixed distances of the layout design are all
%    shown in fig.~\ref{fig:plo}; from this distances, from the relations
%    shown in the figure, and from the additional information that the
%    main body of text should be horizontally centered between the edges
%    of the sheet, it is possible to deduce the values of almost all the
%    basic page layout parameters once the value for "\textwidth" has
%    been (cleverly) chosen.  Some of these parameters are readily
%    readable: for instance, fig.~\ref{fig:plo} clearly states that
%    "\headsep" should be equal to \( 1.5\,\mbox{cm} \); other parameters
%    may require some computations, and may even not be completely
%    determined: for instance, from the figure you see that \(
%    "\topmargin"+"\headheight" = 2.5\,\mbox{cm}-1\,\mbox{in} \), but you
%    cannot tell what the single values of "\topmargin" and "\headheight"
%    are.  In the last case, the inherent uncertainty does no harm,
%    because the "\headheight" parameter is not used to position any
%    graphical element of the letterhead: it suffices to ensure that it
%    allows enough room for the other, ordinary running heads; in
%    practice, that there is room for a line of text in the largest
%    supported font size (\emph{i.e.}, 12~points).  Setting "\headheight"
%    to \( 1\,\mbox{cm} \) definitely satisfies this requisite, and has the
%    nice additional aesthetic advantage that the virtual lines delimiting the
%    head run exactly along the outer strokes of the ``C'' in the seal.
%    (Note that decreasing or increasing the value of "\headheight" does
%    not alter the dimensions of the seal: the dimensions of the seal are
%    fixed, and the seal appears as a box of null width and height.)
%
%    We shall now discuss the parameters shown in fig.~\ref{fig:plo}
%    one by one.  Of course, many of them are standard \LaTeX\ page
%    layout parameters, and do not require particular explanations.
%
%    The first decision I took was to locate the lower right corner of
%    the seal in a fixed position \( 4\,\mbox{cm} \) across and \(
%    2.5\,\mbox{cm} \) down from the upper left corner of the page.  The
%    value of \( 4\,\mbox{cm} \) was chosen because it was twice the
%    design width of the seal; $2.5$~is the golden section of~$4$.  I then
%    placed the upper margin of the main body of text \( 4\,\mbox{cm}
%    \) from the upper edge of the paper.  Also, the rule found to the
%    right of the letterhead extends up to a distance of \( 2\,\mbox{cm}
%    \) from the right edge of the paper; the rule of the footer is
%    aligned with that of the letterhead on the right, and on the left it
%    extends to a symmetric distance.  From these fixed setting, one
%    deduces the other parameters: let us see how.
%
%    \begin{description}
%
%    \renewcommand*\makelabel[1]{\hspace\labelsep\normalfont
%      \texttt{\bslash #1}.}
%
%    \item[textwidth]
%    This parameter is first of all initialized in the standard
%    \filedir{.clo} files: this ensures that the standard \LaTeX\ initial
%    value is used (cf.~step~\ref{plostep1} above).  Nevertheless, the
%    value can be subsequently adjusted as explained in
%    step~\ref{plostep2}, to achieve a better alignment with some points
%    of the letterhead.
%
%    \item[oddsidemargin]
%    This is set to \( \frac{1}{2}("\paperwidth"-"\textwidth") -
%    1\,\mbox{in} \), to ensure that the main body of text is
%    horizontally centered on the page.  Note that \LaTeX\ measures
%    "\oddsidemargin" from the \TeX\ origin, and not from the left edge
%    of the paper.
%
%    \item[evensidemargin]
%    This is set equal to "\oddsidemargin".
%
%    \item[@lh@left@margin]
%    This is set to \( 4\,\mbox{cm}-"\oddsidemargin"-1\,\mbox{in} \);
%    this setting is done at ``"\begin{document}"-time''
%    (cf.~step~\ref{plostep4} above), to allow the user to change
%    "\oddsidemargin" in the preamble (cf.~step~\ref{plostep3} above).
%    It can be useful to remark that the amount shown in
%    fig.~\ref{fig:plo} is positive when measured according to the
%    sign convention used internally by the code.
%
%    \item[@lh@right@margin]
%    This is set to \( 2\,\mbox{cm}-"\oddsidemargin"-1\,\mbox{in} \);
%    this setting is done at ``"\begin{document}"-time''
%    (cf.~step~\ref{plostep4} above), to allow the user to change
%    "\oddsidemargin" in the preamble (cf.~step~\ref{plostep3} above).
%    It can be useful to remark that the amounts shown in
%    fig.~\ref{fig:plo} are negative when measured according to the sign
%    convention used internally by the code.
%
%    \item[topmargin]
%    This is set to \( 2.5\,\mbox{cm}-1\,\mbox{in} \) (because \LaTeX\
%    measures "\topmargin" from the \TeX\ origin, and not from the
%    upper edge of the paper).
%
%    \item[headheight]
%    This is set to \( 1\,\mbox{cm} \).
%
%    \item[headsep]
%    This is set to \( 1.5\,\mbox{cm} \).
%
%    \item[textheight]
%    To avoid underfull "\vbox"es when typesetting pages that contain
%    no glue besides the "\baselineskip" glue (that usually has no
%    ability to stretch or shrink), it is highly recommendable to
%    set "\textheight" to an integer number of text lines, that is,
%    to set it to \( "\topskip" + n\cdot"\baselineskip" \), where
%    $n$~is a natural number.  We do this, choosing $n$ to be the
%    largest natural number such that
%    \begin{equation}
%      "\topskip" + n\cdot"\baselineskip" \le "\paperheight"-8\,\mbox{cm}
%      \mbox{.}
%      \label{eq:textheight}
%    \end{equation}
%
%    \item[footskip]
%    This is set to \( "\paperheight" - "\textheight" -
%    6.5\,\mbox{cm} \): this ensures that the baseline of the footer
%    (along which the rule is traced) runs at \( 2.5\,\mbox{cm} \)
%    from the bottom edge of the paper.
%
%    \end{description}
%
%    In the case of "\footskip", note that the baseline of the footer
%    actually means\ldots\ the baseline of the footer!  I mean, normal
%    footers (like, for instance, page numbers) are typeset with the
%    baseline at exactly \( 2.5\,\mbox{cm} \) from the bottom edge of the
%    paper; but the footer containing the address of the
%    \emph{Coordinamento} is treated differently, in that it is the
%    horizontal rule which is aligned with the baseline.
%
%    OK, after all this preliminary blather, we are now ready to return
%    to the code.  Since we have already given many explanations, the
%    following comments will be rather terse.
%
%    We begin to perform some of the initialization described above.
%    \begin{macrocode}
\setlength\headheight{1cm}
\setlength\topmargin{1.5cm}
\addtolength\topmargin{-1in}
\setlength\headsep{1.5cm}
%    \end{macrocode}
%    The following settings pertaining to marginal notes and footnotes
%    are simply copied from the standard \packlass{letter} class: we have
%    no reason to change them.
%    \begin{macrocode}
\setlength\marginparsep {11\p@}
\setlength\marginparpush{5\p@}
\setlength\footnotesep{12\p@}
\setlength{\skip\footins}{10\p@ plus 2\p@ minus 4\p@}
%    \end{macrocode}
%
%    Everything we have been saying above was for \LaTeXe\footnote{This
%    term should no longer be used, however: what was once known as
%    \LaTeXe\ has now become \LaTeX\ \emph{tout-court}.}.  No attempt is
%    made to support any users who happened to be still using the
%    Palaeolithic \LaTeX~2.09: we simply honor the standard convention
%    according to which certain basic page layout parameters must be set to
%    fixed values in compatibility mode.  Note that the alignment of
%    those certain special points of the letterhead to fixed positions
%    will still work even in this case, but the placement of the main
%    body of text will be awful, in the best hypothesis.  Note also that,
%    in general, "\textheight" will not at all be of the form \(
%    "\topskip" + n\cdot "\baselineskip" \).
%    \begin{macrocode}
\if@compatibility
  \setlength\oddsidemargin{53pt}
  \setlength\evensidemargin{53pt}
  \setlength\marginparwidth{90pt}
  \setlength\textwidth{365\p@}
  \setlength\textheight{505\p@}
  \setlength\footskip{25\p@}
\else
%    \end{macrocode}
%
%    Very well, now that the have get rid of that bothersome
%    parenthesis of compatibility mode, we can go on with our
%    initialization code.  We now take care of "\textwidth" and
%    "\oddsidemargin".  These parameters have already been initialized in
%    a \filedir{.clo} file---and this was step~\ref{plostep1}, see above.
%    Now we take care of step~\ref{plostep2}.  Put
%    \[
%      "\@tempdima" = \textit{total\_left\_margin} :=
%        {"\paperwidth"-"\textwidth"\over 2}
%      \mbox{.}
%    \]
%    \begin{macrocode}
  \setlength\@tempdima{\paperwidth}
  \addtolength\@tempdima{-\textwidth}
  \setlength\@tempdima{.5\@tempdima}
%    \end{macrocode}
%    If \( \textit{total\_left\_margin} < 3.25\,\mbox{cm} \), that is,
%    if the left margin measured from the paper edge is too narrow, then
%    we set "\oddsidemargin" to \( 3\,\mbox{cm} \), thereby aligning the
%    left margin with the centre of the seal.
%    \begin{macrocode}
  \ifdim\@tempdima < 3.25cm % align to centre of logo
    \setlength\oddsidemargin{3cm}
%    \end{macrocode}
%    If \( 3.25\,\mbox{cm} \le \textit{total\_left\_margin} <
%    4.5\,\mbox{cm} \), that is, if the left margin measured from the paper
%    edge is sufficiently close to the predetermined position of the right
%    edge of the seal, then we align the former to the latter, by
%    setting "\oddsidemargin" to~\( 4\,\mbox{cm} \).
%    \begin{macrocode}
  \else\ifdim\@tempdima < 4.5cm % align to right edge of logo
    \setlength\oddsidemargin{4cm}
%    \end{macrocode}
%    In all other cases, we set "\oddsidemargin" to the computed
%    $\textit{total\_left\_margin}$.
%    \begin{macrocode}
  \else % keep the computed margin
    \setlength\oddsidemargin{\@tempdima}
  \fi\fi
%    \end{macrocode}
%    Whatever value we have set "\oddsidemargin" to, we reset
%    "\textwidth" according to it.
%    \begin{macrocode}
  \setlength\textwidth{\paperwidth}
  \addtolength\textwidth{-2\oddsidemargin}
%    \end{macrocode}
%    Of course, we must not forget to subtract \( 1\,\mbox{in} \) from
%    "\oddsidemargin": we shall do this later.
%
%    The following segment of code sets the width of marginal
%    paragraphs (marginal notes).  We first try to use up all the
%    margin, leaving only a gap of "\marginparsep" (already
%    initialized above) on the text side, and of \( 7\,\mbox{mm} \)
%    from the paper edge.  The latter should suffice with modern laser
%    printers, but other printers might have more restrictive
%    mechanical constraints that can affect their ability to print so
%    close to the paper edge: let's hope everything works\ldots
%    \begin{macrocode}
  \setlength\marginparwidth{\oddsidemargin}
  \addtolength\marginparwidth{-\marginparsep}
  \addtolength\marginparwidth{-7mm}
%    \end{macrocode}
%    However, with some paper formats (\emph{e.g.}, with landscape
%    orientation) the above setting may yield very wide marginal notes,
%    which is undesirable.  Therefore, if the value just set exceeds one
%    third of "\textwidth", we cut it down to this value, provided that
%    the latter is at least \( 90\,\mbox{pt} \).
%    \begin{macrocode}
  \setlength\@tempdima{.33333\textwidth}
  \ifdim\marginparwidth > \@tempdima
    \ifdim\@tempdima < 90pt\else
      \setlength\marginparwidth{\@tempdima}
    \fi
  \fi
%    \end{macrocode}
%
%    All the main horizontal page layout parameters have been set.  We
%    can now convert "\oddsidemargin" into \TeX's coordinate system: we
%    did not do this before to ease other computations.  We also set
%    "\evensidemargin".
%    \begin{macrocode}
  \addtolength\oddsidemargin{-1in}
  \setlength\evensidemargin{\oddsidemargin}
%    \end{macrocode}
%
%    We turn now to vertical parameters.  We set "\textheight"
%    according to~\eqref{eq:textheight} and "\footskip" as stated above.
%    First step:
%    \[
%      "\@tempdima" = \textit{max\_desired\_text\_height}
%        := "\paperheight"-8\,\mbox{cm}
%      \mbox{.}
%    \]
%    \begin{macrocode}
  \setlength\@tempdima{\paperheight}
  \addtolength\@tempdima{-8cm}
  \setlength\footskip{\@tempdima}
%    \end{macrocode}
%    Remove the first line, which is only "\topskip" high:
%    \begin{macrocode}
  \addtolength\@tempdima{-\topskip}
%    \end{macrocode}
%    Set "\textheight" to the largest possible integer multiple of
%    "\baselineskip":
%    \begin{macrocode}
  \divide\@tempdima\baselineskip
  \@tempcnta=\@tempdima
  \setlength\textheight{\@tempcnta\baselineskip}
%    \end{macrocode}
%    Put in again the first line:
%    \begin{macrocode}
  \addtolength\textheight{\topskip}
%    \end{macrocode}
%    "\footskip" is still equal to \( "\paperheight"-8\,\mbox{cm} \);
%    finish its initialization (cf.~above):
%    \begin{macrocode}
  \addtolength\footskip{-\textheight}
  \addtolength\footskip{1.5cm}
%    \end{macrocode}
%
%    The following "\fi" goes with "\if@compatibility":
%    \begin{macrocode}
\fi
%    \end{macrocode}
%
%    \begin{macro}{\computelongindentation}
%    As explained above, "\longindentation" is a parameter that should
%    set to roughly half the value of "\textwidth", with optional
%    fine-tuning for better graphical results.  The setting is made
%    by the "\computelongindentation" macro, which is available also
%    to the final user: if (s)he alters the value of "\textwidth",
%    then (s)he should also call this macro to update the value of
%    "\longindentation".  The macro takes care of all the necessary
%    fine-tuning.
%    \begin{macrocode}
\newcommand*\computelongindentation{%
%    \end{macrocode}
%    More precisely, "\longindentation" is set as follows: the first
%    attempt is to set it equal to the width of the writing
%    ``oordinamento dei Dottorandi di Padova'' ("\@oordinamento@box"
%    is initialized below), because this makes for a great visual
%    effect\ldots
%    \begin{macrocode}
  \setlength\@tempdima{\wd\@oordinamento@box}%
  \setlength\longindentation{\@tempdima}%
%    \end{macrocode}
%    \ldots but this ideal value will only be retained if it falls within
%    the closed range \( [\frac{1}{2}"\textwidth"-2.5\,\mbox{mm},
%    \frac{1}{2}"\textwidth"+12.5\,\mbox{mm}] \), that is, sufficiently
%    close to \( \frac{1}{2}"\textwidth" \) (which is the case for the
%    most common page formats, like \opz{a4paper}); otherwise, \(
%    \frac{1}{2}"\textwidth" \) will be used.
%    \begin{macrocode}
  \addtolength\@tempdima{2.5mm}%
  \ifdim\@tempdima<.5\textwidth
    \setlength\longindentation{.5\textwidth}%
  \else
    \addtolength\@tempdima{-12.5mm}%
    \ifdim\@tempdima>.5\textwidth
      \setlength\longindentation{.5\textwidth}%
    \fi
  \fi
%    \end{macrocode}
%    A final check is also made to ensure that "\longindentation" falls
%    within the closed range \( [\frac{4}{10}"\textwidth",
%    \frac{6}{10}"\textwidth"] \).
%    \begin{macrocode}
  \ifdim\longindentation<.4\textwidth
    \setlength\longindentation{.5\textwidth}%
  \else\ifdim\longindentation>.6\textwidth
    \setlength\longindentation{.5\textwidth}%
  \fi\fi
}
%    \end{macrocode}
%    \end{macro}
%
%    The following part of the code deals with initializations the have
%    to be deferred until the "\begin{document}" hook.  The most complex
%    of these is the check about the "\foldedheight" parameter.  Recall
%    that this parameter, which is initialized to a default value by the
%    code which handles the \ldots\opz{paper} options, can be altered by
%    the user at any time, but has to be converted in an internal form
%    afterwards; before making the conversion, we need to check that the
%    value lies in the prescribed range.  If this is not the case, we
%    issue a warning and set the "\if@do@fold@" switch to false: the
%    following two macros, which are used below, take care of this,
%    providing two different types of warning.  They take two arguments,
%    used to modify the warning printed to the user: argument "#1" will be
%    either the word ``short'' or the word ``tall'', and argument "#2"
%    will contain text giving further help.
%
%    \begin{macro}{\@folding@ht@warn}
%    This macro is invoked when the value of "\foldedheight" is found
%    to be wrong in the check that is made during the "\AtBeginDocument"
%    hook.
%    \begin{macrocode}
\@ifdefinable\@folding@ht@warn{\def\@folding@ht@warn#1#2{%
  \ClassWarningNoLine{\@letteracdp}{%
    \protect\foldedheight\space ignored:
    it is too #1!\MessageBreak
    (#2.)\MessageBreak
    Folded letters will be shunned%
  }%
  \@do@fold@false
}}%
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@folding@ht@NO}
%    This macro is used by the "\checkfoldedheight" command.
%    \begin{macrocode}
\@ifdefinable\@folding@ht@NO{\def\@folding@ht@NO#1#2{%
  \ClassWarning{\@letteracdp}{%
    Bad value of \protect\foldedheight: it is too #1!\MessageBreak
    (#2.)\MessageBreak
    Therefore, at present folded letters are _shunned_;\MessageBreak
    warning issued%
  }%
  \@do@fold@false
}}%
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@folding@ht@OK}
%    The following, instead, is the macro used to inform the user that
%    the value of "\foldedheight" is correct.  It sets the "\if@do@fold@"
%    switch to true, too.
%    \begin{macrocode}
\@ifdefinable\@folding@ht@OK{\def\@folding@ht@OK{%
  \ClassWarning{\@letteracdp}{%
    Checked \protect\foldedheight,
    current value is acceptable.\MessageBreak
    Therefore, at present folded letters are _allowed_;\MessageBreak
    warning issued%
  }%
  \@do@fold@true
}}%
%    \end{macrocode}
%    \end{macro}
%
%    Uncommented code starts here.
%    \begin{macrocode}
\@ifdefinable\@checkfoldedheight{\def\@checkfoldedheight#1#2{%
  \ifdim\foldedheight>\z@
    \ifdim\foldedheight>.6\paperheight
      #1{tall}{% action to take if value is bad
        It must not exceed 0.6\protect\paperheight%
      }%
    \else
      \setlength\@folding@ht{\foldedheight}%
      \addtolength\@folding@ht{-1in}%
      \addtolength\@folding@ht{-\topmargin}%
      \addtolength\@folding@ht{-\headheight}%
      \setlength\@lh@folding@ht{-\@folding@ht}%
      \addtolength\@folding@ht{-\headsep}%
      \ifdim\@folding@ht<2.5cm
        #1{short}{% action to take if value is bad
          At least 2cm _of_text_ and 0.5cm of margin\MessageBreak
          must be allowed above the folding%
        }%
      \else
        \setlength\@above@folding@margin{1cm}%
        \setlength\@above@folding@shrink{5mm}%
        \setlength\@below@folding@skip{5mm}%
        \dimen4 .5\baselineskip
        \dimen@ \@folding@ht
        \advance\dimen@ \@below@folding@skip
        \advance\dimen@ -\topskip
        \dimen@ii -\dimen@
        \divide\dimen@ \dimen4%
        \count@ \dimen@
        \advance\dimen@ii \count@\dimen4%
        \addtolength\@below@folding@skip{\dimen@ii}%
        \addtolength\@folding@ht{-\@above@folding@margin}%
        #2% action to take if value is OK
      \fi
    \fi
  \else
    \@do@fold@false
  \fi
}}
\newcommand*\checkfoldedheight{%
  \@checkfoldedheight\@folding@ht@NO\@folding@ht@OK
}
\AtBeginDocument{%
  \setlength\@lh@left@margin{4cm}%
  \addtolength\@lh@left@margin{-1in}%
  \addtolength\@lh@left@margin{-\oddsidemargin}%
  \setlength\@lh@right@margin{\@lh@left@margin}%
  \addtolength\@lh@right@margin{-2cm}%
  \@checkfoldedheight\@folding@ht@warn\@do@fold@true
  \let\@folding@ht@warn\@undefined
}
\sbox\@oordinamento@box{%
  \@lh@nss oordinamento dei {\@lh@bss D}\kern-.033333em ottorandi di
  {\@lh@bss P}\kern-.1em adova\enspace
}
\computelongindentation
\newcommand*\standardvertspaces{%
  \setlength\aboveaddressvspace       {\medskipamount}%
  \@msetlength\andaddressvspace       {2}{\medskipamount}%
  \@msetlength\belowaddressvspace     {3}{\medskipamount}%
  \setlength\abovesubjectvspace       {\medskipamount}%
  \setlength\presubjectvspace         {\medskipamount}%
  \@msetlength\belowsubjectvspace     {3}{\medskipamount}%
  \@msetlength\abovesignaturevspace   {6}{\medskipamount}%
  \setlength\abovesignatureshortvspace{\bigskipamount}%
  \setlength\belowsignaturevspace     {\bigskipamount}%
  \@msetlength\belowpresentationvspace{3}{\medskipamount}%
}
\setlength\senderindentation   {\z@}
\setlength\senderwidth         {\textwidth}
\setlength\addresseeindentation{\z@}
\setlength\addresseewidth      {\textwidth}
\setlength\signatureindentation{\z@}
\setlength\signaturewidth      {\textwidth}
\standardvertspaces
%    \end{macrocode}
%
%    \subsubsection{Page styles}
%
%    \begin{macrocode}
\newcommand*{\automark}{\let\@mkboth\markboth}
\newcommand*{\usermark}{\let\@mkboth\@gobbletwo}
\automark % default is to put page no. and addressee in the header
%% We need to change even the definition of the standard page styles.
\def\ps@empty{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \let\@oddfoot\@empty
  \let\@evenfoot\@empty
}
\def\ps@plain{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@firstpage{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \let\@oddfoot\@first@foot
  \let\@evenfoot\@centred@folio
}
\def\ps@foldedpage{%
  \def\@oddhead{\hfill\@folding@tag}%
  \let\@evenhead\@empty
  \let\@oddfoot\@first@foot
  \let\@evenfoot\@centred@folio
}
\def\ps@letterhead{%
  \let\@oddhead\@cdp@head
  \let\@evenhead\@empty
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@firstletterhead{%
  \let\@oddhead\@cdp@head
  \let\@evenhead\@empty
  \let\@oddfoot\@cdp@foot
  \let\@evenfoot\@centred@folio
}
\def\ps@foldedletterhead{%
  \def\@oddhead{\@cdp@head\@folding@tag}%
  \let\@evenhead\@empty
  \let\@oddfoot\@cdp@foot
  \let\@evenfoot\@centred@folio
}
\def\ps@logo{%
  \def\@oddhead{\@cdp@logo\hfill}%
  \let\@evenhead\@empty
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@headings{%
  \automark
  \let\@oddhead\@r@head
  \let\@evenhead\@l@head
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@logoheadings{%
  \automark
  \def\@oddhead{\@cdp@logo\@r@head}%
  \let\@evenhead\@l@head
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@myheadings{%
  \usermark
  \let\@oddhead\@r@head
  \let\@evenhead\@l@head
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@logomyheadings{%
  \usermark
  \def\@oddhead{\@cdp@logo\@r@head}%
  \let\@evenhead\@l@head
  \let\@oddfoot\@centred@folio
  \let\@evenfoot\@centred@folio
}
\def\ps@letterheadnpn{%
  \let\@oddhead\@cdp@head
  \let\@evenhead\@empty
  \let\@oddfoot\@empty
  \let\@evenfoot\@empty
}
\def\ps@logonpn{%
  \def\@oddhead{\@cdp@logo\hfill}%
  \let\@evenhead\@empty
  \let\@oddfoot\@empty
  \let\@evenfoot\@empty
}
\@ifdefinable\@centred@folio{\def\@centred@folio{%
  \reset@font\hfil\thepage\hfil
}}
\@ifdefinable\@l@head{\def\@l@head{%
  \reset@font\slshape\hfil\ignorespaces\leftmark\unskip\/\hfil
}}
\@ifdefinable\@r@head{\def\@r@head{%
  \reset@font\slshape\hfil\ignorespaces\rightmark\unskip\/\hfil
}}
\@ifdefinable\@first@foot{\def\@first@foot{%
  \reset@font
  \raisebox{-24\p@}[\z@]{%
    \hb@xt@\textwidth{%
      \ifcase \@ptsize\relax
        \normalsize
      \or
        \small
      \or
        \footnotesize
      \fi
      \thesenderlocation \hfill \thesenderphone
    }%
  }\hss
}}
%    \end{macrocode}
%
%    \begin{macro}{\@folding@tag}
%    Invoked by the macros that implement the ``folded'' page styles,
%    more precisely by those which draw the header, to draw the small sign
%    that marks the point where the sheet should be folded.
%    \begin{macrocode}
\@ifdefinable\@folding@tag{\def\@folding@tag{%
  \if@do@fold@
    \raisebox{\@lh@folding@ht}[\z@][\z@]{%
      \makebox[\z@][l]{%
%    \end{macrocode}
%    Vers.~0.36: new and more robust way of computing the horizontal position.
%    \begin{macrocode}
        \dimen@ \paperwidth
        \advance \dimen@ -1in%
        \advance \dimen@ -\oddsidemargin
        \advance \dimen@ -\textwidth
        \advance\dimen@ -1cm%
%    \end{macrocode}
%    End of change.
%    \begin{macrocode}
        \kern\dimen@ \vbox{%
%    \end{macrocode}
%    Vers.~0.36: change to support the new "\foldingtagrule" user-level command
%    and the use of color.
%    \begin{macrocode}
          \color@begingroup
          \foldingtagrule
          \color@endgroup
%    \end{macrocode}
%    End of change.
%    \begin{macrocode}
        }%
      }%
    }%
  \fi
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\foldingtagrule}
%    Vers.~0.36 (2015 Feb~08): new command, redefinable by the user, 
%    to draw the tag.  It permits customization of the latter.
%    It should take up no vertical space in total
%    (\emph{i.e.}, it should backspace).
%    \begin{macrocode}
\newcommand*\foldingtagrule{%
  \kern -.1\p@
  \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm%
  \kern -.1\p@
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\CDPFactoryFoldingTagRule}
%    Back up of the above.  Should \emph{not} be redefined!
%    \begin{macrocode}
\@ifdefinable\CDPFactoryFoldingTagRule{
  \let \CDPFactoryFoldingTagRule = \foldingtagrule
}
%    \end{macrocode}
%    \end{macro}
%
%    \subsubsection{Macros for drawing the CDP seal}
%
%    \begin{macrocode}
\savebox\@logo@box@base[\z@][r]{\setlength\unitlength{.625mm}%
  \begin{picture}(32,16)(-3,7.87)%
    \put(8,16){\oval(10,10)[l]}%
    \put(8,11){\line(0,1){10}}%
    \put(9,11){\framebox(3,20){}}%
    \put(18,16){\oval(10,10)[r]}%
    \put(18,11){\line(0,1){10}}%
    \put(14,1){\framebox(3,20){}}%
    \thicklines
    \put(8,16){\oval(16,16)[l]}%
    \put(8,8){\line(1,0){5}}%
    \put(13,24){\line(1,0){10}}%
    \put(8,16){\oval(14,14)[l]}%
    \put(8,9){\line(1,0){5}}%
    \put(13,23){\line(1,0){10}}%
  \end{picture}%
}%
\savebox\@logo@box@addS[\z@][r]{\setlength\unitlength{.625mm}%
  \begin{picture}(32,16)(-3,7.87)%
    \thicklines
    \put(18,8){\line(1,0){8}}%
    \put(18,9){\line(1,0){8}}%
  \end{picture}%
}%
\savebox\@logo@box@addL[\z@][r]{\setlength\unitlength{.625mm}%
  \begin{picture}(32,16)(-3,7.87)%
    \thicklines
    \put(18,8){\line(1,0){10}}%
    \put(18,9){\line(1,0){10}}%
  \end{picture}%
}%
\@ifdefinable\@logo@overlay{\def\@logo@overlay{%
  \kern\@lh@left@margin
  \copy\@logo@box@base \copy
}}
\@ifdefinable\@cdp@logo{\def\@cdp@logo{%
  \@logo@overlay\@logo@box@addS
}}
\@ifdefinable\@cdp@head{\def\@cdp@head{%
  \@logo@overlay\@logo@box@addL
  \copy\@oordinamento@box \hrulefill \kern\@lh@right@margin
}}
\setbox\@name@and@WWW@box = \vtop{%
  \baselineskip 11\p@
  \hb@xt@\z@{\hss \@lh@rm\Coordinamento \hss}%
  \hb@xt@\z@{%
    \hss
    \@lh@it World Wide Web:\/
    \@lh@tt \CoordinamentoWWW
    \hss
  }%
}
\@ifdefinable\@cdp@foot{\def\@cdp@foot{%
  \reset@font
  \setlength\@tempdima{\textwidth}%
  \addtolength\@tempdima{-2\@lh@right@margin}%
  \hss\parbox[t]{\@tempdima}{%
    \parfillskip\z@skip
    \noindent\hrulefill\@@par
    \baselineskip 11\p@
    \hb@xt@\hsize{\hfil\copy\@name@and@WWW@box\hfil}%
  }\hss
}}
%    \end{macrocode}
%
%    \subsubsection{``Letter-making'' environments}
%
%    \begin{macrocode}
\newcommand*\name     [1]{\def\thesendername{#1}}
\newcommand \signature[1]{\def\thesendersignature{#1}}
\newcommand \address  [1]{\def\thesenderaddress{#1}}
\newcommand \location [1]{\def\thesenderlocation{#1}}
\newcommand*\telephone[1]{\def\thesenderphone{#1}}
%    \end{macrocode}
%
%    \begin{macro}{\makelabels}
%    \changes{0.36}{2015 Feb 08}{Added new instruction
%      \protect\texttt{\protect\bslash @making@labels@true}.}
%    The "\makelabels" command now sets the "\if@making@labels@" switch.
%    \begin{macrocode}
\newcommand*\makelabels{%
  \@making@labels@true
  \AtBeginDocument{%
     \def\@beginlabels{\begin{labels}}%
     \def\@beginlabelgroup{\begin{labelgroup}}%
     \let\@mlabel\basemlabel
     \def\@endlabelgroup{\end{labelgroup}}%
     \def\@endlabels{\end{labels}}%
     \if@filesw
       \immediate\write\@mainaux{\string\@beginlabels}\fi}%
  \AtEndDocument{%
     \if@filesw\immediate\write\@mainaux{\string\@endlabels}\fi}}
\@onlypreamble\makelabels
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\cleardoubleemptypage}
%    Similar to "\cleardoublepage", but inserts pages with \sty{empty} page
%    style.
%    \begin{macrocode}
\newcommand*\cleardoubleemptypage{\par
  \onecolumn
  \if@twoside \ifodd\c@page \else
    \thispagestyle{empty}\null\newpage
  \fi\fi
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@safe@space}
%    This macro inserts \#1 in the current horizontal lists; if it contributes
%    a (strictly) positive width, it also inserts~\#2.  Usually \#1 is a
%    certain string, and \#2 is a spacing command that one wants to emit (if
%    and) only if the string is nonempty.
%    \begin{macrocode}
\@ifdefinable\@safe@space{\def\@safe@space#1#2{%
  \setbox\z@\hbox{\ignorespaces #1\unskip}%
  \ifdim\wd\z@>\z@
    \unhbox\z@ #2%
  \else
    \unhbox\z@
  \fi
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{environment}{baseletter}
%    \changes{0.31}{2001 Dec 01}{Reintroduced the first mandatory argument
%      to hold local initializations}
%    All the ``letter-making'' environments are based upon this one,
%    which is the lowest-level one.  Its purpose is to take the basic
%    actions that are needed to begin and end every kind of letter.  In
%    this version of the code it takes two arguments (this has changed
%    several times among different releases), which are meant to contain
%    code that performs any custom initialization required by the
%    higher-level environments (or by the user, if this environment is
%    called directly by the user).  The code passed in~"#1" is executed
%    before the core initializations provided by "baseletter", but inside
%    the group implied by this environment; the code passed in~"#2" is
%    executed as the last thing (just before "\@begin@letter@hook").  Other
%    arguments will be picked up by the "\x@baseletter" or
%    "\y@baseletter" macro.
%    \begin{macrocode}
\newenvironment{baseletter}[2]{%
  #1%
%    \end{macrocode}
%    Save~"#2" in a token register for later execution:
%    \begin{macrocode}
  \@lett@decl{#2}%
%    \end{macrocode}
%    Obvious initializations; note that "\cleardoubleemptypage" calls
%    "\onecolumn".
%    \begin{macrocode}
  \cleardoubleemptypage
  \c@page\@ne
  \refstepcounter{letter}%
  \typeout{\lettername \space \number\c@letter}%
  \interlinepenalty 200 % smaller than the TeXbook value
  \parskip\medskipamount
%    \end{macrocode}
% Set "\parindent" according to the option specified by the user.
%    \begin{macrocode}
  \ifx\@indent@pref L\else
    \ifx\@indent@pref N%
      \setlength\parindent{\z@}%
    \else
      \ifdim .1\textwidth>2pc
        \setlength\parindent{.1\textwidth}%
      \else
        \setlength\parindent{2pc}%
      \fi
    \fi
  \fi
%    \end{macrocode}
%    Continue initialization in two different ways, according to the
%    presence or not of the first optional argument.
%    \begin{macrocode}
  \@ifnextchar[\x@baseletter\y@baseletter % ] bracket matching
}{%
%    \end{macrocode}
%    Code for ending letters.  "\stopletter" is a hook reserved to the
%    user; it is executed \emph{before} the last page of the letter is
%    finished off.
%    \begin{macrocode}
  \stopletter
%    \end{macrocode}
%    Now ensure vertical mode and add a zero-cost page break \emph{above}
%    the vertical glue (possibly) present at the end of the page: this
%    allows to discard the glue after the signature if this is needed to
%    fit the letter in the page, even if "\stopbreaks" is in effect after
%    the signature.  Should this be a ``"-\@M"''-cost page break instead?
%
%    (2015 Feb~08, vers.~0.36: definitely \emph{no}, since that would stretch 
%    out the last page of the letter!  It was fortunate we didn't dare change
%    it in previous releases!)
%    \begin{macrocode}
  \@@par\addpenalty\z@
  \clearpage
%    \end{macrocode}
%    The following is a hook reserved to extensions of the
%    \packlass{letteracdp} class; it is used, for instance, by
%    \packlass{articoletteracdp}.  Note that it is executed \emph{after}
%    ejecting the last page of the letter.
%    \begin{macrocode}
  \@end@letter@hook
%    \end{macrocode}
%    Write to the \filedir{.aux} file the data for the address labels.
%    This is rather tricky because we can have multiple addressees
%    \emph{and} multiple senders
%    \changes{0.36}{2015 Feb 08}{Added check for the
%      \protect\texttt{\protect\bslash if@making@labels@} switch before
%      writing to the \protect\filedir{.aux} file unneeded information for 
%      generating the address labels.}
%    (v.~0.36: note the new check for "\if@making@labels@", in order to write
%    to the \filedir{.aux} file the information about the address labels
%    only when it is actually needed).
%    \begin{macrocode}
  \if@filesw \if@making@labels@
    \begingroup
%    \end{macrocode}
%    Ensure that "\\", "~" and "\protect"'ed tokens are written literally
%    instead of being expanded:
%    \begin{macrocode}
      \let\\\relax
      \let ~\relax
      \let\protect\@unexpandable@protect
%    \end{macrocode}
%    ^^A { brace match
%    The following hack causes "\and" (and "\andcc") to expand into
%    ``"}\@gobble{"''.
%    ^^A } brace match
%    \begin{macrocode}
      \def\and{%
        \iffalse{\fi}\expandafter\@gobble\expandafter{\iffalse}\fi
      }%
      \let\andcc\and
%    \end{macrocode}
%    "\returnaddress" contains the addresses of the senders, separated by
%    "\and"; thanks to the above hack, only the first is saved into
%    "\@cdp@reserved", and the others are "\@gobble"'d.
%    \begin{macrocode}
      \edef\@cdp@reserved{{\returnaddress}}%
%    \end{macrocode}
%    We now cope with "\and"'s and "\andcc"'s inside "\theaddresseeaddress":
%    we write them to the \filedir{.aux} file as
%    ^^A { brace match
%    ``"}"\,\meta{LF}\,"\@mlabel{"^^A
%    \( \langle\mbox{\itshape expansion of\/ } "\@cdp@reserved"\,\rangle \)^^A
%    "}{"'',
%    ^^A } brace match
%    \emph{i.e.}, for what we have just said, as
%    ^^A { brace match
%    ``"}"\,\meta{LF}\,"\@mlabel{"\meta{address of 1st~sender}"}{"''.
%    ^^A } brace match
%    \begin{macrocode}
      \def\and{%
        \iffalse{\fi}^^J%
        \string\@mlabel{\@cdp@reserved}{\iffalse}\fi
      }%
      \let\andcc\and
%    \end{macrocode}
%    We are now ready to write out the correct sequence of commands,
%    \emph{e.g.}:
%    \begingroup
%      \fontsize{9}{11}\selectfont
%      \zerolistvertspaces
%      \begin{flushleft}
%        "\@beginlabelgroup"\\
%        "\@mlabel{"\meta{1st sender}"}{"\meta{1st addressee}"}"\\
%        "\@mlabel{"\meta{1st sender}"}{"\meta{2nd addressee}"}"\\
%        "\@mlabel{"\meta{1st sender}"}{"\meta{3rd addressee}"}"\\
%        \ldots\\
%        "\@endlabelgroup"\\
%      \end{flushleft}
%    \endgroup
%    \begin{macrocode}
      \immediate\write\@auxout{%
        \string\@beginlabelgroup ^^J%
        \string\@mlabel
          {\@cdp@reserved}{\theaddresseeaddress}^^J%
        \string\@endlabelgroup
      }%
    \endgroup
%    \end{macrocode}
%    Vers.~0.36: note the additional "\fi" to go with the new
%    "\if@making@labels@".
%    \begin{macrocode}
  \fi \fi
}
%    \end{macrocode}
%    \end{environment}
%
%    Back to uncommented code.
%    \begin{macrocode}
\@ifdefinable\x@baseletter{\long\def\x@baseletter[#1]#2{%
  \def\theaddresseename{#1}%
  \def\theaddresseeaddress{#2}%
  \@baseletter
}}
\@ifdefinable\y@baseletter{\long\def\y@baseletter#1{%
  \@cut@andcc #1\andcc\@@@
  \def\theaddresseeaddress{#1}%
  \@baseletter
}}
\newcommand\@baseletter[1][]{%
  \def\thesubject{#1}%
  \if@twoside
    \@mkboth{%
      \noexpand\@safe@space\noexpand\headtoname\noexpand\enspace
      \ignorespaces\theaddresseename\unskip \hfill \noexpand\@date
    }{%
      \noexpand\@date \hfill
      \noexpand\@safe@space\noexpand\headtoname\noexpand\enspace
      \ignorespaces\theaddresseename % \unskip put by \@?@head
    }%
  \else
    \@mkboth{}{%
      \noexpand\@safe@space\noexpand\headtoname\noexpand\enspace
      \ignorespaces\theaddresseename\unskip \hfill \noexpand\@date
    }%
  \fi
  \the\@lett@decl
  \@begin@letter@hook
}
\@ifdefinable\@cut@andcc{\long\def\@cut@andcc#1\andcc#2\@@@{%
  \@cut@and #1\and\@@@%
}}
\@ifdefinable\@cut@and{\long\def\@cut@and#1\and#2\@@@{%
  \@cut@nl #1\\\@@@%
}}
\@ifdefinable\@cut@nl{\long\def\@cut@nl#1\\#2\@@@{%
  \@cut@par #1\par\@@@%
}}
\@ifdefinable\@cut@par{\long\def\@cut@par#1\par#2\@@@{%
  \def\theaddresseename{#1}%
}}
\newcommand*\stopbreaks{%
  \interlinepenalty\@M
  \def\par{\ifvmode\else\@@par\nobreak\fi}%
  \let\\\@nobreakcr
  \let\vspace\@nobreakvspace
}
\DeclareRobustCommand\@nobreakvspace
   {\@ifstar\@vspacer\@nobreakvspacex}
\@ifdefinable\@nobreakvspacex{\def\@nobreakvspacex#1{%
  \ifvmode
    \nobreak
    \vskip #1%
    \vskip\z@skip
  \else
    \@bsphack
    \vadjust{\@restorepar
      \nobreak
      \vskip #1%
      \vskip\z@skip
    }%
    \@esphack
  \fi
}}
\@ifdefinable\@nobreakcr{\def\@nobreakcr{%
  \@ifstar{\@normalcr*}{\@normalcr*}%
}}
\newcommand*\startbreaks{%
  \interlinepenalty 200%
  \let\par\@@par
  \let\\\@normalcr
  \let\vspace\@@vspace
}
\@ifdefinable\@par@stopbreaks{\def\@par@stopbreaks{%
  \par\nobreak\stopbreaks
}}
\@ifdefinable\@@letter{\def\@@letter#1#2#3{%
  \ifx#2N%
    \renewcommand*\makepresentation{\makenormalpresentation}%
    \renewenvironment*{presentation}{%
      \normalpresentation
    }{%
      \endnormalpresentation
    }%
  \else\ifx#2F%
    \renewcommand*\makepresentation{\makefoldedpresentation}%
    \renewenvironment*{presentation}{%
      \foldedpresentation
    }{%
      \endfoldedpresentation
    }%
  \fi\fi
  \setlength\senderindentation   {\z@}%
  \setlength\senderwidth         {#3}%
  \setlength\addresseeindentation{#3}%
  \setlength\addresseewidth      {\textwidth}%
    \addtolength\addresseewidth{-\addresseeindentation}%
  \setlength\signatureindentation{.3\textwidth}%
  \setlength\signaturewidth      {.6\textwidth}%
  \renewcommand*\closingindentation{\parindent}
  \renewcommand*\signaturealignment{\centering}%
  \standardvertspaces
  \baseletter{}{%
    #1%
  }%
}}
\@ifdefinable\@letter{\def\@letter#1{%
  \@@letter{\thispagestyle{#1}}%
}}
\newenvironment*{customletter}{%
  \@@letter{}L%
}{\endbaseletter}
\newenvironment*{letter}{%
  \@letter{firstpage}N{.5\textwidth}%
}{\endbaseletter}
\newenvironment*{foldedletter}{%
  \@letter{foldedpage}F{.5\textwidth}%
}{\endbaseletter}
\newenvironment*{letter*}{%
  \@letter{firstpage}N\longindentation
}{\endbaseletter}
\newenvironment*{foldedletter*}{%
  \@letter{foldedpage}F\longindentation
}{\endbaseletter}
\newenvironment*{letterhead}{%
  \@letter{firstletterhead}N\longindentation
}{\endbaseletter}
\newenvironment*{foldedletterhead}{%
  \@letter{foldedletterhead}F\longindentation
}{\endbaseletter}
%    \end{macrocode}
%
%    \subsubsection{Addresses and subject}
%
%    The addresses and the subject are not composed inside inner boxes:
%    instead, they are constructed from ``blocks'' of lines, conveniently 
%    indented, that are contributed directly to the main vertical list.
%    The correct indentation is achieved by a clever combination of "\parshape"
%    and "\everypar".
%    This unusual scheme was chosen with the intent of maintaining full control
%    over the interline glue, but other, and simpler, ways to accomplish this
%    are actually available (\emph{if} the interline glue is \emph{rigid}).
%
%    \begin{macro}{\@block@parshape}
%    This macro, invoked at every par., is responsible for setting the
%    indentation.
%    \begin{macrocode}
\@ifdefinable\@block@parshape{\def\@block@parshape{%
  \parshape \@ne\@block@inden\@block@width
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@block@@everypar}
%    The part of "\@block@everypar" that "\y@custom@block" uses directly.
%    \begin{macrocode}
\@ifdefinable\@block@@everypar{\def\@block@@everypar{%
  \parskip\z@skip
  \@nobreakfalse \@minipagefalse % these are already \global
  \@new@block@false \@empty@and@false % these too
  \everypar{\@block@parshape}%
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@block@everypar}
%    Code executed when a block or an ``"\and"-section'' begins.
%    \changes{0.36}{2015 Feb 08}{Added a hook, \protect\texttt{\protect\bslash
%      @begin@block@or@and@hook}.}^^A
%    2015 Feb~08 (v.~0.36): "\@begin@block@or@and@hook" added.
%    \begin{macrocode}
\@ifdefinable\@block@everypar{\def\@block@everypar{%
  \@block@parshape
  \@block@@everypar
  \@begin@block@or@and@hook
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\x@custom@block}
%    General utility macro for generating blocks that, like address blocks,
%    haven't got a label, but for which, in exchange, the indentation and the
%    width can be set independently of one another.  Parameters:\strut\\*
%    \strut
%    \begin{tabular}{r@{}l}
%      \param{1} & switch: \( \mbox{Y} = \mbox{add} \) space above and below,
%          \( \mbox{N} = \mbox{don't} \) add it;\\
%      \param{2} & block indentation from left margin (\textoken{dimen});\\
%      \param{3} & block width (\textoken{dimen});\\
%      \param{4} & vertical space above block (\textoken{glue});\\
%      \param{5} & vertical space between ``"\and"-sections''
%          (\textoken{glue});\\
%      \param{6} & vertical space below block (\textoken{glue});\\
%      \param{7} & penalty for breaking before block;\\
%      \param{8} & penalty for breaking between ``"\and"-sections'';\\
%      \param{9} & penalty for breaking after block.\\
%    \end{tabular}\strut
%    \begin{macrocode}
\@ifdefinable\x@custom@block{\def\x@custom@block#1#2#3#4#5#6#7#8#9{%
  \@custom@block#1#4#5#6#8#9%
  \@block@inden #2%
  \@block@width #3%
  \def\voidisOK{\global\let\@empty@block\@empty}%
  \everypar{\@block@everypar}%
  \@@custom@block #7%
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\y@custom@block}
%    General utility macro for generating blocks that, just like the block of
%    the subject, do have a label, but for which, in exchange, both the
%    indentation and the width are deduced from the width of the label itself.
%    \changes{0.36}{2015 Feb 08}{Added parameter for space after label.}^^A
%    2015 Feb~08 (v.~0.36): added new parameter for the amount of
%    horizontal space after the label.  Parameters now are:\strut\\*
%    \strut
%    \begin{tabular}{r@{}l}
%      \param{1} & switch: \( \mbox{Y} = \mbox{add} \) space above and below,
%          \( \mbox{N} = \mbox{don't} \) add it;\\
%      \param{2} & label;\\
%      \param{3} & horizontal space after label (\textoken{dimen});\\
%      \param{4} & vertical space above block (\textoken{glue});\\
%      \param{5} & vertical space between ``"\and"-sections''
%          (\textoken{glue});\\
%      \param{6} & vertical space below block (\textoken{glue});\\
%      \param{7} & penalty for breaking before block;\\
%      \param{8} & penalty for breaking between ``"\and"-sections'';\\
%      \param{9} & penalty for breaking after block.\\
%    \end{tabular}\strut
%    \begin{macrocode}
\@ifdefinable\y@custom@block{\def\y@custom@block#1#2#3#4#5#6#7#8#9{%
  \@custom@block#1#4#5#6#8#9%
  \sbox\@labels{\normalfont\ignorespaces #2\unskip}%
    % We use \@labels to save a box register.
  \@block@inden\wd\@labels
  \ifdim\@block@inden>\z@
    \advance \@block@inden #3\relax
    \wd\@labels\@block@inden
  \fi
  \@block@width\textwidth \advance\@block@width -\@block@inden
  \everypar{%
    \parshape \tw@ \z@\textwidth \@block@inden\@block@width
    \box\@labels
    \@block@@everypar
  }%
  \@@custom@block #7%
}}
%    \end{macrocode}
%    \end{macro}
%
%    Uncommented code.
%    \begin{macrocode}
\@ifdefinable\@custom@block{\def\@custom@block#1#2#3#4#5#6{%
  \if@inlabel \indent \fi
  \let\par\@@par \par
  \if@newlist \@noitemerr \fi
  \let\makelabel\m@kel@bel
  \@nobreakfalse
  \@noskipsecfalse
  \@totalleftmargin\z@
  \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
  \parfillskip\@flushglue
  \ifx#1Y%
    \parskip #2\relax
    \ifdim\lastskip>\parskip
      \parskip\z@skip
    \else
      \advance\parskip -\lastskip
    \fi
  \else
    \parskip\z@skip
  \fi
  \parindent\z@
  \linewidth\textwidth
  \hsize\textwidth
  \@block@space #4%
  \@block@andspace #3%
  \@i@penalty #5%
  \@e@penalty #6%
  \stopbreaks
  \@new@block@true \@empty@and@true
}}
\@ifdefinable\@@custom@block{\def\@@custom@block#1{%
  \addpenalty #1%
  \color@begingroup
}}
\def\end@custom@block#1{\par
  \color@endgroup
  \if@new@block@
    \@empty@block
  \else
    \if@empty@and@
      \@empty@and
    \fi
    \ifx#1Y%
      \addpenalty\@e@penalty
      \addvspace\@block@space
    \fi
  \fi
  \everypar{}%
}
\newcommand*\makeandvspace{%
  \addpenalty\@i@penalty
  \addvspace\@block@andspace
}
\newcommand*\makeandcclabel[1][\andccname]{%
  \makebox[\z@][r]{\normalfont\@safe@space{#1}\quad}%
  \ignorespaces
}
\@ifdefinable\@block@nd{\def\@block@nd{\par
  \if@empty@and@
    \@empty@and
  \else
    \makeandvspace
  \fi
  \@empty@and@true
  \everypar{\@block@everypar}%
}}
\@ifdefinable\@empty@and{\def\@empty@and{%
  \ClassWarning{\@letteracdp}{%
    \protect\and\space with nothing inside%
  }%
}}
\@ifdefinable\@empty@sender{\def\@empty@sender{%
  \ClassWarning{\@letteracdp}{%
    Empty sender address%
  }%
}}
\@ifdefinable\@sender{\def\@sender#1{%
  \let\@empty@block\@empty@sender
  \let\and\@block@nd
  \x@custom@block #1%
    \senderindentation\senderwidth
    \aboveaddressvspace\andaddressvspace\belowaddressvspace
    \@b@frompenalty\@i@frompenalty\@e@frompenalty
  \raggedright
}}
\newenvironment*{sender} {\@sender Y}{\end@custom@block Y}
\newenvironment*{sender*}{\@sender N}{\end@custom@block N}
\@ifdefinable\@empty@addressee{\def\@empty@addressee{%
  \ClassWarning{\@letteracdp}{%
    Empty addressee address%
  }%
}}
\@ifdefinable\@addressee{\def\@addressee#1{%
  \let\@empty@block\@empty@addressee
  \let\and\@block@nd
  \def\andcc{\@block@nd
    \everypar\expandafter{\the\everypar
      \makeandcclabel\relax
    }%
  }%
  \x@custom@block #1%
    \addresseeindentation\addresseewidth
    \aboveaddressvspace\andaddressvspace\belowaddressvspace
    \@b@topenalty\@i@topenalty\@e@topenalty
  \raggedright
}}
\newenvironment*{addressee} {\@addressee Y}{\end@custom@block Y}
\newenvironment*{addressee*}{\@addressee N}{\end@custom@block N}
\@ifdefinable\@good@prsbj{\def\@good@prsbj#1{%
  \@new@block@false \@empty@and@false
  \let\presubject\@bad@prsbj
  \vskip\parskip
  \leftline{\normalfont\ignorespaces #1\unskip}%
  \nobreak
  \parskip\presubjectvspace
}}
\@ifdefinable\@bad@prsbj{\def\@bad@prsbj#1{%
  \ClassError{\@letteracdp}{%
    Misused \protect\presubject%
  }{%
    At the beginning of the subject of a letter
    you can write something like\MessageBreak
    \protect\presubject{A short phrase...}
    in order to typeset "A short phrase..."\MessageBreak
    just above the subject; but the \protect\presubject\space
    command must come before\MessageBreak
    any other text in the subject,
    and it cannot be used twice.\MessageBreak
    (If you are wondering where you used the
    \protect\presubject\space command,\MessageBreak
    recall that both \protect\registered\space and
    \protect\registeredRR\space invoke
    \protect\presubject.)\MessageBreak
    The offending command will be ignored:
    try to type \space <return> \space to proceed.%
  }%
}}
%    \end{macrocode}
%
%    \begin{macro}{\@subject}
%    Inner implementation of \env{subject}\slash\env{subject*} environments.
%    \changes{0.36}{2015 Feb 08}{Now this macro passes
%      \protect\texttt{\protect\bslash subjectnamegap} as parameter~\#3 to
%      \protect\texttt{\protect\bslash y@custom@block}.}^^A
%    2015 Feb~08 (v.~0.36): now passes the "\subjectnamegap" macro
%    as parameter~\#3 to "\y@custom@block", parameter added in this same
%    version.
%    \begin{macrocode}
\@ifdefinable\@subject{\def\@subject#1#2{%
  \let\@empty@block\@empty
  \y@custom@block #1%
    {#2}\subjectnamegap
    \abovesubjectvspace\z@skip\belowsubjectvspace
    \@b@subjpenalty\@M\@e@subjpenalty
  \let\presubject\@good@prsbj
  \def\registered  {\presubject{\registeredname}}%
  \def\registeredRR{\presubject{\registeredRRname}}%
  \everypar\expandafter{\the\everypar
    \let\presubject\@bad@prsbj
  }%
  \@subject@style
}}
%    \end{macrocode}
%    \end{macro}
%
%    Uncommented code.
%    \begin{macrocode}
\newenvironment*{subject} [1][\subjectname]
  {\@subject Y{#1}}{\end@custom@block Y}
\newenvironment*{subject*}[1][\subjectname]
  {\@subject N{#1}}{\end@custom@block N}
\newcommand*\ifemptyblock{%
  \if@new@block@
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\@ifdefinable\@makesender{\def\@makesender#1{%
  \begin{sender#1}\thesenderaddress\end{sender#1}%
}}
\newcommand*\makesender{%
  \@ifstar{\@makesender *}{\@makesender {}}%
}
\@ifdefinable\@makeaddressee{\def\@makeaddressee#1{%
  \begin{addressee#1}\theaddresseeaddress\end{addressee#1}%
}}
\newcommand*\makeaddressee{%
  \@ifstar{\@makeaddressee *}{\@makeaddressee {}}%
}
\newcommand*\x@makesubject[1][\subjectname]{%
  \begin{subject}[#1]\thesubject\end{subject}%
}
\newcommand*\y@makesubject[1][\subjectname]{%
  \begin{subject*}[#1]\thesubject\end{subject*}%
}
\newcommand*\makesubject{\@ifstar\y@makesubject\x@makesubject}
%    \end{macrocode}
%
%    \subsubsection{Presentations}
%
%    With this funny term we denote the initial part of a letter
%    (addresses and the like).
%
%    \begin{macro}{\@setup@pres}
%    Code for setting up style parameters.
%    \begin{macrocode}
\@ifdefinable\@setup@pres{\def\@setup@pres{%
  \global\@topnum\z@ % prevents figures from going at top of page
  \parskip\z@skip
  \parindent\z@
  \@b@frompenalty \@M
  \@i@frompenalty \@fold@toppenalty
  \@e@frompenalty \@M
  \@b@topenalty   \@fold@toppenalty
  \@i@topenalty   \@fold@toppenalty
  \@e@topenalty   \@M
  \@b@subjpenalty \@fold@toppenalty
  \@e@subjpenalty \@M
  \interlinepenalty\@M
  \def\par{\ifvmode\else\@@par\penalty\@fold@toppenalty\fi}%
  \let\\\@nobreakcr
  \let\vspace\@nobreakvspace
}}
\newenvironment*{presentation}{%
  \normalpresentation
}{%
  \endnormalpresentation
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{environment}{normalpresentation}
%    The environment for making a normal presentation:
%    \begin{macrocode}
\newenvironment*{normalpresentation}{%
  \cleardoublepage
  \@setup@pres
}{%
%    \end{macrocode}
%    \changes{0.34}{2006 Jan 01}{At the end of the environment,
%      changed \protect\texttt{\protect\bslash par} into
%      \protect\texttt{\protect\bslash @@par}}
%    Changed the following line from "\par" to "\@@par" (v.~0.34):
%    \begin{macrocode}
  \@@par
  \addpenalty\@e@prespenalty
  \addvspace\belowpresentationvspace
}
%    \end{macrocode}
%    \end{environment}
%
%    \begin{macro}{\@nofoldwarning}
%    Warning issued when folded presentations are not allowed:
%    \begin{macrocode}
\@ifdefinable\@nofoldwarning{\def\@nofoldwarning{%
  \ClassWarning{\@letteracdp}{%
    The paper format you chose does not allow\MessageBreak
    folded letters; making normal presentation.\MessageBreak
    (Modify \protect\foldedheight\space in the preamble\MessageBreak
    if you want to alter the default behavior.)\MessageBreak
    Warning issued%
  }%
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{environment}{foldedpresentation}
%    The environment for making a folded presentation, possibly
%    splitting it into two parts: the part the actually fits in the folded
%    flap, and the other, which is merged with the text below the
%    folding.  I~think it's better to include some comments here.
%    \begin{macrocode}
\newenvironment*{foldedpresentation}{%
%    \end{macrocode}
%    Are folded letters currently allowed?
%    \begin{macrocode}
  \if@do@fold@
%    \end{macrocode}
%    \emph{Yes.} First, ensure that we are at the beginning of a page;
%    note that \emph{numbered} pages, here, are inserted if there is a gap
%    to be filled.
%    \begin{macrocode}
    \cleardoublepage
%    \end{macrocode}
%    The contents of the presentation will be saved in "\box0": set up
%    parameters, color support\ldots
%    \begin{macrocode}
    \setbox\z@\vbox\bgroup
      \@setup@pres
%    \end{macrocode}
%    \changes{0.34}{2006 Jan 01}{Added setting of
%      \protect\texttt{\protect\bslash boxmaxdepth}
%      at the beginning of the environment}
%    Added the following line (v.~0.34), even if the depth of "\box0" 
%    will be checked later:
%    \begin{macrocode}
      \boxmaxdepth\maxdepth
%    \end{macrocode}
%    \ldots color support, we were saying\ldots
%    \begin{macrocode}
      \color@begingroup
%    \end{macrocode}
%    The reason for this "\penalty" will be explained later~($*$):
%    \begin{macrocode}
      \penalty-\@M
%    \end{macrocode}
%    \changes{0.34}{2006 Jan 01}{Removed a superfluous setting of
%      \protect\texttt{\protect\bslash prevdepth}
%      from the beginning of the environment}
%    Removed the following line (v.~0.34): we have no need to insert
%    interline glue here, and it is even wrong to do it; we will insert the
%    "\topskip" glue below with a trick (which, in any case, would remove
%    the---incorrect---interline glue inserted here).  Why did I include
%    this redundant statement?
%\begin{verbatim}
%\prevdepth\z@
%\end{verbatim}
%    \begin{macrocode}
  \else
%    \end{macrocode}
%    \emph{No.} Inform the user and substitute a normal presentation.
%    \begin{macrocode}
    \@nofoldwarning
    \normalpresentation
  \fi
}{%
%    \end{macrocode}
%
%    When the presentation ends, if we were making a folded
%    presentation\ldots
%    \begin{macrocode}
  \if@do@fold@
%    \end{macrocode}
%    \ldots finish off the box\ldots
%    \begin{macrocode}
      \@@par
      \color@endgroup
%    \end{macrocode}
%    \ldots and save its "\prevdepth" for later.
%    \begin{macrocode}
      \global\dimen@i\prevdepth
%    \end{macrocode}
%    Insert the equivalent of "\foldingfilbreak[0]": if possible, the
%    "\vsplit" that will later split the presentation should try to split
%    it here (\emph{i.e.}, not to split it at all).
%    \begin{macrocode}
      \@f@ldingfilbreak\@fold@basepenalty
%    \end{macrocode}
%    But "\vsplit" might prefer to split the box at the implicit
%    "\penalty-10000" inserted at its end; avoid this, since it would
%    defeat the "\vfil" of "\@f@ldingfilbreak":\nobreak\space($**$)
%    \begin{macrocode}
      \vskip\maxdimen % "discourage" the break at the \penalty-10000
%    \end{macrocode}
%    End of "\vbox".
%    \begin{macrocode}
    \egroup
%    \end{macrocode}
%    Now "\box0" contains the presentation, but it lacks the due
%    "\topskip" glue atop.  Of course, we could have inserted the
%    equivalent (in normal circumstances) of the "\topskip" glue by
%    setting \[ "\prevdepth" := "\topskip"-"\baselineskip" \] at the
%    beginning of "\box0", but this does not work always, since it could
%    insert the "\lineskip" glue instead.  We are admittedly whimsical
%    here, but, in order to achieve exactly the same result yielded by
%    the "\topskip" glue machinery operated in the main vertical list, we
%    use the following trick of "\vsplit"'ting "\box0" to \texttt{0pt}.
%    A legal breakpoint exists for this: it is the "\penalty-10000"
%    inserted above in~($*$)!  This breakpoint comes first in "\box0" and
%    it is mandatory, so the "\vsplit" operation will stop immediately
%    (without consuming time); nothing will be actually split off,
%    everything will remain in "\box0", but with "\splittopskip" glue
%    added at the top!  Moreover, although we set "\boxmaxdepth" inside
%    "\box0", we check again for possible excess depth (can't figure out
%    how it could creep in, however).  So:
%    \begin{macrocode}
    \splitmaxdepth\maxdepth
    \splittopskip\topskip
    \setbox\tw@\vsplit\z@ to\z@
%    \end{macrocode}
%    The real splitting of the presentation is done by the following
%    "\vsplit": the baseline of the first line possibly remaining in
%    "\box0" after the "\vsplit" must be at a distance of
%    "\@below@folding@skip" from the folding, plus the "\parskip" glue
%    and, of course, the normal interline glue (we are in mid-page now).
%    \begin{macrocode}
    \splittopskip\baselineskip
    \advance\splittopskip\@below@folding@skip
    \advance\splittopskip\parskip
    \setbox\tw@\vsplit\z@ to\@folding@ht
%    \end{macrocode}
%    Now "\box2" contains the part of the presentation that does fit in the
%    folded flap; we append this box to the page (actually, it is the first
%    thing contributed since the "\cleardoublepage").  Since this box already
%    includes "\topskip" glue at the top, we take redundant precautions to
%    ensure that no such glue is added again here.
%    \begin{macrocode}
    {\topskip\z@skip \box\tw@
%    \end{macrocode}
%    Thanks to the above setting of "\splitmaxdepth", we are sure that
%    the depth of the previous box is small; so the following line will
%    take us exactly on the edge of the fold, with null depth\ldots
%    \begin{macrocode}
    \baselineskip\@above@folding@margin \nobreak\null}%
%    \end{macrocode}
%    \ldots where we insert a costly, yet feasible breakpoint.
%    \begin{macrocode}
    \penalty\@highpenalty
%    \end{macrocode}
%    If everything fitted in the folded flap, nothing remained in
%    "\box0".
%    \begin{macrocode}
    \ifvoid\z@
%    \end{macrocode}
%    In that case, just leave appropriate blank space (the "\prevdepth"
%    is already zero, so the interline glue of the following line will be
%    correct).
%    \begin{macrocode}
      \vskip\@below@folding@skip
%    \end{macrocode}
%    Otherwise, take the part that did not fit out of "\box0"\ldots
%    \begin{macrocode}
    \else
      \unvbox\z@
%    \end{macrocode}
%    \ldots so it is now in the list of ``recent contributions''
%    ("\unvbox" does not exercise the page builder); remove the
%    "\vskip\maxdimen" added in~($**$) just to fool "\vsplit", as well as
%    the items added by the virtual "\foldingfilbreak[0]".
%    \begin{macrocode}
      \unskip    % remove "\vskip\maxdimen"
      \unpenalty % remove "\penalty\@fold@basepenalty"
      \unskip    % remove "\vskip \dimen@ plus 1fil minus ..."
      \unskip    % remove "\vskip -\skip@"
      \unpenalty % remove "\penalty 10000"
%    \end{macrocode}
%    Now the list of ``recent contributions'' contains exactly what the
%    user put in the presentation (and did not fit in the folded flap).
%    Restore "\prevdepth" and conclude as if it were a normal
%    presentation: this makes a perfectly seamless join with the
%    following material, as if the folded presentation had been a normal
%    one, extending down to this spot in the page.  ^^A ( paren match
%    Not bad, uhu?~:-)
%    \begin{macrocode}
      \prevdepth\dimen@i
      \addpenalty\@e@prespenalty
      \addvspace\belowpresentationvspace
%    \end{macrocode}
%    Ah, yes, also inform the user of what happened:
%    \begin{macrocode}
      \ClassWarning{\@letteracdp}{%
        Some text that did not fit into the folded flap\MessageBreak
        was moved into the main text below the folding;\MessageBreak
        warning issued%
      }%
    \fi
%    \end{macrocode}
%    If we were not making a folded presentation, then conclude a
%    normal one.
%    \begin{macrocode}
  \else
    \endnormalpresentation
  \fi
}
%    \end{macrocode}
%    \end{environment}
%
%    Back to uncommented code.
%    \begin{macrocode}
\newcommand*\iffoldedallowed{%
  \if@do@fold@
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\newcommand*\makepresentation{\makenormalpresentation}
\newcommand*\makenormalpresentation{%
  \begin{normalpresentation}%
    \makesender\relax
    \makeaddressee\relax
    \makesubject\relax
  \end{normalpresentation}%
}
%    \end{macrocode}
%
%    \begin{macro}{\@f@ldingfilbreak}
%    The ``upper half'' of "\@foldingfilbreak".
%    \begin{macrocode}
\@ifdefinable\@f@ldingfilbreak{\def\@f@ldingfilbreak#1{%
  \ifdim\prevdepth<\maxdepth
    \dimen@ -\prevdepth
  \else
    \dimen@ -\maxdepth
  \fi
  \skip@ \lastskip
  \nobreak
  \vskip -\skip@
  \vskip \dimen@ \@plus 1fil\@minus \@above@folding@shrink
  \penalty #1%
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\@ifdefinable\@foldingfilbreak{\def\@foldingfilbreak#1#2{\par
  \@f@ldingfilbreak#1%
  \vskip -\dimen@ \@plus -1fil\@minus -\@above@folding@shrink
  \vskip \skip@
  \addvspace{#2}%
}}
\@ifdefinable\@fold@getpen{\def\@fold@getpen#1{%
  \ifcase #1 \@fold@basepenalty \or \@fold@lowpenalty
    \or \@fold@medpenalty \or \@fold@highpenalty
    \else \@fold@toppenalty \fi
}}
\newcommand*\foldingbreak[1][\z@]{%
  \ifvmode
    \penalty\@fold@getpen{#1}%
  \else
    \@bsphack
    \vadjust{\penalty\@fold@getpen{#1}}%
    \@esphack
  \fi
}
\newcommand*\foldingfilbreak[1][\z@]{%
  \@foldingfilbreak{\@fold@getpen{#1}}%
}
\newcommand*\makefoldedpresentation{%
  \if@do@fold@
    \begin{foldedpresentation}%
      \renewcommand*\makeandvspace{%
        \@foldingfilbreak\@fold@medpenalty\andaddressvspace
      }%
      \makesender\relax
      \@foldingfilbreak\@fold@medpenalty\z@skip
      \if@new@block@
        \aboveaddressvspace \z@\@plus1fil\relax
        \nointerlineskip\null\nobreak
      \fi
      \makeaddressee\relax
      \@foldingfilbreak\@fold@lowpenalty\z@skip
      \makesubject\relax
    \end{foldedpresentation}%
  \else
    \@nofoldwarning
    \makenormalpresentation
  \fi
}
%    \end{macrocode}
%
%    \subsubsection{Date, salutation, signature, enclosures\ldots}
%
%    This section should be reorganized, with commands listed in a more 
%    logical order: at present, they are rather mixed up.
%
%    First comes the date.
%    \begin{macrocode}
\@ifdefinable\@make@date{\def\@make@date#1#2#3{\par
  \ifx#2Y%
    \nobreak\medskip
  \fi
  \noindent\@safe@space{#1}\space\@date\par
  \ifx#3Y%
    \nobreak\medskip
  \fi
}}
\newcommand*\makedate      [1][\@place]{\@make@date{#1}NN}
\newcommand*\maketopdate   [1][\@place]{\@make@date{#1}NY}
\newcommand*\makebottomdate[1][\@place]{\@make@date{#1}YN}
\@ifdefinable\@empty@signature{\def\@empty@signature{%
  \ClassWarning{\@letteracdp}{%
    Empty signature%
  }%
}}
%    \end{macrocode}
%
%    Then, heaven knows why, the signature.
%
%    \begin{macro}{\@signatureenv}
%    Inner implementation of the \env{signatureenv}\slash\env{signatureenv*}
%    environments.
%    \changes{0.36}{2015 Feb 08}{Added support for \protect\opz{signaturerule}
%      option.}^^A
%    Added support for the \opz{signaturerule} option (vers.~0.36), exploiting
%    the new ``hook'' "\@begin@block@or@and@hook", the gets executed whenever a
%    signature is typeset.
%    \begin{macrocode}
\@ifdefinable\@signatureenv{\def\@signatureenv#1{\par
  \let\@empty@block\@empty@signature
  \let\and\@block@nd
  \if@signature@rule@
    \let \@begin@block@or@and@hook \@make@signature@rule
  \fi
  \x@custom@block Y%
    \signatureindentation\signaturewidth
    #1#1\z@skip
    \@M\@M\@M
  \signaturealignment\@signature@style
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\end@signatureenv}
%    Ends a \env{signatureenv}\slash\env{signatureenv*} environment.
%    \begin{macrocode}
\def\end@signatureenv{%
  \end@custom@block N% not "Y" for efficiency
%    \end{macrocode}
%    The following line (also added, of course, in vers.~0.36) is not actually necessary ("\@begin@block@or@and@hook"
%    has been set by "\@signatureenv" inside a group), but redundancy does not
%    hurt.
%    \begin{macrocode}
  \let \@begin@block@or@and@hook \@empty
  \addvspace\belowsignaturevspace
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{environment}{signatureenv}
%    For signatures that include vertical space for handwriting.
%    \begin{macrocode}
\newenvironment*{signatureenv}{%
  \@signatureenv\abovesignaturevspace
}{%
  \end@signatureenv
}
%    \end{macrocode}
%    \end{environment}
%
%    \begin{environment}{signatureenv*}
%    For signatures that do \emph{not} include vertical space for handwriting; 
%    these should \emph{never} display a rule, and for this reason\ldots
%    \begin{macrocode}
\newenvironment*{signatureenv*}{%
%    \end{macrocode}
%    \changes{0.36}{2015 Feb 08}{Taken care of always suppressing rules
%      here.}^^A
%    \ldots~we add the following line in vers.~0.36 (note that we are inside a
%    group).
%    \begin{macrocode}
  \@signature@rule@false
  \@signatureenv\abovesignatureshortvspace
}{%
  \end@signatureenv
}
%    \end{macrocode}
%    \end{environment}
%
%    Uncommented code.
%    \begin{macrocode}
\@ifdefinable\x@msignature{\def\x@msignature#1{%
  \begin{signatureenv#1}%
    \ifx\thesendersignature\@empty
      \thesendername
    \else
      \thesendersignature
    \fi
  \end{signatureenv#1}%
}}
\@ifdefinable\y@msignature{\def\y@msignature{%
  \begin{signatureenv}%
    \vskip\parskip \vskip\z@skip
    \the\everypar
  \end{signatureenv}%
}}
\newcommand*\makesignature{\@par@stopbreaks
  \@ifstar{%
    \x@msignature *%
  }{%
    \@ifnextchar -{%
      \@firstoftwo\y@msignature
    }{%
      \x@msignature {}%
    }%
  }%
}
%    \end{macrocode}
%
%    \begin{macro}{\@make@signature@rule}
%    Generate a fake, raised line, containing the rule.  Added in vers.~0.36.
%    \begin{macrocode}
\@ifdefinable\@make@signature@rule{\def\@make@signature@rule{%
  \raisebox{\baselineskip}[0pt][0pt]{%
    \signaturerule
  }\\*[-\baselineskip]%
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\signaturerule}
%    User command to allow customization of the signature rule.
%    Added in vers.~0.36.
%    \begin{macrocode}
\newcommand*\signaturerule{%
  \makebox[\signaturerulewidth]{%
    \leaders \hrule \@height .1\p@ \@depth .1\p@ \hfill
  }%
}
%    \end{macrocode}
%    \end{macro}
%
%    Now it is the turn of the salutation (I~said the order isn't logical!).
%
%    \begin{macro}{\makeopening}
%    This command generates the sheer salutation.  It comes in two flavors:
%    \begin{description}
%      \item[normal form:]
%        "\makeopening{"\meta{text}"}"\\*
%          typeset the \meta{text} as the salutation;
%      \item[$+$-form:]
%        "\makeopening+"\\*
%          leave space for a handwritten salutation.
%    \end{description}
%    \begin{macrocode}
\newcommand*\makeopening{\par
  \@ifnextchar +{\@firstoftwo\y@mopening}\x@mopening
}
%    \end{macrocode}
%    \end{macro}
%
%    Uncommented code.
%    \begin{macrocode}
\@ifdefinable\x@mopening{\def\x@mopening#1{%
  \ifx\@indent@pref O%
    \dimen@\prevdepth
    \setbox\z@\vbox{\color@begingroup
      \null
      \prevdepth\dimen@
      \noindent\null\ignorespaces #1\par
      \global\dimen@i\prevdepth
    \color@endgroup}%
    \setbox\tw@\vbox{%
      \unvcopy\z@
      \setbox\z@\lastbox
      \global\setbox\@ne\hbox{\unhbox\z@}%
    }%
    \ifdim\wd\@ne<2pc
      \parindent 2pc\relax
    \else\ifdim\wd\@ne>.4\textwidth
      \parindent .1\textwidth\relax
    \else
      \parindent \wd\@ne
    \fi\fi
    \unvbox\z@
    \prevdepth\dimen@i
  \else
    \noindent\null\ignorespaces #1\par
  \fi
  \nobreak
}}
\@ifdefinable\y@mopening{\def\y@mopening{%
  \@handwr@box\z@ \nobreak
}}
%    \end{macrocode}
%
%    \begin{macro}{\opening}
%    Well-known command for opening a letter.  In vers.~0.35, it,
%    and related macros, have been completely reimplemented to support the
%    "\OpeningSequence" feature.
%    \begin{macrocode}
\newcommand*\opening{\par
  \@ifnextchar +{\@firstoftwo\y@opening}\x@opening
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\y@opening}
%    Implements the ``\mbox{$+$-form}'' of the "\opening" command (salutation
%    written by hand): "\ChosenMakeOpening" should expand to ``"\y@mopening"''.
%    \begin{macrocode}
\newcommand*\y@opening[1][\@place]{%
  \@opening \y@mopening {#1}%
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\x@opening}
%    Implements the normal form of the "\opening" command (with typeset
%    salutation): "\ChosenMakeOpening" should expand to
%    ``"\x@mopening{"\meta{contents of~\#2}"}"''.
%    \begin{macrocode}
\newcommand*\x@opening[2][\@place]{%
  \@opening{\x@mopening{#2}}{#1}%
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@opening}
%    Prepare call to "\OpeningSequence", then call it.  Parameters:\strut\\*
%    \strut
%    \begin{tabular}{r@{}l}
%      \param{1} & intended meaning of "\ChosenMakeOpening";\\
%      \param{2} & contents of optional argument of "\opening"
%          (defaults to "\@place").\\
%    \end{tabular}\strut
%    \begin{macrocode}
\@ifdefinable\@opening{\def\@opening#1#2{%
%    \end{macrocode}
%    Keep definition of "\ChosenMakeOpening" local.
%    \begin{macrocode}
  \begingroup
    \def\ChosenMakeOpening{#1}%
%    \end{macrocode}
%    Invoke user-customizable opening sequence.
%    \begin{macrocode}
    \OpeningSequence{#2}%
%    \end{macrocode}
%    If the \opz{smartindent} option is in force, "\parindent" might have just
%    been changed: this change must be ``lifted'' out of the group.
%    \begin{macrocode}
    \global\dimen@i\parindent
  \endgroup
  \parindent\dimen@i
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\OpeningSequence}
%    This command defines the ``opening sequence'', that is, the sequence of
%    commands that should be executed when the user-level "\opening" command
%    is given.  Provided in vers.~0.35 to allow customization.  The optional
%    argument of "\opening" is passed in the---mandatory!---argument of this
%    command; the mandatory argument of "\opening", if present (\emph{i.e.},
%    if not ``\mbox{$+$-form}'') is embodied in "\ChosenMakeOpening".
%    Factory definition:
%    \begin{macrocode}
\newcommand*\OpeningSequence[1]{%
  \makepresentation
  \maketopdate[#1]%
  \ChosenMakeOpening
}
%    \end{macrocode}
%    \end{macro}
%
%    A little bit of uncommented code.
%    \begin{macrocode}
\newcommand*\makeclosing{\@par@stopbreaks
  \@ifnextchar +{\@firstoftwo\y@mclosing}\x@mclosing
}
\@ifdefinable\x@mclosing{\def\x@mclosing#1{%
  \noindent\hspace*{\closingindentation}\ignorespaces #1\par
}}
\@ifdefinable\y@mclosing{\def\y@mclosing{%
  \@handwr@box\closingindentation
}}
%    \end{macrocode}
%
%    \begin{macro}{\closing}
%    Well-known command for closing a letter.  In vers.~0.35, it,
%    and related macros, have been completely reimplemented to support the
%    "\ClosingSequence" feature.  The present implementation support exactly
%    the same modifiers as the former one (cf.~\cite{nts}), \emph{i.e.}:
%    \begin{description}
%      \item[normal form:]
%        "\closing{"\meta{text}"}"\\*
%          typeset the \meta{text} as the closing sentence,
%          using the internal equivalent of "\makeclosing{"\meta{text}"}";
%          an ordinary signature (the internal equivalent of "\makesignature")
%          follows;
%      \item[$*$-form:]
%        "\closing*{"\meta{text}"}"\\*
%          typeset the \meta{text} as the closing sentence,
%          using the internal equivalent of "\makeclosing{"\meta{text}"}";
%          a compressed signature (the internal equivalent of
%          "\makesignature*") follows;
%      \item[$+$-form:]
%        "\closing+"\\*
%          leave space for a handwritten closing sentence (as "\makeclosing+"
%          would do),
%          followed by another space for an equally handwritten signature
%          (like the one produced by "\makesignature-");
%      \item[$-$-form:]
%        "\closing-{"\meta{text}"}"\\*
%          typeset the \meta{text} as the closing sentence,
%          using the internal equivalent of "\makeclosing{"\meta{text}"}",
%          followed by the space for a handwritten signature
%          (like the one produced by "\makesignature-").
%    \end{description}
%    \begin{macrocode}
\newcommand*\closing{\@par@stopbreaks
  \@ifstar{%
    \@closing{\x@msignature *}%
  }{%
    \@ifnextchar +{\@firstoftwo{%
      \@@closing \y@mclosing \y@msignature
    }}{%
      \@ifnextchar -{\@firstoftwo{%
        \@closing \y@msignature
      }}{%
        \@closing{\x@msignature {}}%
      }%
    }%
  }%
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@closing}
%    The sole purpose of this macro is to absorb the argument destined for the
%    "\closing" command (which is absent in the ``\mbox{$+$-form}, though),
%    which becomes argument~\#2; argument~\#1 is the token sequence that should
%    be used to generate the signature.
%    \begin{macrocode}
\@ifdefinable\@closing{\def\@closing#1#2{%
  \@@closing{\x@mclosing{#2}}{#1}%
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@@closing}
%    Prepare call to "\ClosingSequence", then call it.  Parameters:\strut\\*
%    \strut
%    \begin{tabular}{r@{}l}
%      \param{1} & intended meaning of "\ChosenMakeClosing";\\
%      \param{2} & intended meaning of "\ChosenMakeSignature".\\
%    \end{tabular}\strut
%    \begin{macrocode}
\@ifdefinable\@@closing{\def\@@closing#1#2{%
%    \end{macrocode}
%    Keep definitions local.
%    \begin{macrocode}
  \begingroup
    \def\ChosenMakeClosing{#1}%
    \def\ChosenMakeSignature{#2}%
%    \end{macrocode}
%    Invoke user-customizable closing sequence.
%    \begin{macrocode}
    \ClosingSequence
  \endgroup
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\ClosingSequence}
%    This command defines the ``closing sequence'', that is, the sequence of
%    commands that should be executed when the user-level "\closing" command
%    is given.  Provided in vers.~0.35 to allow customization.
%    Factory definition:
%    \begin{macrocode}
\newcommand*\ClosingSequence{%
  \ChosenMakeClosing
  \ChosenMakeSignature
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@handwr@box}
%    Draws an almost imperceptible sign that marks the spot where a handwritten
%    salutation, or closing sentence, should start.  \#1~is the amount of
%    indentation.
%    \begin{macrocode}
\@ifdefinable\@handwr@box{\def\@handwr@box#1{%
  \vskip .5\baselineskip
  \setbox\z@\vbox{%
    \hrule\@height .1\p@ \@depth .1\p@ \@width 3\p@
  }%
  \wd\z@\z@ \ht\z@\z@ \dp\z@\z@ \noindent\hspace*{#1}\box\z@\par
  \vskip .5\baselineskip\vskip\z@skip
}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@cc@encl}
%    Inner implementation for both "\cc" and "\encl".
%    \changes{0.36}{2015 Feb 08}{Fully reimplemented by means of
%      ``blocks''.}^^A
%    Wholly rewritten in vers.~0.36, now uses ``blocks'' (like addresses and
%    subject).  This, among other things, ensures coherent treatment of the
%    interline glue.
%    \begin{macrocode}
\@ifdefinable\@cc@encl{\long\def\@cc@encl#1#2{\par
  \begingroup
    \let\@empty@block\@empty
    \y@custom@block N{#1}{.5em}%
      \z@skip\z@skip\z@skip
      \@M\z@\z@
    \ignorespaces #2%
    \end@custom@block N%
  \endgroup
}}
%    \end{macrocode}
%    \end{macro}
%
%    Uncommented code.
%    \begin{macrocode}
\newcommand*\cc  [1][\ccname]  {\@cc@encl{#1}}
\newcommand*\encl[1][\enclname]{\@cc@encl{#1}}
\newenvironment{enclosures}[1][\enclname]{%
  \baseenclosures[#1]{}%
}{%
  \endbaseenclosures
}
\newenvironment{baseenclosures}[2][\enclname]{\par
  \addpenalty{-\@lowpenalty}%
  \addvspace{\bigskipamount}%
  \startbreaks
  \parskip\z@skip
  {\parindent\z@ #1\par}%
  \list{\labelenumi}{%
    \usecounter{enumi}%
    \@beginparpenalty\@M
    \@itempenalty-\@lowpenalty
    \@endparpenalty-\@medpenalty
%% ( paren match
    \renewcommand*\labelenumi{\theenumi)}%
    #2%
  }%
}{%
  \endlist
  \aftergroup\startbreaks
}
\newcommand*\ps{\par\startbreaks\parindent\z@}
\newcommand*\@PS@rigid [1][\PSname]{%
  {\normalfont\@safe@space{#1}\enspace}\ignorespaces
}
\newcommand*\@PS@rubber[1][\PSname]{%
  \@safe@space{#1}{\nobreak\space}\ignorespaces
}
\newcommand*\PS{%
  \ps\@ifstar{\@PS@rubber}{\@PS@rigid}%
}
%    \end{macrocode}
%
%    \begin{macro}{\stopletter}
%    User-level hook invoked (before anything else) when a letter ends.
%    \begin{macrocode}
\newcommand*\stopletter{}
%    \end{macrocode}
%    \end{macro}
%
%    \subsubsection{Address labels}
%
%    This part of the code should probably be detached and put in a 
%    separate file to be loaded on demand.
%
%    The general idea is the following:
%    \begin{itemize}
%    \item
%    a \env{labels} (or \env{baselabels}, see below) environment
%    produces one or more sheets of address labels;
%    \item
%    inside \env{labels}, several \env{labelgroup} environments wrap up
%    the address labels pertaining to each letter (a letter may have
%    several address labels associated with it, if it has several
%    addressees);
%    \item
%    inside each \env{labelgroup} environment, individual labels are
%    produced with the "\basemlabel" command.
%    \end{itemize}
%    The \env{labels} environment takes care of such things like jumping
%    to a new page, etc.; the \env{labelgroup} environment merely changes
%    the way address labels are numbered, but does not otherwise affect
%    the printout.
%
%    The user may either:
%    \begin{enumerate}
%    \renewcommand*{\theenumi}{(\Alph{enumi})}
%    \renewcommand*{\labelenumi}{\theenumi}
%    \item\label{autolabels}
%    include a "\makelabels" declaration in the preamble, to have 
%    address labels generated automatically via the \filedir{.aux} 
%    file; in this case, appropriate commands are written in the 
%    \filedir{.aux} file by each 
%    \env{baseletter} environment, which, when the \filedir{.aux} file 
%    is re-read at the "\end{document}", automatically generate the 
%    required environments and commands (\env{labels}, 
%    \env{labelgroup}, etc.); \emph{or}
%    \item\label{handlabels}
%    produce the address labels ``by hand'', including directly in the
%    source file, where (s)he want the address label sheets to appear, a
%    \env{labels} environment, containing the appropriate
%    \env{labelgroup} environments, containing, in turn, the individual
%    "\basemlabel" commands.
%    \end{enumerate}
%    In principle, it is also possible to mix \ref{autolabels} 
%    and~\ref{handlabels} (and to have several \env{labels} 
%    environments, too), but this has no practical utility.
%
%    \begin{macrocode}
\newcommand*\returnaddress{\thesenderaddress}
\@ifdefinable\@emptyaddrlabels@err{\def\@emptyaddrlabels@err{%
  \advance \@cdp@gencount \m@ne
  \ClassError{\@letteracdp}{%
    Counter emptyaddrlabels out of range%
  }{%
    The counter emptyaddrlabels holds
    the number of labels\MessageBreak
    to leave blank when starting to print
    the address labels\MessageBreak
    (e.g., because some labels
    have already been peeled off).\MessageBreak
    For the label format you chose,
    it must lie in the range\MessageBreak
    0..\number\@cdp@gencount\space (inclusive),
    but presently its value is \number\c@emptyaddrlabels.\MessageBreak
    It will therefore be ignored;
    type \space <return> \space to proceed.%
  }%
}}
\newcommand*\skipemptylabels{%
  \@cdp@gencount \c@addrlabelrows
  \multiply \@cdp@gencount \c@addrlabelcolumns
  \ifnum\c@emptyaddrlabels<\z@
    \@emptyaddrlabels@err
  \else\ifnum\c@emptyaddrlabels<\@cdp@gencount
    \begingroup
      \let\ifactuallabel\@secondoftwo
      \@whilenum\c@totallabel<\c@emptyaddrlabels\do{\@mlabel{}{}}%
    \endgroup
  \else
    \@emptyaddrlabels@err
  \fi\fi
}
%    \end{macrocode}
%
%    \begin{environment}{baselabels}
%    This is the actual environment for producing sheets of address
%    labels: the \env{labels} environment (see below) is simply a wrapper
%    that offers the user the opportunity of changing some settings before
%    invoking \env{baselabels}.
%    \begin{macrocode}
\newenvironment*{baselabels}{%
  \cleardoubleemptypage
  \c@page\@ne
  \typeout{Address Labels}%
  \pagestyle{empty}%
  \textwidth \c@addrlabelcolumns\addrlabelwidth
  \count@ \c@addrlabelcolumns
  \advance \count@ \m@ne
  \ifnum\count@>\z@
    \advance \textwidth \count@\addrlabelshsep
  \fi
  \linewidth\textwidth \hsize\textwidth
  \oddsidemargin -1in%
  \advance \oddsidemargin \addrlabelsleftmargin
  \evensidemargin \oddsidemargin
  \@totalleftmargin\z@
  \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
  \parfillskip\@flushglue
  \textheight \c@addrlabelrows\addrlabelheight
  \count@ \c@addrlabelrows
  \advance \count@ \m@ne
  \ifnum\count@>\z@
    \advance \textheight \count@\addrlabelsvsep
  \fi
  \@colht\textheight  \@colroom\textheight \vsize\textheight
  \headsep \z@
  \headheight \z@
  \footskip \z@
  \topmargin -1in%
  \advance \topmargin \addrlabelstopmargin
  \ifcase \@ptsize\relax
    \normalsize
  \or
    \small
  \or
    \footnotesize
  \fi
  \parindent \z@
  \baselineskip \z@skip
  \lineskip \z@skip
  \boxmaxdepth \z@
  \raggedright
  \fboxrule \z@
  \fboxsep \addrlabelborder
  \addrlabeltrimwidth \addrlabelwidth
  \advance \addrlabeltrimwidth -2\addrlabelborder
  \addrlabeltrimheight \addrlabelheight
  \advance \addrlabeltrimheight -2\addrlabelborder
  \setcounter{totallabel}{\z@}%
  \setcounter{label}{\z@}%
  \setcounter{letter}{\z@}%
  \noindent
  \skipemptylabels
}{%
  \@killglue\clearpage
}
%    \end{macrocode}
%    \end{environment}
%
%    \begin{environment}{labels}
%    It is the user-level environment for producing one or more sheets of 
%    address labels. 
%    Its default definition simply invokes \env{baselables}, but the 
%    user may redefine it to set some style parameters.  For example:
%\begin{verbatim}
%\renewenvironment{labels}{%
%    \baselabels
%    \setlength\fboxrule{.2pt}%
%    \addtolength\fboxsep{-2\fboxrule}%
%}{\endbaselabels}
%\end{verbatim}
%    will draw a thin border around each address label.
%    \begin{macrocode}
\newenvironment*{labels}{\baselabels}{\endbaselabels}
%    \end{macrocode}
%    \end{environment}
%
%    Back to uncommented code.
%    \begin{macrocode}
\let\@beginlabels=\relax
\let\@endlabels=\relax
\newenvironment*{labelgroup}{\stepcounter{letter}}{}
\let\@beginlabelgroup=\relax
\let\@endlabelgroup=\relax
\newcommand*\labeltab{\@killglue
  \ifnum\c@totallabel>\z@
    \count@ \c@totallabel
    \divide \count@ \c@addrlabelcolumns
    \multiply \count@ -\c@addrlabelcolumns
    \advance \count@ \c@totallabel
    \ifnum\count@=\z@
      \par\vskip\addrlabelsvsep\noindent
    \else
      \hskip\addrlabelshsep
    \fi
  \fi
  \stepcounter{totallabel}%
  \stepcounter{label}%
}
%    \end{macrocode}
%
%    \begin{macro}{\ifactuallabel}
%    Macro for the user: "\ifactuallabel{"\meta{FOO}"}{"\meta{BAR}"}"
%    executes \meta{FOO} if the label is not being skipped, \meta{BAR}
%    otherwise.
%    \begin{macrocode}
\let\ifactuallabel\@firstoftwo
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\newcommand\basemlabel[2]{%
  \begingroup
    \def\startaddrlabel{\par
      \noindent \vrule\@height\topskip \@depth\z@ \@width\z@ \par
      \vskip-\baselineskip \vskip\z@skip
    }%
    \def\stopaddrlabel{\par
      \ifnum\prevdepth>\z@
        \kern -\prevdepth
        \prevdepth\z@
      \fi
    }%
    \labeltab\mlabel{\ignorespaces #1}{\ignorespaces #2}%
  \endgroup
}
\newcommand\mlabel[2]{%
  \fbox{%
    \parbox[c][\addrlabeltrimheight]{\addrlabeltrimwidth}{%
      \raggedright\startaddrlabel #2\stopaddrlabel
    }%
  }%
}
\let\@mlabel=\@gobbletwo
%    \end{macrocode}
%
%    \subsubsection{Lists and other similar environments}
%
%    \begin{macrocode}
\normalfont \normalsize
\setlength\leftmargini  {2em}
\setlength\leftmarginii {2em}
\setlength\leftmarginiii{2em}
\setlength\leftmarginiv {1.75em}
\setlength\leftmarginv  {1.5em}
\setlength\leftmarginvi {1.5em}
\setlength\leftmargin   {\leftmargini}
\setlength  \labelsep  {.5em}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
\setlength\partopsep{\z@skip}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
\def\@listI{\leftmargin\leftmargini
            \parsep \smallskipamount
            \topsep \medskipamount
            \itemsep\smallskipamount}
\let\@listi\@listI
\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \topsep\smallskipamount
              \parsep\z@skip}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}
\renewcommand*\theenumi{\@arabic\c@enumi}
\renewcommand*\theenumii{\@alph\c@enumii}
\renewcommand*\theenumiii{\@roman\c@enumiii}
\renewcommand*\theenumiv{\@Alph\c@enumiv}
\newcommand*\labelenumi{\theenumi.}
\newcommand*\labelenumii{(\theenumii)}
\newcommand*\labelenumiii{\theenumiii.}
\newcommand*\labelenumiv{\theenumiv.}
\renewcommand*\p@enumii{\theenumi}
\renewcommand*\p@enumiii{\theenumi(\theenumii)}
\renewcommand*\p@enumiv{\p@enumiii\theenumiii}
\newcommand*\labelitemi{\textbullet}
\newcommand*\labelitemii{\normalfont\bfseries \textendash}
\newcommand*\labelitemiii{\textasteriskcentered}
\newcommand*\labelitemiv{\textperiodcentered}
\newenvironment*{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
\newenvironment*{verse}
               {\let\\\@centercr
                \list{}{\setlength\itemsep{\z@skip}%
                        \setlength\itemindent{-15\p@}%
                        \setlength\listparindent{\itemindent}%
                        \setlength\rightmargin{\leftmargin}%
                        \addtolength\leftmargin{15\p@}}%
                \item[]}
               {\endlist}
\newenvironment*{quotation}
               {\list{}{\setlength\listparindent{1.5em}%
                        \setlength\itemindent{\listparindent}%
                        \setlength\rightmargin{\leftmargin}}%
                \item[]}
               {\endlist}
\newenvironment*{quote}
               {\list{}{\setlength\rightmargin{\leftmargin}}%
                \item[]}
               {\endlist}
%    \end{macrocode}
%
%    \subsubsection{Miscellanea}
%
%    \begin{macrocode}
\setlength\parindent{2em}
\setlength\parskip{\z@ plus \p@}
\setlength\columnsep{10\p@}
\setlength\columnseprule{\z@}
\setlength\arraycolsep{5\p@}
\setlength\tabcolsep{6\p@}
\setlength\arrayrulewidth{.4\p@}
\setlength\doublerulesep{2\p@}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
\renewcommand*\theequation{\@arabic\c@equation}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
\renewcommand*\footnoterule{%
  \kern-\p@
  \hrule \@width .4\columnwidth
  \kern .6\p@}
\long\def\@makefntext#1{%
    \noindent
    \hangindent 5\p@
    \hb@xt@5\p@{\hss\@makefnmark}#1}
%    \end{macrocode}
%
%    \subsubsection{Names and final setup}
%
%    \begin{macrocode}
\newcommand*\subjectname     {Oggetto:}
\newcommand*\registeredname  {Raccomandata}
\newcommand*\registeredRRname{\registeredname~A.R.}
\newcommand*\andccname       {e~p.~c.}
\newcommand*\ccname          {P.~c.:}
\newcommand*\enclname        {Allegati:}
\newcommand*\PSname          {P.S.:}
\newcommand*\headtoname      {A:}
\newcommand*\lettername      {Lettera}
\newcommand*\today{\number\day~\ifcase\month\or
  gennaio\or febbraio\or marzo\or aprile\or maggio\or giugno\or
  luglio\or agosto\or settembre\or ottobre\or novembre\or dicembre\fi
  \space\number\year}
\let\do\@undefined
\pagestyle{plain}
\pagenumbering{arabic}
\raggedbottom
\onecolumn
%    \end{macrocode}
%
%    End of the module for the \packlass{\letteracdp} class.
%    \begin{macrocode}
%</letter>
%    \end{macrocode}
%    \noindent\null\par
%
% \section{The code for the \packlass{\articoletteracdp} class}
%
%    This part of the file goes into \filedir{\articoletteracdp.cls}.
%    \begin{macrocode}
%<*artico>
%    \end{macrocode}
%
%    \subsection{Identification}
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1996/06/01] % LaTeX2e is required!
\ProvidesClass{articoletteracdp}
              [2015/02/08 v0.36 (development)]
%    \end{macrocode}
%
%    \subsection{Initial code}
%
%    We check that some names are not already taken.
%    \begin{macrocode}
\@ifdefinable\@out@table@list{}
\@ifdefinable\@in@table@list{}
\@ifdefinable\@do@tf{}
\@ifdefinable\@sec@head@size{}
%    \end{macrocode}
%
%    Definition of two switches that support the options about what to
%    include in the table of contents.
%    \begin{macrocode}
\def\do#1{\@ifdefinable#1{\newif#1}}
\do\if@toc@in@toc@
\do\if@loX@in@toc@
%    \end{macrocode}
%
%    \begin{macro}{\@letter@bookmark}
%    Support for pdf\TeX\slash\packlass{\HyperRef}.  If pdf\TeX\ is
%    being used to typeset the document, if the \packlass{\HyperRef}
%    package is loaded, and if the user doesn't ask us to avoid doing so,
%    we shall generate a ``level~0'' bookmark for each letter we shall
%    typeset (sections are of level~1, so they will be bookmarked under
%    letters).  This command serves this purpose: it is defined either
%    as "\@gobbletwo", if such bookmarks are \emph{not} being generated,
%    or as a suitable invocation of "\pdfbookmark" if they are.  To begin
%    with, we set the former alternative, which makes it act as a no-op.
%    \begin{macrocode}
\@ifdefinable\@letter@bookmark{\let\@letter@bookmark\@gobbletwo}
%    \end{macrocode}
%    \end{macro}
%
%    Space above and below captions for figures and tables.
%    \begin{macrocode}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
%    \end{macrocode}
%
%    \subsection{Declaration of options}
%
%    \begin{macrocode}
\DeclareOption{titlepage}{%
  \@latexerr{No title page for letters}\@eha
}
\DeclareOption{notitlepage}{}
\DeclareOption{loXintoc}{%
  \@toc@in@toc@false
  \@loX@in@toc@true
}
\DeclareOption{tocintoc}{%
  \@toc@in@toc@true
  \@loX@in@toc@true
}
\DeclareOption{Hofstadter}{%
  \ExecuteOptions{tocintoc}%
}
\DeclareOption{plaintoc}{%
  \@toc@in@toc@false
  \@loX@in@toc@false
}
%    \end{macrocode}
%    The option \opz{letterbookmarks} causes the bookmarks for letters to
%    be generated.  Upon expansion, the 2~arguments of
%    "\@letter@bookmark" will become arguments of "\pdfbookmark".  We
%    also need to ask the \packlass{\HyperRef} package to generate closed
%    bookmarks.  Note that the user can later overwrite this setting;
%    note also that nothing will happen if \packlass{\HyperRef} is not
%    loaded later.
%    \begin{macrocode}
\DeclareOption{letterbookmarks}{%
  \def\@letter@bookmark{\pdfbookmark[0]}%
  \PassOptionsToPackage{bookmarksopen=false}{hyperref}%
}
%    \end{macrocode}
%    The option \opz{noletterbookmarks} supresses the bookmarks for
%    letters.
%    \begin{macrocode}
\DeclareOption{noletterbookmarks}{%
  \let\@letter@bookmark\@gobbletwo
}
%    \end{macrocode}
%    The option \opz{openletterbookmarks} causes the bookmarks for
%    letters to be generated and to be presented open to the reader.  We
%    ask the \packlass{\HyperRef} package to generate open bookmarks, but
%    only one level deep.  Note that the user can later overwrite this
%    setting.  This is made the default option, below.
%    \begin{macrocode}
\DeclareOption{openletterbookmarks}{%
  \def\@letter@bookmark{\pdfbookmark[0]}%
  \PassOptionsToPackage{bookmarksopen,bookmarksopenlevel=1}{hyperref}%
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letteracdp}}
%    \end{macrocode}
%
%    \subsection{Option processing}
%
%    \begin{macrocode}
\ExecuteOptions{plaintoc,openletterbookmarks}
\ProcessOptions\relax
%    \end{macrocode}
%
%    \subsection{Class loading}
%
%    \begin{macrocode}
\LoadClass{letteracdp}[2015/02/08]
%    \end{macrocode}
%
%    \subsection{Main code}
%
%    Unfortunately, most of the code is not commented (yet).
%
%    \subsubsection{More initializations}
%
%    \begin{macrocode}
\newcounter{section}[letter]
\newcounter{paragraph}[section]
\newcounter{figure}[letter]
\newcounter{table}[letter]
%    \end{macrocode}
%
%    Stuff for dealing with the \packlass{\HyperRef} package.  The
%    problem is our non-standard hierarchy of sectioning commands, with
%    paragraphs placed directly below sections.  In this version (0.34) we
%    choose a different approach than the one we adopted in version 0.33,
%    redefining "\theHparagraph"; of course, this must be done
%    \emph{after} \packlass{\HyperRef} has been loaded, and we could not
%    find any better place for this than the "\AtBeginDocument" hook.
%    Within the same hook, we also redefine "\theHsection" (the counter
%    used by \packlass{\@hyperref} to generate hyperlinks to sections) so
%    that sections with the same number, but included in different
%    letters, will have different anchors; we fix the bookmark level for
%    paragraphs, too.
%    \begin{macrocode}
\AtBeginDocument{%
  \def\theHletter{\arabic{letter}}%
  \@ifpackageloaded{hyperref}{%
    \def\theHparagraph{\theHsection.\arabic{paragraph}}%
    \def\theHsection{\theHletter.\arabic{section}}%
    \def\toclevel@paragraph{2}%
  }{%
%    \end{macrocode}
%    If the \packlass{\@hyperref} package is not loaded, we ensure that
%    "\@letter@bookmarks" acts as a no-op:
%    \begin{macrocode}
    \let\@letter@bookmark\@gobbletwo
  }%
}
%    \end{macrocode}
%
%    \begin{macro}{\hyper@last}
%    The following line is to deactivate the check that
%    \packlass{\HyperRef} makes against old files; this is necessary
%    because otherwise, on the first \LaTeX\ run, it would overwrite our
%    redefinition of "\@starttoc", possibly writing unwanted
%    \filedir{.toc}, \filedir{.lof}, and \filedir{.lot} files, and (much
%    worse) causing trouble if the letter happens to contain more than one
%    "\tableofcontents", "\listoffigures", or "\listoftables".  Of
%    course, this means that the user must be informed that (s)he has to
%    delete the old files by hand.~\mbox{:-(}^^A ) paren match
%    \closeofsentencespace Note, anyway, that the automatic check
%    made by \packlass{\HyperRef} would not work with the \Bundle\ 
%    in any case (because it looks for \filedir{.toc}, \filedir{.lof},
%    etc.\ files, not for, say, \filedir{.toc1}, etc.), so\ldots
%    \begin{macrocode}
\@ifdefinable\hyper@last{\let\hyper@last\relax}
%    \end{macrocode}
%    \end{macro}
%
%    Back to uncommented code.
%
%    \begin{macrocode}
%% Command \title and \author redefined to make changes local.
\def\title#1{\def\@title{#1}}
\def\author#1{\def\@author{#1}}
%    \end{macrocode}
%
%    \subsubsection{Managing the \filedir{.toc}, \filedir{.lof}, and
%      \filedir{.lot} files}
%
%    \begin{macrocode}
%% Inner command \@starttoc redefined to make table of contents, etc.
%% local to letters (this is tricky!).
\def\@starttoc#1{%
  \begingroup
    \vskip\parskip
    \parskip\z@skip
    \makeatletter
    \@input{\jobname.#1\number\c@letter}%
    \if@filesw
      \@ifundefined{tf@@#1}{%
        \expandafter\newwrite\csname tf@@#1\endcsname
      }\relax
      \immediate\write\@out@table@list{\string\@do@tf{#1}}%
    \fi
    \@nobreakfalse
  \endgroup
}
%    \end{macrocode}
%
%    The "\@begin@letter@hook" macro is invoked whenever a letter
%    starts; we want (possibly, see above) a bookmark to be generated for
%    the letter.  Note that we use "\theletter" for the letter number
%    presented to the user, and "\theHletter" for the number used to
%    generate the anchor.
%    \begin{macrocode}
\g@addto@macro\@begin@letter@hook{%
  \edef\@cdp@reserved{%
    \noexpand\@letter@bookmark
      {\lettername\space\theletter}{letter.\theHletter}%
  }%
  \@cdp@reserved
%    \end{macrocode}
%
%    Actions for closing a set of toc/lof/lot file and opening another:
%    \begin{macrocode}
  \if@filesw
    {\escapechar\m@ne
      \immediate\write\@out@table@list{\string\}^^J\string\{}%
    }%
    \immediate\write\@auxout
      {\string\@deferred@clopen{\number\c@letter}}%
  \fi
}
%    \end{macrocode}
%
%    Uncommented code.
%    \begin{macrocode}
\@ifdefinable\@deferred@open  {\let\@deferred@open  \@gobble}
\@ifdefinable\@deferred@close {\let\@deferred@close \@empty}
\@ifdefinable\@deferred@clopen{\let\@deferred@clopen\@gobble}
\newwrite\@out@table@list
\newread\@in@table@list
\AtBeginDocument{%
  \if@filesw
    \immediate\openout\@out@table@list = \jobname.summ\relax
    {\escapechar\m@ne
      \immediate\write\@out@table@list{\string\{}%
    }%
    \immediate\write\@auxout{\string\@deferred@open{0}}%
    \def\@deferred@close{%
      \def\@do@tf##1{%
        \@restore@tf{##1}%
        \immediate\closeout \csname tf@##1\endcsname
        \global\expandafter\let\csname tf@##1\endcsname\@undefined
      }%
      \@temp@table@list
    }%
    \def\@deferred@open#1{%
      \ifeof\@in@table@list\else
        \read\@in@table@list to\@temp@table@list
        \def\@do@tf##1{%
          \@restore@tf{##1}%
          \immediate\openout
            \csname tf@##1\endcsname = \jobname.##1#1\relax
        }%
        \@temp@table@list
      \fi
    }%
    \def\@deferred@clopen#1{%
      \@deferred@close
      \@deferred@open{#1}%
    }%
  \fi
}
\AtEndDocument{%
  \if@filesw
    {\escapechar\m@ne
      \immediate\write\@out@table@list{\string\}}%
    }%
    \immediate\closeout\@out@table@list
    \clearpage
    \immediate\write\@auxout{\string\@deferred@close}%
    \openin\@in@table@list = \jobname.summ\relax
  \fi
}
\@ifdefinable\@restore@tf{\def\@restore@tf#1{%
  \edef\@tempa{%
    \let\csname tf@#1\endcsname\csname tf@@#1\endcsname
  }%
  \global\@tempa
}}
\@ifdefinable\@temp@table@list{\let\@temp@table@list\@empty}
%    \end{macrocode}
%
%    \subsubsection{Adding punctuation to titles}
%
%    \begin{macrocode}
\@ifdefinable\@addfullstop{\long\def\@addfullstop#1{%
  {\nonfrenchspacing\ignorespaces#1\unskip
  \ifnum \spacefactor>\@m \else.\fi \/}%
}}
\newcommand*\nopunct{\spacefactor 1001\relax}
%    \end{macrocode}
%
%    \subsubsection{Floats}
%
%    \begin{macrocode}
\setcounter{topnumber}{\tw@}
\renewcommand\topfraction{.7}
\setcounter{bottomnumber}{\@ne}
\renewcommand\bottomfraction{.3}
\setcounter{totalnumber}{\thr@@}
\renewcommand\textfraction{.2}
\renewcommand\floatpagefraction{.5}
\c@dbltopnumber\c@topnumber
\let\dbltopfraction\topfraction
\let\dblfloatpagefraction\floatpagefraction
\setlength  \floatsep           {\bigskipamount}
\@msetlength\textfloatsep    {2}{\bigskipamount}
\setlength  \intextsep          {\bigskipamount}
\setlength  \dblfloatsep        {\bigskipamount}
\@msetlength\dbltextfloatsep {2}{\bigskipamount}
\setlength  \@fptop             {\z@ plus 1 fil}
\setlength  \@fpsep             {1\bigskipamount plus 2 fil}
\setlength  \@fpbot             {\z@ plus 1 fil}
\setlength  \@dblfptop          {\@fptop}
\setlength  \@dblfpsep          {\@fpsep}
\setlength  \@dblfpbot          {\@fpbot}
\setlength\abovecaptionskip{\medskipamount}
\setlength\belowcaptionskip{\z@skip}
%    \end{macrocode}
%
%    \subsubsection{Title, section heads, figures, bibliography\ldots}
%
%    \begin{macro}{\maketitle}
%    Without the \packlass{\@hyperref} package, the "\maketitle"
%    command can take the same optional argument as "\maketopdate", for
%    specifying a short string to be prepended to the date; and in this
%    case, the new "\place" declaration will be automatically honored.
%    But the former feature will break if \packlass{\@hyperref} is
%    loaded, and no remedy seems feasible for this, since
%    \packlass{\@hyperref} assumes that "\maketitle" hasn't got any
%    arguments.  Note also that a period is automatically added to the
%    title.
%    \begin{macrocode}
\newcommand*\maketitle{%
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\thesenderaddress{\@author}%
    \def\thesubject{\leavevmode\@addfullstop\@title}%
    \let\@empty@sender\@empty
    \let\@thanks\@empty
    \makepresentation
    \@thanks
  \endgroup
  \setcounter{footnote}{\z@}%
  \maketopdate
}
%    \end{macrocode}
%    \end{macro}
%
%    Uncommented code.
%    \begin{macrocode}
\setcounter{secnumdepth}{\tw@}
\def\@seccntformat#1{\csname the#1\endcsname .\enspace}
\ifcase \@ptsize\relax
  \def\@sec@head@size{\@setfontsize\@sec@head@size\@xiipt{15}}
\or
  \def\@sec@head@size{\@setfontsize\@sec@head@size\@xiipt{17.4}}
\or
  \def\@sec@head@size{\@setfontsize\@sec@head@size\@xivpt{18.75}}
\fi
\newcommand*\section{\@startsection {section}{\@ne}%
  {\z@}%
  {-\bigskipamount}%
  {\smallskipamount}%
  {%
    \normalfont
    \noindent\null\@@par\nobreak\vskip-\baselineskip
    \parskip\z@skip
    \@sec@head@size\bfseries
  }%
}
\newcommand*\paragraph{\@startsection{paragraph}{\tw@}%
  {\z@}%
  {-\medskipamount}%
  {-.66667em}%
  {\normalfont\normalsize\itshape\@addfullstop}%
}
\newcommand*\epilogue{%
  \if@noskipsec \leavevmode \fi
  \par
  \if@nobreak
    \everypar{}%
  \else
    \addpenalty\@secpenalty\addvspace\bigskipamount
  \fi
}
\renewcommand*\thesection{\@arabic\c@section}
\renewcommand*\theparagraph{\thesection.\@arabic\c@paragraph}
\renewcommand*\thefigure{\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{\@ne}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
\newenvironment*{figure}
               {\@float{figure}}
               {\end@float}
\newenvironment*{figure*}
               {\@dblfloat{figure}}
               {\end@dblfloat}
\renewcommand*\thetable{\@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{\tw@}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
\newenvironment*{table}
               {\@float{table}}
               {\end@float}
\newenvironment*{table*}
               {\@dblfloat{table}}
               {\end@dblfloat}
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\itshape \@addfullstop{#1: #2}}%
  \ifdim \wd\@tempboxa >\hsize
    \unhbox\@tempboxa\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip
}
\newcommand*\@pnumwidth{1.55em}
\newcommand*\@tocrmarg{2.55em}
\newcommand*\@dotsep{4.5}
\setcounter{tocdepth}{\@ne}
\newcommand*\tableofcontents{%
  \section*{\contentsname \sectionmark\contentsname}
  \if@toc@in@toc@
    \addcontentsline{toc}{section}{\protect\contentsname}%
  \fi
  \@starttoc{toc}%
}
\newcommand*\l@section{\@dottedtocline{\@ne}{\z@}{2em}}
\newcommand*\l@paragraph[2]{%
  \@dottedtocline{\tw@}{2em}{2.5em}{\small #1}{\small #2}%
}
\newcommand*\listoffigures{%
  \section*{\listfigurename \sectionmark\listfigurename}%
  \if@loX@in@toc@
    \addcontentsline{toc}{section}{\protect\listfigurename}%
  \fi
  \@starttoc{lof}%
}
\def\l@figure{\@dottedtocline{\@ne}{\z@}{2em}}
\newcommand*\listoftables{%
  \section*{\listtablename \sectionmark\listtablename}%
  \if@loX@in@toc@
    \addcontentsline{toc}{section}{\protect\listtablename}%
  \fi
  \@starttoc{lot}%
}
\let\l@table\l@figure
\newenvironment*{thebibliography}[1]{%
  \startbreaks
  \section*{\refname \sectionmark\refname}%
  \addcontentsline{toc}{section}{\protect\refname}%
  \vskip\parskip
  \parskip\z@skip
  \parindent\z@
  \list{\@biblabel{\@arabic\c@enumiv}}{%
    \settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}%
  }%
  \sloppy
  \clubpenalty 4000
  \@clubpenalty \clubpenalty
  \widowpenalty 4000
  \sfcode`\.\@m
}{%
  \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
  \endlist
}
\newcommand*\newblock{\hskip .11em\@plus.33em\@minus.07em}
\newcommand*\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace}
%    \end{macrocode}
%
%    \subsubsection{Names}
%
%    \begin{macrocode}
\newcommand*\contentsname  {Sommario}
\newcommand*\listfigurename{Indice delle figure}
\newcommand*\listtablename {Indice delle tabelle}
\newcommand*\refname       {Testi citati}
\newcommand*\indexname     {Indice analitico}
\newcommand*\figurename    {Figura}
\newcommand*\tablename     {Tabella}
%    \end{macrocode}
%
%    End of the module for the \packlass{\articoletteracdp} class.
%    \begin{macrocode}
%</artico>
%    \end{macrocode}
%    \noindent\null\par
%
% \section{The code for the \packlass{\cdpaddon} package}
%
%    This part of the file goes into \filedir{\cdpaddon.sty}.
%    \begin{macrocode}
%<*addon>
%    \end{macrocode}
%
%    \subsection{Identification}
%
%    Why did I ask for the June 1998 release of \LaTeX?  I don't remember!
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1998/06/01] % LaTeX2e is required!
\ProvidesPackage{cdpaddon}
              [2015/02/08 v0.36 (development)]
\@ifdefinable\@cdpaddon{\def\@cdpaddon{cdpaddon}}
%    \end{macrocode}
%
%    \subsection{Initial code}
%
%    Switches; "\if@custom@lh@" added in vers.~0.36 (2015 Feb~08).
%    \begin{macrocode}
\def\do#1{\@ifdefinable#1{\newif#1}}
\do\if@using@cdp@
\do\if@use@color@
\do\if@use@hyper@
\do\if@custom@lh@
%    \end{macrocode}
%
%    \begin{macro}{\@cdpaddon@printer}
%    Below, we shall store in this macro the name (without the extension
%    \filedir{.def}) of the definition file from which to read the
%    definitions of the colors for the C.D.P.  seal.
%    If it is empty, the emergency colors will be used:
%    we make this the default.
%    \begin{macrocode}
\@ifdefinable\@cdpaddon@printer{\let\@cdpaddon@printer\@empty}
%    \end{macrocode}
%    \end{macro}
%
%    ``Scratch'' macros, will be re-used in the sequel.
%    \begin{macrocode}
\@ifdefinable\@temp@cdpaddon@a{}
\@ifdefinable\@temp@cdpaddon@b{}
%    \end{macrocode}
%
%    Here is a first use of those ``scratch'' macros.
%    \begin{macrocode}
\def\@temp@cdpaddon@a{%
  \@using@cdp@false
  \PackageWarningNoLine{\@cdpaddon}{%
    It seems that you are not using the letteracdp\MessageBreak
    document class; therefore no attempt will be made\MessageBreak
    to modify letterheads and similar things%
  }%
}
\def\@temp@cdpaddon@b{letteracdp}
%    \end{macrocode}
%    Double check to be absolutely sure that the \packlass{\letteracdp}
%    class is loaded.
%    \begin{macrocode}
\@ifclassloaded{\@temp@cdpaddon@b}{%
  \ifx\@letteracdp\@temp@cdpaddon@b
    \@using@cdp@true
  \else
    \@temp@cdpaddon@a
  \fi
}{%
  \@temp@cdpaddon@a
}
%    \end{macrocode}
%
%    \subsection{Declaration of options}
%
%    The following macro is needed to strip the prefix \opz{printer:}\
%    from the option that selects which color definition file to load.
%    Again, we use one of the ``scratch'' macro to save memory (the other
%    ``scratch'' macro is used as well inside).
%    \begin{macrocode}
\def\@temp@cdpaddon@a#1printer:#2,#3\@@@{%
  \def\@temp@cdpaddon@b{#1}%
  \ifx\@temp@cdpaddon@b\@empty
    \def\@cdpaddon@printer{#2}%
  \else
    \@unknownoptionerror
  \fi
}
%    \end{macrocode}
%    Vers.~0.36 (2015 Feb~08): modified the existing option so that they also
%    deal with the new "\if@custom@lh@" switch\ldots
%    \begin{macrocode}
\DeclareOption{bw}{\@use@color@false\@custom@lh@false}
\DeclareOption{color}{\@use@color@true\@custom@lh@false}
\DeclareOption{hypertext}{\@use@hyper@true\@custom@lh@false}
\DeclareOption{plaintext}{\@use@hyper@false\@custom@lh@false}
%    \end{macrocode}
%    \ldots~and added new \opz{customletterhead} option.
%    \begin{macrocode}
\DeclareOption{customletterhead}{%
  \@use@color@false
  \@use@hyper@false
  \@custom@lh@true
}
%    \end{macrocode}
%    Otherwise, we can have a \opz{printer:}\ldots\ option requesting a color
%    definition file.
%    \begin{macrocode}
\DeclareOption*{%
  \expandafter\@temp@cdpaddon@a\CurrentOption,printer:,\@@@%
}
%    \end{macrocode}
%
%    \subsection{Option processing}
%
%    \begin{macrocode}
\ExecuteOptions{color,plaintext}
\ProcessOptions\relax
%    \end{macrocode}
%    If the \opz{printer:Default} option has been specified, we want
%    the same behavior as if no \opz{printer:}\ldots\ option had been
%    specified at all.
%    \begin{macrocode}
\def\@temp@cdpaddon@a{Default}
\ifx\@cdpaddon@printer\@temp@cdpaddon@a
  \let\@cdpaddon@printer\@empty
\fi
%    \end{macrocode}
%
%    \subsection{Package loading}
%
%    V.~0.34a: fixed up the use of dvips names
%    (bug reported by Tommaso Gordini).^^A
%    \changes{0.34a}{2010 Jun 01}{Fixed up the use of dvips names in the
%      \protect\packlass{\protect\cdpaddon} package (bug reported by Tommaso
%      Gordini).}
%    V.~0.36: also removed the ridiculous check for the presence of standard
%    packages on the system!
%    \begin{macrocode}
\if@use@color@
  \RequirePackage[dvipsnames]{color}
\fi
\if@use@hyper@
  \RequirePackage{hyperref}
\fi
%    \end{macrocode}
%
%    \subsection{Main code}
%
%    Unfortunately, the code is only sparsely commented (at the moment).
%
%    \subsubsection{Redefinition of the seal, etc.}
%
%    Vers.~0.36 (2015 Feb~08): removed the "\@back@folding@tag" macro,
%    now become unnecessary because of the introduction of the
%    "\foldingtagrule" user command.
%    We leave the code in place, but commented out, for documentation purposes.
%\begin{verbatim}
%\@ifdefinable\@back@folding@tag{\def\@back@folding@tag{%
%  \if@do@fold@
%    \raisebox{\@lh@folding@ht}[\z@][\z@]{%
%      \makebox[\z@][l]{%
%        \color{strong@col}%
%        \dimen@ -\@lh@right@margin
%        \advance\dimen@ 1cm%
%        \kern\dimen@ \vbox{%
%          \kern -.1\p@
%          \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm%
%          \kern -.1\p@
%        }%
%      }%
%    }%
%  \fi
%}}
%\end{verbatim}
%
%    If the \packlass{\letteracdp} class is loaded\ldots
%    \begin{macrocode}
\if@using@cdp@
%    \end{macrocode}
%    \ldots then we can try to replace the macros that draw the seal,
%    etc.; but we want to perform the redefinition (if and) only if the
%    macro is already defined, and rise an error otherwise.  To ease this
%    task, we define the ``scratch'' macro "\@temp@cdpaddon@a" in such a
%    way that "\@temp@cdpaddon@a{"\meta{name}"}{"\meta{code}"}" rises an
%    error if \meta{name} is undefined, and executes \meta{code}
%    otherwise.  It is intended that \meta{code} is the code that does the
%    actual redefinition.  Note that \meta{name} must be indicated
%    \emph{without} the backslash.  Note also that it is not necessary
%    a second parameter for \meta{code}: "{"\meta{code}"}" becomes the
%    third parameter of "\@ifundefined".
%    \begin{macrocode}
  \def\@temp@cdpaddon@a#1{%
    \@ifundefined{#1}{%
      \PackageError\@cdpaddon{%
        Internal command \@backslashchar#1 undefined%
      }{%
        The internal command \@backslashchar#1,
        that should have been defined\MessageBreak
        by the \@letteracdp\space document class,
        is actually undefined.\MessageBreak
        Probably, you are using an old or modified version
        of that class.\MessageBreak
%    \end{macrocode}
%    Vers.~0.36 (2015 Feb~08): modified the following line:
%    \begin{macrocode}
        Proceed, but keep your fingers crossed!%
      }%
    }%
  }
%    \end{macrocode}
%
%    We first take care of color.  Did the user request colors?
%    \begin{macrocode}
  \if@use@color@
%    \end{macrocode}
%    Yes?  Well, in that case, we try to load the file that defines
%    the hues.  First of all, see whether the user selected a color
%    definition file.
%    \begin{macrocode}
    \ifx\@cdpaddon@printer\@empty
%    \end{macrocode}
%    If not (\("\@cdpaddon@printer"="\@empty"\)), then we must read the
%    config.\ file.  Before doing this, we define the "\DeclareCDPSealHuesDefault"
%    command, in a somewhat tricky way: we begin a group, thereby making
%    a local definition, but we put the "\endgroup" in the replacement text
%    of the macro itself.  This is quite OK, because once the macro has
%    been expanded, we no longer need its definition!  We must foresee
%    the case in which the configuration file does not contain any
%    "\DeclareCDPSealHuesDefault" command at all.  For this, we use
%    another hack: we "\let" "\@temp@cdpaddon@b" equal to "\endgroup"
%    \emph{inside} the group, but to "\@empty" outside of it.  Then we call it:
%    if the group has already ended, nothing happens, otherwise the group
%    is ended now.
%    \begin{macrocode}
      \let\@temp@cdpaddon@b\@empty
      \begingroup % \endgroup put in by \@temp@cdpaddon@b
      \let\@temp@cdpaddon@b\endgroup
      \InputIfFileExists{cdpshues.cfg}{%
        \PackageInfo{\@cdpaddon}{%
          Reading config. file%
        }%
%    \end{macrocode}
%    \begin{macro}{\DeclareCDPSealHuesDefault}
%    This command is defined in such a way that it not only ends the group,
%    but also stops reading from the file.
%    \begin{macrocode}
        \def\DeclareCDPSealHuesDefault{%
          \@temp@cdpaddon@b % ends group
          \endinput
%    \end{macrocode}
%    \end{macro}
%    The argument to "\DeclareCDPSealHuesDefault" will become the
%    replacement text of the following "\def".
%    \begin{macrocode}
          \def\@cdpaddon@printer
        }%
      }{%
        \PackageWarningNoLine{\@cdpaddon}{%
          Could not find config. file for default printer%
        }%
      }%
%    \end{macrocode}
%    The following is part of the hack to end the group if it has not
%    already ended.
%    \begin{macrocode}
      \@temp@cdpaddon@b
%    \end{macrocode}
%    We now check if the user specified the \opz{printer:None} option;
%    if so, we take the same action that would result from an empty
%    configuration file.
%    \begin{macrocode}
    \else
      \def\@temp@cdpaddon@b{None}%
      \ifx\@cdpaddon@printer\@temp@cdpaddon@b
        \let\@cdpaddon@printer\@empty
      \fi
%    \end{macrocode}
%    End of things to do when no \opz{printer:}\ldots\ option has been
%    specified.
%    \begin{macrocode}
    \fi
%    \end{macrocode}
%    OK, now we have the name of the color definition file in
%    "\@cdpaddon@printer", and we have to load it.  The following are the
%    actions to take when the file cannot be found or when
%    "\@cdpaddon@printer" is still empty (\emph{e.g.,} because no
%    config.\ file was found, or because it was void): use emergency
%    definitions and issue a warning.  We save them in a ``scratch''
%    macro because we need them twice~(!).
%    \begin{macrocode}
    \def\@temp@cdpaddon@b{%
      \definecolor{slight@col}{named}{SpringGreen}
      \definecolor{strong@col}{named}{OliveGreen}
      \PackageInfo{\@cdpaddon}{%
        Color hues defined internally%
      }%
      \typeout{%
        *Package cdpaddon using built-in colors for the C.D.P. seal.*%
      }%
    }
%    \end{macrocode}
%    We finally try to load the color definition file.
%    \begin{macrocode}
    \ifx\@cdpaddon@printer\@empty
      \@temp@cdpaddon@b
    \else
      \InputIfFileExists{\@cdpaddon@printer.def}{%
        \PackageInfo{\@cdpaddon}{%
          Color hues defined by def. file\MessageBreak
          \@cdpaddon@printer.def%
        }%
      }{%
        \PackageWarningNoLine{\@cdpaddon}{%
          Could not find def. file \@cdpaddon@printer.def%
        }%
        \@temp@cdpaddon@b
      }%
    \fi
%    \end{macrocode}
%
%    We define another handy subroutine.  Given the name \meta{boxname}
%    of an hbox, "\@temp@cdpaddon@b{"\meta{boxname}"}" causes a
%    "\color{strong@col}" declaration to be added at the beginning of
%    "\"\meta{boxname}, properly contained in a group to ensure that the
%    "\special" for restoring the previous colors is included in the box too.
%    We use this method of setting and resetting the color inside the
%    individual boxes because the one used in the previous versions, of
%    setting the color once for all at the beginning of "\@cdp@head", did
%    not seem to work properly with pdf\TeX.
%    \begin{macrocode}
    \def\@temp@cdpaddon@b#1{%
      \@temp@cdpaddon@a{#1}{%
        \setbox\z@\box\@nameuse{#1}%
        \sbox{\@nameuse{#1}}{{\color{strong@col}\unhbox\z@}}%
      }%
    }
%    \end{macrocode}
%
%    Actual redefinition of macros begins here.
%
%    Vers.~0.36 (2015 Feb~08): no need, now, to redefine the "\@folding@tag"
%    macro: just redefine the user-level command "\foldingtagrule"
%    (much neater!).
%    \begin{macrocode}
    \renewcommand*\foldingtagrule{%
      \color{strong@col}%
      \CDPFactoryFoldingTagRule
    }
%    \end{macrocode}
%
%    \begin{macro}{\@logo@box@base}
%    \changes{0.32}{2002 Jul 01}{Eliminated an awful bug introduced with
%      version 0.31 (a conditional that could not appear at this spot).}^^A
%    Color the main part of the seal.
%    \begin{macrocode}
    \@temp@cdpaddon@a{@logo@box@base}{%
      \savebox\@logo@box@base[\z@][r]{\setlength\unitlength{.625mm}%
        \begin{picture}(32,16)(-3,7.87)%
%    \end{macrocode}
%    I don't remember exactly what this group was for.  Eliminate?
%    \begin{macrocode}
          \begingroup
%    \end{macrocode}
%    Draw the inner of the~``D'' and of the~``P'', in the slight color.
%    \begin{macrocode}
            \color{slight@col}%
%    \end{macrocode}
%    Try to draw two filled circles of the right size to fill up the
%    inner of the two letters.  If the target system happens to have 
%    sufficiently large filled circles, this will suffice.
%    \begin{macrocode}
            \put(8,16){\circle*{10}}%
            \put(18,16){\circle*{10}}%
%    \end{macrocode}
%    With the standard set of fonts, however, the above request can not
%    be honored, and the two circles we have just obtained are a little
%    too small; so, we finish them by adding arcs of circumference of
%    increasing size, drawn in thick lines.
%    \begin{macrocode}
            \thicklines
            \put(8,16){\oval(8.2,8.2)[l]}%
            \put(8,16){\oval(8.6,8.6)[l]}%
            \put(8,16){\oval(9,9)[l]}%
            \put(8,16){\oval(9.4,9.4)[l]}%
            \put(8,16){\oval(9.8,9.8)[l]}%
            \put(18,16){\oval(8.2,8.2)[r]}%
            \put(18,16){\oval(8.6,8.6)[r]}%
            \put(18,16){\oval(9,9)[r]}%
            \put(18,16){\oval(9.4,9.4)[r]}%
            \put(18,16){\oval(9.8,9.8)[r]}%
%    \end{macrocode}
%    Now erase the inner half of the two circles.
%    \begin{macrocode}
            \put(13,16){\makebox(0,0){\color{white}%
              \vrule height 6.25mm depth 0mm width 6.25mm
            }}%
%    \end{macrocode}
%    Draw the vertical part of the two letters.
%    \begin{macrocode}
            \put(9,11){\makebox(0,0)[bl]{%
              \vrule height 12.5mm depth 0mm width 1.875mm
            }}%
            \put(14,1){\makebox(0,0)[bl]{%
              \vrule height 12.5mm depth 0mm width 1.875mm
            }}%
          \endgroup
%    \end{macrocode}
%    Now redraw the outer strokes of the~``D'' and of the~``P'' in the
%    strong color.
%    \begin{macrocode}
          \color{strong@col}%
          \put(8,16){\oval(10,10)[l]}%
          \put(8,11){\line(0,1){10}}%
          \put(9,11){\framebox(3,20){}}%
          \put(18,16){\oval(10,10)[r]}%
          \put(18,11){\line(0,1){10}}%
          \put(14,1){\framebox(3,20){}}%
%    \end{macrocode}
%    The strokes of the~``C'' are thick.
%    \begin{macrocode}
          \thicklines
          \put(8,16){\oval(16,16)[l]}%
          \put(8,8){\line(1,0){5}}%
          \put(13,24){\line(1,0){10}}%
          \put(8,16){\oval(14,14)[l]}%
          \put(8,9){\line(1,0){5}}%
          \put(13,23){\line(1,0){10}}%
        \end{picture}%
      }%
    }
%    \end{macrocode}
%    \end{macro}
%    Coloring the other parts of the seal is easier: just add the color
%    declaration to the various boxes, to the rule in the head, and to the
%    whole footer.
%    \begin{macrocode}
    \@temp@cdpaddon@b{@logo@box@addS}
    \@temp@cdpaddon@b{@logo@box@addL}
    \@temp@cdpaddon@b{@oordinamento@box}
    \@temp@cdpaddon@a{@cdp@head}{\def\@cdp@head{%
      \@logo@overlay\@logo@box@addL
      \copy\@oordinamento@box
      {\color{strong@col}\hrulefill}\kern\@lh@right@margin
    }}
    \@temp@cdpaddon@a{@cdp@foot}{\def\@cdp@foot{%
      \color{strong@col}%
      \reset@font
      \setlength\@tempdima{\textwidth}%
      \addtolength\@tempdima{-2\@lh@right@margin}%
      \hss\parbox[t]{\@tempdima}{%
        \parfillskip\z@skip
        \noindent\hrulefill\@@par
        \baselineskip 11\p@
        \hb@xt@\hsize{\hfil\copy\@name@and@WWW@box\hfil}%
      }\hss
    }}
  \fi
%    \end{macrocode}
%
%    Support for user-defined letterheads added in vers.~0.36 (2015 Feb~08).
%    Support for custom logo (cf.~\sty{logo} pagestyle and its relatives)
%    still kept hidden.
%
%    First, define storage boxes to hold custom head, foot, and logo.
%    \begin{macrocode}
  \newsavebox\@cdp@custom@lhead@box
  \newsavebox\@cdp@custom@lfoot@box
  \newsavebox\@cdp@custom@llogo@box
%    \end{macrocode}
%
%    \begin{environment}{customletterhead}
%    \begin{environment}{customletterfoot}
%    \begin{environment}{customletterlogo}
%    These three environments are defined similarly, so we use one of the
%    ``scratch'' macros to perform their definition
%    The parameters are:\strut\\*
%    \strut
%    \begin{tabular}{r@{}l}
%      \param{1} & \( \texttt{head} \mathbin{|} \texttt{foot} \mathbin{|}
%          \texttt{logo} \);\\
%      \param{2} & intended alignment of the \env{minipage}
%          (\( \texttt{b} \mathbin{|} \texttt{t} \));\\
%      \param{3} & either "\vss" or nothing;\\
%      \param{4} & either "\vss" or nothing.\\
%    \end{tabular}\strut
%    \begin{macrocode}
  \def\@temp@cdpaddon@b#1#2#3#4{%
    \newenvironment*{customletter#1}[1]{%
%    \end{macrocode}
%    Save in the appropriate box, pretending that they have zero height and
%    depth\ldots
%    \begin{macrocode}
      \setbox\@nameuse{@cdp@custom@l#1@box}\vbox to\z@ \bgroup
        \hsize ##1\relax
        \parskip \z@skip
        #3% either \vss or nothing
%    \end{macrocode}
%    \ldots~the contents of a temporary \env{minipage}; note that we need to
%    disable the ``"Missing \begin{document}"'' error, which is triggered by
%    "\everypar".
%    \begin{macrocode}
        \everypar{}%
        \noindent\minipage[#2]{##1}%
          \null
    }{%
%    \end{macrocode}
%    Code for ending the \env{minipage}: note that we smash to zero the 
%    possible depth of the contents.
%    \begin{macrocode}
          \par
          \vskip -\baselineskip
          \null
        \endminipage
        #4% either \vss or nothing
      \egroup
%    \end{macrocode}
%    ``Lift'' the definition out of the group implied by the environment.
%    We have used the outer boxes, above, because we prefer not to keep around
%    any ``scratch'' boxes (\emph{e.g.}, "\box1") when we must pass control to
%    the final user.
%    \begin{macrocode}
      \global \setbox \@ne \box \@nameuse{@cdp@custom@l#1@box}%
      \xdef\@cdp@reserved{%
        \setbox \@nameuse{@cdp@custom@l#1@box}\box \@ne
      }%
      \aftergroup \@cdp@reserved
    }%
  }%
%    \end{macrocode}
%    Perform definitions of the three abovementioned environments.
%    \begin{macrocode}
  \@temp@cdpaddon@b{head}{b}{\vss}{}
  \@temp@cdpaddon@b{foot}{t}{}{\vss}
  \@temp@cdpaddon@b{logo}{b}{\vss}{}
%    \end{macrocode}
%    \end{environment}
%    \end{environment}
%    \end{environment}
%
%    \begin{macro}{\ruleacrossheadorfoot}
%    Draw a rule across head or foot.  Synopsis:
%    \begin{flushleft}
%      "\ruleacrossheadorfoot["\meta{wdth\_l}"]["\meta{wdth\_r}"]"
%    \end{flushleft}
%    \meta{wdth\_l} is the inset from the left margin (defaults to zero),
%    a negative inset causes the rule to protrude into the margin itself;
%    \meta{wdth\_r} is the inset from the right margin (defaults to
%    \meta{wdth\_l}).  Both \meta{wdth\_l} and \meta{wdth\_r} must be
%    rigid lengths.  \emph{Note:} "\@tempdima" and "\@tempdimb" are used here.
%    \begin{macrocode}
  \newcommand*\ruleacrossheadorfoot[1][\z@]{\par
    \setlength\@tempdima{#1}%
    \@ifnextchar [% ] bracket matching
      \@cdp@rule@across@x
      {%
        \@tempdimb \@tempdima
        \@cdp@rule@across
      }%
  }
%    \end{macrocode}
%    \end{macro}
%
%    Inner implementation.
%    \begin{macrocode}
  \@ifdefinable\@cdp@rule@across@x{\def\@cdp@rule@across@x[#1]{%
    \setlength\@tempdimb{#1}%
    \@cdp@rule@across
  }}
  \@ifdefinable\@cdp@rule@across{\def\@cdp@rule@across{
    \nobreak
    \vskip -\baselineskip
    \hb@xt@ \hsize {%
      \kern \@tempdima \hrulefill \kern \@tempdimb
    }%
  }}
%    \end{macrocode}
%
%    If the \opz{customletterhead} option is in force, install custom
%    head\slash foot\slash logo.
%    \begin{macrocode}
  \if@custom@lh@
    \@temp@cdpaddon@a{@cdp@head}{\def\@cdp@head{%
      \hss\copy\@cdp@custom@lhead@box\hss
    }}
    \@temp@cdpaddon@a{@cdp@foot}{\def\@cdp@foot{%
      \hss\copy\@cdp@custom@lfoot@box\hss
    }}
%    \end{macrocode}
%    The logo is assumed to protrude to the left of the header line.
%    \begin{macrocode}
    \@temp@cdpaddon@a{@cdp@logo}{\def\@cdp@logo{%
      \hb@xt@ \z@ {\hss\copy\@cdp@custom@llogo@box}%
    }}
%    \end{macrocode}
%    Do not forget to reset "\longindentation"!
%    \begin{macrocode}
    \setlength\longindentation{.5\textwidth}
  \fi
%    \end{macrocode}
%
%    We now deal with hyperlinks.  If the user requested them\ldots
%    \begin{macrocode}
  \if@use@hyper@
%    \end{macrocode}
%    \ldots well, we take care of them.  The precompilation of the footer
%    must be deferred until the "\begin{document}" hook, because the macros
%    of the \packlass{hyperref} package are not available for actual
%    typesetting until that moment.  Note that we just need to encapsulate
%    the web address of the \emph{Coordinamento} into an "\href" command:
%    the color-switching command has already been given above, inside the
%    "\@cdp@foot" box (the color must be changed independently of the use
%    of hyperlinks).
%    \begin{macrocode}
    \AtBeginDocument{%
      \@temp@cdpaddon@a{@name@and@WWW@box}{%
        \setbox\@name@and@WWW@box = \vtop{%
          \baselineskip 11\p@
          \hb@xt@\z@{\hss \@lh@rm\Coordinamento \hss}%
          \hb@xt@\z@{%
            \hss
            \@lh@it World Wide Web:\/
            \href{\CoordinamentoWWW}{\@lh@tt \CoordinamentoWWW}%
            \hss
          }%
        }%
      }%
%    \end{macrocode}
%    Of course, in this case we cannot release the "\@temp@cdpaddon@a"
%    macro until the "\begin{document}" hook, too.
%    \begin{macrocode}
      \let\@temp@cdpaddon@a\@undefined
    }
%    \end{macrocode}
%    The following line has been removed from the code, since the
%    bookmark level for paragraphs is now fixed in the file
%    \filedir{\articoletteracdp.cls} (v.~0.34).
%\begin{verbatim}
%\def\toclevel@paragraph{2}
%\end{verbatim}
%    If hyperlinks are not requested, we can release "\@temp@cdpaddon@a"
%    right now.
%    \begin{macrocode}
  \else
    \let\@temp@cdpaddon@a\@undefined
  \fi
%    \end{macrocode}
%
%    We can do the same thing if the \packlass{\letteracdp} class is
%    not loaded.
%    \begin{macrocode}
\else
  \let\@temp@cdpaddon@a\@undefined
\fi
%    \end{macrocode}
%
%    The memory taken by the following ``scratch'' macros can be freed
%    in any case.
%    \begin{macrocode}
\let\if@using@cdp@\@undefined
\let\@using@cdp@true\@undefined
\let\@using@cdp@false\@undefined
\let\if@use@color@\@undefined
\let\@use@color@true\@undefined
\let\@use@color@false\@undefined
\let\if@use@hyper@\@undefined
\let\@use@hyper@true\@undefined
\let\@use@hyper@false\@undefined
%    \end{macrocode}
%    Vers.~0.36 (2015 Feb~08): added the following three lines\ldots
%    \begin{macrocode}
\let\if@custom@lh@\@undefined
\let\@custom@lh@true\@undefined
\let\@custom@lh@false\@undefined
%    \end{macrocode}
%    \ldots~and removed the following one:
%\begin{verbatim}
%\let\@back@folding@tag\@undefined
%\end{verbatim}
%    \begin{macrocode}
\let\@cdpaddon@printer\@undefined
\let\@temp@cdpaddon@b\@undefined
%    \end{macrocode}
%
%    \subsubsection{Smiling faces}
%
%    \begin{macro}{\facesmile}
%    \begin{macro}{\facefrown}
%    These commands produce happy or sad ``faces''.  They are made
%    ``transparent'' to the "\spacefactor", just like parentheses
%    (the "\spacefactor" is saved in "\count@").
%    \begin{macrocode}
\DeclareRobustCommand*\facesmile{\@face\smile}
\DeclareRobustCommand*\facefrown{\@face\frown}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%
%    \begin{macro}{\@face}
%    The low-level command that draws the face ("\bigcirc"), the eyes,
%    and the mouth: the latter is passed as an argument, so it can be
%    either a "\smile" or a "\frown".
%    \begin{macrocode}
\@ifdefinable\@face{\def\@face#1{%
  \leavevmode
  \count@\spacefactor
  \hb@xt@ 1em{\hfil$%
    \hb@xt@\z@ {\hss$\bigcirc$\hss}%
    \lower .2ex \hb@xt@\z@ {\hss$\scriptscriptstyle #1$\hss}%
    \raise .3ex \hb@xt@\z@ {\hss${\cdot}\mkern 2mu{\cdot}$\hss}%
  $\hfil}%
  \spacefactor\count@
}}
%    \end{macrocode}
%    \end{macro}
%
%    End of the module for the \packlass{\cdpaddon} package.
%    \begin{macrocode}
%</addon>
%    \end{macrocode}
%    \noindent\null\par
%
% \section{The code for the \packlass{\cdpbabel} package}
%
%    This part of the file goes into \filedir{\cdpbabel.sty}.
%    \begin{macrocode}
%<*babel>
%    \end{macrocode}
%
%    \subsection{Identification}
%
%    As usual, the reason for requesting this specific version of \LaTeXe\ is
%    shrouded in mystery\ldots
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1998/09/02] % LaTeX2e is required!
\ProvidesPackage{cdpbabel}
                [2015/02/08 v0.36 (development)]
\@ifdefinable\@cdpbabel{\def\@cdpbabel{cdpbabel}}
%    \end{macrocode}
%
%    \subsection{Initial code}
%
%    Usual check for availability of names.
%    \begin{macrocode}
\def\do#1{\@ifdefinable #1{\let #1\@empty}}
\do\@cdpbabel@perform@redefinitions
\do\@cdpbabel@letter@names
\do\@cdpbabel@artlet@names
%    \end{macrocode}
%
%    \subsection{Declaration of options}
%
%    Options specify which languages should be activated.  A language option is
%    both passed on to the \packlass{\babel} package and used to select and
%    load a ``C.D.P. language definition file''.
%    \begin{macrocode}
\DeclareOption*{%
  \IfFileExists{cdpnames\CurrentOption.ldf}{%
    \input{cdpnames\CurrentOption.ldf}%
%    \end{macrocode}
%    If \( "\CurrentOption" = \mbox{\opz{italian}} \), say,
%    then the following amounts to
%\begin{verbatim}
%\def\do#1{\g@addto@macro\@cdpbabel@perform@redefinitions{%
%    \addto\captionsitalian{#1}%
%}}
%\end{verbatim}
%    which is used just below with parameter~\#1 set equal to
%    \emph{the expansion of} either "\@cdpbabel@letter@names" or
%    "\@cdpbabel@artlet@names".
%    \begin{macrocode}
    \edef\do##1{%
      \noexpand\g@addto@macro
        \noexpand\@cdpbabel@perform@redefinitions
        {%
          \noexpand\addto \csname captions\CurrentOption \endcsname
            {##1}%
        }%
    }%
    \@ifclassloaded{letteracdp}{%
      \expandafter\do \expandafter{\@cdpbabel@letter@names}%
    }{}%
    \@ifclassloaded{articoletteracdp}{%
      \expandafter\do \expandafter{\@cdpbabel@artlet@names}%
    }{}%
    \PackageInfo{\@cdpbabel}{%
      Redefined the names of "C.D.P. Bundle" captions\MessageBreak
      for the language `\CurrentOption'%
    }%
  }{%
    \PackageError{\@cdpbabel}{%
      Name def. file `cdpnames\CurrentOption.ldf' not found%
    }{%
      Files of the form `cdpnames<language>.ldf' are meant
      to define the names\MessageBreak
      in the language <language> of some captions used by
      the "C.D.P. Bundle".\MessageBreak
      You requested\MessageBreak
      \space\space<language> = `\CurrentOption',\MessageBreak
      but the corresponding file is missing; therefore,
      probably some of these\MessageBreak
      captions will not be printed as intended.\MessageBreak
      This error affects only the \@cdpbabel\space package,
      but not the babel package.\MessageBreak
      You may continue:
      type \space <return> \space to proceed.%
    }%
  }%
  \PassOptionsToPackage{\CurrentOption}{babel}%
}
%    \end{macrocode}
%
%    \subsection{Option processing}
%
%    \mbox{$*$-form} of "\ProcessOptions" required here.
%    \begin{macrocode}
\ProcessOptions*
%    \end{macrocode}
%    Now, the following are no longer needed.
%    \begin{macrocode}
\let \do = \@undefined
\let \@cdpbabel@letter@names = \@undefined
\let \@cdpbabel@artlet@names = \@undefined
%    \end{macrocode}
%
%    \subsection{Package loading}
%
%    Note that the \packlass{\cdpbabel} package is loaded \emph{instead} of
%    \packlass{\babel}.
%    \begin{macrocode}
\RequirePackage{babel}
%    \end{macrocode}
%
%    \subsection{Main code}
%
%    At this point, "\@cdpbabel@perform@redefinitions" contains exactly the 
%    set of "\addto\captions"\meta{language}"{"\ldots"}" commands that need
%    to be executed for the languages that have been specified in the options.
%    So, execute them.
%    \begin{macrocode}
\@cdpbabel@perform@redefinitions
%    \end{macrocode}
%    After that, "\@cdpbabel@perform@redefinitions" is no longer needed.
%    \begin{macrocode}
\let \@cdpbabel@perform@redefinitions = \@undefined
%    \end{macrocode}
%
%    End of the module for the \packlass{\cdpbabel} package.
%    \begin{macrocode}
%</babel>
%    \end{macrocode}
%    \noindent\null\par
%
% \section{Definition and configuration files}
%
%    This section contains the ancillary files (definition and
%    configuration files) used by the \packlass{\cdpaddon} and
%    the \packlass{\cdpbabel} packages.
%
%    \subsection{The \filedir{\example} file}
%
%    This part of the file goes into the prototype definition file
%    \filedir{\example}.  All comments are left in the code because this
%    file is intended as an example of how to write color definition files
%    for the \packlass{\cdpaddon} package.
%    \begin{macrocode}
%<*example>
%%%
%%% The "\ProvidesFile" command allows LaTeX to check the name and
%%% the release date of the file; if either differs from what the
%%% user requested, a warning is issued when the file is loaded.
%%% This helps to pinpoint old files as well as files which have been
%%% installed incorrectly.  It is not mandatory to include this
%%% command in a file, and you can omit it from your definition files
%%% if you want (but including it is more elegant); however, if you do
%%% leave this command in your definition files, you should modify
%%% both its mandatory and its optional argument so that they reflect
%%% the name and the release date, respectively, of your file.
%%% Note that the extension ".def" must be included in the file name,
%%% and that the date is in the format YYYY/MM/DD.
\ProvidesFile{cdpshues-example.def}[2015/02/08 Printer-dependent file]
%%%
%%% Define here the colors to use to draw the C.D.P. seal;
%%% "slight@col" is the color used to paint the inner of the D and
%%% of the P, "strong@col" is the color used to draw the lines.
%%% The colors are defined by means of the usual "\definecolor"
%%% command, which is part of the standard color package.  The colors
%%% defined here, of course, are just a silly example.
\definecolor{slight@col}{named}{SpringGreen}
\definecolor{strong@col}{named}{OliveGreen}
%</example>
%    \end{macrocode}
%
%    \subsection{The \filedir{\epson} file}
%
%    This part of the file goes into the definition file
%    \filedir{\epson}.
%    \begin{macrocode}
%<*epson>
\ProvidesFile{epson-stylus-740.def}[2015/02/08 Printer-dependent file]
\definecolor{slight@col}{rgb}{.8,1,.8}
\definecolor{strong@col}{rgb}{0,.266667,0}
%</epson>
%    \end{macrocode}
%
%    \subsection{The \filedir{\hplj} file}
%
%    This part of the file goes into the definition file \filedir{\hplj}.
%    \begin{macrocode}
%<*hplj>
\ProvidesFile{hp-laserjet-4500.def}[2015/02/08 Printer-dependent file]
\definecolor{slight@col}{cmyk}{.1,0,.1,0}
\definecolor{strong@col}{cmyk}{.5,0,.5,.5}
%</hplj>
%    \end{macrocode}
%
%    \subsection{The \filedir{\cdpshues} file}
%
%    This part of the file goes into the configuration file
%    \filedir{\cdpshues}.  Again, we leave all comments in the generated
%    file because they are meant to help the final user to modify the file.
%    \begin{macrocode}
%<*config>
%%%
%%% The argument of the "\DeclareCDPSealHuesDefault" command contains
%%% the name (w/o extension) of the default color definition file:
\DeclareCDPSealHuesDefault{cdpshues}

====================
EXPLANATORY COMMENTS
====================

This file is special in that the cdpaddon package stops reading it as
soon as it encounters the first "\DeclareCDPSealHuesDefault" command:
all subsequent lines are ignored, and can hence contain explanatory
comments, just like these.  To save disk space (although, in this era
of terabytes, this is not a compelling issue!), you can, if you want,
delete all lines in this file except the one which contains the first
occurrence of a "\DeclareCDPSealHuesDefault" command (12 lines above);
but if you do so, please be sure to read them before deleting them!
(Anyway, I think it is a good idea to leave the comments in place.)

The "\DeclareCDPSealHuesDefault" command has one argument, in which
you should put the name of a default file from which the definitions
of the hues for the C.D.P. seal are read when no other file has been
indicated in the options passed to the cdpaddon package.  Note that
the extension ".def" is automatically added to the name; therefore,
you **must** leave it out in the name given as the argument of the
"\DeclareCDPSealHuesDefault" command.

The C.D.P. Bundle comes with some definition files already included;
their names are listed below, without the extension ".def" (each one
is packaged in a "\DeclareCDPSealHuesDefault" command):

\DeclareCDPSealHuesDefault{cdpshues-example}
\DeclareCDPSealHuesDefault{epson-stylus-740}
\DeclareCDPSealHuesDefault{hp-laserjet-4500}

To make one of these files the default one, copy (or move) the line
containing its name to the top of the file, so that its becomes the
first line (yes, even above the opening comments, those four dozens
lines starting with "%%": let us keep things easy!).

If you write a new definition file, you can make it the default by
writing a similar "\DeclareCDPSealHuesDefault" command and putting it
in the first line of this file (above the opening comments, why not).
Remember that only the first such command appearing in this file is
taken into consideration: all subsequent lines are ignored.

%</config>
%    \end{macrocode}
%
%    \subsection{The \filedir{\cdpnamesenglish} file}
%
%    This part of the file goes into the language definition file
%    \filedir{\cdpnamesenglish}.
%    \begin{macrocode}
%<*lang-en>
\ProvidesFile{cdpnamesenglish.ldf}[2015/02/08]
\def\@cdpbabel@letter@names{%
  \def\subjectname      {Subject:}%
  \def\registeredname   {Registered}%
  \def\registeredRRname {\registeredname~R.R.}%
  \def\andccname        {cc}%
  \def\ccname           {cc:}%
  \def\enclname         {Encl:}%
  \def\PSname           {P.S.:}%
  \def\headtoname       {To:}%
  \def\lettername       {Letter}%
}
\def\@cdpbabel@artlet@names{%
  \def\contentsname     {Contents}%
  \def\listfigurename   {List of figures}%
  \def\listtablename    {List of tables}%
%%  \def\refname          {References}%
%%  \def\indexname        {Index}%
%%  \def\figurename       {Figure}%
%%  \def\tablename        {Table}%
}
%</lang-en>
%    \end{macrocode}
%
%    \subsection{The \filedir{\cdpnamesitalian} file}
%
%    This part of the file goes into the language definition file
%    \filedir{\cdpnamesitalian}.
%    \begin{macrocode}
%<*lang-it>
\ProvidesFile{cdpnamesitalian.ldf}[2015/02/08]
\def\@cdpbabel@letter@names{%
  \def\subjectname      {Oggetto:}%
  \def\registeredname   {Raccomandata}%
  \def\registeredRRname {\registeredname~A.R.}%
  \def\andccname        {e~p.~c.}%
  \def\ccname           {P.~c.:}%
  \def\enclname         {Allegati:}%
  \def\PSname           {P.S.:}%
  \def\headtoname       {A:}%
  \def\lettername       {Lettera}%
}
\def\@cdpbabel@artlet@names{%
  \def\contentsname     {Sommario}%
  \def\listfigurename   {Indice delle figure}%
  \def\listtablename    {Indice delle tabelle}%
  \def\refname          {Testi citati}%
%%  \def\indexname        {Indice analitico}%
%%  \def\figurename       {Figura}%
%%  \def\tablename        {Tabella}%
}
%</lang-it>
%    \end{macrocode}
%
% \section{End of input}
%
%    The usual "\endinput" which prevents the \DS\ program from putting
%    garbage into the generated files.
%    \begin{macrocode}
\endinput
%    \end{macrocode}
%
% \Finale
%