summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/make-tex-work/html/ch04.html
blob: a64b3e597fbf8ecaaf0723da3a7a109988c9ac3a (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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator"
    content="HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org" />
    <meta http-equiv="Content-Type"
    content="text/html; charset=ISO-8859-1" />

    <title>Chapter&#160;4.&#160;Macro Packages</title>
    <link rel="stylesheet" href="mtw.css" type="text/css" />
    <meta name="generator"
    content="DocBook XSL Stylesheets V1.53.0" />
    <link rel="home" href="index.html" title="Making TeX Work" />
    <link rel="up" href="pt01.html"
    title="Part&#160;I.&#160;An Introduction to TeX" />
    <link rel="previous" href="ch03.html"
    title="Chapter&#160;3.&#160;Running TeX" />
    <link rel="next" href="pt02.html"
    title="Part&#160;II.&#160;Elements of a Complex Document" />
  </head>

  <body>
    <div class="navheader">
      <table border="0" cellpadding="0" cellspacing="0"
      width="100%" summary="Navigation table">
        <tr>
          <td align="left">&#160;<a title="Making TeX Work"
          href="index.html"><img src="figures/nav-home.png"
          alt="Home" border="0" /></a>&#160;<a
          title="Chapter&#160;3.&#160;Running TeX"
          href="ch03.html"><img src="figures/nav-prev.png"
          alt="Prev" border="0" /></a>&#160;<a
          title="Part&#160;I.&#160;An Introduction to TeX"
          href="pt01.html"><img src="figures/nav-up.png" alt="Up"
          border="0" /></a>&#160;<a
          title="Part&#160;II.&#160;Elements of a Complex Document"
          href="pt02.html"><img src="figures/nav-next.png"
          alt="Next" border="0" /></a></td>

          <td align="right"><i>Making TeX Work</i> Version 1.0.1
          <span class="alpha-version">(<a
          href="co01.html"><em>Alpha</em></a>)</span></td>
        </tr>
      </table>
    </div>

    <div class="chapter">
      <div class="titlepage">
        <div>
          <h2 class="title"><a id="chap.macpack"
          name="chap.macpack"></a>Chapter&#160;4.&#160;Macro
          Packages</h2>
        </div>

        <div>
          <p class="releaseinfo">$Revision: 1.1 $</p>
        </div>

        <div>
          <p class="pubdate">$Date: 2002/08/23 14:31:13 $</p>
        </div>
        <hr class="component-separator" />
      </div>

      <p>Everyone who uses TeX uses a macro package<a
      id="id2869171" class="indexterm" name="id2869171"></a><a
      id="id2869178" class="indexterm" name="id2869178"></a> (also
      called a &#8220;format&#8221;). A macro package extends TeX
      to provide functionality that is suited to a particular task
      or set of tasks.</p>

      <p>This chapter provides a summary of TeX macro packages.
      General-purpose packages designed to typeset a wide range of
      documents---articles, books, letters, and reports---are
      examined first. The general-purpose packages described are
      Plain TeX, Extended Plain TeX, LaTeX2e, LaTeX, AMSTeX,
      AMSLaTeX, Lollipop, and TeXinfo. After surveying the
      general-purpose packages, several special-purpose packages
      designed to handle specific tasks---typesetting
      transparencies, music, chemistry or physics diagrams,
      etc.---are described. The special-purpose packages surveyed
      are SliTeX, FoilTeX, Seminar, MusicTeX, ChemStruct, and
      ChemTeX.</p>

      <p>There are a lot of overlapping features and similar
      commands in the general-purpose packages. To understand why
      this is the case, consider how a new macro package comes into
      existence. An ambitious person, who is very familiar with
      TeX, decides that there are some things she would like to
      express in her documents that are difficult to express with
      existing formats. Perhaps, for example, no existing format
      produces documents that match the precise specifications
      required for publishing in her field, or perhaps she has in
      mind a whole new document structuring paradigm. A more
      mundane possibility is simply that she has been customizing
      an existing format for some time and now feels it has enough
      unique features to be useful to others.</p>

      <p>In any event, a new format is born. Now, if this format is
      designed for a very specific task, writing multiple-choice
      mathematics exams, for example, it might not have very many
      general-purpose writing features. On the other hand, if it is
      designed for writing longer, more general documents (e.g.,
      history textbooks or papers to appear in a particular
      journal) then there are a number of features that it is
      likely to include; provisions for numbered lists, cross
      references, tables of contents, indexes, and quotations are
      all examples of features common to many documents.</p>

      <p>To support these common features, many macro packages have
      similar control sequences. This stems from the fact that they
      are all built on top of a common set of primitives<a
      id="id2869134" class="indexterm" name="id2869134"></a> and
      that macro package authors tend to copy some features of
      other packages into their own.</p>

      <p>You may find that you'd like to use the features of
      several different packages in the same document.
      Unfortunately, there is no provision for using multiple
      formats to process a single document. The features required
      to process most documents are shared by all of the
      general-purpose formats, however. You are more likely to need
      multiple macro packages if you want to use a special format
      to construct a diagram or figure and incorporate it into a
      document. Chapter&#160;<a href="ch06.html"
      title="Chapter&#160;6.&#160;Pictures and Figures">Chapter&#160;6</a>,
      <span class="emphasis"><em><a href="ch06.html"
      title="Chapter&#160;6.&#160;Pictures and Figures">Chapter&#160;6</a></em></span>,
      describes several ways to take &#8220;electronic
      snippets&#8221; of one document and insert them into another,
      which is one possible solution to this problem.</p>

      <p>If you're beginning to feel a little lost, have no fear.
      Most general-purpose formats are sufficient for most
      documents. And there's no reason why every document you write
      has to be done with the same format. Many people find LaTeX
      and Plain TeX sufficient, but if you're writing an article
      for a particular journal and someone has written a format
      specifically for that journal's documents, by all means use
      it. It is more likely, however, that someone has written a
      style file<a id="id2873990" class="indexterm"
      name="id2873990"></a> which tailors LaTeX to the requirements
      of the journal.</p>

      <p>In addition to describing some common macro packages in
      this chapter, I'll describe how to build format files for
      them. If the packages that you want to use have already been
      installed at your site, you can ignore the installation
      sections.</p>

      <p>The packages that you find most convenient will depend on
      the tasks you perform and how well each package suits your
      work style. The list of packages in this chapter is not meant
      to be all-inclusive, nor is it my intention to suggest which
      packages are best. Use the ones <span
      class="emphasis"><em>you</em></span> like, for whatever
      reasons.</p>

      <p>I can hear some of you already, &#8220;I don't really need
      a macro package,&#8221; you say, &#8220;I can roll my own
      with just TeX.&#8221;</p>

      <p>And you are absolutely correct.</p>

      <p>I don't recommend it, however. It's akin to using your
      compiler without any of the built-in functions. Most TeX
      primitives offer little support by themselves for writing
      documents.</p>

      <div class="sidebar">
        <p class="title"><b>A New Perspective</b></p>

        <p>LaTeX2e<a id="id2874066" class="indexterm"
        name="id2874066"></a> (and its successor, which will be
        LaTeX3<a id="id2874077" class="indexterm"
        name="id2874077"></a>) seek to address many of the problems
        mentioned above by defining a core LaTeX format with
        extension packages to provide custom features.</p>

        <p>The LaTeX2e system provides a single format <a
        id="id2874097" class="indexterm" name="id2874097"></a> file
        that supports LaTeX<a id="id2874111" class="indexterm"
        name="id2874111"></a>, AMSTeX<a id="id2874123"
        class="indexterm" name="id2874123"></a>, and SliTeX<a
        id="id2874134" class="indexterm" name="id2874134"></a>. For
        the time being, LaTeX2e is described separately in this
        chapter along with the other formats. Be aware, however,
        that LaTeX2e is now the standard LaTeX<sup>[<a
        id="id2874145" name="id2874145"
        href="#ftn.id2874145">39</a>]</sup>and you should migrate
        to it as soon as possible.</p>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a
            id="macpack.sec.latexvslatexe"
            name="macpack.sec.latexvslatexe"></a>Installation:
            Making Format Files</h2>
          </div>
        </div>

        <p>A format file<a id="id2874176" class="indexterm"
        name="id2874176"></a><a id="id2874186" class="indexterm"
        name="id2874186"></a>, as described in Chapter&#160;<a
        href="ch03.html"
        title="Chapter&#160;3.&#160;Running TeX">Chapter&#160;3</a>,
        <span class="emphasis"><em><a href="ch03.html"
        title="Chapter&#160;3.&#160;Running TeX">Chapter&#160;3</a></em></span>,
        is a special &#8220;compiled&#8221; version of a macro
        package. The iniTeX<a id="id2874224" class="indexterm"
        name="id2874224"></a> program interprets all of the control
        sequences in a macro package and writes the corresponding
        memory image into a file. Loading a format file is much
        faster than loading individual macro packages in your
        document because TeX does not have to interpret any of the
        control sequences while it is also processing text.</p>

        <p>In general, all format files should be stored in the
        same directory.<sup>[<a id="id2874246" name="id2874246"
        href="#ftn.id2874246">40</a>]</sup> If you install TeX in a
        directory called <tt>tex</tt>, then formats typically go in
        a directory called <tt>formats</tt><a id="id2874268"
        class="indexterm" name="id2874268"></a> in the <tt>tex</tt>
        directory<a id="id2874283" class="indexterm"
        name="id2874283"></a>. This is not universally the case
        because you need separate format directories for big and
        small TeXs.<sup>[<a id="id2874291" name="id2874291"
        href="#ftn.id2874291">41</a>]</sup></p>

        <p>Usually, an environment variable<a id="id2874326"
        class="indexterm" name="id2874326"></a><a id="id2874333"
        class="indexterm" name="id2874333"></a> indicates where the
        format files are located. Environment variables are a
        common way of customizing your interaction with programs.
        They are usually set in your <tt>AUTOEXEC.BAT</tt> file<a
        id="id2874354" class="indexterm" name="id2874354"></a> for
        MS-DOS, <tt>CONFIG.SYS</tt><a id="id2874371"
        class="indexterm" name="id2874371"></a> for OS/2, or the
        <span class="emphasis"><em>rc</em></span>-file for a shell
        (i.e., <tt>.cshrc</tt><a id="id2874392" class="indexterm"
        name="id2874392"></a>, <tt>.kshrc</tt><a id="id2874409"
        class="indexterm" name="id2874409"></a>) on unix systems.
        Any good reference book for your operating system or shell
        will describe how to use environment variables.</p>

        <p>A common name for the environment variable that
        indicates where TeX formats are located is
        <tt>TEXFORMATS</tt>. Implementations that provide big and
        small TeXs need another variable to indicate the directory
        that contains formats for big TeX.</p>

        <p>IniTeX is not always a separate program. Some
        implementations of TeX combine the functionality of TeX and
        iniTeX into a single program and use a special switch at
        runtime to determine which function to perform. In this
        chapter, all of the examples use the program name
        <tt>initex</tt> to identify iniTeX. If you use an
        implementation that doesn't provide a separate iniTeX
        program, you should use the TeX program with the iniTeX
        switch<a id="id2874454" class="indexterm"
        name="id2874454"></a> instead. For example, for emTeX, use
        <tt>tex /i</tt> instead of <tt>initex</tt> when you build a
        format.</p>

        <p>Like TeX, iniTeX needs to be able to find input files<a
        id="id2874487" class="indexterm" name="id2874487"></a>.
        Usually, this is accomplished by searching the directories
        listed in the <tt>TEXINPUTS</tt> environment variable.
        Place the input files that iniTeX needs in a directory on
        the <tt>TEXINPUTS</tt> path before running iniTeX unless
        otherwise directed. The <tt>TEXINPUTS</tt> environment
        variable is discussed in the &#8220;<a
        href="ch03.html#sec.userfiles" title="User Files">the
        section called &#8220;User Files&#8221;</a>&#8221; section
        of Chapter&#160;<a href="ch03.html"
        title="Chapter&#160;3.&#160;Running TeX">Chapter&#160;3</a>.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2874541"
              name="id2874541"></a>Hyphenation Patterns</h3>
            </div>
          </div>

          <p>In order for TeX to correctly hyphenate words, every
          format file must contain a set of hyphenation patterns<a
          id="id2874552" class="indexterm" name="id2874552"></a>.
          The patterns are part of an algorithmic solution to the
          problem of breaking a word into syllables for
          hyphenation.</p>

          <p>The details of the hyphenation algorithm (given in
          Appendix H of <span class="emphasis"><em>The
          TeXbook</em></span>&#160;[<a
          href="bi01.html#kn:texbook">kn:texbook</a>]) are too
          complex to describe here, but two aspects of this
          solution deserve particular emphasis. First, using
          patterns means that a dictionary of hyphenated words is
          not necessary.<sup>[<a id="id2874585" name="id2874585"
          href="#ftn.id2874585">42</a>]</sup> This saves a lot of
          space and time. Second, by loading different sets of
          patterns, TeX can achieve equal success at hyphenating
          any language---even English ;-). There are actually at
          least two sets of hyphenation patterns for English, one
          for British English and one for American English.
          Chapter&#160;<a href="ch07.html"
          title="Chapter&#160;7.&#160;International Considerations">
          Chapter&#160;7</a>, <span class="emphasis"><em><a
          href="ch07.html"
          title="Chapter&#160;7.&#160;International Considerations">
          Chapter&#160;7</a></em></span>, describes how to load
          multiple sets of hyphenation patterns for typesetting
          multilingual documents<a id="id2874620" class="indexterm"
          name="id2874620"></a>.</p>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2874634"
            name="id2874634"></a>General-purpose Formats</h2>
          </div>
        </div>

        <p>This section describes several macro packages <a
        id="id2874644" class="indexterm" name="id2874644"></a> that
        are designed for formatting standard documents like
        articles or books. In order to provide some form of
        comparative measure, each macro package is used to create
        the same document, a one-page report that looks like
        Figure&#160;<a href="ch04.html#fig.sampresults"
        title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>.
        I constructed this example to demonstrate a few common
        elements in a document: several sizes of headings, a
        paragraph of text, inline and displayed mathematics, and a
        few fonts. There are lots of other things that aren't shown
        (tables, figures, footnotes, etc.), and these elements vary
        as much as any other in the different macro packages.</p>

        <div class="figure">
          <a id="fig.sampresults" name="fig.sampresults"></a>

          <p class="title"><b>Figure&#160;4.1.&#160;Sample
          page</b></p>

          <div class="mediaobject">
            <img src="perf-ltx.eps" />
          </div>
        </div>

        <p>Observant readers will notice that the examples are
        shown in the Computer Modern fonts while the rest of this
        book uses different fonts.<sup>[<a id="id2874736"
        name="id2874736" href="#ftn.id2874736">43</a>]</sup> There
        are a number of reasons why the example is shown in
        Computer Modern. For one thing, all of the formats
        discussed here use the Computer Modern fonts by default.
        Using a different set of fonts would only add more
        complexity to each example. A more subtle problem is that I
        do not have appropriate mathematics fonts for Garamond.
        There are a number of complex issues involving the use of
        fonts in TeX. They are discussed in Chapter&#160;<a
        href="ch05.html"
        title="Chapter&#160;5.&#160;Fonts">Chapter&#160;5</a>,
        <span class="emphasis"><em><a href="ch05.html"
        title="Chapter&#160;5.&#160;Fonts">Chapter&#160;5</a></em></span>.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2874772"
              name="id2874772"></a>Plain TeX</h3>
            </div>
          </div>

          <p>Plain TeX<a id="id2874779" class="indexterm"
          name="id2874779"></a> is the format <a id="id2874790"
          class="indexterm" name="id2874790"></a> written by Donald
          Knuth<a id="id2874805" class="indexterm"
          name="id2874805"></a> during the development of TeX. It
          is described fully in <span class="emphasis"><em>The
          {TeX}book</em></span>&#160;[<a
          href="bi01.html#kn:texbook">kn:texbook</a>].</p>

          <p>Plain TeX ties together the TeX primitives <a
          id="id2874830" class="indexterm" name="id2874830"></a> in
          a way that makes it practical to work in TeX. If you do
          not have a computer programming background, you may find
          Plain TeX a little bit intimidating. It is definitely a
          &#8220;roll your own&#8221; environment. Although it
          demonstrably contains all of the functionality required
          to write everything from letters to books, there is very
          little &#8220;user-friendly&#8221; packaging around the
          internals of TeX.</p>

          <p>Aside from user interface considerations, which are
          highly subjective, Plain TeX lacks some functionality
          when compared to other formats. There is no provision in
          Plain TeX for automatically numbered sections, labelled
          figures, tables of contents, indexes, or bibliographies.
          Any of these functions can be constructed in Plain TeX if
          you are willing to invest the time and energy required to
          write your own macros, but they are not built into Plain
          TeX.</p>

          <p>If you enjoy writing your own macros or plan to
          produce novel types of documents, a firm grasp of Plain
          TeX will allow you to write anything in TeX. A firm grasp
          of Plain TeX also makes it easier to understand and
          modify other formats (like LaTeX) that are built on top
          of Plain TeX.</p>

          <p>In addition, Plain TeX is the only format that is
          always distributed with TeX. The other formats discussed
          in this chapter are freely available but do not come with
          TeX.</p>

          <p>The Plain TeX input that produces the report in
          Figure&#160;<a href="ch04.html#fig.sampresults"
          title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>
          is shown in Example&#160;<a
          href="ch04.html#ex.sampplaintex"
          title="Figure&#160;4.2.&#160;Plain TeX Input">Figure&#160;4.2</a>.</p>

          <div class="figure">
            <a id="ex.sampplaintex" name="ex.sampplaintex"></a>

            <p class="title"><b>Figure&#160;4.2.&#160;Plain TeX
            Input</b></p>

            <div class="mediaobject">
              <img src="perf-ptx" />
            </div>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2874942"
                name="id2874942"></a>Building the Plain TeX
                format</h4>
              </div>
            </div>

            <p>To build Plain TeX<a id="id2874951"
            class="indexterm" name="id2874951"></a>, you need only
            two files: <tt>plain.tex</tt><a id="id2874971"
            class="indexterm" name="id2874971"></a> and
            <tt>hyphen.tex</tt><a id="id2874994" class="indexterm"
            name="id2874994"></a>. These files are distributed with
            TeX so they should be available as soon as you have
            installed TeX. The <tt>hyphen.tex</tt> file is
            language-dependent. Readers who frequently work with
            non-English text should read Chapter&#160;<a
            href="ch07.html"
            title="Chapter&#160;7.&#160;International Considerations">
            Chapter&#160;7</a> for more information about obtaining
            non-English hyphenation patterns.</p>

            <p>The command:</p>
