summaryrefslogtreecommitdiff
path: root/usergrps/uktug/baskervi/4_2/goossens.tex
blob: 0e470f77ca5409c44a9d9dce621a3362aaea4cb6 (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
% Prevent infinite loops
\def\LaTeXo{\LaTeX~2.09}
\let\Otemize =\itemize  
\let\Onumerate =\enumerate
\let\Oescription =\description
% Zero the vertical spacing parameters
\def\Nospacing{\itemsep=0pt\topsep=0pt\partopsep=0pt\parskip=0pt\parsep=0pt}
% Redefine the environments in terms of the original values
\newenvironment{Itemize}{\Otemize\Nospacing}{\endlist}
\newenvironment{Enumerate}{\Onumerate\Nospacing}{\endlist}
\newenvironment{Description}{\Oescription\Nospacing}{\endlist}

\makeatletter
\input b-conv.sty
\let\origverbatim\verbatim
\def\verbatim{\par\@verbatim\small
  \frenchspacing\@vobeyspaces\verbatim@start}
\makeatother

\def\AmS{{\protect\the\textfont2 A}\kern-.1667em\lower
         .5ex\hbox{\protect\the\textfont2 M}\kern
         -.125em{\protect\the\textfont2 S}}
\renewcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}

\renewcommand{\meta}[1]{$\langle$\itshape #1\/$\rangle$}
\renewcommand{\labelitemi}{{\bfseries --}}

\title{\LaTeXe{}, an overview}

\author[Michel Goossens]{Michel Goossens\\CN Division, CERN, CH1211
  Gen\\lq\nobreak{}eve 23, Switzerland\\ \texttt{goossens@cern.ch}}

\begin{Article} 

\begin{abstract}
This article gives an overview of the new or extended
user commands available with \LaTeXe, the new \LaTeX{} release,
compared to the previous version \LaTeXo.
After introducing the new preamble commands, 
the extensions for defining new commands and environments,
and handling length and boxes are discussed.
The new font selection commands are explained,
both for text and math, and it is shown how to
easily use different font families.
A list of supported class and package files is given
and new possibilities  for controlling page contents and floats
are discussed.
Most of this material is described in much greater detail
in \lq\lq\nobreak{}The \LaTeX{} Companion\rq\rq\nobreak{}~\cite{bib-Companion} and in the
second edition of the \LaTeX{} Reference Manual~\cite{bib-Lamport}.
\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Why \LaTeXe?}

\LaTeX{} became generally available in 1986; its
popularity has increased ever since, and many 
extensions have been developed.
Unluckily, these extensions were included in incompatible
formats, \eg \lq\lq\nobreak{}standard\rq\rq\nobreak{} \LaTeX{} with and without \NFSS{}, 
\SliTeX, \AmSLaTeX, and so on.
From the \LaTeX{} source alone, it was difficult to determine
for which of these (or other) formats a document was composed
and, because different sites could have different configuration,
document portability was a problem.

Already in 1989 at the Stanford TUG Conference Frank Mittelbach
and Rainer Sch\"opf got together with Leslie Lamport to discuss these
(and other) topics and they published their ideas 
about possible ways to evolve \LaTeX{} in  
TUGBoat~\cite{Mittelbach:TB10-3-400-401,Mittelbach:TB11-3-337-345}.
This lead a few years later to the start of
the long-term \LaTeX3 project
\cite{Mittelbach:TB13-1-96-101,Rowley:TB13-3-390-391,%
      Mittelbach:TB13-4-510-515,Mittelbach:TTN3-1-7-11}.

However, to help end the confusion for the present 
\LaTeX{} users, after a meeting in Spring 1993 between Leslie Lamport
and Frank Mittelbach in Mainz, it was decided to release an upgraded
version of \LaTeX, called \LaTeXe{}, which was officially announced 
in August 1993 at the TUG Conference at Aston.

Its stated aims are:

\begin{Itemize}
\item bring all extensions back under a single format;
\item prevent proliferation of mutually incompatible 
      dialects of \LaTeXo{};
\item \NFSS{} becomes the \lq\lq\nobreak{}standard\rq\rq\nobreak{} font selection scheme;
\item make style files like \textsf{amstex}
      (formerly \AmSLaTeX{} format) or 
      \textsf{slides} (formerly \SliTeX{} format) 
      into extension packages, all using the same base format;
\item add a small number of often-requested features;
\item retain the \lq\lq\nobreak{}touch and feel\rq\rq\nobreak{}, or the \lq\lq\nobreak{}flavour\rq\rq\nobreak{} of \LaTeXo{}.
\end{Itemize}

The first beta version of \LaTeXe{} was released at the end of 1993,
while the first production release is foreseen for \lq\lq\nobreak{}Spring 1994\rq\rq\nobreak{}.
After that, twice a year (in \lq\lq\nobreak{}Spring\rq\rq\nobreak{} and \lq\lq\nobreak{}Autumn\rq\rq\nobreak{}) consolidation 
releases are planned, in order to keep all versions of the files in
synchronization. Bug reports are handled centrally by inviting the
users to fill out an electronic form, distributed with the \LaTeXe{}
distribution, and sending it via electronic mail to
\Lit{latex-bugs@rus.uni-stuttgart.de}.
Note that only bug reports referring to the last 
two releases will be considered.
You can also subscribe to the \LaTeXe{} discussion list
on \Lit{LATEX-2E@DHDURZ1.BITNET} and post questions (and answers)
to that list.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Initial and preamble commands}

In this section commands which can only be used before
or in the preamble will be discussed.
The first two below can only appear \emph{before}
the  \Lcs{documentclass} command.

\subsection*{Initial commands}

\BDefCmo{NeedsTeXFormat}{format-name}{release-date}

This command, which is normally present in package and class files,
can also be useful in user documents to make sure that the file 
is run with \LaTeXe.
Users who try and run it with \LaTeXo{} or plain \TeX{} will get 
a reasonably clear error message.
An example is

\begin{verbatim}
\NeedsTeXFormat{LaTeX2e}[1994/02/01]
\end{verbatim}

If you want to make sure that your document can be processed at
another site, it could make sense that you include all packages 
and files that your document needs together with the main file.
\LaTeXe{} provides the following syntax to facilitate this

\begin{BDef}
\DefEm{filecontents}{file-name} \\
\qquad  \meta{file-contents} \\
\LEND{filecontents}
\end{BDef}

When your document file is run through \LaTeXe{} the body of each
\Lenv{filecontents} environment is written verbatim to a file
whose name is given as the argument \Larg{file-name}.
If a file with such a name already exists
in any of the directories \lq\lq\nobreak{}visible\rq\rq\nobreak{} to \TeX{} only an
informative message is given, the body of the environment is
by-passed, and the file is not replaced.

\subsection*{Preamble commands}

The next commands in the preamble are specifically designed to differentiate
\LaTeXe{} documents from those needing \LaTeXo{}.

\BDefComo{documentclass}{option-list}{class-name}{release-date}

This command or \lq\lq\nobreak{}declaration\rq\rq\nobreak{} replaces the
\LaTeXo{} command \Lcs{documentstyle}.

There must be exactly one \Lcs{documentclass} declaration in a document,
and it must come first (except for the \lq\lq\nobreak{}initial\rq\rq\nobreak{} commands described
above).


\noindent
\Larg{option-list}: list of options that each can
modify the formatting of
document elements defined in the \Larg{class-name} file
or in packages loaded with \Lcs{usepackage} declarations,
as described below.

\noindent
\Larg{class-name}: name of the class file (file extension \Lfn{cls}).

\noindent
\Larg{release-date} (optional) specifies release date of the
class file, using the format \Lit{YYYY/MM/DD}.
If a version of the class older than this date is found, 
a warning is issued.

\BDefComo{documentstyle}{option-list}{style-name}{release-date}

This command, which is supported for compatibility reasons, is
similar to \Lcs{documentclass}, but it loads a
\lq\lq\nobreak{}compatibility mode\rq\rq\nobreak{} which redefines certain commands to
act as they did in \LaTeXo{} and thus allows you to run your old files
unchanged through \LaTeXe.  Note, however, that in this mode, you
\emph{cannot} use any of the
\LaTeXe{} extensions described in this article.

You can define new or change existing  document elements
by loading package files with \Lcs{usepackage}, whose syntax is:

\BDefComo{usepackage}{option-list}{package-name}{release-date}

\noindent
\Larg{package-name}: name of the package (file extension \Lfn{sty});
a package can
\begin{Itemize}
  \item define new document elements;
  \item modify elements defined in the class file;
  \item extend the range of documents that can be processed.
\end{Itemize}

\noindent
\Larg{option-list}: list of options, each of which can modify 
the formatting of elements defined in the package.

\noindent
\Larg{release-date}: (optional) earliest desired release date 
of package file (see \Lcs{documentclass} command above).

Any number of\ \Lcs{usepackage} are allowed, but \LaTeXe{} makes sure
that each package is only loaded once.  
On top of processing the list of options specified in the
argument \Larg{option-list} on its \Lcs{usepackage} command,
each package also processes the option \Larg{option-list} on 
the \Lcs{documentclass} command.

\BDefC{listfiles}

To help you get an overview of the files 
read in by your document during processing, you can place a
\Lcs{listfiles} command in the preamble of your document.
This will display the list of all files used at the end of the run.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Example of document preambles}

The following preamble references the \Lclass{article} class
with the (global) options \Loption{twocolumn}
and \Loption{a4paper}, and loads the \Lpack{multicol} and \Lpack{babel}
packages,
the latter with the \Loption{german} and \Loption{french} options.
Other document parameters (\eg the \Lit{textheight}) can also be
specified.

\begin{verbatim}
  \documentclass[twocolumn,a4paper]{article}
  \usepackage{multicol}
  \usepackage[german,french]{babel}
  \addtolength{\textheight}{2cm}
  \begin{document}
      ...
  \end{document}
\end{verbatim}

The following shows three equivalent ways of specifying 
the loading of packages.

\begin{verbatim}
  \documentclass[german]{book}
  \usepackage[german]{babel}
  \usepackage[german]{varioref}
  \usepackage{multicol}
  \usepackage{epic}
\end{verbatim}

Somewhat less verbose is:

\begin{verbatim}
  \documentclass[german]{book}
  \usepackage[german]{babel,varioref}
  \usepackage{multicol,epic}