<pre class="screen">
\$ <span class="bold"><b>initex plain \dump</b></span>
</pre>

            <p>will create the Plain TeX format. Move the resulting
            files, <tt>plain.fmt</tt><a id="id2875061"
            class="indexterm" name="id2875061"></a> and
            <tt>plain.log</tt><a id="id2875077" class="indexterm"
            name="id2875077"></a>, into your TeX formats
            directory.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2875093"
              name="id2875093"></a>Extended Plain TeX</h3>
            </div>
          </div>

          <p>Extended Plain TeX<a id="id2875102" class="indexterm"
          name="id2875102"></a><a id="id2875112" class="indexterm"
          name="id2875112"></a> extends Plain TeX in a number of
          useful ways without forcing you to use any particular
          &#8220;style&#8221; of output. The argument is this:
          although Plain TeX really doesn't provide all of the
          features that you need (tables of contents, cross
          references, citations, enumerated lists, convenient
          access to verbatim input, etc), many of these features
          don't have any direct impact on the appearance of your
          document. Unfortunately, other general-purpose macro
          packages like LaTeX, which do provide these features,
          tend to force you to accept their notion of what the
          typeset page should look like.<sup>[<a id="id2875131"
          name="id2875131" href="#ftn.id2875131">44</a>]</sup></p>

          <p>Extended Plain TeX is an attempt to solve that
          problem. It provides many behind-the-scenes features
          without providing any general page layout commands (like
          \chapter or \section), which means that these features
          can be used inside Plain TeX without much difficulty and
          without changing the layout of typeset pages.</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2875171"
                name="id2875171"></a>Building the Extended Plain
                TeX format</h4>
              </div>
            </div>

            <p>To build the Extended Plain TeX format<a
            id="id2875181" class="indexterm" name="id2875181"></a>,
            you need the <tt>plain.tex</tt><a id="id2875201"
            class="indexterm" name="id2875201"></a> and
            <tt>hyphen.tex</tt> files <a id="id2875225"
            class="indexterm" name="id2875225"></a> required to
            build the Plain format as well as the
            <tt>eplain.tex</tt> file <a id="id2875250"
            class="indexterm" name="id2875250"></a> distributed
            with Extended Plain TeX.<sup>[<a id="id2875268"
            name="id2875268" href="#ftn.id2875268">45</a>]</sup>
            Make and install the Plain TeX format first, then
            change to the directory that contains the Extended
            Plain TeX distribution.</p>

            <p>The command:</p>
<pre class="screen">
$ <span class="bold"><b>initex \&amp;plain eplain \dump</b></span>
</pre>

            <p>will create the Extended Plain TeX format. Move the
            resulting files, <tt>eplain.fmt</tt> <a id="id2875315"
            class="indexterm" name="id2875315"></a> and
            <tt>eplain.log</tt><a id="id2875338" class="indexterm"
            name="id2875338"></a>, into your TeX formats
            directory.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2875359"
              name="id2875359"></a>LaTeX2e Versus LaTeX</h3>
            </div>
          </div>

          <p>The tremendous popularity of LaTeX<a id="id2875368"
          class="indexterm" name="id2875368"></a><a id="id2875378"
          class="indexterm" name="id2875378"></a> in the TeX
          community has had an unfortunate side effect: because it
          is a very familiar and flexible format, many people have
          used it as the basis for extensions of one sort or
          another. This has resulted in a wide range of (slightly)
          incompatible formats and a lot of frustration.</p>

          <p>This situation is being rectified by a new release of
          LaTeX, currently called LaTeX2e<a id="id2875402"
          class="indexterm" name="id2875402"></a><a id="id2875414"
          class="indexterm" name="id2875414"></a>. The new release
          replaces the existing dialects of LaTeX (LaTeX with and
          without NFSS, SliTeX, AMSLaTeX, etc.) with a single core
          system and a set of extension packages. LaTeX2e includes
          a compatibility mode which will allow it to continue to
          format existing documents without change (provided that
          they do not rely on local modifications to the LaTeX
          format, of course). Local modifications can also be
          incorporated into the LaTeX2e system as extension
          packages, making LaTeX2e a complete replacement for all
          existing versions of LaTeX and packages closely derived
          from LaTeX.</p>

          <p>The most significant and least compatible difference
          between LaTeX and LaTeX2e<a id="id2875443"
          class="indexterm" name="id2875443"></a><a id="id2875460"
          class="indexterm" name="id2875460"></a> is the font
          selection scheme. There are many control sequences for
          selecting fonts in LaTeX. Some control the typeface (\rm,
          \tt, \sc, etc.); some the size (\small, \normalsize,
          \large, etc.); and some the appearance (\it, \bf, \em,
          etc.). Under the Old Font Selection Scheme (OFSS)<a
          id="id2875523" class="indexterm" name="id2875523"></a>,
          the control sequences for selecting a font completely
          override any font selection already in place. Consider,
          for example, the control sequences \it and \bf, which
          switch to italic and boldface. Using \bf\it produces
          italic text, and \it\bf produces boldface text, and <span
          class="emphasis"><em>neither</em></span> produces
          boldfaced-italic text (which is probably what you
          wanted).</p>

          <p>Under the New Font Selection Scheme<a id="id2875563"
          class="indexterm" name="id2875563"></a><a id="id2875570"
          class="indexterm" name="id2875570"></a>, typeface (called
          <span class="emphasis"><em>family</em></span> in NFSS
          parlance), appearance (called <span
          class="emphasis"><em>series</em></span> and <span
          class="emphasis"><em>shape</em></span>), and size are
          viewed as orthogonal components in font selection.
          Because these parameters are independent, selecting an
          italic appearance with the \it control sequence switches
          to italic in the current typeface and size. Under the
          NFSS, \bf\cs{it} <span
          class="emphasis"><em>does</em></span> select
          boldface-italic in both the current typeface and size (if
          it is available).</p>

          <p>LaTeX2e supports only the NFSS, version 2 (called
          NFSS2)<a id="id2875613" class="indexterm"
          name="id2875613"></a><a id="id2875624" class="indexterm"
          name="id2875624"></a>. For more than a year, the NFSS
          (initially version 1, and more recently version 2) has
          been available as an extension for LaTeX 2.09. However,
          in light of stable test releases of LaTeX2e, the NFSS2
          package for LaTeX 2.09 has been withdrawn. The discussion
          of NFSS in this book applies equally well to LaTeX 2.09
          with NFSS2, but it is described in terms of LaTeX2e in an
          effort to be more applicable in the future. The NFSS is
          discussed in more detail in Chapter&#160;<a
          href="ch05.html"
          title="Chapter&#160;5.&#160;Fonts">Chapter&#160;5</a>.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="sec.latexe"
              name="sec.latexe"></a>LaTeX2e</h3>
            </div>
          </div>

          <p>Leslie Lamport<a id="id2875668" class="indexterm"
          name="id2875668"></a>'s LaTeX format is probably the most
          commonly used TeX format. It is described in <span
          class="emphasis"><em>LaTeX: A Document Preparation
          System</em></span>&#160;[<a
          href="bi01.html#ll:latexbook">ll:latexbook</a>] and many
          other TeX books. LaTeX2e<a id="id2875692"
          class="indexterm" name="id2875692"></a> is the new
          standard LaTeX. It is described in <span
          class="emphasis"><em>{The LaTeX
          Companion}</em></span>&#160;[<a
          href="bi01.html#latexcompanion">latexcompanion</a>]. The
          next edition of <span class="emphasis"><em>LaTeX: A
          Document Preparation System</em></span>&#160;[<a
          href="bi01.html#ll:latexbook">ll:latexbook</a>] will also
          describe LaTeX2e.</p>

          <div class="sidebar">
            <p>At the time of this writing, LaTeX2e is available
            only in a test release, but by the time you read this,
            it is likely to be available as the new standard LaTeX.
            It is described first in this chapter to emphasize that
            you should begin using LaTeX2e as soon as possible.
            Once LaTeX2e is out of testing, it will become LaTeX,
            and support for older versions will not be provided (at
            least not by the LaTeX developers). LaTeX2e includes a
            compatibility mode<a id="id2875736" class="indexterm"
            name="id2875736"></a> for old LaTeX documents so the
            transition should be relatively painless.</p>
          </div>

          <p>The central theme of LaTeX is &#8220;structured
          document preparation.&#8221; An ideal LaTeX document is
          described entirely in terms of its structure: chapters,
          sections, paragraphs, numbered lists, bulleted items,
          tables, figures, and all the other elements of a document
          are identified descriptively. For example, you enclose
          figures in a figure <span
          class="emphasis"><em>environment</em></span> identified
          by the control sequences \begin{figure} and
          \end{figure}.</p>

          <p>When you are ready to print your document, select an
          appropriate document class<a id="id2875794"
          class="indexterm" name="id2875794"></a>, and LaTeX
          formats your document according to the rules of the
          selected style. In the case of the ideal document, it
          might first be printed in a magazine or newsletter using
          the article class. Later, when it is incorporated into a
          book, selecting the book class is <span
          class="emphasis"><em>all</em></span> that is required to
          produce appropriate output; the document itself is
          unchanged.</p>

          <p>LaTeX is written on top of Plain TeX. This means that
          almost any control sequence <a id="id2875821"
          class="indexterm" name="id2875821"></a> or macro that you
          learn about in Plain TeX can also be used in LaTeX. Of
          course, LaTeX insulates you from many Plain TeX commands
          by wrapping a much more user-friendly interface around
          them.</p>

          <p>The LaTeX2e input that produces the sample page in
          Figure&#160;<a href="ch04.html#fig.sampresults"
          title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>
          is shown in Example&#160;<a
          href="ch04.html#fig.samplatex2e"
          title="Figure&#160;4.3.&#160;LaTeX2e Input">Figure&#160;4.3</a>.
          The only difference between this document and an old
          LaTeX document is the use of the \documentclass
          declaration instead of the \documentstyle
          declaration.<sup>[<a id="id2875867" name="id2875867"
          href="#ftn.id2875867">46</a>]</sup> For more complex
          documents, other minor changes may also be necessary.</p>

          <div class="figure">
            <a id="fig.samplatex2e" name="fig.samplatex2e"></a>

            <p class="title"><b>Figure&#160;4.3.&#160;LaTeX2e
            Input</b></p>

            <div class="mediaobject">
              <img src="perf-l2e.eps" />
            </div>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="sec.buildlatexe"
                name="sec.buildlatexe"></a>Building the LaTeX2e
                format</h4>
              </div>
            </div>

            <p>The LaTeX2e distribution is available from the
            directory <tt>macros/latex2e/core</tt> in the CTAN
            archives<a id="id2875937" class="indexterm"
            name="id2875937"></a>.</p>

            <p>The following steps will build the LaTeX2e format.
            For more complete installation instructions, read the
            file <tt>install.l2e</tt> in the LaTeX2e
            distribution.</p>

            <div class="orderedlist">
              <ol type="1">
                <li>
                  <p>Place the LaTeX2e distribution in a temporary
                  directory and make that directory the current
                  directory. After the installation is complete,
                  you will need to move only selected files into
                  the standard places.</p>
                </li>

                <li>
                  <p>Restrict to only the current directory the
                  directories that TeX searches for input files</p>

                  <p>This can usually be accomplished by setting
                  the environment variable
                  <tt>TEXINPUTS</tt><sup>[<a id="id2876004"
                  name="id2876004"
                  href="#ftn.id2876004">47</a>]</sup> to a single
                  period or the absolute path name of the current
                  directory.</p>
                </li>

                <li>
                  <p>Copy the <tt>hyphen.tex</tt> file <a
                  id="id2876037" class="indexterm"
                  name="id2876037"></a> from the Plain TeX
                  distribution into the current directory.</p>
                </li>

                <li>
                  <p>Issue the command:</p>