\end{verbatim}

With \Loption{german} as global option you can write:

\begin{verbatim}
  \documentclass[a4paper,german]{book}
  \usepackage{babel,varioref,multicol,epic}
\end{verbatim}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A complex document might look something like the following:

\begin{verbatim}
\NeedsTeXFormat{LaTeX2e}[1994/05/01]
\begin{filecontents}{varioref.sty} 
   ....           % Code for varioref package
\end{filecontents}
\listfiles        % print list of files referenced
\documentclass[a4paper,german]{book} % book class
\usepackage{varioref}
\begin{document}
%--------------------- front matter of document
\maketitle
\section*{...}    % e.g. section named "Preface"
\tableofcontents  % chapter with table of contents
\listoffigures    % chapter with list of figures
\listoftables     % chapter with list of tables
%--------------------- body of the document
\part{...}
\chapter{...}
   \section{...}
\chapter{...}
\part{...}
%--------------------- back matter of document
\appendix         
\chapter{...}     % chapters labelled appendix
\chapter{...}
\begin{thebibliography}  
  ...             % bibliography entries
\end{thebibliography}
\begin{theindex}         
  ...             % index entries
\end{theindex}
\end{document}
\end{verbatim}

Note that, to ensure that the recipient of the document can process
the file correctly, the code of the \Lpack{varioref}
package is shipped with the file inside a \Lenv{filecontents}
environment.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Option processing}

Options that are specified in the \Larg{option-list} argument
of the \Lcs{documentclass} or \Lcs{usepackage} commands are
handled as follows:

\begin{Enumerate}
\item They are first divided into two types, \emph{local} and \emph{global}:
  \begin{Itemize}
    \item for a \emph{class}, the options from its \Lcs{documentclass} command are
      local and there are no global options;
    \item for a \emph{package}, the options from its \Lcs{usepackage} command are
      local but the options from the \Lcs{documentclass} command are global.
  \end{Itemize}
\item The local and global options that have been declared within the current
   class or package are processed first, normally
   in their order of declarations, thus 
   their order in \Larg{option-list} is irrelevant.
\item Any local options not declared in the current class or
   package are then processed.  For document classes, this usually
   means that they are ignored, except for this fact being recorded by
   adding the option to a list of \lq\lq\nobreak{}unused options\rq\rq\nobreak{}; they may, of
   course, be used later since they become global options for every
   package subsequently loaded. For packages, usually
   an error message is produced, giving the choice of retyping the
   option name in case it is incorrect.
\end{Enumerate}

Finally, when the \LBEG{document} command is reached \LaTeXe{} 
will produce a list of all global 
options not used by  the class or any package file, and issue 
a warning message for each.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Defining new commands and environments}

This section and the following describe commands and environments
that are used inside the document body 
(\ie after the \LBEG{document}) command.
Let us first look at what is available for defining new 
commands and environments.

\subsection*{Defining commands}

Commands are defined or redefined in \LaTeX{} with:

\begin{BDef}
\Lcs{newcommand}\Largb{\bs{}mycom}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{newcommand}}\Largb{command definition}\\[1mm]
\Lcs{renewcommand}\Largb{\bs{}mycom}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{renewcommand}}\Largb{command definition}\\[1mm]
\Lcs{providecommand}\Largb{\bs{}mycom}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{providecommand}}\Largb{command definition}
\end{BDef} 

The first and second commands show enhancements with respect to 
\LaTeXo{} by providing
the possibility to have an \emph{optional} argument 
when (re)defining a user command.
If there is a second optional parameter to \Lcs{newcommand}, etc.,
then the command being defined has an optional parameter,
with \Larg{default} value if not specified
The last form is useful for general purpose files that are included in a
document and over which the user does not always have control
(\eg \BibTeX{} databases).
If \Lcs{mycom} is not yet defined, the \Lcs{providecommand} will act
as \Lcs{newcommand} and define it, otherwise the existing definition
is kept.