<pre class="screen">
\$ <span class="bold"><b>initex unpack2e.ins</b></span>
</pre>

                  <p>This will unpack all of the distribution
                  files.</p>
                </li>

                <li>
                  <p>Build the format file by issuing the
                  command:</p>
<pre class="screen">
\$ <span class="bold"><b>initex latex2e.ltx</b></span>
</pre>

                  <p>Move the resulting files <tt>latex2e.fmt</tt>
                  <a id="id2876114" class="indexterm"
                  name="id2876114"></a> and <tt>latex2e.log</tt><a
                  id="id2876128" class="indexterm"
                  name="id2876128"></a> into the TeX formats
                  directory.</p>
                </li>

                <li>
                  <p>In addition to the files needed to build the
                  format, unpacking the LaTeX2e distribution
                  creates many files that are needed for formatting
                  documents. These files must be placed in a
                  location where TeX will find them. However, in
                  order to maintain a functioning LaTeX 2.09
                  system, you must not place the new files in the
                  same input directory as the existing
                  files.<sup>[<a id="id2876148" name="id2876148"
                  href="#ftn.id2876148">48</a>]</sup></p>

                  <p>Create a new directory (or folder) for the new
                  files. On the unix system that I use, where
                  existing input files are stored in a directory
                  called <tt>/usr/local/lib/tex/inputs</tt>, I
                  created <tt>/usr/local/lib/tex/latex2e</tt> to
                  store the new files. You will have to add the new
                  directory to the <span
                  class="emphasis"><em>front</em></span> of the
                  list of directories that TeX searches for input
                  files whenever you format a document with
                  LaTeX2e.</p>

                  <p>Move the files that the installation script
                  produces into the new directory. Move the files
                  <tt>docstrip.tex</tt>, <tt>latexbug.tex</tt>,
                  <tt>sfontdef.ltx</tt>, <tt>slides.ltx</tt>,
                  <tt>testpage.tex</tt>, and all of the files that
                  end in <tt>.cfg</tt>, <tt>.cls</tt>,
                  <tt>.clo</tt>, <tt>.def</tt>, <tt>.fd</tt>, and
                  <tt>.sty</tt>. You should also move the files
                  <tt>gglo.ist</tt> and <tt>gind.ist</tt> someplace
                  where <b>MakeIndex</b> can find them.
                  (<b>MakeIndex</b> is described in Chapter&#160;<a
                  href="ch12.html"
                  title="Chapter&#160;12.&#160;Bibliographies, Indexes, and Glossaries">
                  Chapter&#160;12</a>, <span
                  class="emphasis"><em><a href="ch12.html"
                  title="Chapter&#160;12.&#160;Bibliographies, Indexes, and Glossaries">
                  Chapter&#160;12</a></em></span>.)</p>

                  <p>One of the aspects of the test releases that
                  continues to change is the exact list of files
                  that must be moved. Consult the
                  <tt>install.l2e</tt> file in the distribution for
                  the exact list. The list above is from the test
                  version of January 28, 1994.</p>
                </li>
              </ol>
            </div>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="sec.latex"
              name="sec.latex"></a>LaTeX</h3>
            </div>
          </div>

          <p>This section briefly covers LaTeX version 2.09. This
          version of LaTeX<a id="id2876362" class="indexterm"
          name="id2876362"></a><a id="id2876373" class="indexterm"
          name="id2876373"></a> is still very widely used but it is
          being phased out.</p>

          <p>The LaTeX input to produce the sample page in
          Figure&#160;<a href="ch04.html#fig.sampresults"
          title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>
          is shown in Example&#160;<a
          href="ch04.html#fig.samplatex"
          title="Figure&#160;4.4.&#160;LaTeX Input File">Figure&#160;4.4</a>.</p>

          <div class="figure">
            <a id="fig.samplatex" name="fig.samplatex"></a>

            <p class="title"><b>Figure&#160;4.4.&#160;LaTeX Input
            File</b></p>

            <div class="mediaobject">
              <img src="perf-ltx.eps" />
            </div>
          </div>

          <p>Support for the NFSS in LaTeX 2.09 has been withdrawn.
          If you need to build a format with support for NFSS,
          consult the &#8220;<a href="ch04.html#sec.latexe"
          title="LaTeX2e">the section called
          &#8220;LaTeX2e&#8221;</a>&#8221; section of this
          chapter.</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="sec.buildlatexofss"
                name="sec.buildlatexofss"></a>Building the LaTeX
                format with the OFSS</h4>
              </div>
            </div>

            <p>The LaTeX <a id="id2876478" class="indexterm"
            name="id2876478"></a><a id="id2876490"
            class="indexterm"
            name="id2876490"></a>distribution<sup>[<a
            id="id2876500" name="id2876500"
            href="#ftn.id2876500">49</a>]</sup> includes three
            subdirectories, <tt>sty</tt>, <tt>doc</tt>, and
            <tt>general</tt>. All of the LaTeX files required to
            build the format file are in the <tt>general</tt>
            subdirectory. You will also need the
            <tt>hyphen.tex</tt> file <a id="id2876557"
            class="indexterm" name="id2876557"></a> required to
            build the Plain format.</p>

            <p>In the <tt>general</tt> subdirectory, the
            command:</p>
<pre class="screen">
\$ <span class="bold"><b>initex lplain</b></span>
</pre>

            <p>will create the LaTeX format. Move the resulting
            files, <tt>lplain.fmt</tt> <a id="id2876609"
            class="indexterm" name="id2876609"></a> and
            <tt>lplain.log</tt><a id="id2876632" class="indexterm"
            name="id2876632"></a>, to the TeX formats directory. In
            order to complete the installation, copy the files from
            the <tt>sty</tt> directory in the LaTeX distribution
            into a directory where TeX searches for input
            files.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="sec.texincolor"
              name="sec.texincolor"></a>AMSTeX</h3>
            </div>
          </div>

          <p>When the American Mathematical Society<a
          id="id2876675" class="indexterm" name="id2876675"></a>
          selected TeX as a document preparation system, they
          decided to extend it in a number of ways to make the
          creation of papers and journals easier. They had two
          goals: to make it easier for authors to write
          mathematical papers in TeX and to make the resulting
          papers conform to a particular set of style
          specifications. AMSTeX<a id="id2876684" class="indexterm"
          name="id2876684"></a> is described completely in <span
          class="emphasis"><em>The Joy of TeX</em></span>&#160;[<a
          href="bi01.html#ms:joyoftex">ms:joyoftex</a>].</p>

          <p>AMSTeX provides many commands that resemble LaTeX
          environments. These have the form
          \<i><tt>environment</tt></i> &#8230;
          \end<i><tt>environment</tt></i>. In addition, AMSTeX
          provides the notion of a document style to control
          style-related formatting issues.</p>

          <p>Another important contribution made by the American
          Mathematical Society when creating AMSTeX was the
          construction of a large number of new fonts<a
          id="id2876739" class="indexterm" name="id2876739"></a><a
          id="id2876757" class="indexterm" name="id2876757"></a>.
          The American Mathematical Society provides fonts with
          many more mathematical symbols than the fonts that come
          with TeX. These fonts are available as a separate package
          and can be used with any TeX macro package, not just
          AMSTeX.</p>

          <p>The AMSTeX input required to produce the document in
          Figure&#160;<a href="ch04.html#fig.amsresults"
          title="Figure&#160;4.6.&#160;AMS sample page">Figure&#160;4.6</a>
          is shown in Example&#160;<a
          href="ch04.html#ex.sampamstex"
          title="Figure&#160;4.5.&#160;AMSTeX Input File">Figure&#160;4.5</a>.
          The result of formatting this document does not appear
          exactly like Figure&#160;<a
          href="ch04.html#fig.sampresults"
          title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>
          because AMSTeX uses the style conventions of the American
          Mathematical Society.</p>

          <div class="figure">
            <a id="ex.sampamstex" name="ex.sampamstex"></a>

            <p class="title"><b>Figure&#160;4.5.&#160;AMSTeX Input
            File</b></p>

            <div class="mediaobject">
              <a type="simple" show="embed" actuate="onLoad"
              href="perf-amt"></a>
            </div>
          </div>

          <div class="figure">
            <a id="fig.amsresults" name="fig.amsresults"></a>

            <p class="title"><b>Figure&#160;4.6.&#160;AMS sample
            page</b></p>

            <div class="mediaobject">
              <img src="perf-amt.eps" />
            </div>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2876876"
                name="id2876876"></a>Building the AMSTeX
                format</h4>
              </div>
            </div>

            <p>In order to build the AMSTeX format, you need the
            <tt>plain.tex</tt> <a id="id2876893" class="indexterm"
            name="id2876893"></a> and <tt>hyphen.tex</tt> files <a
            id="id2876917" class="indexterm" name="id2876917"></a>
            from Plain TeX and the <tt>amstex.ini</tt> <a
            id="id2876941" class="indexterm" name="id2876941"></a>
            and <tt>amstex.tex</tt> <a id="id2876959"
            class="indexterm" name="id2876959"></a> files from the
            AMSTeX distribution<a id="id2876970" class="indexterm"
            name="id2876970"></a>.</p>

            <p>The command:</p>
<pre class="screen">
\$ <span class="bold"><b>initex amstex.ini</b></span>
</pre>

            <p>will create the AMSTeX format. Move the resulting
            files, <tt>amstex.fmt</tt> <a id="id2877015"
            class="indexterm" name="id2877015"></a> and
            <tt>amstex.log</tt><a id="id2877031" class="indexterm"
            name="id2877031"></a>, into your TeX formats
            directory.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2877047"
              name="id2877047"></a>AMSLaTeX</h3>
            </div>
          </div>

          <p>AMSLaTeX<a id="id2877055" class="indexterm"
          name="id2877055"></a><a id="id2877065" class="indexterm"
          name="id2877065"></a>, like AMSTeX, provides many
          features to make typesetting mathematics convenient while
          meeting the standards of the American Mathematical
          Society<a id="id2877079" class="indexterm"
          name="id2877079"></a> for publication. However, AMSTeX
          lacks many of the features that are present in LaTeX,
          like automatically numbered sections and tools for
          creating tables of contents and indexes.</p>

          <p>When LaTeX gained popularity, many authors requested
          permission to submit articles to the American
          Mathematical Society in LaTeX. In 1987, the American
          Mathematical Society began a project to combine the
          features of AMSTeX with the features of LaTeX. The result
          is AMSLaTeX.</p>

          <p>AMSLaTeX provides all of the functionality of LaTeX
          because it is an extension of LaTeX. It also provides the
          functionality of AMSTeX in LaTeX syntax and access to
          additional mathematical constructs and math symbols not
          present in LaTeX. .</p>

          <p>The input required to produce Figure&#160;<a
          href="ch04.html#fig.sampresults"
          title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>
          is not shown because they do not differ significantly
          from the LaTeX sample. Because the sample document
          doesn't use any of AMSLaTeX's additional features, it is
          exactly the same as the LaTeX document.</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2877132"
                name="id2877132"></a>Building the AMSLaTeX
                format</h4>
              </div>
            </div>

            <p>The AMSLaTeX macros are embodied entirely in style
            files for LaTeX. It is not necessary to build a special
            format file<a id="id2877141" class="indexterm"
            name="id2877141"></a>. However, the AMSLaTeX macros
            require the New Font Selection Scheme (NFSS). Consult
            the section on LaTeX, above, for instructions on
            building the LaTeX format with NFSS.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2877164"
              name="id2877164"></a>Lollipop</h3>
            </div>
          </div>

          <p>It can be argued that LaTeX has the following
          deficiency: although there are many different style
          options available, it is not easy for a novice user to
          change a style option. Changing the internals of most
          LaTeX style options requires a deep understanding of
          TeX.</p>

          <p>The Lollipop<a id="id2877183" class="indexterm"
          name="id2877183"></a><a id="id2877189" class="indexterm"
          name="id2877189"></a> format is very different from the
          other formats. The central thrust of Lollipop is that it
          should be easy to change and customize document styles.
          All Lollipop documents are built from five different
          generic constructs: headings, lists, text blocks, page
          grids, and external items.</p>

          <p>The Lollipop input required to produce a document like
          the sample page in Figure&#160;<a
          href="ch04.html#fig.sampresults"
          title="Figure&#160;4.1.&#160;Sample page">Figure&#160;4.1</a>
          is shown in Example&#160;<a
          href="ch04.html#ex.samplollipop"
          title="Figure&#160;4.7.&#160;Lollipop Input File">Figure&#160;4.7</a>.</p>

          <div class="figure">
            <a id="ex.samplollipop" name="ex.samplollipop"></a>

            <p class="title"><b>Figure&#160;4.7.&#160;Lollipop
            Input File</b></p>

            <div class="mediaobject">
              <a type="simple" show="embed" actuate="onLoad"
              href="perf-lol"></a>
            </div>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2873878"
                name="id2873878"></a>Building the Lollipop
                format</h4>
              </div>
            </div>

            <p>To make <a id="id2873887" class="indexterm"
            name="id2873887"></a>the Lollipop format, you need the
            Lollipop distribution and the file <tt>hyphen.tex</tt>
            from the Plain TeX distribution.</p>

            <p>This command will create the Lollipop format:</p>
<pre class="screen">
\$ <span class="bold"><b>initex lollipop \dump</b></span>
</pre>

            <p>It should be performed in the directory where you
            installed the Lollipop distribution so that all of the
            Lollipop files can be located. Move the resulting files
            <tt>lollipop.fmt</tt><a id="id2873932"
            class="indexterm" name="id2873932"></a> and
            <tt>lollipop.log</tt><a id="id2873950"
            class="indexterm" name="id2873950"></a> into your TeX
            formats directory.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2873910"
              name="id2873910"></a>TeXinfo</h3>
            </div>
          </div>

          <p>The TeXinfo format is a general-purpose format, but it
          was designed to support a particular application: to
          produce both online documentation and professional
          quality typeset documentation from the same source file.
          It is discussed in more detail in Chapter&#160;<a
          href="ch10.html"
          title="Chapter&#160;10.&#160;Online Documentation">Chapter&#160;10</a>,
          <span class="emphasis"><em><a href="ch10.html"
          title="Chapter&#160;10.&#160;Online Documentation">Chapter&#160;10</a></em></span>.</p>

          <p>The input file shown in Example&#160;<a
          href="ch04.html#ex.infinp"
          title="Figure&#160;4.8.&#160;TeXinfo Input">Figure&#160;4.8</a>
          produces the typeset output shown in Figure&#160;<a
          href="ch04.html#fig.infex"
          title="Figure&#160;4.9.&#160;TeXinfo sample page">Figure&#160;4.9</a>.
          The input file for this example is complicated by the
          fact that it contains mathematics. None of TeX's
          sophisticated mechanisms for handling mathematics are
          applicable to plain ASCII online documentation. The
          online documentation produced by the example in
          Example&#160;<a href="ch04.html#ex.infinp"
          title="Figure&#160;4.8.&#160;TeXinfo Input">Figure&#160;4.8</a>
          is shown in Figure&#160;<a href="ch04.html#fig.infinf"
          title="Figure&#160;4.10.&#160;Online documentation produced by MakeInfo">
          Figure&#160;4.10</a>.</p>

          <p>The TeXinfo<a id="id2877600" class="indexterm"
          name="id2877600"></a><a id="id2877609" class="indexterm"
          name="id2877609"></a> format is the official
          documentation format of the Free Software Foundation
          (FSF)<a id="id2877625" class="indexterm"
          name="id2877625"></a>. Although less commonly used, a
          LaTeX variant called LaTeXinfo<a id="id2877634"
          class="indexterm" name="id2877634"></a> is also
          available.</p>

          <div class="figure">
            <a id="ex.infinp" name="ex.infinp"></a>

            <p class="title"><b>Figure&#160;4.8.&#160;TeXinfo
            Input</b></p>

            <div class="mediaobject">
              <a type="simple" show="embed" actuate="onLoad"
              href="perf-inf"></a>
            </div>
          </div>

          <div class="figure">
            <a id="fig.infex" name="fig.infex"></a>

            <p class="title"><b>Figure&#160;4.9.&#160;TeXinfo
            sample page</b></p>

            <div class="mediaobject">
              <img src="perf-inf.eps" />
            </div>
          </div>

          <div class="figure">
            <a id="fig.infinf" name="fig.infinf"></a>

            <p class="title"><b>Figure&#160;4.10.&#160;Online
            documentation produced by MakeInfo</b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="perf-inf.inf"></a>