The number of arguments, which \emph{includes} the optional argument, 
is in the range \Lit{0\(\le\)\Larg{narg}\(\le\)9}.
If the command has no arguments, then
the \Lit{[0]} can be omitted.
Inside the \textit{command definition} part, the
arguments are referenced as \Lit{#1} to \Lit{#\Larg{narg}},
the optional argument, if present, being the first one.
 
For example, compare the following commands, with no, 
one mandatory, one optional, and one optional and one mandatory argument,
allowing the user more freedom in each case.
\begin{verbatim}
\newcommand{\seq}{x_{0},\ldots\,x_{n}}
\newcommand{\seqm}[1]{#1_{0},\ldots\,#1_{n}}
\newcommand{\seqo}[1][k]{x_{0},\ldots\,x_{#1}}
\newcommand{\seqom}[2][k]{#2_{0},\ldots\,#2_{#1}}
$$\seq\quad\seqm{z}$$
$$\seqo\quad\seqo[l]$$
$$\seqom{y}\quad\seqom[i]{q}$$
\end{verbatim}
This gives:
\newcommand{\seq}{x_{0},\ldots\,x_{n}}
\newcommand{\seqm}[1]{#1_{0},\ldots\,#1_{n}}
\newcommand{\seqo}[1][k]{x_{0},\ldots\,x_{#1}}
\newcommand{\seqom}[2][k]{#2_{0},\ldots\,#2_{#1}}
$$\seq\quad\seqm{z}$$
$$\seqo\quad\seqo[l]$$
$$\seqom{y}\quad\seqom[i]{q}$$
 
If a command should work both in math and in
text mode, special care should be taken in its definition.
In \LaTeXe{} you have the following command:

\BDefCm{ensuremath}{math code}

As its name implies \Lmcs{ensuremath} ensures that its argument is
always typeset in math mode by surrounding it if necessary with
\Lit{$} signs. 
For instance, the above can be rewritten as:
\begin{verbatim}
\renewcommand{\seq}{\ensuremath{x_{0},\ldots\,x_{n}}}
\renewcommand{\seqm}[1]{%
                  \ensuremath{#1_{0},\ldots\,#1_{n}}}
\seq,\quad\seqm{z} or $\seq,\quad\seqm{z}$
\end{verbatim}
\renewcommand{\seq}{\ensuremath{x_{0},\ldots\,x_{n}}}
\renewcommand{\seqm}[1]{\ensuremath{#1_{0},\ldots\,#1_{n}}}
\seq,\quad\seqm{z} or $\seq,\quad\seqm{z}$

\subsection*{Defining New Environments}

In \LaTeXo{}, environments are defined or redefined with the commands:

\begin{BDef}
\DefCmomm{newenvironment}{name}{narg}{begdef}{enddef}   \\
\DefCmomm{renewenvironment}{name}{narg}{begdef}{enddef} 
\end{BDef}

The number of arguments is in the range
\Lit{0\(\le\)\Larg{narg}\(\le\)9}; and, in
the case of no parameters, you can omit \Lit{[0]}.
Inside the definition part, \Larg{begdef}, these
parameters are referenced as \Lit{#1} to \Lit{#\Larg{narg}}.
If arguments are present, then
they are defined when \emph{entering} the environment
by specifying them on the command \verb=\begin{myenv}= as
shown below.
 
\begin{BDef}
\LBEG{myenv}\lcb\Larg{arg\(_1\)}\rcb\Lit{...}\lcb\Larg{arg\(_{\mathrm{k}}\)}\rcb
\end{BDef}
 
When \emph{exiting} an environment with the command \verb=\end{myenv}=
no parameters can be specified.
Moreover, the parameters specified with the
\verb=\begin{myenv}= command when entering the environment (see above)
are no longer available in the definition part
\Larg{enddef} where you define the actions which should
take place when leaving the \Larg{myenv} environment.

As with commands, in \LaTeXe{} you can now also define environments
with an optional (first) argument.

\begin{BDef}
\Lcs{newenvironment}\Largb{myenv}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{newenvironment}}\Largb{begdef}\Largb{enddef}
\end{BDef}

The default for the optional argument is given between the second
pair of square brackets \Largs{default}.
Inside the \Larg{begdef} part, which is executed when
the environment \Larg{myenv} is entered, the optional argument
can be accessed with \Lit{#1},
while the mandatory arguments (when present) are addressed
as \Lit{#2} to \Lit{#\Larg{narg}}.
When the \Larg{myenv} environment is used without an
optional parameter, \Lit{#1} will contain the string specified
as \Largs{default}.
      
As an example, a variant,
\Lmenv{deflist}, of a \Lenv{description} environment
will be constructed.
The \Lmenv{deflist} environment behaves somewhat like a 
standard \LaTeX{} \Lenv{description} environment
if it is used without an optional argument.
If an optional argument is specified, then the width of the 
description label will be put equal to the width of the argument.
Thus, by specifying the widest entry in the list as
an optional argument, you ensure
that the description parts of all entries line up nicely.
     
The result below first shows the (default) behaviour of the 
\Lenv{deflist}
list and then what it looks like when using the optional argument.

\begin{verbatim}
\newenvironment{deflist}[1][\quad]%
 {\begin{list}{}{
  \renewcommand{\makelabel}[1]{\textbf{##1}\hfil}%
  \settowidth{\labelwidth}{\textbf{#1}}% 
  \setlength{\leftmargin}{\labelwidth+\labelsep}}}
 {\end{list}}
\begin{deflist}
\item[First] This is a short term.
\item[Long term] This is a long term.
\item[Even longer term] A very long term.
\end{deflist}
\begin{deflist}[Even longer term]
    .....  
\end{deflist}
\end{verbatim}

\newenvironment{deflist}[1][\quad]%
  {\begin{list}{}{%
   \renewcommand{\makelabel}[1]{\emph{##1}\hfil}%
   \settowidth{\labelwidth}{\emph{#1}}% 
   \setlength{\leftmargin}{\labelwidth+\labelsep}}}
  {\end{list}}
\begin{deflist}
\item[First] This is a short term.
\item[Long term] This is a long term.
\item[Even longer term] A very long term.
\end{deflist}
\begin{deflist}[Even longer term]
\item[First] This is a short term.
\item[Long term] This is a long term.
\item[Even longer term] A very long term.
\end{deflist}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
\section{Playing with lengths}

 
Lengths can be defined, set and changed by the following commands.

\begin{BDef}
\DefCm{newlength}{cmd} & \qquad \DefCmm{setlength}{cmd}{len}\\
\DefCmm{addtolength}{cmd}{len}\\
\DefCmm{settowidth}{cmd}{text} & \qquad\Lcs{width}\\
\DefCmm{settoheight}{cmd}{text}& \qquad\Lcs{height}\\
\DefCmm{settodepth}{cmd}{text} & \qquad\Lcs{depth} \\
                               & \qquad\Lcs{totalheight}
\end{BDef}

The new \Lcs{settoheight} and \Lcs{settodepth} commands,
in analogy with the \Lcs{settowidth} command, already
present in \LaTeXo{}, allow one to \lq\lq\nobreak{}measure\rq\rq\nobreak{} the height and
depth of some \TeX{} material.
The lengths \Lcs{width}, \Lcs{height}, \Lcs{depth}, and
\Lcs{totalheight} are also new in \LaTeXe{}, and can be used 
inside the box commands described in the next section.

For ease of reference an overview of \TeX{}\rq\nobreak{}s units of length is
given below.
 
\begin{center}
\small
\def\pip{\vrule height 4 true pt }
\begin{tabbing}
\Lit{dd}\  \= xxx \kill% \hspace{.68\linewidth} \= xxx \kill
\Lit{sp} \> scaled point (65536~sp = 1~pt) \TeX\rq\nobreak{}s smallest unit.     \\
\Lit{pt} \> point = \(\frac{1}{72.27}\)~in = 0.351~mm
         \` \hbox to 1 pt{\pip\hrulefill\pip}                        \\
\Lit{bp} \> big point (72~bp = 1~in), also PostScript point
         \` \hbox to 1 bp{\pip\hrulefill\pip}                        \\
\Lit{dd} \> Did\^ot point \( = \frac{1}{72}\) of a French inch,
                        \(= 0.376\)~mm
         \` \hbox to 1 dd{\pip\hrulefill\pip}                        \\
%
\Lit{mm} \> millimeter = 2.845~pt
         \` \hbox to 1 mm {\pip\hrulefill\pip}                       \\
%
\Lit{pc} \> pica = 12~pt = 4.218~mm
         \` \hbox to 1 pc{\pip\hrulefill\pip}                        \\
%
\Lit{cc} \> cicero = 12~dd = 4.531~mm
         \` \hbox to 1 cc{\pip\hrulefill\pip}                        \\
%
\Lit{cm} \> centimeter = 10~mm =2.371~pc
         \` \hbox to 1 cm{\pip\hrulefill\pip}                        \\
%
\Lit{in} \> inch = 25.4~mm = 72.27~pt = 6.022~pc
         \` \hbox to 1 in{\pip\hrulefill\pip}                        \\
%
\Lit{ex} \> height of a small \lq\lq\nobreak{}x\rq\rq\nobreak{} for the current font
         \` \hbox to 1 ex{\pip\hrulefill\pip}                        \\
%
\Lit{em} \> width of capital \lq\lq\nobreak{}M\rq\rq\nobreak{} in current font 
         \` \hbox to 1 em{\pip\hrulefill\pip}                        \\
%
\Lit{mu} \> math mode unit (18~mu = 1~em) 
         \` \hbox to .12em{\pip\hrulefill\pip}                       \\
%
\end{tabbing}
\end{center}

The following lines show how length commands are created,
defined, changed, and used. 
They work, most of the time, both for rigid and rubber lengths.

\begin{verbatim}
\newlength{\Mylen} Mylen = \the\Mylen 
\end{verbatim}

\newlength{\Mylen} Mylen = \the\Mylen 

\begin{verbatim}
\setlength{\Mylen}{10mm} Mylen = \the\Mylen       
\setlength{\Mylen}{5mm plus 1mm minus .5mm}
\par Mylen = \the\Mylen  % Use a rubber length
\end{verbatim}

\setlength{\Mylen}{10mm} Mylen = \the\Mylen       
\setlength{\Mylen}{5mm plus 1mm minus .5mm}
\par Mylen = \the\Mylen  % Use a rubber length
\begin{verbatim}
\setlength{\Mylen}{1em} One em is \the\Mylen;
\addtolength{\Mylen}{1pc} add one pica \the\Mylen.
\end{verbatim}

\setlength{\Mylen}{1em} One em is \the\Mylen;
\addtolength{\Mylen}{1pc} add one pica \the\Mylen.

\begin{verbatim}
\settowidth{\Mylen}{May} The width is \the\Mylen
\settowidth{\Mylen}{\Large May} and now \the\Mylen.

\settoheight{\Mylen}{May} The height is \the\Mylen
\settoheight{\Mylen}{\Large May} and now \the\Mylen.

\settodepth{\Mylen}{May} The depth is \the\Mylen
\settodepth{\Mylen}{\Large May} and now \the\Mylen.
\end{verbatim}

\settowidth{\Mylen}{May} The width is \the\Mylen
\settowidth{\Mylen}{\Large May} and now \the\Mylen.

\settoheight{\Mylen}{May} The height is \the\Mylen
\settoheight{\Mylen}{\Large May} and now \the\Mylen.

\settodepth{\Mylen}{May} The depth is \the\Mylen
\settodepth{\Mylen}{\Large May} and now \the\Mylen. 


\lq\lq\nobreak{}Rubber\rq\rq\nobreak{} (variable) lengths are very useful for placing information
on the page.

\begin{BDef}
  \Lmskip{fill}
\end{BDef}

This is a rubber length with a natural length of zero.
It can stretch to any positive value and its value should not be changed!
 
\BDefCm{stretch}{dec\_num}

This is a more useful rubber length, since
\Lmskip{fill} is equivalent to \Lit{\Lmcs{stretch}\lcb1\rcb}.
More generally, \Lit{\Lmcs{stretch}\lcb\Larg{dec\_num}\rcb} 
has a stretchability of \Larg{dec\_num} times \Lmskip{fill}.
It can be used to fine-tune the positioning of text horizontally or vertically.

Examples of the use of these stretchable lengths for controlling
the horizontal and vertical page layout are given below.

\begin{verbatim}
\newcommand{\HS}[1][1.]{\hspace{\stretch{#1}}}
\begin{center}
left \hfill                            right\\
left \HS[.5]\fbox{$\frac{1}{3}$}\hfill right\\
left \HS         middle \hfill         right\\
left \hrulefill\ middle \hrulefill\    right\\
left \dotfill\                         right\\
left \dotfill\ \HS[.5] \dotfill\       right\\
left \dotfill\ \HS     \dotfill\       right\\
left \dotfill\ \HS[2.] \dotfill\       right
\end{center}
\end{verbatim}
\newcommand{\HS}[1][1.]{\hspace{\stretch{#1}}}
\begin{center}
left \hfill                            right\\
left \HS[.5]\fbox{$\frac{1}{3}$}\hfill right\\
left \HS         middle \hfill         right\\
left \hrulefill\ middle \hrulefill\    right\\
left \dotfill\                         right\\
left \dotfill\ \HS[.5] \dotfill\       right\\
left \dotfill\ \HS     \dotfill\       right\\
left \dotfill\ \HS[2.] \dotfill\       right
\end{center}

\begin{verbatim}
\documentclass{article}
\usepackage{times}
\thispagestyle{empty}
\newcommand{\HRule}{\rule{\linewidth}{1mm}}
\setlength{\parindent}{0mm}
\setlength{\parskip}{0mm}
\begin{document}
  \vspace*{\stretch{1}}
  \HRule
  \begin{flushright}
    \Huge Geoffrey Chaucer\\[5mm]
          The Canterbury Tales
  \end{flushright}
  \HRule
  \vspace*{\stretch{2}}
  \begin{center}
    \Large\textsc{London 1400}
  \end{center}
\end{document}
\end{verbatim}

\begin{center}
\fbox{\epsfig{bbllx=90pt,bblly=160pt,bburx=520pt,bbury=720pt,%
        file=vspaceex.eps,height=9cm}}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
\subsection*{Page Markup---Several Kinds of Boxes}

Boxes are at the very heart of \TeX{}\rq\nobreak{}s basic typesetting paradigm,
and \LaTeX{} provides several commands which make it easy to make
use of this functionality.

\begin{BDef}
\DefCm{mbox}{text}\hspace*{1em}\DefCoom{makebox}{width}{pos}{text}  \\

\DefCm{fbox}{text}\hspace*{1em}\DefCoom{framebox}{width}{pos}{text} \\
\end{BDef}

In addition to centreing the text with positional argument \Lit{[c]}
(the default), you can position the text flush left (\Lit{[l]}) or
flush right (\Lit{[r]}).  \LaTeXe{} also offers you an \Lit{[s]}
specifier that will stretch your \Larg{text} from the left margin to
the right margin of the box provided it contains some stretchable
space.
As already mentioned in the previous section,
\LaTeXe{} also allows you to make use of four special length
parameters inside the
\Larg{width} argument of the box commands:
\Lmdim{width}, \Lmdim{height}, \Lmdim{depth}, and
\Lmdim{totalheight}. 
These parameters specify the natural size of the \Larg{text},
where \Lmdim{totalheight} is the sum of \Lmdim{height} and \Lmdim{depth}.

The examples below show how these various parameters are used
to control the layout in the box. Note that use is also
made of the \Lpack{calc} package, which allows arithmetic operations
in the arguments of the commands.

\begin{verbatim}
\framebox{A few words of advice}             \par
\framebox[\width + 6mm][s]{A few words of advice} 
\par  \framebox[1.5\width]{A few words of advice}   
\end{verbatim}

\framebox{A few words of advice}             \par
\framebox[\width + 6mm][s]{A few words of advice} 
\par  \framebox[1.5\width]{A few words of advice}   


\BDefComm{rule}{lift}{width}{total\_height}

Rules come in handy for controlling the height of a box.
Together with the new \LaTeX{} commands for measuring the 
height and depth of your boxes, they allow you to 
perform micro-typographic adjustments for tuning the
visual presentation of your document elements.

\begin{verbatim}
\newsavebox{\Maybox}\savebox{\Maybox}{\Large May}
\newlength{\Mdp}\settodepth{\Mdp}{\usebox{\Maybox}}
\newlength{\Mht}\settoheight{\Mht}{\usebox{\Maybox}}
\addtolength{\Mht}{\Mdp}

\framebox[1.6\width+1em][s]{\usebox{\Maybox}}
\quad
\framebox[1.6\width+1em][s]{\usebox{\Maybox}%
          \rule[-2\Mdp]{0mm}{2\Mht}}
\end{verbatim}

\newsavebox{\Maybox}\savebox{\Maybox}{\Large May}
\newlength{\Mdp}\settodepth{\Mdp}{\usebox{\Maybox}}
\newlength{\Mht}\settoheight{\Mht}{\usebox{\Maybox}}
\addtolength{\Mht}{\Mdp}

\framebox[1.6\width+1em][s]{\usebox{\Maybox}}
\quad
\framebox[1.6\width+1em][s]{\usebox{\Maybox}%
          \rule[-2\Mdp]{0mm}{2\Mht}}

Zero-width boxes are also useful in other circumstances.

\begin{verbatim}
\begin{center}
A centred sentence.\makebox[0cm][l]{$^{123}$}\\
Some more text in the middle.                 \\
\makebox[0cm][r]{$^{321}$}A centred sentence.\\
\end{center}
\noindent\makebox[0cm][r]{\(\Leftrightarrow\)}%
As seen in the margin of the current line, boxes 
with a vanishing width can stick out in the margin.
\end{verbatim}

\begin{center}
A centred sentence.\makebox[0cm][l]{$^{123}$}\\
Some more text in the middle.                 \\
\makebox[0cm][r]{$^{321}$}A centred sentence.\\
\end{center}
\noindent\makebox[0cm][r]{\(\Leftrightarrow\)}%
As seen in the margin of the current line, boxes 
with a vanishing width can stick out in the margin.

\subsection*{Moving boxes}

Boxes can be moved up or down by the command:

\BDefCmoom{raisebox}{lift}{depth}{height}{contents}
 
The simple example below shows its principle of use.

\begin{verbatim}
\begin{flushleft}
x111x \raisebox{-1ex}{downward} x222x     \\
x333x \raisebox{1ex}{upward} x444x        \\[1em]
x111x \raisebox{-1ex}[0cm][0cm]{downward} x222x\\
x333x \raisebox{1ex}[0cm]{upward} x444x
\end{flushleft}
\end{verbatim}
 
\begin{flushleft}
x111x \raisebox{-1ex}{downward} x222x     \\
x333x \raisebox{1ex}{upward} x444x        \\[1em]
x111x \raisebox{-1ex}[0cm][0cm]{downward} x222x\\
x333x \raisebox{1ex}[0cm]{upward} x444x
\end{flushleft}

A more useful example is the generation of text \lq\lq\nobreak{}between\rq\rq\nobreak{}
two rows in a table (by \lq\lq\nobreak{}hiding\rq\rq\nobreak{} the boxes\rq\nobreak{} content from
\TeX{}.)

\begin{verbatim}
\begin{center}
\begin{tabular}{|c|c|c|}               \hline
         & \multicolumn{2}{c|}{title}\\\cline{2-3}
\raisebox{1.5ex}[0cm][0cm]{100}
         & A         & B             \\\hline
20000000 & 10        & 10            \\\hline
\end{tabular}
\end{center}
\end{verbatim}

\begin{center}
\begin{tabular}{|c|c|c|}             \hline
         & \multicolumn{2}{c|}{title}\\\cline{2-3}
\raisebox{1.5ex}[0cm][0cm]{100}
         & A         & B           \\\hline
20000000 & 10        & 10          \\\hline
\end{tabular}
\end{center}

Finally, when your printer driver allows it, you can
rotate boxes.
In this case the use of the various
box dimension parameters becomes apparent.

\begin{verbatim}
\newcommand{\DoT}[1]{\begin{turn}{45}#1\end{turn}}
x1 \DoT{\fbox{Not so Good.}} x2 
\DoT{\raisebox{\depth}{\fbox{I like it.}}} x3
\DoT{\raisebox{-\height}{\fbox{Bad Choice.}}} x4
\end{verbatim}

\bigskip

\newcommand{\DoT}[1]{\begin{turn}{45}#1\end{turn}}
x1 \DoT{\fbox{Not so Good.}} x2 
\DoT{\raisebox{\depth}{\fbox{I like it.}}} x3
\DoT{\raisebox{-\height}{\fbox{Bad Choice.}}} x4

\subsection*{Placing parboxes and minipages}

In \LaTeXo{}, boxes which can contain more than one paragraph are defined
as follows. 
 
\begin{BDef}
\DefComm{parbox}{pos}{width}{text}  \\[1mm]
\DefEom{minipage}{pos}{width}        \\
\qquad\Larg{text}                    \\
\LmEND{minipage}                      
\end{BDef}

A simple example of its use is the following

\begin{verbatim}
\parbox{.3\linewidth}{This is the
 contents of the left-most parbox.}
\hfill Centerline \hfill
\parbox{.3\linewidth}{This is the right-most parbox.
 Note that the typeset text looks sloppy because 
 \LaTeX{} cannot nicely balance the material
 in these narrow columns.}
\end{verbatim}

\parbox{.3\linewidth}{This is the
 contents of the left-most parbox.}
\hfill Centerline \hfill
\parbox{.3\linewidth}{This is the
 right-most parbox.
 Note that the typeset
 text looks sloppy because \LaTeX{}
 cannot nicely balance the material
 in these narrow columns.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Generalized parboxes and minipages}

Sometimes it is helpful to predefine the vertical dimension of a
paragraph box. For this \LaTeXe{} has additional optional
arguments for \Lmenv{minipage} and \Lmcs{parbox}.

\begin{BDef}
\DefCooom{parbox}{pos}{height}{inner-pos}{width}\Largb{text}  \\
\DefEooom{minipage}{pos}{height}{inner-pos}{width}\\
\qquad\Larg{text}\\
\LmEND{minipage}           
\end{BDef}

The \Larg{inner-pos} determines the position of \Larg{text} within
the box. It can be \Lit{t}, \Lit{c}, \Lit{b}, or \Lit{s}. If not
specified, the value of \Larg{pos} will be used. You can think of
\Larg{height} and \Larg{inner-pos} as the vertical equivalent of the
\Larg{width} and \Larg{pos} arguments of a \Lcs{makebox}. 
If you use the \Lit{s} position
the \Larg{text} will be vertically stretched to fill the given
\Larg{height}. 
Thus, in this case you are responsible for providing vertically
stretchable space if necessary  using, for example, \Lcs{vspace} 
or \Lcs{vfill} commands.

As with the other box commands you can use \Ldim{height},
\Ldim{totalheight}, and so on to refer to the natural dimensions of the
box when specifying the optional argument.

\begin{verbatim}
xx \fbox{\parbox[b][1.5\height][s]
         {30mm}{Some text on top. \par\vfill 
                In the middle. \par\vfill
                And a few lines on the
                bottom of the box.}}
   \fbox{\parbox[b][\height+\baselineskip][s]
         {30mm}{This time a few lines on the
                top of the box. But only one
                line \par\vfill down here.}} xx
\end{verbatim}

xx \fbox{\parbox[b][1.5\height][s]
         {30mm}{Some text on top. \par\vfill
                In the middle. \par\vfill
                And a few lines on the
                bottom of the box.}}
   \fbox{\parbox[b][\height+\baselineskip][s]
         {30mm}{This time a few lines on the
                top of the box. But only one
                line \par\vfill down here.}} xx

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Manipulating Boxed Material}

Material can be typeset once and then stored inside a named box, so that its
contents can be retrieved later.
\LaTeX{} offers the following commands for dealing with this situation. 

\begin{BDef}
\DefCm{newsavebox}{cmd}                  & \quad declare box \\
\DefCmm{sbox}{cmd}{text}                 & \quad fill box    \\
\DefCmoom{savebox}{cmd}{width}{pos}{text}& \quad fill box    \\
\DefCm{usebox}{cmd}                      & \quad use contents\\[1mm]
\DefEm{lrbox}{cmd}                       & \quad fill box    \\
\qquad\Larg{text}  \\
\LmEND{lrbox}
\end{BDef}

Note that the environment \Lenv{lrbox} is an addition in \LaTeXe{}.
\Larg{cmd} should be a box register previously allocated with
\Lmcs{newsavebox}. 
The environment \Lmenv{lrbox} will save \Larg{text} in
this box for later use with \Lmcs{usebox}. Leading and trailing spaces
are ignored. Thus, \Lmenv{lrbox} is basically the environment form of 
\Lmcs{sbox}. You can make good use of this environment if you want to
save the body of some environment in a box for further processing. For
example, the following code defines the environment 
\Lmenv{fminipage}
that works like a \Lenv{minipage} but surrounds its body with a frame.
Note the use of the optional argument for controlling the width
of the boxed minipage, and the fact that
verbatim material can be used inside.
To be able to do the  arithmetic operations
you will also need to have the \Lpack{calc} package loaded.

\begin{verbatim}
\newsavebox{\fminibox}
\newlength{\fminilength}
\newenvironment{fminipage}
    [1][\linewidth]% default width is \linewidth
  {\setlength{\fminilength}%
        {#1-2\fboxsep-2\fboxrule}%
   \begin{lrbox}{\fminibox}%
   \begin{minipage}{\fminilength}}
  {\end{minipage}\end{lrbox}%
   \noindent\fbox{\usebox{\fminibox}}}
\end{verbatim}

\newsavebox{\fminibox}
\newlength{\fminilength}
\newenvironment{fminipage}
    [1][\linewidth]% default width is \linewidth
  {\setlength{\fminilength}%
        {#1-2\fboxsep-2\fboxrule}%
   \begin{lrbox}{\fminibox}%
   \begin{minipage}{\fminilength}}
  {\end{minipage}\end{lrbox}%
   \noindent\fbox{\usebox{\fminibox}}}

\begin{verbatim}
\begin{fminipage} 
  In this environment verbatim text like 
  \verb=\fminibox= can be used.
\end{fminipage}
\end{verbatim}

\begin{fminipage} 
  In this environment verbatim text like 
  \verb=\fminibox= can be used.
\end{fminipage}

\begin{verbatim}
\begin{fminipage}[.5\linewidth] 
  ....
\end{fminipage}
\end{verbatim}

\begin{fminipage}[.5\linewidth]
  In this environment verbatim text like 
  \verb=\fminibox= can be used.
\end{fminipage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{For hackers only: a list with two optional parameters}

What if we want to define a command or environment
with, \eg \emph{two} optional arguments?
Suppose we want a list where we are able to specify not only
the width of the label, but also whether the list should be \lq\lq\nobreak{}dense\rq\rq\nobreak{}
or not, \ie we want a syntax like:

\begin{verbatim}
\begin{Description}[<margin>][<style>]
\end{verbatim}

In this case we use a trick
(and the packages \Lmpack{calc} and \Lmpack{ifthen})
and introduce a multiple-step definition.
The example also shows how one can parameterize the various
typographic parameters for the
list so that they can be controlled more easily
(\eg the alignment of the label, its font, and the width of the margin).

\begin{verbatim}
\newcommand{\Descriptionlabel}[1]{%
       \mbox{\Descriptionfont #1}\hfil}

\newcommand\Descriptionfont{\itshape}
\newcommand\Descriptionmargin{}

\newenvironment{Description}[1][\kern\leftmargin]
 {\renewcommand\Descriptionmargin{#1}\xdescription}
 {\endlist}

\newcommand{\xdescription}[1][normal]{%
 \list{}{\settowidth{\labelwidth}%
  {\mbox{\Descriptionfont\Descriptionmargin}}%
  \setlength{\itemindent}{0pt}%
  \setlength{\leftmargin}{\labelwidth+\labelsep}%
  \let\makelabel\Descriptionlabel
  \ifthenelse{\equal{#1}{compact}}%
   {\setlength{\itemsep}{0pt}%
    \setlength{\topsep}{.5\topsep}}{}%
 }}
\end{verbatim}

\newcommand{\Descriptionlabel}[1]{%
       \mbox{\Descriptionfont #1}\hfil}

\newcommand\Descriptionfont{\itshape}
\newcommand\Descriptionmargin{}

\renewenvironment{Description}[1][\kern\leftmargin]
     {\renewcommand\Descriptionmargin{#1}%
      \xdescription
     }
     {\endlist}

\newcommand{\xdescription}[1][normal]
   {\list{}{\settowidth{\labelwidth}%
          {\mbox{\Descriptionfont\Descriptionmargin}}%
            \setlength{\itemindent}{0pt}%
            \setlength{\leftmargin}{\labelwidth+\labelsep}%
            \let\makelabel\Descriptionlabel
            \ifthenelse{\equal{#1}{compact}}%
             {\setlength{\itemsep}{0pt}%
              \setlength{\topsep}{.5\topsep}}{\itemsep2mm}%
            }}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{verbatim}
Text before text before text before text before
\begin{Description}
  \item[First] This is the first item in the list.
  \item[Veryyy long] This is a veryyy long item.
  \item[] This is an empty item.
\end{Description}

\begin{Description}[Veryyy long]
  ...
\end{Description}

\begin{Description}[Veryyy long][compact] 
  ...
\end{Description}
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Text before text before text before text before
\begin{Description}
\item[First] This is the first item in the list.
\item[Veryyy long] This is a veryyy long item.
\item[] This is an empty item.
\end{Description}

\begin{Description}[Veryyy long]
\item[First] This is the first item in the list.
\item[Veryyy long] This is a veryyy long item.
\item[] This is an empty item.
\end{Description}

\begin{Description}[Veryyy long][compact]
\item[First] This is the first item in the list.
\item[Veryyy long] This is a veryyy long item.
\item[] This is an empty item.
\end{Description}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\section{Font commands---an overview}

This section covers the user commands in \LaTeXe{} for specifying
fonts, both in text as in mathematics.  We also mention some of the
more popular fonts packages and say a few words on compatibility with
\LaTeXo{}.

The first question you can naturally ask yourself is why 
new font commands were introduced at all.
To answer this question let us mention that \LaTeXo{} 
font commands had a few idiosyncrasies:
\begin{itemize}
\item their syntax, \ie \verb|{\it foo}| rather than \verb|\it{foo}|, which
      is unlike the syntax of (most) other \LaTeX{} commands
      (safe the size-changing series), which are specified with arguments;
\item the font commands were not \emph{orthogonal}, \eg
      \verb|\bf\sf| produces medium-weight sans, \ie only the inner
      font command is honoured;
\item some font substitutions were taking place \lq\lq\nobreak{}behind our backs\rq\rq\nobreak{},
      \eg \verb|\tiny\tt| produces tiny roman, since it was assumed that
      at such a small size the difference is hardly visible, so that
      one can as well use a font already loaded;
\item italic corrections must be introduced by hand, \eg 
      one has to write \verb|{\em my text\/}|, and even this is not
      correct in all circumstances.
\end{itemize}

\LaTeXe{} addresses these problems by introducing
the following new text font commands:
\begin{itemize}
\item[] \verb|\textmd{|\textmd{This is medium text}\verb|}|
\item[] \verb|\textbf{|\textbf{This is bold text}\verb|}|
\item[] \verb|\textup{|\textup{This is upright text\/}\verb|}|
\item[] \verb|\textit{|\textit{This is italic text\/}\verb|}|
\item[] \verb|\textsl{|\textsl{This is slanted text\/}\verb|}|
\item[] \verb|\textsc{|{T\footnotesize HIS IS SMALL CAPS TEXT}\verb|}|
\item[] \verb|\textrm{|\textrm{This is roman text}\verb|}|
\item[] \verb|\textsf{|\textsf{This is sans text}\verb|}|
\item[] \verb|\texttt{|\texttt{This is typewriter text}\verb|}|
\end{itemize}
Plus \verb|\emph{|\emph{This is emphasized text}\verb|}|.

The size changing commands remain unchanged (\ie \Lcs{large},
\Lcs{scriptsize}, \etc are still valid).

These commands do not have the problems of the \LaTeXo{} commands,
because:

\begin{itemize}
\item their syntax is the same as for the other \LaTeX{} commands;
\item \verb|\textbf{\textsf{|\textbf{\textsf{text}}\verb|}}| produces bold
      sans;
\item \verb|{\tiny\texttt{|{\tiny\texttt{text}}\verb|}}| produces tiny
      typewriter;
\item \verb|\emph{|\emph{text}\verb|}| does \emph{not} need \verb|\/|.
\end{itemize}
Note that there are still some restrictions, for instance,
\verb|\textbf{\texttt{|\texttt{text}\verb|}}| produces
medium typewriter for lack of a bold Computer Modern typewriter font,
but at least \LaTeXe{} warns you about the substitution.

In the area of math fonts,  
\LaTeXe{} provides the following new commands:

\begin{itemize}
\item[] \verb|\mathnormal{|$\mathnormal{This~is~normal~math~italic}$\verb|}|
\item[] \verb|\mathcal{|$\mathcal{MATH~CALLIGRAPHIC}$\verb|}|
\item[] \verb|\mathrm{|$\mathrm{This~is~roman~in~math}$\verb|}|
\item[] \verb|\mathbf{|$\mathbf{This~is~bold~in~math}$\verb|}|
\item[] \verb|\mathsf{|$\mathsf{This~is~sans~in~math}$\verb|}|
\item[] \verb|\mathit{|$\mathit{This~is~text~italic~in~math}$\verb|}|
\item[] \verb|\mathtt{|$\mathtt{This~is~typewriter~in~math}$\verb|}|
\end{itemize}

Note that these commands do not work outside mathematics.

It is now relatively easy (if you have the fonts) to
replace Computer Modern with other font families.
Various packages for popular fonts are already available, for example:
\begin{itemize}
\item In the area of PostScript fonts \verb|\usepackage{times}| provides Adobe Times, 
      \verb|\usepackage{palatino}|  Adobe Palatino, 
      \verb|\usepackage{lucidbrb}| Y\&Y\rq\nobreak{}s LucidaBright and
      LucidaNewMath, \etc;
\item \verb|\usepackage{amssymb}| provides the AMS fonts;
\item \verb|\usepackage{pandora}| allows you to use the Pandora fonts;
\item \verb|\usepackage{euler}| lets you experiment with Hermann
      Zapf\rq\nobreak{}s Euler font family.
\end{itemize}

\LaTeXo{}\rq\nobreak{}s old font commands (\Lcs{rm}, \Lcs{bf}, \etc) are still
available in \LaTeXe{}, but they are \emph{not} part of the \lq\lq\nobreak{}kernel\rq\rq\nobreak{}.
They are now defined in the document class files, where the definitions
of the size changing commands, like \Lcs{huge}, \Lcs{tiny}, have
always resided.
It is thus up to the document designer to define
how the old font commands behave.
Note, however, that for the \lq\lq\nobreak{}standard classes\rq\rq\nobreak{} 
(\Lclass{article}, \Lclass{book}, \etc)  the old
font commands behave as they did in \LaTeXo{}.

One more word about about \LaTeXo{} compatibility.
A document beginning with \Lcs{documentstyle} is run in
\emph{compatibility mode}, which emulates \LaTeX{} without NFSS.
If you want to emulate \LaTeX{} with NFSS you should say:
\begin{verbatim}
   \documentstyle[newlfont]{...}
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section[]{Standard Classes in \LaTeXe}

This section discusses the files that come with the \LaTeXe{} distribution
and lists some of the packages which are already adapted to \LaTeXe{}.

Files associated to \LaTeXe{} are characterized by the extensions:
\begin{flushleft}
\textit{name}\texttt{.cls} for class files;\\
\textit{name}\texttt{.clo} for external option files;\\
\textit{name}\texttt{.sty} for package files\\
\textit{name}\texttt{.cfg} for runtime configuration files
\end{flushleft}

The \lq\lq\nobreak{}standard\rq\rq\nobreak{} document classes distributed with \LaTeXe{} are
\Lclass{article}, \Lclass{report}, \Lclass{book},  \Lclass{letter},
\Lclass{slide}, \Lclass{proc}, and \Lclass{ltxdoc}.
Below, we say a few words about each one of them.

\noindent\Lclass{article}, \Lclass{report}, \Lclass{book}
\begin{Itemize}
\item[--] they behave like the old \LaTeXo{} styles;
\item[--] \Loption{twocolumn} and \Loption{openbib} are now internal options;
\item[--] a set of new internal options was added:
          \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{letterpaper}, \Loption{legalpaper},
          \Loption{executivepaper}, \Loption{landscape}.
\end{Itemize}
\noindent \Lclass{letter}
\begin{Itemize}
\item[--] it behaves like the old style;
\item[--] it has a set of new internal  options:
          \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{letterpaper}, \Loption{legalpaper},
          \Loption{executivepaper}.
\end{Itemize}
\noindent \Lclass{slide}
\begin{Itemize}
\item[--] it behaves like the old style, but used with \LaTeXe;
\item[--] it supports local font configuration by looking for
          \texttt{sfonts.cfg};
\item[--] it has a set of new internal options:
          \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{letterpaper}, \Loption{legalpaper},
          \Loption{executivepaper}, \Loption{landscape};
\item[--] the option \Loption{twocolumn} is not supported.
\end{Itemize}
\noindent \Lclass{proc}
\begin{Itemize}
\item[--] it is no longer an option but a \emph{document class};
\item[--] it is built on the \Lclass{article} class;
\item[--] it disallows options \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{onecolumn}, \Loption{titlepage}.
\end{Itemize}
\noindent \Lclass{ltxdoc}
\begin{Itemize}
\item[--] it is used to format the \LaTeXe\ source code;
\item[--] it is built on \Lclass{article} and requires the \Lpack{doc} package;
\item[--] it looks for the configuration file \texttt{ltxdoc.cfg};
\item[--] it defines the commands \Lcs{DocInclude} and \Lcs{GetFileInfo};
\item[--] it disallows the option \Loption{a5paper}.
\end{Itemize}

Presently the following packages are available:
\begin{Itemize}
  \item \Lpack{ifthen}, for building control structures.
         It provides on top of 
        \Lcs{ifthenelse} and \Lcs{whiledo} available previously with
        \LaTeXo{}, the new
        commands \Lcs{newboolean}, \Lcs{setboolean}, and \Lcs{boolean}.
  \item \Lpack{makeidx}, \Lpack{showidx},
        to help you make indexes.
  \item \Lpack{doc}, \Lpack{shortvrb}, for generating class and
        package file documentation.
  \item \Lpack{oldlfont}, \Lpack{newlfont}, for compatibility with
        \LaTeXo{} and version 1 of the NFSS.
  \item \Lpack{latexsym}
         \LaTeXe\ no longer loads the \texttt{lasy} fonts by default;
         if needed they become available by loading this package.
         Note that they are not necessary when either \Lpack{amsfonts} or
         \Lpack{amssymb} is used.
  \item \Lpack{exscale} allows for different math extension fonts.
  \item \Lpack{eufrak} and \Lpack{euscript} give access to the Euler
        fraktur and script alphabets, \Lpack{oldgerm} to Haralambous\rq\nobreak{}
        beautiful old German fonts, while \Lpack{pandora} allows you to
        use Billawala\rq\nobreak{}s Pandora font family.
  \item \Lpack{syntonly} will make \LaTeX{} only check the syntax of
        your document, while \Lpack{tracefnt}, with its various options
        \Loption{errorshow}, \Loption{warningshow}, \Loption{infoshow},
        and \Loption{debugshow}, allows you to trace NFSS as \LaTeX{}
        processes your document.
  \item \Lpack{varioref}
        provides a way to automatically adapt the text of
        a reference, depending on the position of the \Lcs{label}.
\end{Itemize}

Many other packages on CTAN already work with \LaTeXe{} 
or will soon be converted. In the first category  one finds 
\Lpack{a4}, \Lpack{epsfig}, \Lpack{exams}, \Lpack{labels},
\Lpack{layout}, the NTG document class family \Lclass{artikel1}, \Lclass{rapport3},
\etc, \Lpack{subeqnarray}, \Lpack{psnfss}, \Lpack{textfit}, while the
latter contains the \Lpack{babel} collection,
\Lpack{changebar}, \Lclass{ltugboat} and friends,
the \lq\lq\nobreak{}Mainz\rq\rq\nobreak{} packages \Lpack{array}, \Lpack{ftnright},
\Lpack{multicol}, \Lpack{theorem}, \Lpack{verbatim}, and \Lpack{supertabular}.

\section{Miscellaneous goodies}

This section describes some features which are perhaps not used every
day, but which can come in handy for solving certain practical
document preparation problems.

\subsection{Controlling page breaks}

Sometimes, when preparing the \emph{final} version of your document,
you might need to help \LaTeX\ break the pages in a suitable way. 
\LaTeXo{} had commands like \Lcs{clearpage}, \Lcs{samepage}, \etc,
while \LaTeXe\ provides, in addition, commands which increase or
decrease the height of the \emph{current} page from its \lq\lq\nobreak{}natural\rq\rq\nobreak{} height
\Lcs{textheight} by an amount \Larg{size}.

\begin{BDef}
\DefCm{enlargethispage}{size} \\
\DefCm{enlargethispage*}{size}
\end{BDef}

For example,
\verb!\enlargethispage{-\baselineskip}}! decreases the length
of the current page by one line, while 
\verb!\enlargethispage*{2\baselineskip}}! makes it two lines longer
than usual.

The starred form also shrinks any vertical white space on the page as
much as possible, so as to fit the maximum amount of text onto the
page.

\subsection{Floats}

A new command and a new \lq\lq\nobreak{}float specifier\rq\rq\nobreak{} will allow you more 
control over \LaTeX\rq\nobreak{}s float placement algorithm.

\BDefCo{suppressfloats}{placement}

This command stops any further floating environments from being placed
on the current page. 
The optional argument \Larg{placement} can be either
\Lit{t} or \Lit{b} (not both), and in this case the restriction applies only to putting
further floats at the top or at the bottom.

\begin{BDef}
Extra float placement specifier: \ \texttt{!}
\end{BDef}

This can be used, along with at least one of \texttt{h}, \texttt{t},
\texttt{b} and \texttt{p}, in the float placement optional argument.

If a \texttt{!} is present then, just for this particular float,
whenever it is processed by the float mechanism the following are
ignored:
\begin{itemize}
\item  all restrictions on the number of floats which can appear;
\item all explicit restrictions on the amount of space on a text page
which may be occupied by floats or must be occupied by text.
\end{itemize}
The mechanism will, however, still attempt to ensure that pages are
not overfull and that floats of the same type are printed in the
correct order.

Note that its presence has no effect on the production of float pages.

A \texttt{!} placement specifier overrides the effect of any \Lcs{suppressfloats}
command for this particular float.

\section*{Bibliography}

\begin{thebibliography}{1}
\bibitem{bib-Companion}
Michel Goossens, Frank Mittelbach and Alexander Samarin.
\newblock \emph{The \LaTeX{} Companion}.
\newblock Addison-Wesley, Reading, USA, 1994.

\bibitem{bib-Lamport}
Leslie Lamport.
\newblock {\em {\LaTeX}---A Document Preparation System.
          Second edition}
\newblock Addison-Wesley, Reading, USA, 1994.

\bibitem{Mittelbach:TB10-3-400-401}
Frank Mittelbach and Rainer Sch{\"{o}}pf.
\newblock Towards \LaTeX{} 2.10.
\newblock {\em TUGBoat}, 10(3):400--401, November 1990.

\bibitem{Mittelbach:TB11-3-337-345}
Frank Mittelbach.
\newblock {{E-\TeX: Guidelines for future \TeX{} extensions}}.
\newblock {\em TUGBoat}, 11(3):337--345, September 1990.

\bibitem{Mittelbach:TB13-1-96-101}
Frank Mittelbach and Chris Rowley,
\newblock \LaTeXo{} $\hookrightarrow$ \LaTeX3.
\newblock {\em TUGBoat}, 13(1):96-101, April 1992.

\bibitem{Rowley:TB13-3-390-391}
Chris Rowley.
\newblock \LaTeX3 update.
\newblock {\em TUGBoat}, 13(3):390-391, October 1992.

\bibitem{Mittelbach:TB13-4-510-515}
Frank Mittelbach and Chris Rowley and Michael Downes.
Volunteer work for the \LaTeX3 project.
\newblock {\em TUGBoat}, 13(4):510-515, December 1992.

\bibitem{Mittelbach:TTN3-1-7-11}
Frank Mittelbach and Chris Rowley.
\newblock Volunteer work for the \LaTeX3 project.
\newblock {\em \TeX{} and TUG NEWS}, 3(1):7-11, January 1994.

\end{thebibliography}

\end{Article} 

\endinput


 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Making Your Own Lists}
 
Format of generic \Lenv{list} environment:
 
\begin{BDef}
  \DefEmm{list}{default\_label}{decls}\\ \quad \Larg{item\_list}\\ 
  \LEND{list}
\end{BDef}
 
\Larg{default\_label} text for label when \Lcs{item} command
issued without optional argument.

\Larg{decls} modify geometrical parameters of 
\Lenv{list} environment


Several \LaTeX{} environments use \Lenv{list} (e.g., \Lenv{quote},
\Lenv{quotation}, \Lenv{center}, \Lenv{flushleft}, and
\Lenv{flushright}).  They have only one item, and the
\Lit{\Lcs{item}[]} command is specified in the environment definition.

\end{Slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}
\footnotesize
\setlength{\unitlength}{.29mm}
\hspace*{14mm}\begin{picture}(240,250)(0,10)
% =====================  Following text  ========================
\put(0,30){\line(0,-1){20}\line(1,0){240}}
\put(240,10){\line(0,1){20}}
\put(120,20){\makebox(0,0){\emph{Text following list}}}
\put(120,45){\vector(0,-1){15}\vector(0,1){15}
             \makebox(0,0)[l]{\ttfamily\bs topsep + \bs parskip
             [+ \bs partopsep]}}
% =========================  Item 2  ============================
\put(210,90){\line(0,-1){30}\line(-1,0){120}}
\put(90,80){\line(0,1){10}\line(-1,0){20}}
\put(70,60){\line(0,1){20}\line(1,0){140}}
\put(128,75){\makebox(0,0)[l]{\emph{Item 2}}}
\put(10,80){\framebox(45,10){\emph{Label}}}
\put(120,100){\vector(0,-1){10}\vector(0,1){10}
             \makebox(0,0)[l]{\ttfamily\bs itemsep + \bs parsep}}
% ====================  Item 1 Paragraph 2  =====================
\put(70,110){\line(0,1){20}\line(1,0){140}}
\put(100,130){\line(0,1){10}\line(-1,0){30}}
\put(210,140){\line(0,-1){30}\line(-1,0){110}}
\put(128,134){\makebox(0,0)[l]{\emph{Item 1}}}
\put(128,117){\makebox(0,0)[l]{\emph{Paragraph 2}}}
\put(120,150){\vector(0,-1){10}\vector(0,1){10}
             \makebox(0,0)[l]{\ttfamily\bs parsep}}
\put(85,140){\vector(-1,0){15}\vector(1,0){30}}
\put(85,145){\makebox(0,0)[b]{\ttfamily\bs listparindent}}
% ====================  Item 1 Paragraph 1  =====================
\put(210,210){\line(0,-1){50}\line(-1,0){120}}
\put(90,200){\line(0,1){10}\line(-1,0){20}}
\put(70,160){\line(0,1){40}\line(1,0){140}}
\put(128,195){\makebox(0,0)[l]{\emph{Item 1}}}
\put(128,175){\makebox(0,0)[l]{\emph{Paragraph 1}}}
\put(35,175){\makebox(0,0)[t]{\rule{0mm}{4mm}\ttfamily\bs leftmargin}}
\put(35,175){\vector(1,0){35}\vector(-1,0){70}}
\put(10,200){\framebox(45,10){\emph{Label}}}
\put(33,196){\makebox(0,0)[t]{\rule{0mm}{4mm}\ttfamily\bs labelwidth}}
\put(33,196){\vector(1,0){22}\vector(-1,0){45}}% for \labelwidth
\put(95,197){\makebox(0,0)[t]{\rule{0mm}{4mm}\ttfamily\bs itemindent}}
\put(80,196){\vector(1,0){10}\vector(-1,0){20}}% for \itemindent
\put(80,210){\vector(1,0){10}\vector(-1,0){35}}% for \labelsep
\put(73,215){\makebox(0,0)[b]{\rule[-2mm]{0mm}{5mm}\ttfamily\bs labelsep}}
\put(225,210){\vector(1,0){15}\vector(-1,0){30}}
\put(210,206){\makebox(0,0)[l]{\ttfamily\bs rightmargin}}
\put(120,225){\vector(0,-1){15}\vector(0,1){15}
             \makebox(0,0)[l]{\ttfamily\bs topsep + \bs parskip
             [+ \bs partopsep]}}
% =====================  Preceding text  ========================
\put(0,240){\line(0,1){20}\line(1,0){240}}
\put(240,240){\line(0,1){20}}
\put(120,250){\makebox(0,0){\emph{Text preceding list}}}
\end{picture}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand\showlen[1]{\makebox[#1]%
  {\rule{.5pt}{2mm}\hrulefill\rule{.5pt}{2mm}}} \tabcolsep1mm
\newcommand{\SHOWDIMS}%
{{\ttfamily \begin{tabular}{@{}lrl@{}} \bs leftmargin& \Leftmargin &
\showlen{\leftmargin}\\ \bs itemindent& \Itemindent &
\showlen{\itemindent}\\ \bs labelwidth& \Labelwidth &
\showlen{\labelwidth}\\ \bs labelsep & \Labelsep & \showlen{\labelsep}
\end{tabular}}}
\newcommand{\SHOWLAB}{\makebox[\labelwidth]{%
    \rule{.5pt}{2mm}\hfill\mbox{label}\hfill\rule{.5pt}{2mm}}}

\begin{Slide}{Example of list parameters}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{10mm}\def\Labelwidth{10mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{4mm}}\def\Itemindent{4mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{10mm}\def\Labelwidth{10mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{0mm}}\def\Itemindent{0mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{4mm}}\def\Itemindent{4mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Example of list parameters (cont.)}
 
  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{0mm}}\def\Itemindent{0mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{4mm}}\def\Itemindent{4mm}
  \renewcommand{\makelabel}[1]{\emph{#1}\hfil}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS\\ 

  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{0mm}}\def\Itemindent{0mm}
  \renewcommand{\makelabel}[1]{\emph{#1}\hfil}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS\\ 
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Option naming conventions in \LaTeXe{}}

\begin{description}
\item[\emph{Language options}] Language dependent \lq\nobreak{}fixed
  strings\rq\nobreak{} should use options compatible with the babel package.
\item[\emph{Paper size options}] The standard classes
  support the options \Loption{letterpaper}, \Loption{legalpaper}, \Loption{executivepaper},
  \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}; any paper size can be modified by
  the option \Loption{landscape}.
\item[\emph{Driver options}] Many graphics related
  packages need to know dvi-driver (syntax of \Lcs{special} command.
  Currently the list includes: \Loption{emtex}, \Loption{dvips}, \Loption{oztex}, etc.
\item[\emph{Debugging options}] \Loption{errorshow},
  \Loption{warningshow}, \Loption{infoshow}, \Loption{debugshow}, \Loption{pausing}
\end{description}

\end{Slide}

\section{The font selection commands of \LaTeXe}

\begin{itemize}
\item the \LaTeXe{} font selection model
\item the user\rq\nobreak{}s interface
\item the designer\rq\nobreak{}s interface
\item the installer\rq\nobreak{}s interface
\end{itemize}

\section{\LaTeXo{} font selection}

Declaring new fonts in \LaTeXo{} was \emph{difficult}.

Using a text font other than CM meant redefining 50 or so internal
commands:
\begin{verbatim}
   \font\twlrm=ptmr at 12pt
\end{verbatim}
Adding new math fonts involved lots of low-level hacking with
\verb|\newfam|, \verb|\font| and \verb|\@addfontinfo|.

Many people thought that \LaTeX=CM.

This was improved with Mittelbach and Sch\"opf\rq\nobreak{}s \emph{New Font Selection
Scheme} (\emph{NFSS}).

NFSS~2 is part of \LaTeXe.

\section{Font selection model}

A \LaTeX{} font is defined by:
\begin{itemize}
\item an \emph{encoding}, e.g.~\lq\nobreak{}\TeX{} text\rq\nobreak{}
\item a \emph{family}, e.g.~\lq\nobreak{}Computer Modern\rq\nobreak{}
\item a \emph{series}, e.g.~\lq\nobreak{}Bold extended\rq\nobreak{}
\item a \emph{shape}, e.g.~\lq\nobreak{}Italic\rq\nobreak{}
\item a \emph{size}, e.g.~\lq\nobreak{}10pt\rq\nobreak{}
\end{itemize}
In this case, the font is
{\fontfamily{cmr}\fontseries{bx}\fontshape{it}\selectfont
cmbxi10}.

\section{Encodings}

An \emph{encoding} says which characters a font contains.

Some encodings are:
\begin{itemize}
\item \verb|OT1| Latin, e.g.~CM roman
\item \verb|OT2| Cyrillic, e.g.~CM cyrillic
\item \verb|OT3| International phonetic alphabet, e.g.~WSU IPA
\item \verb|U|   Unknown
\end{itemize}
Note \lq\nobreak{}\verb|O|\rq\nobreak{} means \lq\nobreak{}old\rq\nobreak{} means \lq\nobreak{}7-bit\rq\nobreak{}.

\section{Families}

A \emph{family} says what the name of the font collection is.

Some families are:
\begin{itemize}
\item \verb|cmr| Computer Modern Roman
\item \verb|cmss| Computer Modern Sans
\item \verb|cmtt| Computer Modern Typewriter
\item \verb|ptm| Adobe Times Roman
\item \verb|phv| Adobe Helvetica
\end{itemize}

\section{Series and shape}

The \emph{series} and \emph{shape}
say what the appearance
of a font is.

Some series are:
\begin{itemize}
\item \verb|m| medium
\item \verb|bx| \textbf{bold extended}
\end{itemize}
Some shapes are:
\begin{itemize}
\item \verb|n| \lq\nobreak{}normal\rq\nobreak{}
\item \verb|sl| \textsl{slanted}
\item \verb|sc| {\scriptsize SMALL CAPS}
\end{itemize}

\section{Size}

The \emph{size} says how large a font should be.

Some sizes are:
\begin{itemize}
\item \verb|5| {\fontsize{5}{5} 5pt}
\item \verb|10| {\fontsize{10}{10} 10pt}
\item \verb|14.4| {\fontsize{14.4}{14.4} 14.4pt}
\end{itemize}
Together, these five parameters determine every \LaTeX{} font.
For example:
\begin{itemize}
\item \verb|OT1/cmr/bx/it/10| is
   {\fontfamily{cmr}\fontseries{bx}\fontshape{it}\selectfont
      cmbxi10}
\item \verb|OT1/cmss/m/n/10| is cmss10
\item \verb|OML/cmm/m/it/10| is $\mathnormal{cmmi10}$
\end{itemize}

\section{User\rq\nobreak{}s interface}

The most important user command for selecting fonts is
\verb|\documentclass|.
The document class sets:
\begin{itemize}
\item the families for roman, sans and typewriter
\item the effects of \verb|\rm|, \verb|\bf|, \verb|\huge|, etc.
\item how \emph{logical} structure (e.g.~\verb|\section|) maps to
   \emph{optical} structure (e.g.~12pt bold)
\end{itemize}
The user commands:
\begin{itemize}
\item \verb|\textrm|, \verb|\textsf| \& \verb|\texttt| change the family
\item \verb|\textmd| \& \verb|\textbf| change the series
\item \verb|\textup|, \verb|\textit|, \verb|\textsl| \& \verb|\textsc|
   change the shape
\end{itemize}

\section{Designer\rq\nobreak{}s interface}

The document class designer has to set:
\begin{itemize}
\item the families for roman, sans and typewriter
\item the effects of \verb|\rm|, \verb|\bf|, \verb|\huge|, etc.
\item how \emph{logical} structure maps to
   \emph{optical} structure
\end{itemize}
The commands defined by the class include:
\begin{itemize}
\item \verb|\rmdefault|, \verb|\sfdefault|, \verb|\ttdefault|, etc.
\item \verb|\rm|, \verb|\bf|, \verb|\huge|, etc.
\item \verb|\section|, \verb|\maketitle|, etc.
\end{itemize}
For example, to say a document is set in Adobe Times, just say:
\begin{verbatim}
   \renewcommand{\rmdefault}{ptm}
\end{verbatim}

The designer\rq\nobreak{}s commands are:
\begin{itemize}
\item \verb|\fontencoding{|\emph{encoding}\verb|}|
\item \verb|\fontfamily{|\emph{family}\verb|}|
\item \verb|\fontseries{|\emph{series}\verb|}|
\item \verb|\fontshape{|\emph{shape}\verb|}|
\item \verb|\fontsize{|\emph{size}\verb|}{|\emph{baselineskip}\verb|}|
\item \verb|\selectfont|
\end{itemize}
For example:
\begin{verbatim}
   {\fontfamily{cmtt}\fontshape{sl}
      \selectfont hello}
\end{verbatim}
produces {\fontfamily{cmtt}\fontshape{sl}\selectfont hello}.

\section{Installer\rq\nobreak{}s interface}

The font installer has to say how the \LaTeX{} font selection model
relates to \TeX{} fonts, for example that \verb|OT1/cmtt/m/n/10| is
\verb|cmtt10|.

This is done with \emph{font definition} (\emph{fd}) files.

For each \emph{encoding} and \emph{family} there is a file
\emph{encodingfamily}\verb|.fd|, e.g.~\verb|OT1cmtt.fd|.

This uses the commands:
\begin{quotation}
\verb|\DeclareFontFamily{|\emph{encoding}\verb|}{|%
   \emph{family}\verb|}|\\\hspace*{2em}\verb|{|\emph{commands}\verb|}|
\\
\verb|\DeclareFontShape{|\emph{encoding}\verb|}{|%
   \emph{family}\verb|}|\\\hspace*{2em}\verb|{|\emph{series}\verb|}{|%
   \emph{shape}\verb|}{|\emph{loading}\verb|}{|%
   \emph{commands}\verb|}|
\end{quotation}

For example, a simple \verb|OT1ptm.fd| file is:
\begin{verbatim}
   \DeclareFontFamily{OT1}{ptm}{}
   \DeclareFontShape{OT1}{ptm}
      {m}{n}{<-> ptmr}{}
   \DeclareFontShape{OT1}{ptm}
      {b}{n}{<-> ptmb}{}
   \DeclareFontShape{OT1}{ptm}
      {m}{it}{<-> ptmri}{}
   \DeclareFontShape{OT1}{ptm}
      {b}{it}{<-> ptmbi}{}
\end{verbatim}
(The real \verb|OT1ptm.fd| file is a bit more complicated.)

The \emph{loading-commands} can be size-specific, for example:
\begin{verbatim}
   \DeclareFontShape{OT1}{ptmv}{m}{n}{
      <-11>ptmr10
      <11->ptmr
      }{}
\end{verbatim}
The \emph{loading-commands} also have options for:
\begin{itemize}
\item substituting fonts
\item generating font names from sizes automatically
\item running \LaTeX{} commands every time a font is loaded
\end{itemize}

\section{Mathematics and PostScript}

\section{Math font model}

A \LaTeX{} math font is defined by:
\begin{itemize}
\item a \emph{math version}, e.g.~\lq\nobreak{}normal\rq\nobreak{}
\item a \emph{math group}, e.g.~\lq\nobreak{}symbols\rq\nobreak{}
\item a \emph{math style}, e.g.~\lq\nobreak{}scriptstyle\rq\nobreak{}
\item a \emph{text size}, e.g.~\lq\nobreak{}10pt\rq\nobreak{}
\end{itemize}
In this case, the font is 7pt $\scriptstyle\mathcal{CMSY}$.

\section{Math versions}

A math version says which groups are available in math mode.

Some math versions are:
\begin{itemize}
\item \verb|normal| standard groups
\item \verb|bold| bold groups
\end{itemize}
Other math versions could include different subject areas
(e.g.~\verb|chemistry|) or national styles (e.g.~\verb|french|).

\section{Math groups}

A math group says which encoding, family, series and shape the font has.

There are two sorts of groups.

\emph{Symbol} groups are used with symbol commands like
\verb|\otimes|.  Some symbol groups are:
\begin{itemize}
\item \verb|operators| $\mathrm{roman~letters}$
\item \verb|letters| $\mathnormal{math~italic}$
\item \verb|symbols| $\mathcal{SYMBOLS}$
\item \verb|bigsymbols| big symbols such as $\sum$
\end{itemize}

\emph{Alphabet} groups are used with font commands like
\verb|\mathcal|.  Some alphabet groups are:
\begin{itemize}
\item \verb|\mathrm| $\mathrm{roman~letters}$
\item \verb|\mathnormal| $\mathnormal{math~italic}$
\item \verb|\mathcal| $\mathcal{CALLIGRAPHIC}$
\item \verb|\mathbf| $\mathbf{bold}$
\end{itemize}
Note that some groups are both symbol and alphabet groups.

\section{Math styles}

A math style says how large a font is compared with the text font.  The
three math styles are:
\begin{itemize}
\item \verb|textstyle| the size of text
\item \verb|scriptstyle| the size of subscripts
\item \verb|scriptscriptstyle| the size of subsubscripts
\end{itemize}

\section{User interface}

Is mostly unchanged.

Classes and packages change the available math versions and groups.

\verb|\normalmath| and \verb|\boldmath| change the math version.

\verb|\mathrm|, \verb|\mathnormal|, \verb|\mathcal| and \verb|\mathbf|
change the math group.

Commands like \verb|^| or \verb|\frac| change the math style.

\section{Designer interface}

Designers can provide new math versions and math groups, e.g.:
\begin{verbatim}
   \DeclareMathVersion{normal}
   \DeclareSymbolFont{operators}
      {OT1}{cmr}{m}{n}
   \DeclareMathAlphabet{\mathit}
      {OT1}{cmr}{m}{it}
\end{verbatim}
Symbol groups can have symbol declarations, e.g.:
\begin{verbatim}
   \DeclareMathSymbol{\alpha}
      {\mathord}{letters}{"0B}
\end{verbatim}
Symbol groups are less effecient than alphabet groups.

\section{PostScript fonts--User\rq\nobreak{}s and designer\rq\nobreak{}s interface}

As far as \LaTeX{} is concerned, PostScript fonts are just fonts like any
other (but the device driver may disagree).

So to select Times as a user:
\begin{verbatim}
   \usepackage{times}
\end{verbatim}
As a designer:
\begin{verbatim}
   \renewcommand{\rmdefault}{ptm}
\end{verbatim}

\section{Installer\rq\nobreak{}s interface}

The \verb|psnfss| software contains the \LaTeX{} PostScript fonts.

It contains:
\begin{itemize}
\item a set of \LaTeX{} packages
\item a set of font definition (\verb|fd|) files
\item a set of \TeX{} font metric (\verb|tfm|) files
\end{itemize}
For example Adobe Times is used with:
\begin{itemize}
\item \verb|times.sty|
\item \verb|T1ptm.fd|
\item \verb|ptmrq.tfm|, \verb|ptmriq.tmf|, \verb|ptmbq.tfm| and
 \verb|ptmbiq.tfm|
\end{itemize}

\section{Document portability}

The \verb|psnfss| package does \emph{not} say how the fonts should be
printed.  For example:
\begin{itemize}
\item with \verb|dvips| or Oz\TeX they can be printed using virtual fonts
\item with Textures or \verb|dvipsone| they can be
   printed using font re-encodings
\end{itemize}
But since every \LaTeX{} site has the same \verb|tfm| files, documents will
be portable.

A document may have three different encodings:
\begin{itemize}
\item the input encoding (e.g.~Macintosh)
\item the internal encoding (e.g.~Cork)
\item the driver encoding (e.g.~Adobe Standard)
\end{itemize}
\LaTeX{} supports the Cork internal encoding for PostScript fonts, but
doesn\rq\nobreak{}t specify input or driver encodings, so:
\begin{itemize}
\item documents are portable (since all documents use the \verb|T1|
   encoding)
\item documents can use specialist encodings (e.g.~Macintosh or ANSI)
\end{itemize}

Often users are unclear about why the alignment
of their paragraph boxes (or minipages) appears the
way it does. 
To help explain the observed behaviour a few examples 
are presented below, which hopefully,
clarify some of the issues.
 

\newcommand{\HR}{\rule{.5em}{0.4pt}}
\begin{verbatim}
\newcommand{\HR}{\rule{.5em}{0.4pt}}
\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
           A A A A A A A A A A A A A A A
  \end{minipage} xx
  \begin{minipage}[t]{20}
           B B B B B B B B B B B B B B B B B B B B B B B B
  \end{minipage}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR
\end{verbatim}

\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
           A A A A A A A A A A A A A A A
  \end{minipage} xx
  \begin{minipage}[t]{20mm}
           B B B B B B B B B B B B B B B B B B B B B B B B
  \end{minipage}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR

\begin{verbatim}
    ...
  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR
\end{verbatim}

\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
           A A A A A A A A A A A A A A A
  \end{minipage} xx
  \begin{minipage}[t]{20mm}
           B B B B B B B B B B B B B B B B B B B B B B B B
  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR

\begin{verbatim}
\HR
\begin{minipage}[b]{20mm}
     A A A A A A A A A A A A A A A
\end{minipage}\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
     B B B B B B B B B B B B B B B B B B B B B B B B gg jj
  \end{minipage} xx
  \begin{minipage}[t]{20mm}  C C C C C C C  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR
\end{verbatim}

\HR
\begin{minipage}[b]{20mm}
     A A A A A A A A A A A A A A A
\end{minipage}\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
     B B B B B B B B B B B B B B B B B B B B B B B B gg jj
  \end{minipage} xx
  \begin{minipage}[t]{20mm}  C C C C C C C  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR

\begin{verbatim}
\settodepth{\Mylen}{gj}
    ...
  \begin{minipage}[t]{12mm}  C C C C C C C  \end{minipage}
  \par\vspace*{-\Mylen}
\end{minipage}\HR
\end{verbatim}

\settodepth{\Mylen}{gj}
\HR
\begin{minipage}[b]{20mm}
     A A A A A A A A A A A A A A A
\end{minipage}\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
     B B B B B B B B B B B B B B B B B B B B B B B B gg jj
  \end{minipage} xx
  \begin{minipage}[t]{20mm}  C C C C C C C  \end{minipage}
  \par\vspace*{-\Mylen}
\end{minipage}\HR