</pre>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2877747"
              name="id2877747"></a>Other Formats</h3>
            </div>
          </div>

          <p>There are a number of other macro packages available
          for TeX. Some of them are summarized below. The fact that
          they are not discussed more fully here (or listed below,
          for that matter) is not intended to reflect on the
          quality of the format. The formats discussed above are
          examples of the ways in which TeX can be extended. All of
          the formats below extend TeX in a way similar to one of
          the formats already mentioned. For any particular
          application, one of these macro packages might be a
          better choice than the formats discussed above.</p>

          <div class="variablelist">
            <dl>
              <dt><span class="term">EDMAC</span></dt>

              <dd>
                <p>Provides support for typesetting critical
                editions of texts in a format similar to the Oxford
                Classical Texts with marginal line numbers and
                multiple series of footnotes and endnotes keyed by
                line number. EDMAC<a id="id2877788"
                class="indexterm" name="id2877788"></a><a
                id="id2877796" class="indexterm"
                name="id2877796"></a> is available from the CTAN
                archives in the directory
                <tt>macros/plain/contrib/edmac</tt>.</p>
              </dd>

              <dt><span class="term">INRSTeX</span></dt>

              <dd>
                <p>Provides support for multilingual documents in
                French<a id="id2877842" class="indexterm"
                name="id2877842"></a> and English. INRSTeX<a
                id="id2877853" class="indexterm"
                name="id2877853"></a><a id="id2877862"
                class="indexterm" name="id2877862"></a> is
                available from the CTAN archives in the directory
                <tt>macros/inrstex</tt>.</p>
              </dd>

              <dt><span class="term">LamSTeX</span></dt>

              <dd>
                <p>Extends AMSTeX with LaTeX-like features and
                improved support for commutative diagrams.
                LamSTeX<a id="id2877908" class="indexterm"
                name="id2877908"></a><a id="id2877921"
                class="indexterm" name="id2877921"></a> is
                available from the CTAN archives in
                <tt>macros/lamstex</tt>.</p>
              </dd>

              <dt><span class="term">REVTeX</span></dt>

              <dd>
                <p>Extends LaTeX to provide support for typesetting
                articles for journals of the American Physical
                Society<a id="id2877974" class="indexterm"
                name="id2877974"></a>, the Optical Society of
                America<a id="id2877982" class="indexterm"
                name="id2877982"></a>, and the American Institute
                for Physics<a id="id2877992" class="indexterm"
                name="id2877992"></a>. REVTeX<a id="id2878000"
                class="indexterm" name="id2878000"></a><a
                id="id2878010" class="indexterm"
                name="id2878010"></a> is available in the directory
                <tt>macros/latex/contrib/revtex</tt> of the CTAN
                archives.</p>
              </dd>

              <dt><span class="term">TeXsis</span></dt>

              <dd>
                <p>Provides facilities for typesetting articles,
                papers, and theses. It is particularly tuned for
                physics papers. TeXsis<a id="id2878061"
                class="indexterm" name="id2878061"></a><a
                id="id2878071" class="indexterm"
                name="id2878071"></a> also provides support for
                other kinds of documents, such as letters and
                memos. It is based upon Plain TeX. TeXsis is
                available from the CTAN archives in the directory
                <tt>macros/texsis</tt>.</p>

                <p>In addition to REVTeX and TeXsis, there are
                several other packages in the <tt>macros</tt>
                directory on CTAN that were designed for
                typesetting documents about physics: PHYSE<a
                id="id2878115" class="indexterm"
                name="id2878115"></a><a id="id2878122"
                class="indexterm" name="id2878122"></a>, PHYZZX<a
                id="id2878134" class="indexterm"
                name="id2878134"></a><a id="id2878141"
                class="indexterm" name="id2878141"></a>, and
                PSIZZLE<a id="id2878152" class="indexterm"
                name="id2878152"></a><a id="id2878159"
                class="indexterm" name="id2878159"></a>.</p>
              </dd>

              <dt><span class="term">TeX/Mathematica</span></dt>

              <dd>
                <p>Supports interactive use of Mathematica<a
                id="id2878190" class="indexterm"
                name="id2878190"></a> on unix workstations running
                GNU emacs. Mathematica explorations can be
                annotated with TeX/LaTeX, and Mathematica graphics
                can be incorporated into documents.
                TeX/Mathematica<a id="id2878198" class="indexterm"
                name="id2878198"></a><a id="id2878213"
                class="indexterm" name="id2878213"></a> is
                available from the CTAN archives in the directory
                <tt>macros/mathematica</tt>.</p>
              </dd>

              <dt><span class="term">ScriptTeX</span></dt>

              <dd>
                <p>Supports typesetting screenplays in TeX.
                ScriptTeX<a id="id2878261" class="indexterm"
                name="id2878261"></a><a id="id2878271"
                class="indexterm" name="id2878271"></a> is
                available from the CTAN archives in the directory
                <tt>macros/scripttex</tt>.</p>
              </dd>

              <dt><span class="term">VerTeX</span></dt>

              <dd>
                <p>Supports typesetting articles for economic
                journals. VerTeX<a id="id2878320" class="indexterm"
                name="id2878320"></a><a id="id2878330"
                class="indexterm" name="id2878330"></a> is
                available from the CTAN archives in the directory
                <tt>macros/plain/contrib/vertex</tt>.</p>
              </dd>
            </dl>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2878394"
            name="id2878394"></a>Special-purpose Formats</h2>
          </div>
        </div>

        <p>In addition to the general-purpose packages <a
        id="id2878402" class="indexterm" name="id2878402"></a>
        discussed above, there are dozens, if not hundreds, of
        extensions to TeX that are designed for very specific
        tasks. Many of the extensions are LaTeX style files; they
        provide styles for many academic journals, university
        theses, resum\'es, diagrams of various sorts, PostScript
        interfaces, linguistics, multinational language support,
        unix &#8220;man&#8221; pages, program listings, and
        countless other tasks.</p>

        <p>To give you a feel for the range of tasks that TeX can
        perform, I've selected a few packages to highlight the
        latitude of customization that is possible. Figure&#160;<a
        href="ch04.html#fig.caffeine"
        title="Figure&#160;4.11.&#160;Caffeine by ChemTeX">Figure&#160;4.11</a>
        shows the chemical structure of caffeine (a molecule dear
        to my heart) rendered with the ChemTeX<a id="id2878431"
        class="indexterm" name="id2878431"></a><a id="id2878453"
        class="indexterm" name="id2878453"></a> package. The source
        is shown in Example&#160;<a
        href="ch04.html#fig.caffeine-source"
        title="Figure&#160;4.12.&#160;The ChemTeX Source for Caffeine">
        Figure&#160;4.12</a>. Another chemistry package,
        ChemStruct<a id="id2878479" class="indexterm"
        name="id2878479"></a><a id="id2878486" class="indexterm"
        name="id2878486"></a>, was used to draw Figure&#160;<a
        href="ch04.html#fig.lithium"
        title="Figure&#160;4.13.&#160;A lithium cation rendered by ChemStruct">
        Figure&#160;4.13</a>. Its source is shown in
        Example&#160;<a href="ch04.html#fig.lithium-source"
        title="Figure&#160;4.14.&#160;The ChemStruct Source for the Lithium Cation">
        Figure&#160;4.14</a>. Taking TeX in another direction, the
        MusicTeX<a id="id2878521" class="indexterm"
        name="id2878521"></a><a id="id2878529" class="indexterm"
        name="id2878529"></a> package was used to typeset the first
        two bars of Mozart's K545 sonata in C-major in
        Figure&#160;<a href="ch04.html#fig.mozart"
        title="Figure&#160;4.15.&#160;A little Mozart&#8230;">Figure&#160;4.15</a>.
        The MusicTeX input is shown in Example&#160;<a
        href="ch04.html#fig.mozart-source"
        title="Figure&#160;4.16.&#160;The MusicTeX Source for Figure ">
        Figure&#160;4.16</a>. Several more examples are presented
        in Chapter&#160;<a href="ch07.html"
        title="Chapter&#160;7.&#160;International Considerations">Chapter&#160;7</a>
        where formats for typesetting non-English languages are
        described.</p>

        <div class="figure">
          <a id="fig.caffeine" name="fig.caffeine"></a>

          <p class="title"><b>Figure&#160;4.11.&#160;Caffeine by
          ChemTeX</b></p>

          <div class="mediaobject">
            <img src="caffeine.eps" />
          </div>
        </div>

        <div class="figure">
          <a id="fig.caffeine-source"
          name="fig.caffeine-source"></a>

          <p class="title"><b>Figure&#160;4.12.&#160;The ChemTeX
          Source for Caffeine</b></p>

          <div class="mediaobject">
            <a type="simple" show="embed" actuate="onLoad"
            href="caffeine.tex"></a>
          </div>
        </div>

        <div class="figure">
          <a id="fig.lithium" name="fig.lithium"></a>

          <p class="title"><b>Figure&#160;4.13.&#160;A lithium
          cation rendered by ChemStruct</b></p>

          <div class="mediaobject">
            <img src="lithium.eps" />
          </div>
        </div>

        <div class="figure">
          <a id="fig.lithium-source" name="fig.lithium-source"></a>

          <p class="title"><b>Figure&#160;4.14.&#160;The ChemStruct
          Source for the Lithium Cation</b></p>

          <div class="mediaobject">
            <a type="simple" show="embed" actuate="onLoad"
            href="lithium.tex"></a>
          </div>
        </div>

        <div class="figure">
          <a id="fig.mozart" name="fig.mozart"></a>

          <p class="title"><b>Figure&#160;4.15.&#160;A little
          Mozart&#8230;</b></p>

          <div class="mediaobject">
            <img src="mozart.eps" />
          </div>
        </div>

        <div class="figure">
          <a id="fig.mozart-source" name="fig.mozart-source"></a>

          <p class="title"><b>Figure&#160;4.16.&#160;The MusicTeX
          Source for Figure <a href="ch04.html#fig.mozart"
          title="Figure&#160;4.15.&#160;A little Mozart&#8230;">Figure&#160;4.15</a></b></p>

          <div class="mediaobject">
            <a type="simple" show="embed" actuate="onLoad"
            href="mozart.tex"></a>
          </div>
        </div>

        <p>Another popular special-purpose application of TeX is
        the production of transparencies<a id="id2878799"
        class="indexterm" name="id2878799"></a>, also called
        foils<a id="id2878808" class="indexterm"
        name="id2878808"></a> or slides<a id="id2878816"
        class="indexterm" name="id2878816"></a>. There are a few
        different options for this application.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2878827"
              name="id2878827"></a>SliTeX</h3>
            </div>
          </div>

          <p>SliTeX is part of the standard LaTeX distribution.
          Input to SliTeX consists of a main file and a slides
          file. Individual slides are composed in a <tt>slide</tt>
          environment.</p>

          <p>SliTeX<a id="id2878850" class="indexterm"
          name="id2878850"></a><a id="id2878859" class="indexterm"
          name="id2878859"></a> has provisions for black-and-white
          slides, color slides, and overlays. Unlike the other
          slide-making formats, which rely on \special printer
          commands<sup>[<a id="id2878876" name="id2878876"
          href="#ftn.id2878876">50</a>]</sup> to incorporate color,
          SliTeX produces separate output pages for each color. For
          example, if you use red to highlight words on an
          otherwise black-and-white slide, SliTeX will produce two
          output pages for the slide: one with all the black text
          (excluding the words in red) and one with just the red
          words. Both of these pages will be printed in black. You
          must construct the colored slide by copying the pages
          onto colored transparencies and overlaying them.
          Producing slides with overlays in the same color is
          accomplished with a special &#8220;invisible&#8221;
          color. This method of producing colored transparencies
          has been made obsolete by modern color printers. Of
          course, nothing prevents you from using the \special
          extensions of your DVI driver in SliTeX to produce
          colored transparencies directly on a color printer.</p>

          <p>SliTeX has always been a separate macro package,
          distinct from and not 100\% compatible with LaTeX. With
          the introduction of LaTeX2e, SliTeX is simply an
          extension package to the LaTeX2e core format. Support for
          a separate SliTeX format is being phased out.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2878922"
              name="id2878922"></a>FoilTeX</h3>
            </div>
          </div>

          <p>FoilTeX<a id="id2878931" class="indexterm"
          name="id2878931"></a> is an extension of LaTeX for
          producing slides. The primary advantage of FoilTeX over
          SliTeX is that it is completely compatible with
          LaTeX.<sup>[<a id="id2878942" name="id2878942"
          href="#ftn.id2878942">51</a>]</sup> Note, however, that
          the defaults in many cases are not precisely the same as
          LaTeX because of the radically different goal of
          FoilTeX.</p>

          <p>FoilTeX provides support for running headers and
          footers, modified theorem environments for better
          mathematics in slides, support for AMS and PostScript
          fonts, and colors.</p>

          <p>Color slides in FoilTeX are handled by DVI driver
          \special commands (most commonly <b>dvips</b> \specials).
          However, FoilTeX includes a number of new and extended
          features for better handling of color. See the section
          &#8220;<a href="ch04.html#sec.texincolor"
          title="AMSTeX">the section called
          &#8220;AMSTeX&#8221;</a>&#8221; later in this chapter for
          a detailed discussion of using color in TeX.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2878993"
              name="id2878993"></a>Seminar</h3>
            </div>
          </div>

          <p>The Seminar<a id="id2879000" class="indexterm"
          name="id2879000"></a> style is another alternative for
          producing slides and notes. Like FoilTeX, the Seminar
          style is designed to work on top of LaTeX. (Seminar also
          works with AMSLaTeX.) \ The Seminar style is designed to
          produce output for a PostScript printer. It isn't
          strictly necessary to produce PostScript output, but if
          you do not, many of Seminar's features will be
          unavailable to you.</p>

          <p>Seminar provides for a mixture of portrait and
          landscape styles and can support color using either a
          color-separation technique (similar to SliTeX's method)
          or direct use of PostScript color. In either case, the
          PSTricks<a id="id2879012" class="indexterm"
          name="id2879012"></a> macro package is required. (Consult
          the section &#8220;<a
          href="ch06.html#sec.pictures.pstricks"
          title="PSTricks">the section called
          &#8220;PSTricks&#8221;</a>&#8221; in Chapter&#160;<a
          href="ch06.html"
          title="Chapter&#160;6.&#160;Pictures and Figures">Chapter&#160;6</a>,
          <span class="emphasis"><em><a href="ch06.html"
          title="Chapter&#160;6.&#160;Pictures and Figures">Chapter&#160;6</a></em></span>,
          for more information.)</p>

          <p>The Seminar style has support for a number of
          interesting options (including two-up printing of
          slides), automatic resizing by changing a magnification
          parameter, instructions for converting your SliTeX
          slides, and several extensive demonstration files. Also
          included are explicit instructions for placing
          Encapsulated PostScript drawings in your slides.</p>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2879086"
            name="id2879086"></a>TeX in Color</h2>
          </div>
        </div>

        <p>With color printers<a id="id2879094" class="indexterm"
        name="id2879094"></a><a id="id2879107" class="indexterm"
        name="id2879107"></a> and copiers becoming more common, the
        application of color, especially in transparencies, is more
        important than ever. Unfortunately, TeX knows <span
        class="emphasis"><em>nothing</em></span> about color.</p>

        <p>A little reflection about the design of TeX will make it
        clear why this is the case. TeX produces device-independent
        output. Even when color printers are as common as
        &#8220;regular&#8221; printers, if that ever becomes the
        case, it will always be true that color is an inherently
        device-dependent attribute. It does not make sense for TeX
        to understand color. However, this does not prevent TeX
        from using color.</p>

        <p>At the lowest level, all that is required to use color
        in TeX is some way of telling the printer &#8220;start
        printing in &lt;<span
        class="emphasis"><em>color</em></span>&gt; here.&#8221;
        This is easily accomplished with a \special command. In the
        discussion that follows, the <b>dvips</b> \special commands
        are used as concrete examples, but conceptually, any color
        printer can be used in this way.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2879169"
              name="id2879169"></a>Setting Up Color</h3>
            </div>
          </div>

          <p>Color <a id="id2879178" class="indexterm"
          name="id2879178"></a> support at the DVI driver level is
          provided by \special commands, but these are not
          typically convenient to enter directly into your
          document. Frequently, these commands are specified in
          terms of percentages of red, green, and blue (RGB color)
          <a id="id2879192" class="indexterm" name="id2879192"></a>
          or cyan, magenta, yellow, and black (CMYK color)<a
          id="id2879209" class="indexterm"
          name="id2879209"></a>.</p>

          <p>Higher-level support is provided by a collection of
          color control sequences. These sequences are loaded
          either by inputting the file <tt>colordvi.tex</tt><a
          id="id2879233" class="indexterm" name="id2879233"></a>
          (in Plain TeX, for example) or using the
          <tt>colordvi</tt><a id="id2879253" class="indexterm"
          name="id2879253"></a> style file (in LaTeX).</p>

          <p><b>dvips</b> defines the colors in terms of
          &#8220;crayon names.&#8221; If you need very precise
          control of the colors, you can adjust the precise mix of
          CMYK values in the file <tt>colordvi.tex</tt> after
          comparing the output of your printer with a standard
          scale (typically, the PANTONE scale). The following color
          names are standard in <b>dvips</b>.</p>

          <table class="simplelist" border="0"
          summary="Simple list">
            <tr>
              <td>Apricot</td>

              <td>Emerald</td>

              <td>OliveGreen</td>

              <td>RubineRed</td>
            </tr>

            <tr>
              <td>Aquamarine</td>

              <td>ForestGreen</td>

              <td>Orange</td>

              <td>Salmon</td>
            </tr>

            <tr>
              <td>Bittersweet</td>

              <td>Fuchsia</td>

              <td>OrangeRed</td>

              <td>SeaGreen</td>
            </tr>

            <tr>
              <td>Black</td>

              <td>Goldenrod</td>

              <td>Orchid</td>

              <td>Sepia</td>
            </tr>

            <tr>
              <td>Blue</td>

              <td>Gray</td>

              <td>Peach</td>

              <td>SkyBlue</td>
            </tr>

            <tr>
              <td>BlueGreen</td>

              <td>Green</td>

              <td>Periwinkle</td>

              <td>SpringGreen</td>
            </tr>

            <tr>
              <td>BlueViolet</td>

              <td>GreenYellow</td>

              <td>PineGreen</td>

              <td>Tan</td>
            </tr>

            <tr>
              <td>BrickRed</td>

              <td>JungleGreen</td>

              <td>Plum</td>

              <td>TealBlue</td>
            </tr>

            <tr>
              <td>Brown</td>

              <td>Lavender</td>

              <td>ProcessBlue</td>

              <td>Thistle</td>
            </tr>

            <tr>
              <td>BurntOrange</td>

              <td>LimeGreen</td>

              <td>Purple</td>

              <td>Turquoise</td>
            </tr>

            <tr>
              <td>CadetBlue</td>

              <td>Magenta</td>

              <td>RawSienna</td>

              <td>Violet</td>
            </tr>

            <tr>
              <td>CarnationPink</td>

              <td>Mahogany</td>

              <td>Red</td>

              <td>VioletRed</td>
            </tr>

            <tr>
              <td>Cerulean</td>

              <td>Maroon</td>

              <td>RedOrange</td>

              <td>White</td>
            </tr>

            <tr>
              <td>CornflowerBlue</td>

              <td>Melon</td>

              <td>RedViolet</td>

              <td>WildStrawberry</td>
            </tr>

            <tr>
              <td>Cyan</td>

              <td>MidnightBlue</td>

              <td>Rhodamine</td>

              <td>Yellow</td>
            </tr>

            <tr>
              <td>Dandelion</td>

              <td>Mulberry</td>

              <td>RoyalBlue</td>

              <td>YellowGreen</td>
            </tr>

            <tr>
              <td>DarkOrchid</td>

              <td>NavyBlue</td>

              <td>RoyalPurple</td>

              <td>YellowOrange</td>
            </tr>
          </table>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2879595"
              name="id2879595"></a>Using Color</h3>
            </div>
          </div>

          <p>After <b>dvips</b> has loaded <tt>colordvi</tt>,
          typesetting text in color is simply a matter of using the
          appropriate color control sequence<a id="id2879619"
          class="indexterm" name="id2879619"></a><a id="id2879629"
          class="indexterm" name="id2879629"></a>. For example, to
          typeset something in red, use the \Red control sequence
          in your document, like this:</p>
<pre class="screen">
\Red{something in red}
</pre>

          <p>Alternatively, you can change the default text color
          with the \text\texttt{<span
          class="emphasis"><em>color</em></span>} control
          sequences. To make default color for all text blue,
          enter:</p>
<pre class="screen">
\textBlue
</pre>

          <p>To change the background color, use the \background
          macro. For example, to make the current and all future
          pages yellow, enter:</p>
<pre class="screen">
\background{Yellow}
</pre>

          <p>You can enter a precise color by specifying it in
          terms of its CMYK components. The \Color and \textColor
          macros exist for this purpose. To typeset some text in a
          color that is 25\% cyan, 35\% magenta, 40\% yellow, and
          10\% black,<sup>[<a id="id2879690" name="id2879690"
          href="#ftn.id2879690">52</a>]</sup> enter:</p>
<pre class="screen">
\Color{.25 .35 .4 .1}{some text}
</pre>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2879708"
              name="id2879708"></a>Now I've Got Color, but I Need
              Black and White!</h3>
            </div>
          </div>

          <p>If you have reason to print a colored TeX document on
          a black and white printer, you don't have to tear out all
          of the color commands. <b>dvips</b> includes a
          <tt>blackdvi</tt> file <a id="id2879734"
          class="indexterm" name="id2879734"></a>(analogous to
          <tt>colordvi</tt><a id="id2879748" class="indexterm"
          name="id2879748"></a>---an input file or style file
          depending on your macro package), which translates all
          color commands into black and white.</p>

          <p>Alternatively, &#8220;good&#8221; implementations of
          PostScript in a black and white printer should translate
          all colors into shades of grey. This can be an
          inexpensive way to preview a color document. Most screen
          previewers simply ignore color commands so they print in
          black and white even if the document is colored.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2879774"
              name="id2879774"></a>Color Under LaTeX2e</h3>
            </div>
          </div>

          <p>At the time of this writing, the LaTeX2e<a
          id="id2879783" class="indexterm" name="id2879783"></a><a
          id="id2879797" class="indexterm" name="id2879797"></a>
          team has not officially adopted a standard for using
          color. However, it is likely to follow a slightly
          different model than the one described above. The final
          design should provide color selection commands that are
          device-independent at the DVI driver level (in other
          words, the color commands will not insert device-specific
          commands, like snippets of PostScript, into the
          <tt>DVI</tt> files).</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2879830"
              name="id2879830"></a>Color Is Subtle</h3>
            </div>
          </div>

          <p>Color commands implemented as \special commands may
          introduce occasional problems. For example, if TeX
          introduces a page break in a paragraph that you have
          typeset in yellow (<tt>\Yellow{This is a long
          paragraph...}</tt>), the resulting output may print the
          page footer (and even the header) in yellow, although
          that was not intended.</p>

          <p>Circumventing these problems may require careful use
          of color commands in front of text that you want to
          appear black. For example, in Plain TeX the difficulty
          described above can be avoided by specifying that the
          page number should be printed this way:</p>
<pre class="screen">
\footline{\Black{\hss\tenrm\folio\hss}}
</pre>

          <p>This definition guarantees that the page number will
          be set in black, and because it is a local color change,
          colored text can flow across the page around it.</p>

          <p>You may want to make sure that other typographic
          elements are printed in the current global color (which
          may vary). <b>dvips</b> provides a local color macro
          called \globalColor for that purpose. Every time the text
          color is changed globally (with a \text\texttt{<span
          class="emphasis"><em>Color</em></span>} command),
          \globalColor is redefined to print text in that
          color.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2879898"
              name="id2879898"></a>Further Reading</h3>
            </div>
          </div>

          <p>Read the documentation for your DVI driver carefully
          with respect to color. Because it is device-dependent,
          there is a lot of room for interpretation, and it may not
          always be obvious why some things appear the way they do.
          And DVI drivers are free to implement color in any way
          they choose.</p>
        </div>
      </div>

      <div class="footnotes">
        <br />
        <hr width="100" align="left" />

        <div class="footnote">
          <p><sup>[<a id="ftn.id2874145" name="ftn.id2874145"
          href="#id2874145">39</a>]</sup> At the time of this
          writing, it's actually still in test-release, but it may
          be available as a standard release by the time you read
          this.</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2874246" name="ftn.id2874246"
          href="#id2874246">40</a>]</sup> On Macintosh systems and
          other environments that don't have directories, format
          files are typically stored in their own folders (or other
          metaphorically appropriate place ;-).</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2874291" name="ftn.id2874291"
          href="#id2874291">41</a>]</sup> The distinction between
          big and small TeX is described in the section called
          &#8220;<a href="ch03.html#run.sec.formatfiles"
          title="What Do You Run?">the section called &#8220;What
          Do You Run?&#8221;</a>&#8221; in Chapter&#160;<a
          href="ch03.html"
          title="Chapter&#160;3.&#160;Running TeX">Chapter&#160;3</a>.</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2874585" name="ftn.id2874585"
          href="#id2874585">42</a>]</sup> {A small set of
          exceptions is maintained because the algorithm isn't
          perfect.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2874736" name="ftn.id2874736"
          href="#id2874736">43</a>]</sup> {Really observant readers
          may have noticed that it's a version of Garamond ;-)}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2875131" name="ftn.id2875131"
          href="#id2875131">44</a>]</sup> {Of course, that's not
          strictly true. You can change the page layout of LaTeX
          (and most other packages) to be almost anything, but it
          does require learning a lot about the macro package. If
          you are already familiar with Plain TeX (or some other
          Plain TeX-derived package), you probably have a set of
          macros that produce documents in the style you like. Why
          reinvent the wheel?</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2875268" name="ftn.id2875268"
          href="#id2875268">45</a>]</sup> {Extended Plain TeX is
          available in the <tt>macros/eplain</tt> directory in the
          CTAN archives.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2875867" name="ftn.id2875867"
          href="#id2875867">46</a>]</sup> {LaTeX2e will process
          documents that use <tt>\ documentstyle</tt> in LaTeX 2.09
          compatibility mode.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2876004" name="ftn.id2876004"
          href="#id2876004">47</a>]</sup> {Under emTeX, this
          variable is called <tt>TEXINPUT</tt>. On the Macintosh,
          file searching is frequently controlled by a
          configuration file or dialog box.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2876148" name="ftn.id2876148"
          href="#id2876148">48</a>]</sup> {Strictly speaking, this
          is only true for files that have the extension
          <tt>.sty</tt> because the old version of LaTeX will not
          attempt to use the other files.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2876500" name="ftn.id2876500"
          href="#id2876500">49</a>]</sup> {LaTeX is available in
          the <tt>macros/latex/distribs/latex</tt> directory in the
          CTAN archives.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2878876" name="ftn.id2878876"
          href="#id2878876">50</a>]</sup> {The $\$<tt>special</tt>
          mechanism is a way of passing arbitrary information
          through TeX to the DVI driver that will ultimately print
          the document.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2878942" name="ftn.id2878942"
          href="#id2878942">51</a>]</sup> {With the caveat that it
          still uses the Old Font Selection Scheme.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2879690" name="ftn.id2879690"
          href="#id2879690">52</a>]</sup> {I made these numbers up.
          I take no responsibility for the artistic merits (or lack
          thereof) of the resulting color.}</p>
        </div>
      </div>
    </div>

    <div class="navfooter">
      <table width="100%" summary="Navigation table">
        <tr>
          <td width="40%" align="left"><a
          title="Chapter&#160;3.&#160;Running TeX"
          href="ch03.html"><img src="figures/nav-prev.png"
          alt="Prev" border="0" /></a>&#160;</td>

          <td width="20%" align="center"><a title="Making TeX Work"
          href="index.html"><img src="figures/nav-home.png"
          alt="Home" border="0" /></a></td>

          <td width="40%" align="right">&#160;<a
          title="Part&#160;II.&#160;Elements of a Complex Document"
          href="pt02.html"><img src="figures/nav-next.png"
          alt="Next" border="0" /></a></td>
        </tr>

        <tr>
          <td width="40%" align="left">Chapter&#160;3.&#160;Running
          TeX&#160;</td>

          <td width="20%" align="center"><a
          title="Part&#160;I.&#160;An Introduction to TeX"
          href="pt01.html"><img src="figures/nav-up.png" alt="Up"
          border="0" /></a></td>

          <td width="40%" align="right">
          &#160;Part&#160;II.&#160;Elements of a Complex
          Document</td>
        </tr>
      </table>
    </div>
  </body>
</html>