1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
|
<?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 6. Pictures and Figures</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="pt02.html"
title="Part II. Elements of a Complex Document" />
<link rel="previous" href="ch05.html"
title="Chapter 5. Fonts" />
<link rel="next" href="ch07.html"
title="Chapter 7. International Considerations" />
</head>
<body>
<div class="navheader">
<table border="0" cellpadding="0" cellspacing="0"
width="100%" summary="Navigation table">
<tr>
<td align="left"> <a title="Making TeX Work"
href="index.html"><img src="figures/nav-home.png"
alt="Home" border="0" /></a> <a
title="Chapter 5. Fonts" href="ch05.html"><img
src="figures/nav-prev.png" alt="Prev" border="0" />
</a> <a
title="Part II. Elements of a Complex Document"
href="pt02.html"><img src="figures/nav-up.png" alt="Up"
border="0" /></a> <a
title="Chapter 7. International Considerations"
href="ch07.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.pictures"
name="chap.pictures"></a>Chapter 6. Pictures
and Figures</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>Pictures<a id="id2884175" class="indexterm"
name="id2884175"></a> and figures<a id="id2884189"
class="indexterm" name="id2884189"></a> are an important
component of many documents. This chapter explores how they
can be incorporated into your TeX documents. There are many
ways to include pictures and figures in TeX. The most
important considerations are the type of image<a
id="id2855783" class="indexterm" name="id2855783"></a>, the
type of printer you will be using, what platform you are
using, and how portable the document must be.</p>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a
id="sec.devindrev" name="sec.devindrev"></a>Different
Kinds of Images</h2>
</div>
</div>
<p>Images<a id="id2883926" class="indexterm"
name="id2883926"></a> come from many, many different
sources, but they can be divided into two broad classes:
bitmapped and scalable (or vector). Bitmapped images<a
id="id2883939" class="indexterm" name="id2883939"></a><a
id="id2883949" class="indexterm" name="id2883949"></a> are
produced whenever an image is scanned from a drawing,
photograph, or other printed work. They are also produced
by most simple paint programs. Scalable images<a
id="id2883964" class="indexterm" name="id2883964"></a><a
id="id2883971" class="indexterm" name="id2883971"></a><a
id="id2883981" class="indexterm" name="id2883981"></a> are
produced by some more sophisticated drawing programs, many
commercial sources, and some other applications. Both
classes have advantages and disadvantages.</p>
<p>Files that contain graphic images usually end with an
extension<a id="id2890375" class="indexterm"
name="id2890375"></a> that identifies the format of the
image. The extension is a common and convenient nickname
for the image format. In this chapter, I refer to graphic
image formats by their extension (for example, GIF images
or XBM images) without explanation. I do this partly
because it is easy, but also because it is the most common
way of referring to them, and you don't really need to know
anything about the image formats to use them. If your DVI
driver understands PCX images, you just need a PCX image;
you don't have to have a detailed understanding of the
format (thank goodness). If you want to know more, refer to
the filename extension glossary in Appendix <a
href="apa.html"
title="Appendix A. Filename Extension Summary">Appendix A</a>,
which will help you identify each of the formats discussed
in this chapter.</p>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2890411"
name="id2890411"></a>Bitmapped Images</h3>
</div>
</div>
<p>Photographs<a id="id2890419" class="indexterm"
name="id2890419"></a> and images with a lot of subtle
detail are almost always stored as bitmaps. Scanners
always produce bitmapped images<a id="id2890430"
class="indexterm" name="id2890430"></a>. Some bitmap
images can be converted into scalable formats. High-end
graphic packages like \product{CorelDRAW}<a
id="id2890443" class="indexterm" name="id2890443"></a>
and \product{\idx{Adobe Illustrator}} can do this, but
most cannot. The exceptions are line drawings and other
very high contrast images. Bitmaps are also
“cheap” to print. Neither the computer nor
the printer must do very much work to print a
black-and-white bitmap image. (Color bitmap images must
be dithered before they can be printed, but that's a
separate consideration because it need be done only once,
not every time the image is printed.) Bitmapped images
are also easy to convert from one format to another.</p>
<p>Unfortunately, bitmap images are very
device-dependent. They are stored as a two-dimensional
array of dots, which gives them a fixed resolution. A
$3\times5$-inch bitmap image that prints correctly on
your 300dpi laser printer will only be a
$\frac{3}{4}\times1\frac{1}{4}$-inch picture if you make
your final copy on a 1200dpi photo-typesetter.</p>
<p>Bitmap images also require considerable memory and
disk space to store. The $3\times5$ image described above
requires more than 150Kb of memory (if it is
uncompressed).</p>
<p>A final consideration is that bitmap images do not
scale very well. Enlarging or reducing the image requires
either removing some dots (causing a loss of detail) or
inserting extra dots (frequently giving slanted lines a
very jagged appearance). Rescaling images by exact
integer amounts (doubling or tripling its size, for
example, but not making it 2$\frac{1}{2}$ times as large)
works reasonably well (except for jagged edges). Shaded
regions, which are composed of a regular pattern of black
and white dots, are frequently disrupted by irregular
“blotching” if non-integral scaling is
used.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2884033"
name="id2884033"></a>Scalable Images</h3>
</div>
</div>
<p>Many graphic images can be represented more compactly
as a collection of lines, curves, and other discrete
elements. Images of this type are called <span
class="emphasis"><em>scalable</em></span> or <span
class="emphasis"><em>vector</em></span> images<a
id="id2884054" class="indexterm" name="id2884054"></a><a
id="id2884061" class="indexterm" name="id2884061"></a>.
Instead of storing every pixel in a rectangular array,
vector images store the encoded instructions for
“drawing” the image. This provides a compact
representation. A circle, no matter how large, can be
represented with just a few data points: the position of
the center, the radius, the width and color of the line
that forms the circle, and the pattern that fills the
circle. It is also easy to change the size of the image;
if you halve every measurement, the image is drawn at one
half the size with minimal loss of detail.</p>
<p>One drawback of scalable images is that they require
considerable computational power to render. Every printer
ultimately prints the page as a large bitmap; the print
engine has to translate the lines, curves, and fills of a
scalable image into a bitmap before this is
possible.<sup>[<a id="id2884093" name="id2884093"
href="#ftn.id2884093">79</a>]</sup> Previewing scalable
images requires translating them into bitmaps to display
them. This can be a noticeably slow process unless you
have a very fast computer.</p>
<p>The other significant drawback of scalable images is
that they are difficult to translate from one format to
another. For example, to translate a PostScript image<a
id="id2884111" class="indexterm" name="id2884111"></a>
into something that can be printed on a non-PostScript
printer, you have to have a program that understands all
of the commands in the PostScript file. A bitmap
conversion, on the other hand, doesn't require any
understanding of graphics commands; it simply has to know
how to rearrange the bits in the array. What it boils
down to is this: it's a lot easier to write a translation
program to “reverse the order of all the bits in
each byte in each row” than it is to write one that
can “draw the bezier curve with these three control
points using a dashed, light-blue line $\frac{1}{8}$ of
an inch wide.”</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2884144"
name="id2884144"></a>Device Independence Revisited</h2>
</div>
</div>
<p>Pictures<a id="id2890779" class="indexterm"
name="id2890779"></a> and figures<a id="id2890791"
class="indexterm" name="id2890791"></a> are a foreign
concept to TeX. Remember, TeX cares only about building
pages out of boxes and glue. TeX's notion of a picture is
frequently nothing more than “something special goes
here (I don't know what) and it's 5 inches wide, 2 inches
high, and 1 inch deep.” This is device independence,
of a sort, but many of the easiest ways to include pictures
and figures in TeX do rely on features of a specific DVI
driver or a specific kind of printer. If document
portability is an issue, consider carefully before you
select a particular way of including pictures and
figures.</p>
<p>On the bright side, most DVI drivers<a id="id2890822"
class="indexterm" name="id2890822"></a> provide some
mechanism for incorporating pictures and figures. As long
as it is possible to convert the images from the format
originally used to a format that another DVI driver
understands, document portability can be achieved. For
example, it is possible to print PostScript figures on a
non-PostScript device if they are first converted into
another format with <b>Ghostscript</b> or some other
PostScript interpreter. Unfortunately, it is usually
inconvenient to convert pictures from one format to
another, and some conversions may distort the images a
little bit (or a lot).</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a
id="sec.ptexpic" name="sec.ptexpic"></a>Using Only
TeX</h2>
</div>
</div>
<p>This section describes picture and figure environments
that don't use any external programs. Graphics created in
this way are entirely device-independent and can be printed
with any DVI driver.</p>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2890867"
name="id2890867"></a>Plain TeX</h3>
</div>
</div>
<p>Plain TeX<a id="id2890880" class="indexterm"
name="id2890880"></a><a id="id2890893" class="indexterm"
name="id2890893"></a><a id="id2890906" class="indexterm"
name="id2890906"></a> has no built-in provision for
creating pictures or figures. It is possible to do simple
diagrams and graphs by writing macros that place
individual points on the page. Figure <a
href="ch06.html#fig.plaintex"
title="Figure 6.1. An example diagram in Plain TeX">
Figure 6.1</a> shows several data points plotted in
Plain TeX. The input was derived from macros presented in
Appendix D of <span class="emphasis"><em>The
TeXbook</em></span> [<a
href="bi01.html#kn:texbook">kn:texbook</a>]; it is shown
in Example <a href="ch06.html#ex.plaintexm"
title="Example 6.1. The Input for the Plain TeX Diagram">
Example 6.1</a>.</p>
<div class="figure">
<a id="fig.plaintex" name="fig.plaintex"></a>
<p class="title"><b>Figure 6.1. An example
diagram in Plain TeX</b></p>
<pre class="screen">
FIXME:
</pre>
</div>
<div class="example">
<a id="ex.plaintexm" name="ex.plaintexm"></a>
<p class="title"><b>Example 6.1. The Input
for the Plain TeX Diagram</b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.01.tex"></a>
</pre>
</div>
<p>With special-purpose fonts, it is possible to make
more complex figures in Plain TeX. However, LaTeX
provides a <tt>picture</tt> environment which greatly
simplifies the process.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="sec.pictures.latex"
name="sec.pictures.latex"></a>LaTeX</h3>
</div>
</div>
<p>The <tt>picture</tt> environment in LaTeX<a
id="id2891050" class="indexterm" name="id2891050"></a><a
id="id2891064" class="indexterm" name="id2891064"></a><a
id="id2891076" class="indexterm" name="id2891076"></a> is
implemented on top of the kinds of primitive operations
shown in Example <a href="ch06.html#ex.plaintexm"
title="Example 6.1. The Input for the Plain TeX Diagram">
Example 6.1</a>. Working in the <tt>picture</tt>
environment is a lot like working on graph paper: you
begin by specifing how big the graph paper is and the
distance between lines on the paper (the lines aren't
really there; they're just used for reference), and then
inside the <tt>picture</tt> environment, you put <span
class="emphasis"><em>picture elements</em></span> down on
the page at the intersections of the lines on the
grid.</p>
<p>LaTeX provides picture elements for text, boxes, solid
and empty circles, lines, and arrows. Lines and arrows
can be drawn at angles, but they are formed by taking
characters from a special set of fonts so there is a
limited number of angles available. The advantage of
using special fonts to draw the lines is that it is
relatively efficient.</p>
<p>Figure <a href="ch06.html#fig.latexpic"
title="Figure 6.2. A parallelogram in LaTeX">Figure 6.2</a>
is a simple figure drawn with LaTeX's <tt>picture</tt>
environment. The LaTeX input for this environment is
shown in Example <a href="ch06.html#ex.latexpicsrc"
title="Example 6.2. The LaTeX Input for ">Example 6.2</a>.</p>
<div class="figure">
<a id="fig.latexpic" name="fig.latexpic"></a>
<p class="title"><b>Figure 6.2. A
parallelogram in LaTeX</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<div class="example">
<a id="ex.latexpicsrc" name="ex.latexpicsrc"></a>
<p class="title"><b>Example 6.2. The LaTeX
Input for <a href="ch06.html#fig.latexpic"
title="Figure 6.2. A parallelogram in LaTeX">Figure 6.2</a></b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.02.tex"></a>
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="sec.Fig"
name="sec.Fig"></a>The epic and eepic styles</h4>
</div>
</div>
<p>Constructing diagrams using <tt>picture</tt>
primitives is very tedious because each element of the
picture has to be placed individually. The <span
class="emphasis"><em>epic</em></span> style extends
LaTeX's picture environment by adding several
higher-level commands for picture construction. These
commands allow you to draw solid, dotted, and dashed
lines with arbitrary slopes, create matrices and grids
with a single command, join several independently
placed elements together, and read a list of points
from an external file.</p>
<p>The diagrams produced by <tt>epic.sty</tt><a
id="id2891283" class="indexterm" name="id2891283"></a>
are still limited by the fonts available to LaTeX. The
<tt>eepic.sty</tt><a id="id2891298" class="indexterm"
name="id2891298"></a> extends <tt>epic.sty</tt> by
using \special commands to construct the more complex
figure elements. The \special commands are the same as
those used by <tt>tpic</tt> (see the “<a
href="ch06.html#sec.tpic" title="MetaFont">the section
called “MetaFont”</a>” section in
this chapter) and are supported by many DVI
drivers.</p>
<p>Figure <a href="ch06.html#fig.epic"
title="Figure 6.3. A figure created with (a) epic, and (b) eepic">
Figure 6.3</a> shows a figure constructed with the
<span class="emphasis"><em>epic</em></span> macros.
Figure <a href="ch06.html#fig.epic"
title="Figure 6.3. A figure created with (a) epic, and (b) eepic">
Figure 6.3</a> (a) uses <tt>epic.sty</tt>, and (b)
uses <tt>eepic.sty</tt>. Notice that <tt>eepic.sty</tt>
provides circles of arbitrary size and smooth lines at
any angle. The end points of the radial lines in this
figure were calculated by another program and read from
a data file by <span
class="emphasis"><em>epic</em></span>. The source for
these figures is shown in Example <a
href="ch06.html#ex.epicsrc"
title="Example 6.3. The epic Input for ">Example 6.3</a>
(both diagrams were created with the same source).</p>
<div class="example">
<a id="ex.epicsrc" name="ex.epicsrc"></a>
<p class="title"><b>Example 6.3. The epic
Input for <a href="ch06.html#fig.epic"
title="Figure 6.3. A figure created with (a) epic, and (b) eepic">
Figure 6.3</a></b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.03.tex"></a>
</pre>
</div>
<div class="figure">
<a id="fig.epic" name="fig.epic"></a>
<p class="title"><b>Figure 6.3. A figure
created with (a) epic, and (b) eepic</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="id2891474"
name="id2891474"></a>The bezier style</h4>
</div>
</div>
<p>The <span class="emphasis"><em>bezier</em></span>
style<a id="id2891487" class="indexterm"
name="id2891487"></a> allows you to construct curved
lines in the LaTeX picture environment. An example is
shown in Figure <a href="ch06.html#fig.bezier"
title="Figure 6.4. Several bezier curves created with the LaTeX bezier style">
Figure 6.4</a>. Its source is shown in
Example <a href="ch06.html#ex.beziersrc"
title="Example 6.4. The Input for ">Example 6.4</a>.
The grid in this example was created with <span
class="emphasis"><em>epic</em></span> for
convenience.</p>
<div class="example">
<a id="ex.beziersrc" name="ex.beziersrc"></a>
<p class="title"><b>Example 6.4. The Input
for <a href="ch06.html#fig.bezier"
title="Figure 6.4. Several bezier curves created with the LaTeX bezier style">
Figure 6.4</a></b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.04.tex"></a>
</pre>
</div>
<div class="figure">
<a id="fig.bezier" name="fig.bezier"></a>
<p class="title"><b>Figure 6.4. Several
bezier curves created with the LaTeX bezier
style</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="id2891594"
name="id2891594"></a>Other styles</h4>
</div>
</div>
<p>In addition to these styles, there are several other
style files for doing particular types of drawing.
Styles exist for drawing logical circuit diagrams, bar
charts, trees, and more.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="id2891609"
name="id2891609"></a>Other approaches</h4>
</div>
</div>
<p>Because constructing LaTeX drawing by hand is
tedious, several programs have been written that allow
you to construct diagrams visually and then produce the
appropriate <tt>picture</tt> environments
automatically. The <b>texcad</b><a id="id2891633"
class="indexterm" name="id2891633"></a> program
distributed with emTeX<a id="id2891642"
class="indexterm" name="id2891642"></a> is one such
program. A similar program called <b>xtexcad</b><a
id="id2891659" class="indexterm" name="id2891659"></a>
runs under X11 on some platforms, and there is a Fig
translator for the LaTeX <tt>picture</tt> environment.
(For more information about Fig, see the “<a
href="ch06.html#sec.Fig"
title="The epic and eepic styles">the section called
“The epic and eepic styles”</a>”
section later in this chapter.)</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2891692"
name="id2891692"></a>PiCTeX</h3>
</div>
</div>
<p>PiCTeX<a id="id2891701" class="indexterm"
name="id2891701"></a><a id="id2891712" class="indexterm"
name="id2891712"></a> is a macro package that you can
load on top of Plain TeX or LaTeX.<sup>[<a id="id2891727"
name="id2891727" href="#ftn.id2891727">80</a>]</sup> It
does an amazing job of plotting mathematical functions<a
id="id2891735" class="indexterm" name="id2891735"></a>
and two-dimensional graphs directly in TeX. An example of
PiCTeX (taken from <span class="emphasis"><em>The PiCTeX
Manual</em></span> [<a
href="bi01.html#mw:pictex">mw:pictex</a>]) is shown in
Figure <a href="ch06.html#fig.pictex"
title="Figure 6.5. Sample diagrams using PiCTeX">
Figure 6.5</a>. The source for this figure is shown
in Example <a href="ch06.html#ex.pictexsrc"
title="Example 6.5. PiCTeX Input for ">Example 6.5</a>.</p>
<div class="figure">
<a id="fig.pictex" name="fig.pictex"></a>
<p class="title"><b>Figure 6.5. Sample
diagrams using PiCTeX</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<div class="example">
<a id="ex.pictexsrc" name="ex.pictexsrc"></a>
<p class="title"><b>Example 6.5. PiCTeX Input
for <a href="ch06.html#fig.pictex"
title="Figure 6.5. Sample diagrams using PiCTeX">
Figure 6.5</a></b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.05.tex"></a>
</pre>
</div>
<p>The primary drawback of PiCTeX is that it requires a
considerable amount of memory to use. Even relatively
simple looking graphs require a big TeX to plot with
PiCTeX. PiCTeX also produces very, very large
<tt>DVI</tt> files (the graphs are drawn by interpreting
and plotting each pixel individually). This usually
results in very large output files from the DVI driver,
and some printers may have difficulty printing your
documents.</p>
<p>The PiCTeX macros are freely available, but the manual
is not. You can purchase the manual directly from the
author of PiCTeX or from the TeX User's Group.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2891884"
name="id2891884"></a>XYPic</h3>
</div>
</div>
<p><b>XYPic</b><a id="id2891897" class="indexterm"
name="id2891897"></a><a id="id2891907" class="indexterm"
name="id2891907"></a> is another add-on macro package for
TeX, LaTeX, and other formats. It provides considerably
more flexibility than the LaTeX picture environment
without resorting to the resource-expensive strategy of
PiCTeX.</p>
<p><b>XYPic</b> provides many more arrows than LaTeX
(including curved and self-pointing forms), a wider
variety of dashed and dotted lines, provision for lines
that bend and go around \linebreak</p>
<p>other picture elements, and annotations for lines and
arrows. It seems especially well suited to typesetting
commutative diagrams, simple state-transition diagrams,
and complex annotated matrices.</p>
<p>The syntax used in <b>XYPic</b> diagrams is not as
straightforward as LaTeX's picture environment. An
example of a complex <b>XYPic</b> diagram is shown in
Figure <a href="ch06.html#fig.xypic"
title="Figure 6.6. An XYPic diagram">Figure 6.6</a>.
The corresponding source is shown in Example <a
href="ch06.html#ex.xypicsrc"
title="Example 6.6. The XYPic Input for ">Example 6.6</a>.</p>
<div class="figure">
<a id="fig.xypic" name="fig.xypic"></a>
<p class="title"><b>Figure 6.6. An XYPic
diagram</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<div class="example">
<a id="ex.xypicsrc" name="ex.xypicsrc"></a>
<p class="title"><b>Example 6.6. The XYPic
Input for <a href="ch06.html#fig.xypic"
title="Figure 6.6. An XYPic diagram">Figure 6.6</a></b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.06.tex"></a>
</pre>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2892057"
name="id2892057"></a>DraTeX</h3>
</div>
</div>
<p>DraTeX<a id="id2892066" class="indexterm"
name="id2892066"></a><a id="id2892077" class="indexterm"
name="id2892077"></a> is a macro package that can be
loaded on top of Plain TeX or LaTeX and provides many
sophisticated drawing features. An example is shown in
Figure <a href="ch06.html#fig.dratex"
title="Figure 6.7. An DraTeX diagram">Figure 6.7</a>.
The source is in Example <a
href="ch06.html#ex.dratexsrc"
title="Example 6.7. The DraTeX Input for ">Example 6.7</a>.</p>
<div class="figure">
<a id="fig.dratex" name="fig.dratex"></a>
<p class="title"><b>Figure 6.7. An DraTeX
diagram</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<div class="example">
<a id="ex.dratexsrc" name="ex.dratexsrc"></a>
<p class="title"><b>Example 6.7. The DraTeX
Input for <a href="ch06.html#fig.dratex"
title="Figure 6.7. An DraTeX diagram">Figure 6.7</a></b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="tex.06.07.tex"></a>
</pre>
</div>
<p>DraTeX offers a wide variety of low-level drawing
commands: straight lines at arbitrary angles, circles of
any size, bezier curves, rectangular or polar coordinate
systems, perspective for three-dimensional figures,
user-definable shading patterns, clipping, repetition,
and user-definable drawing objects and commands. A
supporting package, AlDraTeX<a id="id2892187"
class="indexterm" name="id2892187"></a>, provides
high-level drawing commands for pie charts, XY charts,
bar charts, spread diagrams, grid diagrams, trees, and
diagram annotations (arrows, edges, labels).</p>
<p>Although it is a flexible and portable solution,
beware that complex figures may require considerable time
to compute and will almost certainly require a big TeX.
The resulting <tt>DVI</tt> files tend to be large as
well.</p>
<p>DraTeX and AlDraTeX are described in <span
class="emphasis"><em>TeX & LaTeX: Drawing and
Literate Programming</em></span> [<a
href="bi01.html#eg:dratex">eg:dratex</a>].</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2892246"
name="id2892246"></a>Using a Little Help</h2>
</div>
</div>
<p>On most platforms, if you have TeX, MetaFont<a
id="id2892255" class="indexterm" name="id2892255"></a> is
available. Because MetaFont was designed for drawing, it
has much better support for pictures and figures than TeX.
There are three utilities that allow you to combine TeX and
MetaFont to create pictures: <b>MFPic</b> and
<b>Fig2MF</b>.</p>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2892297"
name="id2892297"></a>MFPic</h3>
</div>
</div>
<p><b>MFPic</b>'s <tt>picture</tt> environment and
LaTeX's <tt>picture</tt> environment are implemented very
differently. The commands in <b>MFPic</b> don't attempt
to typeset your diagram with special fonts; instead, they
write MetaFont commands to another file. This file must
be processed with MetaFont before your document can be
viewed.</p>
<p>Because MetaFont is used to draw the actual diagram,
the <b>MFPic</b> macros are much more flexible than the
LaTeX picture creation commands. <b>MFPic</b> macros
provide lines (at any angle), rectangles, polygons,
circles (of any size), ellipses, cyclic and acyclic
curves, arcs, and wedges (all empty, shaded, or
filled).</p>
<p>Unlike <b>Fig2MF</b>, described below, <b>MFPic</b>
can plot user-specified functions (parametrically or
directly, using polygonal or bezier interpolation).</p>
<p>Finally, because <b>MFPic</b> works so directly with
TeX, it can include labels and captions in the figure as
well as allowing “MetaFont hackers” to insert
MetaFont code directly.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2892403"
name="id2892403"></a>Fig2MF</h3>
</div>
</div>
<p>The “Fig” in <b>Fig2MF</b><a
id="id2892422" class="indexterm" name="id2892422"></a>
stands for the Fig graphics code (in this case, Fig
version 2.1). Fig is a device-independent way of
representing figures. Like TeX <tt>DVI</tt> files, Fig
graphics<a id="id2892446" class="indexterm"
name="id2892446"></a> are always translated into a
device-dependent form before they are printed.
<b>Fig2MF</b> translates Fig graphics into MetaFont code,
which can be rendered into a font that is usable by TeX
on any platform.</p>
<p>At present, there are a few limitations on
<b>Fig2MF</b>: text objects are ignored, and arrowed and
non-solid line styles are not supported. The advantage of
<b>Fig2MF</b> is that very good interactive drawing
programs, like <b>xfig</b>, can be used to create
figures.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="sec.tpic"
name="sec.tpic"></a>MetaFont</h3>
</div>
</div>
<p>If the idea of programming directly in MetaFont<a
id="id2892507" class="indexterm" name="id2892507"></a> is
appealing to you, start by reading “Simple Drawings
in MetaFont” [<a
href="bi01.html#zw:simple">zw:simple</a>]. This is a
short document (freely available) that describes how
simple drawings can easily be rendered directly in
MetaFont.</p>
<p>In order to use MetaFont creatively, <span
class="emphasis"><em>The \MF{}book</em></span> [<a
href="bi01.html#kn:mfbook">kn:mfbook</a>] is really a
necessity, but you can get a feel for the picture
creation process in MetaFont without it.</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2892560"
name="id2892560"></a>Using a Little More Help</h2>
</div>
</div>
<p>A couple of TeX macro packages combine the convenience
of using only TeX commands to produce pictures and figures
with the power of PostScript<a id="id2892571"
class="indexterm" name="id2892571"></a><a id="id2892581"
class="indexterm" name="id2892581"></a>. Using these macros
makes your documents less portable because they rely on a
PostScript printer or PostScript interpreter to be
printed.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a
id="sec.pictures.pstricks"
name="sec.pictures.pstricks"></a>PSTricks</h2>
</div>
</div>
<p>The PSTricks<a id="id2892610" class="indexterm"
name="id2892610"></a><a id="id2892620" class="indexterm"
name="id2892620"></a> macro package is a TeX-PostScript
hybrid. The advantage of this approach is that PSTricks is
able to provide much wider functionality than the preceding
packages without leaving TeX. The disadvantage is that it
makes your documents dependent on a PostScript printer.</p>
<p>One of the neatest features of PSTricks is the ability
to interact with other TeX objects. You can add PostScript
annotations (curved lines, labels, etc.) to the entries in
a table, for example, or point to other elements on the
page.</p>
<p>In addition to allowing you to insert essentially
arbitrary PostScript commands directly into your document,
PSTricks provides TeX macros for most common picture
elements including: commands for curved and straight lines
(at arbitrary angles), a wide variety of arrow heads and
tails, pattern-filled regions, regular and irregular
polygonal shapes, text scaling and rotation, and grids.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2892664"
name="id2892664"></a>TeXdraw</h2>
</div>
</div>
<p>TeXdraw, like \product{\PSTricks}, provides support for
pictures and figures by relying on a PostScript back
end.</p>
<p>TeXdraw<a id="id2892679" class="indexterm"
name="id2892679"></a><a id="id2892688" class="indexterm"
name="id2892688"></a> is organized into a toolbox of simple
routines from which more complex commands can be
constructed. The TeXdraw manual [<a
href="bi01.html#pk:texdraw">pk:texdraw</a>] includes
several examples of how complex commands can be built from
toolbox routines.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2892716"
name="id2892716"></a>tpic</h2>
</div>
</div>
<p>The “pic”<a id="id2892728" class="indexterm"
name="id2892728"></a> drawing language was designed for
<b>troff</b> documents. The <b>tpic</b><a id="id2892749"
class="indexterm" name="id2892749"></a><a id="id2892756"
class="indexterm" name="id2892756"></a><a id="id2892766"
class="indexterm" name="id2892766"></a> program interprets
pic drawings and produces TeX output to render them. The
output relies on a set of \special commands, which must be
implemented by the DVI driver to actually produce the
output. The <b>tpic</b> \specials are implemented by many
DVI drivers.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a
id="sec.scaleformat" name="sec.scaleformat"></a>Using a
Lot of Help</h2>
</div>
</div>
<p>Although many nice effects can be achieved directly in
TeX or with MetaFont, you will probably want to include
some other form of image (e.g., an encapsulated PostScript
figure or a scanned photograph) in a TeX document
eventually.</p>
<p>There are a myriad of choices when this occurs. To a
large extent, the options available depend on the kind of
printer you have, which DVI drivers you use, and to what
extent you are willing to sacrifice device
independence.</p>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2892815"
name="id2892815"></a>Electronic Cut-and-paste</h3>
</div>
</div>
<p>Documents<a id="id2892828" class="indexterm"
name="id2892828"></a> that require complex graphics may
be difficult to produce as a single TeX document. You may
exceed the memory limitations of your version of TeX if
you try to put too many figures on a given page, or you
may wish to include graphics from incompatible macro
packages (suppose you are using the Lollipop format for
example, and you want to include a LaTeX
<tt>picture</tt>).</p>
<p>You can always leave blank space in your document,
print the graphic on a separate page, and then combine
the two pages with scissors, glue, and a photocopy
machine. However, there are many times when this is
inappropriate (not to mention the aesthetic sensibilities
it may disturb).</p>
<p>Another solution is to use a program that can perform
cut-and-paste operations on the output files before they
are printed. If you use Plain TeX or LamSTeX, one option
is <b>DVIpaste</b><a id="id2892877" class="indexterm"
name="id2892877"></a>. <b>DVIpaste</b> can insert parts
of one <tt>DVI</tt> file into another. It is part of the
LamSTeX distribution. The documentation for
<b>DVIpaste</b> contains a good example of its use.
Unfortunately, <b>DVIpaste</b> relies on macros that are
incompatible with most other macro packages.</p>
<p>Some DVI drivers like <b>dvimsp</b><a id="id2892928"
class="indexterm" name="id2892928"></a>,<sup>[<a
id="id2892937" name="id2892937"
href="#ftn.id2892937">81</a>]</sup> which comes with
emTeX, can translate <tt>DVI</tt> files into bitmapped
images that can then be incorporated into your document
directly. Figures <a href="ch04.html#fig.caffeine"
title="Figure 4.11. Caffeine by ChemTeX">Figure 4.11</a>,
<a href="ch04.html#fig.lithium"
title="Figure 4.13. A lithium cation rendered by ChemStruct">
Figure 4.13</a>, and  <a
href="ch04.html#fig.mozart"
title="Figure 4.15. A little Mozart…">Figure 4.15</a>
in Chapter <a href="ch04.html"
title="Chapter 4. Macro Packages">Chapter 4</a>,
<span class="emphasis"><em><a href="ch04.html"
title="Chapter 4. Macro Packages">Chapter 4</a></em></span>,
were inserted into this book using <b>dvidot</b><a
id="id2893022" class="indexterm"
name="id2893022"></a>.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2893032"
name="id2893032"></a>Scalable Image Formats</h3>
</div>
</div>
<p>Several of the most commonly encountered scalable
image formats are PostScript (usually encapsulated)<a
id="id2893044" class="indexterm" name="id2893044"></a><a
id="id2893054" class="indexterm" name="id2893054"></a>,
HPGL (Hewlett-Packard's<a id="id2893063"
class="indexterm" name="id2893063"></a> Plotter
language), DXF (Autocad's vector format)<a id="id2893072"
class="indexterm" name="id2893072"></a>, and the Fig
graphics<a id="id2893081" class="indexterm"
name="id2893081"></a> language. PostScript and HPGL are
used by specific printers and plotters, DXF files are
created by many computer-aided design programs, and Fig
is a graphic language understood by several free editing
tools---it is always converted into something else before
it is printed. Many programs that can edit scalable
images have their own vendor-specific formats. Luckily,
these programs can usually produce PostScript or HPGL
output as well.</p>
<p>PostScript images are the most commonly encountered
scalable images. Drawing packages that output PostScript
generally produce <span class="emphasis"><em>encapsulated
PostScript</em></span> (EPS)<a id="id2893109"
class="indexterm" name="id2893109"></a><a id="id2893117"
class="indexterm" name="id2893117"></a>. Similarly, most
PostScript clip-art is distributed in EPS format.
Encapsulated PostScript is a subset of the PostScript
language. One of the most important features of EPS
images is a <span class="emphasis"><em>bounding
box</em></span><a id="id2893135" class="indexterm"
name="id2893135"></a><a id="id2893145" class="indexterm"
name="id2893145"></a>. The bounding box identifies the
size of the EPS image. This information is used to
determine the scaling factor required to get an image of
the correct size.</p>
<p>Generic PostScript can sometimes be converted into
encapsulated PostScript. For example, the
<b>ps2epsi</b><a id="id2893170" class="indexterm"
name="id2893170"></a> program that comes with
<b>Ghostscript</b><a id="id2893185" class="indexterm"
name="id2893185"></a> attempts to convert generic
PostScript into encapsulated PostScript.</p>
<p>Some software produces reasonable PostScript figures,
but fails to include the bounding box. For those
situations, the <b>bbfig</b><a id="id2893206"
class="indexterm" name="id2893206"></a> program that
comes with <b>dvips</b> may help. <b>bbfig</b> uses the
printer to calculate a bounding box that you can insert
into the figure. After you have printed the figure, you
can construct a bounding box by hand, if necessary
(sometimes <b>bbfig</b> gets confused). Simply measure
the height and width of the figure and its position on
the page (measured from the bottom-left corner). The
bounding box is a rectangle measured from the lower-left
corner of the figure to the upper-right corner. An
example is shown in Figure <a
href="ch06.html#fig.epsbox"
title="Figure 6.8. A PostScript bounding box example">
Figure 6.8</a>.</p>
<div class="figure">
<a id="fig.epsbox" name="fig.epsbox"></a>
<p class="title"><b>Figure 6.8. A PostScript
bounding box example</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<p>The bounding box is measured in PostScript points.
There are 72 PostScript points to the inch, so the image
in Figure <a href="ch06.html#fig.epsbox"
title="Figure 6.8. A PostScript bounding box example">
Figure 6.8</a> has the following bounding box:</p>
<div class="informalexample">
<p><!-- %BoundingBox: 115.2 180 468 626.4 --></p>
</div>
<p>If you are printing your document on a PostScript
printer, you will find that PostScript images are easy to
handle; every PostScript DVI driver that I have seen
allows you to incorporate encapsulated PostScript with
one or more \special commands. The section “<a
href="ch06.html#sec.incps"
title="Bitmapped Image Formats">the section called
“Bitmapped Image Formats”</a>” later in
this chapter describes two ways of incorporating
encapsulated PostScript images into Plain TeX or LaTeX
documents for printing on a PostScript printer.</p>
<p>PostScript output on non-PostScript devices is much
more difficult, although it can be achieved with a
PostScript interpreter like <b>Ghostscript</b>.<sup>[<a
id="id2893346" name="id2893346"
href="#ftn.id2893346">82</a>]</sup> For a detailed
description of how PostScript images can be converted
into another format with <b>Ghostscript</b>, see the
“<a href="ch06.html#sec.gs"
title="Image Magick">the section called “Image
Magick”</a>” section later in this
chapter.</p>
<p>Hewlett-Packard HPGL<a id="id2893388"
class="indexterm" name="id2893388"></a> is the plotter
language developed by HP for its line of pen-based
plotting devices. Many computer-aided design and drafting
programs can produce HPGL. In addition to plotters, the
HP LaserJet III and more recent HP LaserJet printers also
understand HPGL. On an HP LaserJet III or later model
printer, you can print HPGL directly if your DVI driver
allows you to include printer-specific data. This ability
was introduced in version 1.4t of the emTeX
<b>dvihplj</b><a id="id2893402" class="indexterm"
name="id2893402"></a> driver.</p>
<p>If your DVI driver does not support printer-specific
files or your printer does not understand HPGL, there are
at least two conversion programs (<b>hp2xx</b><a
id="id2893432" class="indexterm" name="id2893432"></a>
and <b>hp2ps</b><a id="id2893446" class="indexterm"
name="id2893446"></a>) that may be able to convert your
HPGL drawings into another form you can use.</p>
<p>The Fig graphics language was designed to represent
pictures and figures in an easy to interpret and portable
manner. The <b>Fig</b><a id="id2893467" class="indexterm"
name="id2893467"></a> and <b>xfig</b><a id="id2893481"
class="indexterm" name="id2893481"></a> drawing programs
work with Fig graphics<a id="id2893490" class="indexterm"
name="id2893490"></a>. Several other programs, like
<b>gnuplot</b><a id="id2893505" class="indexterm"
name="id2893505"></a>, can also produce Fig graphics. See
the “<a href="ch06.html#sec.Fig"
title="The epic and eepic styles">the section called
“The epic and eepic styles”</a>”
section for more information.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="sec.incps"
name="sec.incps"></a>Bitmapped Image Formats</h3>
</div>
</div>
<p>Including bitmapped images<a id="id2893540"
class="indexterm" name="id2893540"></a> is easier than
including scalable images because no real interpretation
of commands is necessary. Over the years, lots of
different ways have been developed for including
bitmapped images in TeX documents. Since the development
of the <b>bm2font</b> program, most of these methods have
become obsolete. As a result, this section examines only
a few methods.</p>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="id2893563"
name="id2893563"></a>DVI driver {\ttbackslash
special}</h4>
</div>
</div>
<p>The first method is DVI driver-specific: if your DVI
driver includes a \special command for including
bitmapped graphic images, you can simply use that
command. The disadvantage of using a DVI driver
\special is that it makes the document less portable.
Instead of being printable with any DVI driver, it now
requires a DVI driver that recognizes a particular
\special command. Note also that some DVI drivers do
not handle color images very well; you may need to
convert the image to black and white first. (Many
programs described in the “<a
href="ch06.html#sec.picconv"
title="Manipulating Images">the section called
“Manipulating Images”</a>” section
later in this chapter can perform this operation.)</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="id2893598"
name="id2893598"></a>bm2font</h4>
</div>
</div>
<p>On most platforms, <b>bm2font</b><a id="id2893612"
class="indexterm" name="id2893612"></a> provides an
ideal solution for including bitmapped images. This
program translates bitmapped images into <tt>PK</tt><a
id="id2893630" class="indexterm" name="id2893630"></a>
fonts and produces a snippet of TeX code that can be
used to print the image in your document. Because most
DVI drivers can use <tt>PK</tt> fonts, a high degree of
portability is maintained. Some portability is still
lost since the bitmapped image has a fixed resolution,
but that is a consequence of using the bitmapped image,
not <b>bm2font</b>. All of the bitmap images in this
book were included with the <b>bm2font</b> program.</p>
<p>This book is a good example of an instance where
portability is required. I could easily have included
the graphics with the \special command of the DVI
driver that I use most frequently (<b>dvihplj</b>), but
then I couldn't have produced pages suitable for final
publication.</p>
<p><b>bm2font</b> can read a number of common graphic
image formats including <tt>GIF</tt><a id="id2893714"
class="indexterm" name="id2893714"></a>, Windows
<tt>BMP</tt><a id="id2893731" class="indexterm"
name="id2893731"></a>, and <tt>PCX</tt><a
id="id2893753" class="indexterm" name="id2893753"></a>.
It can translate color images into black and white
using a number of dithering<a id="id2893763"
class="indexterm" name="id2893763"></a> methods, and it
can scale the image to a specific size (although
scaling bitmap images is not usually very
effective).</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h4 class="title"><a id="id2893776"
name="id2893776"></a>pbmtopk</h4>
</div>
</div>
<p>The <b>pbmtopk</b><a id="id2893790"
class="indexterm" name="id2893790"></a> program
provides a solution similar to <b>bm2font</b>. Because
<b>pbmtopk</b><a id="id2893812" class="indexterm"
name="id2893812"></a> is a smaller program, it may be
easier to port to other systems. The <b>pbmtopk</b>
distribution includes <b>pktopbm</b><a id="id2893834"
class="indexterm" name="id2893834"></a>, which can
translate <tt>PK</tt> files back into <tt>PBM</tt><a
id="id2893860" class="indexterm" name="id2893860"></a>
bitmaps.</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2893872"
name="id2893872"></a>Inserting PostScript Images into
TeX</h3>
</div>
</div>
<p>If you are using Plain TeX or LaTeX and printing your
documents on a PostScript printer<a id="id2893883"
class="indexterm" name="id2893883"></a>, there are
several (essentially equivalent) style files that you can
use to include your figures.</p>
<p>One is <tt>epsfig.sty</tt><a id="id2893906"
class="indexterm" name="id2893906"></a>, which can be
used as a LaTeX style option or be inserted directly into
Plain TeX documents with \input.<sup>[<a id="id2893914"
name="id2893914" href="#ftn.id2893914">83</a>]</sup> The
<tt>epsfig</tt> style option is supported by LaTeX2e as
well.</p>
<p>After the style file is loaded, you can use the macro
\epsfig to include your figure. The complete syntax for
\epsfig is:</p>
<pre class="screen">
\epsfig{figure=, height=, width=, rheight=, rwidth=,
bbllx=, bblly=, bburx=, bbury=,
clip=, angle=, silent=}
</pre>
<p>In practice, only a few of these options are commonly
used. Here is a description of each:</p>
<div class="variablelist">
<dl>
<dt><span class="term"><tt>figure=</tt></span></dt>
<dd>
<p>Identifies the name of the file containing the
PostScript figure. This option is required.</p>
</dd>
<dt><span class="term"><tt>height=,
width=</tt></span></dt>
<dd>
<p>Specify the height and width of the figure. If
only one is specified, the other will be scaled
automatically to keep the proportions of the
original figure. If both are given, the figure will
be scaled (anamorphically) to the requested
size.</p>
</dd>
<dt><span class="term"><tt>rheight=,
rwidth=</tt></span></dt>
<dd>
<p>Provide the “reserved” height and
width of the figure. This is how big the TeX box
that encloses the figure will be. By default, the
box is as big as the figure.</p>
</dd>
<dt><span class="term"><tt>bbllx=, bblly=, bburx=,
bbury=</tt></span></dt>
<dd>
<p>Specify the bounding box<a id="id2894103"
class="indexterm" name="id2894103"></a> of the
figure. If not specified (it usually isn't), the
bounding box is read from the PostScript
figure.</p>
</dd>
<dt><span class="term"><tt>clip=</tt></span></dt>
<dd>
<p>Indicates whether or not the figure should be
“clipped” at its bounding box. Clipping
prevents lines in the figure from extending beyond
the bounding box.</p>
</dd>
<dt><span class="term"><tt>angle=</tt></span></dt>
<dd>
<p>Allows you to specify that the figure should be
rotated. Always specify the angle of rotation in
degrees. The figure is always rotated
counter-clockwise.</p>
</dd>
<dt><span class="term"><tt>silent=</tt></span></dt>
<dd>
<p>Turns off informative messages printed by the
macros as the figure is processed.</p>
</dd>
</dl>
</div>
<p>The parameters to the \epsfig macro have to obey TeX's
strict parsing rules. In particular, you must not put
spaces around the equal sign in any option. The
<tt>clip=</tt> and <tt>silent=</tt> options have no
values, but you must include the equal sign anyway.</p>
<p>For example, Figure <a
href="ch06.html#fig.psfigure"
title="Figure 6.9. An example of an encapsulated figure">
Figure 6.9</a> was inserted by \epsfig using the
following commands:</p>
<pre class="screen">
\begin{figure}
\epsfig{figure=figs/sample.eps}
\caption{An example of an encapsulated figure.}
\label{fig.psfigure}
\end{figure}
</pre>
<a id="id2894252" class="indexterm" name="id2894252"></a>
<div class="figure">
<a id="fig.psfigure" name="fig.psfigure"></a>
<p class="title"><b>Figure 6.9. An example of
an encapsulated figure</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<p>Figure <a href="ch06.html#fig.psfigurerot"
title="Figure 6.10. Another example of an encapsulated figure (resized and rotated)">
Figure 6.10</a> demonstrates a few of other
<tt>epsfig</tt> options:</p>
<pre class="screen">
\begin{figure}
\epsfig{figure=figs/sample.eps,width=6cm,angle=45}
\caption{Another example of an encapsulated figure
(resized and rotated)}
\label{fig.psfigurerot}
\end{figure}
</pre>
<a id="id2894324" class="indexterm" name="id2894324"></a>
<div class="figure">
<a id="fig.psfigurerot" name="fig.psfigurerot"></a>
<p class="title"><b>Figure 6.10. Another
example of an encapsulated figure (resized and
rotated)</b></p>
<div class="mediaobject">
<img src="figs/tex.06.09.eps" />
</div>
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a
id="sec.picconv" name="sec.picconv"></a>Manipulating
Images</h2>
</div>
</div>
<p>There are literally dozens of software packages
available for manipulating graphic images<a id="id2894380"
class="indexterm" name="id2894380"></a>. The discussion
that follows focuses on a small handful of these programs.
The programs selected are representative of the kinds of
tools available, but this is by no means an endorsement
that these are the best tools. Table <a
href="ch06.html#tab.manipover"
title="Table 6.1. Graphics Manipulation Packages">
Table 6.1</a> summarizes the programs described in
this section.</p>
<p>If you cannot find any way of converting a particular
image, remember that you may be able to display the image
and capture it with another program that can save the image
in a more tractable format.</p>
<div class="table">
<a id="tab.manipover" name="tab.manipover"></a>
<p class="title"><b>Table 6.1. Graphics
Manipulation Packages</b></p>
<table summary="Graphics Manipulation Packages"
border="1">
<colgroup>
<col align="left" />
<col align="left" />
<col align="left" />
<col align="left" />
</colgroup>
<thead>
<tr>
<th align="left">\bf Program</th>
<th align="left">\bf Platforms</th>
<th align="left">\bf Cost</th>
<th align="left">\bf Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Image Magick</td>
<td align="left">unix</td>
<td align="left">Free</td>
<td align="left">Display, manipulate, convert and
capture images</td>
</tr>
<tr>
<td align="left">PBMplus</td>
<td align="left">All</td>
<td align="left">Free</td>
<td align="left">Convert and manipulate images</td>
</tr>
<tr>
<td align="left">xv</td>
<td align="left">unix</td>
<td align="left">SW${}^1$</td>
<td align="left">Display, manipulate, convert and
capture images</td>
</tr>
<tr>
<td align="left">xloadimage</td>
<td align="left">unix</td>
<td align="left">Free</td>
<td align="left">Display images</td>
</tr>
<tr>
<td align="left">Image Alchemy</td>
<td align="left">MS-DOS${}^2$</td>
<td align="left">SW</td>
<td align="left">Convert images</td>
</tr>
<tr>
<td align="left">ColorView</td>
<td align="left">MS-DOS</td>
<td align="left">SW</td>
<td align="left">Convert images</td>
</tr>
<tr>
<td align="left">Jpeg4</td>
<td align="left">MS-DOS</td>
<td align="left">SW</td>
<td align="left">Convert images</td>
</tr>
<tr>
<td align="left">pmjpeg</td>
<td align="left">OS/2</td>
<td align="left">SW</td>
<td align="left">Display and convert images</td>
</tr>
<tr>
<td align="left">txt2pcx</td>
<td align="left">MS-DOS</td>
<td align="left">SW</td>
<td align="left">Translate text into graphic image
format</td>
</tr>
<tr>
<td align="left">Ghostscript</td>
<td align="left">All</td>
<td align="left">Free</td>
<td align="left">Convert PostScript to other
formats</td>
</tr>
<tr>
<td align="left">GoScript</td>
<td align="left">MS-DOS</td>
<td align="left">\$\$${}^3$</td>
<td align="left">Convert PostScript to other
formats</td>
</tr>
<tr>
<td align="left">hp2xx</td>
<td align="left">unix</td>
<td align="left">Free</td>
<td align="left">Convert HPGL to other formats</td>
</tr>
<tr>
<td align="left">\multicolumn{4}{l}{ ${}^1$\vrule
height11pt width0pt\tiny Shareware: “Try
before you buy,” but not free.}</td>
<td class="auto-generated"> </td>
<td class="auto-generated"> </td>
<td class="auto-generated"> </td>
</tr>
<tr>
<td align="left">\multicolumn{4}{l}{ ${}^2$\tiny
Also available for Sun workstations; see
documentation.}</td>
<td class="auto-generated"> </td>
<td class="auto-generated"> </td>
<td class="auto-generated"> </td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="sec.gs"
name="sec.gs"></a>Image Magick</h3>
</div>
</div>
<p><b>Image Magick<a id="id2894787" class="indexterm"
name="id2894787"></a></b> is a collection of eight
programs for manipulating images. These programs work
with MIFF files<a id="id2894797" class="indexterm"
name="id2894797"></a> by default. MIFF is the
“machine-independent file format” developed
by the package's author. If you are going to manipulate
images with these tools, the author recommends converting
them to MIFF format first. The <b>convert</b> program
reads and writes a large number of image formats, so
conversion to and from MIFF format is
straightforward.</p>
<p><b>Image Magick</b> requires the Independent JPEG
Group<a id="id2894834" class="indexterm"
name="id2894834"></a>'s JPEG library in order to
manipulate JPEG images. Similarly, Sam Leffler<a
id="id2894844" class="indexterm" name="id2894844"></a>'s
TIFF software library is required to manipulate TIFF<a
id="id2894854" class="indexterm" name="id2894854"></a>
images. Both of these are compile-time options. If you
did not build <b>Image Magick</b>, you may not be able to
manipulate JPEG or TIFF images. To manipulate PostScript
images, <b>Ghostscript</b> must be available.</p>
<p>The programs described below are the <b>Image
Magick</b> tools that allow you to manipulate images in
ways that may be necessary or useful for creating
printable images. Other tools, like <b>animate</b><a
id="id2894899" class="indexterm" name="id2894899"></a>,
included in the <b>Image Magick</b> distribution, aren't
described here because they have no bearing on
printability.</p>
<div class="variablelist">
<dl>
<dt><span class="term"><b>display</b></span></dt>
<dd>
<p>This program<a id="id2894938" class="indexterm"
name="id2894938"></a> allows you to preview images
on an X11 display. The number of colors in the
image is reduced to match the number of colors of
your display, if necessary. Program options allow
you to specify a variety of image-processing
operations on the image (noise reduction, scaling,
manipulation of the color map, etc.).</p>
<p>Conversion to MIFF format, as recommended above,
isn't necessary for simply displaying the
image.</p>
</dd>
<dt><span class="term"><b>import</b></span></dt>
<dd>
<p>This program<a id="id2894981" class="indexterm"
name="id2894981"></a> allows you to capture visible
portions of an X11 display. You can capture any
visible window, the entire display, or any
rectangular portion of the display. <b>import</b>
can save the image in any format recognized by
<b>convert</b>.</p>
</dd>
<dt><span class="term"><b>convert</b></span></dt>
<dd>
<p>As the name implies, this utility<a
id="id2895033" class="indexterm"
name="id2895033"></a> converts images between
graphics formats. The following standard formats
are recognized:</p>
<table class="simplelist" border="0"
summary="Simple list">
<tr>
<td>MIFF</td>
<td>BMP</td>
<td>CMYK</td>
<td>EPS</td>
<td>FAX</td>
<td>GIF</td>
<td>IRIS</td>
<td>JPEG</td>
<td>PICT</td>
<td>PNM</td>
</tr>
<tr>
<td>PS</td>
<td>RGB</td>
<td>RLE</td>
<td>SUN</td>
<td>TGA</td>
<td>TEXT</td>
<td>TIFF</td>
<td>XBM</td>
<td>XWD</td>
<td> </td>
</tr>
</table>
<p>Additionally, a few less-standard formats are
recognized. A complete list is available in the
manual page for <b>convert</b>.</p>
</dd>
<dt><span class="term"><b>combine</b></span></dt>
<dd>
<p>This program combines<a id="id2895167"
class="indexterm" name="id2895167"></a> two images
by blending them together. The result varies
tremendously, depending on the kind of blending
used. Simple overlaps, various kinds of cutouts,
and more complex color blendings are possible.</p>
</dd>
<dt><span class="term"><b>montage</b></span></dt>
<dd>
<p>Unlike <b>combine</b>, <b>montage</b><a
id="id2895217" class="indexterm"
name="id2895217"></a> combines multiple images by
<span class="emphasis"><em>tiling<a id="id2895229"
class="indexterm"
name="id2895229"></a></em></span>. (The images are
laid next to each other rather than on top of each
other.) Optionally, the image name can appear below
each tile.</p>
</dd>
<dt><span class="term"><b>mogrify</b></span></dt>
<dd>
<p><b>mogrify</b><a id="id2895268"
class="indexterm" name="id2895268"></a> is used to
transform an image (or series of images). You can
specify alternate color maps in a variety of ways,
as well as dithering<a id="id2895280"
class="indexterm" name="id2895280"></a> and error
correcting transformations. The images can also be
rolled, rotated, rescaled, and sheared. (Shearing<a
id="id2895290" class="indexterm"
name="id2895290"></a> transforms a rectangle into a
parallelogram by shifting the X or Y axis.)</p>
</dd>
</dl>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2895306"
name="id2895306"></a>PBMplus</h3>
</div>
</div>
<p>The <b>PBMplus<a id="id2895320" class="indexterm"
name="id2895320"></a></b> package is a large collection
of image translation programs. This package was written
originally for unix, but has since been ported to MS-DOS
and OS/2.</p>
<p><b>PBMplus</b> defines three file formats<a
id="id2895342" class="indexterm" name="id2895342"></a><a
id="id2895350" class="indexterm" name="id2895350"></a><a
id="id2895357" class="indexterm"
name="id2895357"></a>:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>PBM---The Portable Bitmap format for black and
white images</p>
</li>
<li>
<p>PGM---The Portable Graymap format for grayscaled
images</p>
</li>
<li>
<p>PPM---The Portable Pixmap format for color
images</p>
</li>
</ul>
</div>
<br />
<br />
<p>Translation from one format to another is accomplished
by translating into the appropriate portable format
first, and then translating the portable bitmap into the
destination format.</p>
<p>The following image formats are supported by the
PBMPlus tools:</p>
<table class="simplelist" border="0"
summary="Simple list">
<tr>
<td>Abekas YUV bytes</td>
<td>MGR bitmaps</td>
</tr>
<tr>
<td>Andrew Toolkit raster objects</td>
<td>MTV or PRT ray traced images</td>
</tr>
<tr>
<td>Atari Degas .pi1 images</td>
<td>MacPaint files</td>
</tr>
<tr>
<td>Atari Degas .pi3 files</td>
<td>Macintosh PICT files</td>
</tr>
<tr>
<td>Atari Spectrum files</td>
<td>PCX files</td>
</tr>
<tr>
<td>AutoCAD slides</td>
<td>PostScript “images”</td>
</tr>
<tr>
<td>Bennet Yee “faces”</td>
<td>QRT ray tracer files</td>
</tr>
<tr>
<td>CMU window manager bitmaps</td>
<td>Raw grayscale bytes</td>
</tr>
<tr>
<td>Doodle brush files</td>
<td>Raw RGB bytes</td>
</tr>
<tr>
<td>FITS files</td>
<td>Sun icons</td>
</tr>
<tr>
<td>GIF files</td>
<td>Sun rasterfiles</td>
</tr>
<tr>
<td>Gould scanner files</td>
<td>TIFF images</td>
</tr>
<tr>
<td>Group 3 faxes</td>
<td>TrueVision Targa files</td>
</tr>
<tr>
<td>HIPS files</td>
<td>Usenix FaceSaver(tm) images</td>
</tr>
<tr>
<td>HP PaintJet files</td>
<td>X10/X11 window dumps</td>
</tr>
<tr>
<td>IFF ILBM files</td>
<td>X11 pixmaps</td>
</tr>
<tr>
<td>IMG (GEM) images</td>
<td>XBM files</td>
</tr>
<tr>
<td>Img-whatnot files</td>
<td>Xim file</td>
</tr>
<tr>
<td>Lisp Machine bitmaps</td>
<td> </td>
</tr>
</table>
<p>The <b>PBMplus</b> tools translate the image into the
appropriate portable format (PBM, PGM, or PPM) depending
on the nature of the image. Similarly, the tools can all
work with “lower” formats. (PPM tools can
work with PGM and PBM files, and PGM tools can work with
PBM files.) For example, there is no
“<b>pbmtopcx</b>,” however the
<b>ppmtopcx</b><a id="id2895625" class="indexterm"
name="id2895625"></a> tool will create a black and white
PCX file if you use a PBM file as the input. Once
converted into a portable format, the image can be
translated back into (almost) any of the supported
formats.</p>
<p>In addition to image conversion, the PBMPlus tools
include programs to perform a wide variety of image
manipulations.</p>
<table class="simplelist" border="0"
summary="Simple list">
<tr>
<td>Apply Conway's rules of life</td>
<td>Create a blank image</td>
</tr>
<tr>
<td>Create a mask bitmap</td>
<td>Reduce/enlarge an image</td>
</tr>
<tr>
<td>Convert text into a bitmap</td>
<td>Create a UPC bitmap</td>
</tr>
<tr>
<td>Bentleyize a greymap</td>
<td>Apply edge-detection</td>
</tr>
<tr>
<td>Apply edge-enhancement</td>
<td>Generate a histogram</td>
</tr>
<tr>
<td>Normalize contrast</td>
<td>Apply an “oil-painting” filter</td>
</tr>
<tr>
<td>Create a “ramp”</td>
<td>Generate textural features</td>
</tr>
<tr>
<td>Perform bitwise arithmetic</td>
<td>Perform MxN convolution</td>
</tr>
<tr>
<td>Crop an image</td>
<td>Cut/Paste rectangles</td>
</tr>
<tr>
<td>Color-reduce</td>
<td>Flip/rotate</td>
</tr>
<tr>
<td>Apply gamma-correction</td>
<td>Build a visual index</td>
</tr>
<tr>
<td>Invert an image</td>
<td>Add a border to an image</td>
</tr>
<tr>
<td>Scale an image</td>
<td>Shear an image</td>
</tr>
<tr>
<td>Smooth an image</td>
<td>Build a tiled image</td>
</tr>
<tr>
<td>Colorize a graymap</td>
<td>Dither color images</td>
</tr>
<tr>
<td>Create fractal terrain</td>
<td>Apply Laplacian-relief filter</td>
</tr>
</table>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2895807"
name="id2895807"></a>xv</h3>
</div>
</div>
<p><b>xv</b><a id="id2895821" class="indexterm"
name="id2895821"></a> is an interactive image
viewing/converting tool that runs on X11 servers
(including MS-DOS implementations of X11 such as
Desqview/X).</p>
<p>You can view GIF<a id="id2895837" class="indexterm"
name="id2895837"></a>, PBM<a id="id2895845"
class="indexterm" name="id2895845"></a>, XBM<a
id="id2895854" class="indexterm" name="id2895854"></a>,
Sun rasterfile<a id="id2895863" class="indexterm"
name="id2895863"></a>, JPEG<a id="id2895871"
class="indexterm" name="id2895871"></a>, and TIFF<a
id="id2895880" class="indexterm" name="id2895880"></a>
images. You can save any image in one of those formats or
in encapsulated PostScript. In addition, you can capture
any visible portion of the X11 server window
interactively with <b>xv</b>.</p>
<p>Like most of the tools described here, <b>xv</b>
includes a number of image manipulation tools (cropping,
scaling, editing the color map, etc.). If you try to view
an image that is larger than your display, <b>xv</b>
automatically scales it to fit. I find that <b>xv</b>'s
interactive nature makes it easier to use for image
manipulation than the command-driven tools.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2895932"
name="id2895932"></a>xloadimage</h3>
</div>
</div>
<p>The <b>xloadimage</b><a id="id2895946"
class="indexterm" name="id2895946"></a> program is
another X11 picture display tool. Like <b>xv</b> and
<b>Image Magick</b>'s <b>display</b>, it has a number of
picture manipulation options (although they are not
interactive).</p>
<p>One advantage of <b>xloadimage</b> is that it does not
rescale images that are too large to fit within the
display. Instead, it places them in a scrollable window.
I find this behavior superior to <b>xv</b>'s solution of
rescaling a very large image even though you are
interested only in a small section of it.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2896003"
name="id2896003"></a>Image Alchemy</h3>
</div>
</div>
<p><b>Image Alchemy</b><a id="id2896018"
class="indexterm" name="id2896018"></a> is a shareware
tool for converting graphic images between various
formats. Although the manual mentions a version for Sun
workstations, I have only seen the MS-DOS version.</p>
<p>Note that the unregistered shareware version of this
program will only convert images which are 640$\times$480
pixels or smaller.</p>
<p>The following is a list of the graphic formats
recognized by version 1.5 of <b>Image Alchemy</b>:</p>
<table class="simplelist" border="0"
summary="Simple list">
<tr>
<td>ADEX</td>
<td>PCPAINT/Pictor Page Format</td>
</tr>
<tr>
<td>Autologic</td>
<td>PCX</td>
</tr>
<tr>
<td>Binary Information Files (BIF)</td>
<td>Portable BitMap (PBM)</td>
</tr>
<tr>
<td>Encapsulated PostScript (EPS)</td>
<td>Q0</td>
</tr>
<tr>
<td>Erdas LAN/GIS</td>
<td>QDV</td>
</tr>
<tr>
<td>Freedom of the Press</td>
<td>QRT</td>
</tr>
<tr>
<td>GEM VDI Image File</td>
<td>Scodl</td>
</tr>
<tr>
<td>GIF</td>
<td>Silicon Graphics Image</td>
</tr>
<tr>
<td>HP Printer Command Language (PCL)</td>
<td>Stork</td>
</tr>
<tr>
<td>HP Raster Transfer Language (RTL)</td>
<td>Sun Raster</td>
</tr>
<tr>
<td>HSI JPEG</td>
<td>TIFF</td>
</tr>
<tr>
<td>HSI Palette</td>
<td>Targa</td>
</tr>
<tr>
<td>HSI Raw</td>
<td>Utah Raster Toolkit (RLE)</td>
</tr>
<tr>
<td>IFF/ILBM</td>
<td>Vivid</td>
</tr>
<tr>
<td>JPEG/JFIF</td>
<td>Windows Bitmap (BMP)</td>
</tr>
<tr>
<td>Jovian VI</td>
<td>WordPerfect Graphic File</td>
</tr>
<tr>
<td>Macintosh PICT/PICT2</td>
<td>XBM</td>
</tr>
<tr>
<td>MTV Ray Tracer</td>
<td>XWD</td>
</tr>
</table>
<p><b>Image Alchemy</b> can also perform a number of
image manipulations like rescaling, cropping, and color
map changes.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2896234"
name="id2896234"></a>ColorView</h3>
</div>
</div>
<p><b>ColorView<a id="id2896248" class="indexterm"
name="id2896248"></a></b> is a shareware MS-DOS program
for displaying and converting graphic images. Although
designed to work with VESA SuperVGA adapters,
<b>ColorView</b> can also work with plain VGA adapters.
It does require a 80286 or a more powerful processor.</p>
<p><b>ColorView</b> can read JPEG<a id="id2896279"
class="indexterm" name="id2896279"></a>, GIF (87 and
89)<a id="id2896288" class="indexterm"
name="id2896288"></a>, BMP<a id="id2896296"
class="indexterm" name="id2896296"></a>, and RLE<a
id="id2896310" class="indexterm" name="id2896310"></a>
images. It can write GIF (87), 8-bit BMP, 24-bit BMP,
JPEG, and RLE images. It can perform image translation
without displaying the images, so a VGA or SuperVGA
adapter is not required for translation.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2896325"
name="id2896325"></a>Jpeg4</h3>
</div>
</div>
<p>This<a id="id2896334" class="indexterm"
name="id2896334"></a> is the Independent JPEG Group<a
id="id2896343" class="indexterm" name="id2896343"></a>'s
JPEG Software. The compression tool can convert GIF<a
id="id2896353" class="indexterm" name="id2896353"></a>,
PPM<a id="id2896361" class="indexterm"
name="id2896361"></a>, and Targa (TGA)<a id="id2896370"
class="indexterm" name="id2896370"></a> images into
JPEG<a id="id2896379" class="indexterm"
name="id2896379"></a> format. The decompression tool
converts JPEG images into GIF, PPM (or PGM<a
id="id2896389" class="indexterm" name="id2896389"></a>),
or Targa formats.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2896400"
name="id2896400"></a>pmjpeg</h3>
</div>
</div>
<p>The <b>pmjpeg</b><a id="id2896415" class="indexterm"
name="id2896415"></a> program is an OS/2 2.x program that
can read and display JPEG<a id="id2896424"
class="indexterm" name="id2896424"></a>, TIFF<a
id="id2896433" class="indexterm" name="id2896433"></a>,
Targa<a id="id2896441" class="indexterm"
name="id2896441"></a>, GIF<a id="id2896450"
class="indexterm" name="id2896450"></a>, PCX<a
id="id2896459" class="indexterm" name="id2896459"></a>,
and Windows<a id="id2896467" class="indexterm"
name="id2896467"></a> or OS/2 BMP<a id="id2896482"
class="indexterm" name="id2896482"></a> images. In
addition, <b>pmjpeg</b> can write images in any of these
formats except Windows BMP. <b>pmjpeg</b> can also
capture all or part of the desktop. Some of the other
features of <b>pmjpeg</b> are color map editing, contrast
enhancement, image cropping, scaling, rotation, batch
translation of images into JPEG format, cyclic slideshow
presentations, and the ability to reduce an image to the
system palette colors.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2896523"
name="id2896523"></a>txt2pcx</h3>
</div>
</div>
<p><b>txt2pcx</b><a id="id2896537" class="indexterm"
name="id2896537"></a> is a memory-resident MS-DOS utility
that captures text-mode screens as PCX graphic images.
See the discussion of screen capturing in the “<a
href="ch06.html#sec.screendump" title="GoScript">the
section called “GoScript”</a>” section
of this chapter for more information about why this is
sometimes desirable.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2896564"
name="id2896564"></a>Ghostscript</h3>
</div>
</div>
<p><b>Ghostscript</b><a id="id2896577" class="indexterm"
name="id2896577"></a> is distributed by the Free Software
Foundation (FSF)<a id="id2896586" class="indexterm"
name="id2896586"></a>. It is one of the few freely
available programs that can convert PostScript images
into other formats.</p>
<p><b>Ghostscript</b> is a (mostly) complete PostScript<a
id="id2896608" class="indexterm" name="id2896608"></a>
interpreter. Converting an entire page of PostScript into
another format is straightforward with
<b>Ghostscript</b>. The following example converts the
PostScript file <tt>file.ps</tt> into a monochrome GIF<a
id="id2896637" class="indexterm" name="id2896637"></a>
image called <tt>image1.gif</tt>:</p>
<pre class="screen">
\$ <span
class="bold"><b>gs -r300 -sDEVICE=gifmono -sOutputFile=image1.gif file.ps</b></span>
</pre>
<br />
<br />
<p>The parameter <span
class="emphasis"><em>-r300</em></span> indicates that
<b>Ghostscript</b> should generate output at a resolution
of 300dpi. This controls the size of the bitmap. If you
plan to print the resulting bitmap, you should specify
the same resolution as your printer. If <tt>file.ps</tt>
contains more than one page, you can use a <tt><!--
d</tt> in the output file's name to identify how multiple
pages --> should be handled. For example, if
<tt>file.ps</tt> contains three pages, the following
command will extract the first page into
<tt>image1.gif</tt>, the second page into
<tt>image2.gif</tt>, and the third page into
<tt>image3.gif</tt>:<sup>[<a id="id2896732"
name="id2896732" href="#ftn.id2896732">84</a>]</sup></p>
<pre class="screen">
\$ <span
class="bold"><b>gs -r300 -sDEVICE=gifmono -sOutputFile=image\%d.gif file.ps</b></span>
</pre>
\vskip-\baselineskip <br />
<br />
<p>For incorporating images into TeX, it is more common
to convert an encapsulated PostScript (EPS)<a
id="id2896761" class="indexterm" name="id2896761"></a><a
id="id2896769" class="indexterm" name="id2896769"></a><a
id="id2896779" class="indexterm" name="id2896779"></a>
image into a bitmapped format than it is to convert
entire pages. Encapsulated PostScript is described
earlier in this chapter in the section “<a
href="ch06.html#sec.scaleformat"
title="Using a Lot of Help">the section called
“Using a Lot of Help”</a>.” It is
slightly more difficult to convert encapsulated
PostScript because of the bounding box<a id="id2896806"
class="indexterm" name="id2896806"></a>. To convert this
into a bitmap of exactly the right size, you have to tell
<b>Ghostscript</b> to move the image to the upper-left
corner of the page (where <b>Ghostscript</b> always
begins its conversion) and tell it how big the image is
in pixels.</p>
<p>The following steps are necessary to produce exactly
the right size bitmap of the encapsulated PostScript
figure:</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>Find the size of the bounding box. Examine the
PostScript file using a text editor. Find the line
that begins with <tt><!-- % BoundingBox:</tt>
--> followed by four numbers. Those numbers are
the lower-left x-coordinate (llx), the lower-left
y-coordinate (lly), the upper-right x-coordinate
(urx), and the upper-right y-coordinate (ury),
respectively.</p>
</li>
<li>
<p>Create another file called <tt>trans.ps</tt>
that contains the single line:</p>
<pre class="screen">
<span class="emphasis"><em>llx</em></span> neg <span
class="emphasis"><em>lly</em></span> neg translate
</pre>
</li>
<li>
<p>Calculate the width of the bounding box:
$width_{bb} = urx - llx$.</p>
</li>
<li>
<p>The width you have just calculated is the width
at 72dpi. To convert this to the resolution that
you will be using, multiply by the resolution and
divide by 72. For example, if you will be printing
at 300dpi and the width of the bounding box
$width_{bb}$ is 216, the width at 300dpi, <span
class="emphasis"><em>width</em></span>, is $(216
\times 300) \div 72 = 900$.</p>
</li>
<li>
<p>Calculate the corrected height in an analogous
manner using $height_{bb} = ury - lly$ as a
starting point. For example, if $height_{bb} =
360$, the height you get at 300dpi is 1500.</p>
</li>
<li>
<p>Finally, run <b>Ghostscript</b> using the <span
class="emphasis"><em>-g</em></span> parameter to
select the image size ($width \times height$). For
example, to translate the EPS file <tt>card.ps</tt>
into the GIF file <tt>card.gif</tt> at 300dpi
assuming the height and width calculated above,
run:</p>
<pre class="screen">
\$ <span
class="bold"><b>{gs -r300 -g900x1500 -sDEVICE=gifmono {\bs}
-sOutputFile=card.gif trans.ps card.ps}</b></span>
</pre>
</li>
</ol>
</div>
<p>The <span class="emphasis"><em>Perl</em></span> script
shown in Example <a href="ch06.html#ex.gseps"
title="Example 6.8. Converting Encapsulated PostScript to a Bitmap with Ghostscript">
Example 6.8</a> automates this process.</p>
<div class="example">
<a id="ex.gseps" name="ex.gseps"></a>
<p class="title"><b>Example 6.8. Converting
Encapsulated PostScript to a Bitmap with
Ghostscript</b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="gs-eps.pl"></a>
</pre>
</div>
<p>The primary disadvantage of <b>Ghostscript</b> is that
the selection of free PostScript fonts is quite limited.
The only freely available fonts are: IBM Courier,
Bitstream Courier, Bitstream Charter, Adobe Utopia, URW
Antiqua, URW Grotesk Bold, Nimbus Roman No9, and Nimbus
Sans. Unless you have the PostScript sources for other
fonts used in your figures (<tt>PFA</tt> or <tt>PFB</tt>
and <tt>AFM</tt> files), <b>Ghostscript</b> will use
crude approximations of the desired font.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="sec.screendump"
name="sec.screendump"></a>GoScript</h3>
</div>
</div>
<p><b>GoScript</b><a id="id2897134" class="indexterm"
name="id2897134"></a> is a commercial PostScript<a
id="id2897143" class="indexterm" name="id2897143"></a>
interpreter sold by LaserGo, Inc.<a id="id2897155"
class="indexterm" name="id2897155"></a> <b>GoScript</b>
is available for MS-DOS systems only. A special version
is available for Microsoft Windows.</p>
<p>The primary advantage of a commercial interpreter is
that it comes with more high-quality fonts. The
<b>GoScript</b> program comes with “clones”
of the 13 standard PostScript fonts:</p>
<table class="simplelist" border="0"
summary="Simple list">
<tr>
<td>Times Roman</td>
<td>Times Italic</td>
</tr>
<tr>
<td>Times Bold</td>
<td>Times Bold Italic</td>
</tr>
<tr>
<td>Helvetica</td>
<td>Helvetica Oblique</td>
</tr>
<tr>
<td>Helvetica Bold</td>
<td>Helvetica Bold Oblique</td>
</tr>
<tr>
<td>Courier</td>
<td>Courier Oblique</td>
</tr>
<tr>
<td>Courier Bold</td>
<td>Courier Bold Oblique</td>
</tr>
<tr>
<td>Symbol</td>
<td> </td>
</tr>
</table>
<p>The <b>GoScript Plus</b> program includes clones of
all 35 standard fonts (the standard 13 plus AvantGarde,
Bookman, Helvetica-Narrow, New Century Schoolbook,
Palatino in four styles, Zapf Chancery Italic, and Zapf
Dingbats). For MS-DOS users, this program has the
additional advantage of being quite a bit faster than
<b>Ghostscript</b>.</p>
<p>Although <b>GoScript</b> can use any PostScript
Type 1 or Type 3 font, the fonts supplied with
<b>GoScript</b> are not in a standard PostScript format,
so they cannot be used with other applications.</p>
<p>On a 300dpi LaserJet printer, <b>GoScript</b> did not
seem to align the baseline of bitmapped PostScript fonts
with great accuracy. This is unfortunate, because the
Computer Modern fonts created with MetaFont for TeX are
bitmapped.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2897312"
name="id2897312"></a>hp2xx</h3>
</div>
</div>
<p><b>hp2xx</b><a id="id2897329" class="indexterm"
name="id2897329"></a> converts scalable images in HPGL<a
id="id2897338" class="indexterm" name="id2897338"></a>
into other formats. HPGL is Hewlett-Packard's command
language for controlling pen-based plotters. (HP's
LaserJet series of printers, starting with the LaserJet
III, also understand HPGL.)</p>
<p>Many computer-aided drafting packages can save
diagrams in HPGL format. Other software that works with
scalable images is likely to be able to save in HPGL
format as well. Because HPGL support is uncommon in
printers, you will probably have to convert HPGL diagrams
into another format to include them in your TeX
documents. <b>hp2xx</b> output comes in three flavors:
scalable graphics, TeX commands, and bitmapped
graphics.</p>
<div class="variablelist">
<dl>
<dt><span class="term">Scalable graphics</span></dt>
<dd>
<p>The supported scalable graphics formats are
encapsulated PostScript and MetaFont source
code.</p>
</dd>
<dt><span class="term">TeX commands</span></dt>
<dd>
<p>HPGL drawings composed of mostly straight lines
can be rendered in TeX. <b>hp2xx</b>'s TeX output
is designed for either the emTeX DVI drivers (it
relies on \special commands to draw lines at
arbitrary angles) or the <span
class="emphasis"><em>epic</em></span> macros (which
also use \special commands that must be supported
by your DVI driver).</p>
</dd>
<dt><span class="term">Bitmapped graphics</span></dt>
<dd>
<p>Bitmaps can be produced in PBM<a id="id2897448"
class="indexterm" name="id2897448"></a>, PCX<a
id="id2897457" class="indexterm"
name="id2897457"></a>, or PCL<a id="id2897465"
class="indexterm" name="id2897465"></a> (HP
LaserJet bitmap) formats. You can select image size
and resolution to produce a bitmap that will print
at the correct size for your printer.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2897483"
name="id2897483"></a>Image Editors</h2>
</div>
</div>
<p>Although many images<a id="id2897492" class="indexterm"
name="id2897492"></a><a id="id2897500" class="indexterm"
name="id2897500"></a> are available on the Net and
commercially, it is very likely that you will want to
create your own pictures and diagrams for some of the
documents that you write. A few common drawing tools are
described below. Table <a
href="ch06.html#tab.drawingtools"
title="Table 6.2. Graphics Editing Packages">Table 6.2</a>
summarizes the packages discussed here. There are many more
commercial packages for image editing---so many, in fact,
that I'm not going to make any effort to describe them
here.</p>
<div class="table">
<a id="tab.drawingtools" name="tab.drawingtools"></a>
<p class="title"><b>Table 6.2. Graphics Editing
Packages</b></p>
<table summary="Graphics Editing Packages" border="1">
<colgroup>
<col align="left" />
<col align="center" />
<col align="center" />
<col align="left" />
</colgroup>
<thead>
<tr>
<th align="left">Program</th>
<th align="center">Platforms</th>
<th align="center">Cost</th>
<th align="left">Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">xfig</td>
<td align="center">unix</td>
<td align="center">free</td>
<td align="left">Edit scalable Fig drawings</td>
</tr>
<tr>
<td align="left">idraw</td>
<td align="center">unix</td>
<td align="center">free</td>
<td align="left">Edit encapsulated PostScript
images</td>
</tr>
<tr>
<td align="left">tgif</td>
<td align="center">unix</td>
<td align="center">free</td>
<td align="left">Edit scalable drawings</td>
</tr>
<tr>
<td align="left">pixmap</td>
<td align="center">unix</td>
<td align="center">free</td>
<td align="left">Edit X11 XBM and XPM files</td>
</tr>
<tr>
<td align="left">texcad</td>
<td align="center">MS-DOS</td>
<td align="center">free</td>
<td align="left">Edit LaTeX picture
environments</td>
</tr>
<tr>
<td align="left">xtexcad</td>
<td align="center">unix</td>
<td align="center">free</td>
<td align="left">An X11 implementation of
<b>texcad</b></td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2897734"
name="id2897734"></a>xfig</h3>
</div>
</div>
<p><b>xfig</b><a id="id2897747" class="indexterm"
name="id2897747"></a> is an editing tool for scalable
images stored in the Fig format, described in the
“<a href="ch06.html#sec.Fig"
title="The epic and eepic styles">the section called
“The epic and eepic styles”</a>”
section of this chapter. An example of a drawing being
constructed with <b>xfig</b> is shown in Figure <a
href="ch06.html#fig.sd-xfig"
title="Figure 6.11. Editing an image with xfig">
Figure 6.11</a>.</p>
<div class="figure">
<a id="fig.sd-xfig" name="fig.sd-xfig"></a>
<p class="title"><b>Figure 6.11. Editing an
image with xfig</b></p>
<div class="mediaobject">
<img src="tex.06.11.eps" />
</div>
</div>
<p>The objects in Fig are arcs, circles, open and closed
splines, ellipses, regular and irregular polygons,
polylines, boxes, arc-boxes (boxes with rounded corners),
text, and encapsulated PostScript. Compound objects can
be constructed by binding these objects together.</p>
<p>As a consequence of Fig's device independence, it can
be translated into a number of different output formats.
A completed Fig drawing can be rendered in PostScript,
PiCTeX, \linebreak</p>
<p>LaTeX's <tt>picture</tt> environment, MetaFont, or any
of the pic, epic, eepic, box, eepicemu and \special
environments. Figures can also be saved as X11 bitmaps.
Not all of the output formats support all of the features
of Fig. For example, arbitrarily sloped lines are not
supported by the LaTeX <tt>picture</tt> environment, and
encapsulated PostScript makes sense only for PostScript
output.</p>
<p><b>xfig</b> supports rotation, flipping, scaling, and
duplication of objects. However, it imposes some
limitations on the figures that you create. Objects that
contain boxes, arc-boxes, circles, or ellipses can be
rotated only in 90 degree increments. Text objects cannot
be flipped over.</p>
<p>When objects are placed on the “canvas,”
you can elect to have <b>xfig</b> restrict their
placement to $\frac{1}{16}$, $\frac{1}{4}$, or
$\frac{1}{2}$-inch intervals. Restricted placement makes
alignment of a large number of objects easier.
Unrestricted placement is also allowed, and there is an
alignment operator that can center (vertically and
horizontally) any number of objects. A nonprinting grid
is available in several sizes, independent of the
restriction on object placement. In a similar way,
<b>xfig</b> can be instructed to draw sloped lines within
specific limits (for example, only allowing lines at
slopes supported by LaTeX's <tt>picture</tt>
environment). Precise numeric-coordinate placement of
individual objects is also supported.</p>
<p><b>xfig</b> provides access to the standard 35
PostScript fonts as well as the standard LaTeX fonts.
Eight-bit input, allowing access to international
symbols, is also provided.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2897932"
name="id2897932"></a>idraw</h3>
</div>
</div>
<p><b>idraw</b><a id="id2897946" class="indexterm"
name="id2897946"></a>, the InterViews drawing editor, is
an X Windows application for editing encapsulated
PostScript figures. Figure <a
href="ch06.html#fig.sd-idraw"
title="Figure 6.12. Editing an image with idraw">
Figure 6.12</a> shows a drawing constructed with
<b>idraw</b>.</p>
<div class="figure">
<a id="fig.sd-idraw" name="fig.sd-idraw"></a>
<p class="title"><b>Figure 6.12. Editing an
image with idraw</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<p>The objects in <b>idraw</b> are lines, ellipses, open
and closed splines, irregular polygons, polylines,
rectangles, and text. Compound objects can be constructed
by gluing these objects together. Fonts, brushes, and
patterns can be customized and extended with X-defaults.
<b>idraw</b> supports the full complement of rotation,
flip, scale, and duplicate operations with or without
grid lines and optional gravity.</p>
<p>Unfortunately, the “gravity” option, which
allows you to create horizontally and vertically aligned
objects, is not preserved when a file is saved. It is
very difficult to recover the alignment of a file when it
has been saved and reloaded.</p>
<p>Graphics in TIFF, encapsulated PostScript, X11 bitmap
format, and Unidraw format can be imported into
<b>idraw</b> figures.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2898057"
name="id2898057"></a>tgif</h3>
</div>
</div>
<p><b>tgif</b><a id="id2898071" class="indexterm"
name="id2898071"></a>, like <b>xfig</b> and <b>idraw</b>,
is an editor for scalable drawings. The
“gif\,” in <b>tgif</b> has nothing to do with
the bitmap GIF format. The captured screen in
Figure <a href="ch06.html#fig.sd-tgif"
title="Figure 6.13. Editing an image with tgif">
Figure 6.13</a> shows a drawing being constructed
with <b>tgif</b>.</p>
<div class="figure">
<a id="fig.sd-tgif" name="fig.sd-tgif"></a>
<p class="title"><b>Figure 6.13. Editing an
image with tgif</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
<p><b>tgif</b> stores objects as a set of Prolog
“facts.” Several programs are provided for
interpretation of <b>tgif</b> objects outside of
<b>tgif</b>. Only four output types are built into
<b>tgif</b>: PostScript<a id="id2898193"
class="indexterm" name="id2898193"></a>, encapsulated
PostScript (EPS)<a id="id2898202" class="indexterm"
name="id2898202"></a>, X11 bitmaps<a id="id2898211"
class="indexterm" name="id2898211"></a>, and X11
pixmaps.</p>
<p><b>tgif</b> has a number of interesting features
including the ability to design hierarchical drawings in
either a “top down” or “bottom
up” manner, and the separation of an object's <span
class="emphasis"><em>representation</em></span> from its
<span class="emphasis"><em>instantiation</em></span>. In
addition, arbitrary text-based attributes can be attached
to each object. <b>tgif</b> uses these attributes in a
number of ways, such as the execution of system commands
based upon object attributes.</p>
<p>The objects supported by <b>tgif</b> are arcs,
ellipses, rectangles, rounded-corner rectangles,
polylines, polygons, open and closed splines, text, X11
bitmaps, some forms of X11 pixmaps, and encapsulated
PostScript. These objects can be grouped together.</p>
<p><b>tgif</b> supports only five fonts (Times, Courier,
Helvetica, New Century Schoolbook, and Symbol) at a few
fixed sizes. The fill patterns, line styles, text-styles,
and other attributes are similarly fixed (although more
generous in number).</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2898297"
name="id2898297"></a>bitmap/pixmap</h3>
</div>
</div>
<p><b>bitmap</b><a id="id2898311" class="indexterm"
name="id2898311"></a> and <b>pixmap</b><a id="id2898325"
class="indexterm" name="id2898325"></a> are standard
tools distributed with the X11 Window System. The
<b>pixmap</b> tool provides a superset of the functions
in <b>bitmap</b>, including support for color images. An
example of the <b>bitmap</b> program editing a small X
icon is shown in Figure <a
href="ch06.html#fig.xbitmap"
title="Figure 6.14. An example of bitmap editing an icon">
Figure 6.14</a>.</p>
<div class="figure">
<a id="fig.xbitmap" name="fig.xbitmap"></a>
<p class="title"><b>Figure 6.14. An example
of bitmap editing an icon</b></p>
<div class="mediaobject">
<img src="FIXME:" />
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2898403"
name="id2898403"></a>Other Bitmap Editors</h3>
</div>
</div>
<p>Free or inexpensive bitmap editors<a id="id2898413"
class="indexterm" name="id2898413"></a> are available for
almost every computer system. The selection of a
particular package depends in large part on what kinds of
diagrams you need to create.</p>
<p>The primary disadvantage of bitmap editing is that it
is difficult to create bitmaps large enough to be used at
printer resolution. Even a “full screen”
image on a high-resolution monitor is only a couple of
inches across (at best) on a laser printer.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<h3 class="title"><a id="id2898442"
name="id2898442"></a>texcad/xtexcad</h3>
</div>
</div>
<p><b>texcad</b><a id="id2898456" class="indexterm"
name="id2898456"></a> is an MS-DOS program (distributed
with emTeX) for editing LaTeX <tt>picture</tt>
environments. <b>xtexcad</b><a id="id2898478"
class="indexterm" name="id2898478"></a> is a similar
program that runs under the X11 Window system.</p>
<p>The LaTeX <tt>picture</tt> environment suffers from
two limitations: it can only draw relatively simple
diagrams, and it is very difficult to use. <b>texcad</b>
and <b>xtexcad</b> remove the second limitation. With one
of these programs, the LaTeX <tt>picture</tt> environment
becomes a viable option for many diagrams.</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a id="id2898527"
name="id2898527"></a>Screen Dumps</h2>
</div>
</div>
<p>If you are writing a document that describes a computer
program, it is frequently desirable to include an image of
the running program (a captured screen or screen dump<a
id="id2898539" class="indexterm" name="id2898539"></a>) in
the document. There are several ways that this can be
accomplished<a id="id2898549" class="indexterm"
name="id2898549"></a><a id="id2898556" class="indexterm"
name="id2898556"></a><a id="id2898563" class="indexterm"
name="id2898563"></a><a id="id2898570" class="indexterm"
name="id2898570"></a><a id="id2898577" class="indexterm"
name="id2898577"></a><a id="id2898584" class="indexterm"
name="id2898584"></a><a id="id2898591" class="indexterm"
name="id2898591"></a><a id="id2898598" class="indexterm"
name="id2898598"></a>:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p><b>Screen Thief</b> for MS-DOS</p>
</li>
<li>
<p><b>GrabIt</b> for Microsoft Windows</p>
</li>
<li>
<p><b>xv</b>, <b>Image Magick</b>, or <b>xwd</b> for
X11 workstations</p>
</li>
<li>
<p><b>PM-Cam</b>, <b>Nikon II</b>, or <b>pmjpeg</b>
for OS/2</p>
</li>
</ul>
</div>
<p>The captured screen may be in a graphics format that is
directly usable by your DVI driver or by <b>bm2font</b>. If
not, one or more of the conversion programs described in
“<a href="ch06.html#sec.picconv"
title="Manipulating Images">the section called
“Manipulating Images”</a>” earlier in
this chapter will help you convert it into a usable
format.</p>
<p>The most common output devices for TeX are laser
printers with a resolution of 300dpi or higher. By
contrast, the resolution of a typical display is around
80dpi. This discrepancy may require you to enlarge the
bitmap image to make it legible in your document. For
example, a 640x480 bitmap image is only about two inches
wide when printed at 300dpi. In color images, <span
class="emphasis"><em>dithering<a id="id2898740"
class="indexterm" name="id2898740"></a></em></span>, which
increases the number of dots used to represent each pixel
in the original image, has a natural enlarging effect on
the image, and this reduces the magnitude of the problem.
However, some scaling may still be necessary.</p>
<p>If the screen you want to include is only text (this
includes IBM's line-drawing characters and other symbols),
you can include it as a special “verbatim”
environment if you have an appropriate font. The advantages
of this method are that the actual screen text can be
incorporated directly into your document (making the
document more portable and easier to distribute, if that is
a concern), and that the resulting document is small and
easy to print. The disadvantage of this approach is that
information about color is lost. If parts of the on-screen
text appear in different colors for highlighting, using a
pure-text approach may not produce acceptable results. For
example, compare Figure <a
href="ch06.html#fig.textshot"
title="Figure 6.15. A text mode screen dump.">Figure 6.15</a>
with the results in Figure <a
href="ch02.html#fig.melatexcmp"
title="Figure 2.2. LaTeX as a compiler in Multi-Edit">
Figure 2.2</a> in Chapter <a href="ch02.html"
title="Chapter 2. Editing">Chapter 2</a>,
<span class="emphasis"><em><a href="ch02.html"
title="Chapter 2. Editing">Chapter 2</a></em></span>.</p>
<div class="figure">
<a id="fig.textshot" name="fig.textshot"></a>
<p class="title"><b>Figure 6.15. A text mode
screen dump.</b></p>
<div class="literallayout">
<p>\screendump{metext}</p>
</div>
</div>
<p>To insert pure-text screen captures, you have to have a
font with exactly the same encoding as the text on the
screen (for more information about font encodings, see the
section “<a href="ch05.html#sec.fonts.encodingvec"
title="Declaring a family">the section called
“Declaring a family”</a>” in
Chapter <a href="ch05.html"
title="Chapter 5. Fonts">Chapter 5</a>,
<span class="emphasis"><em><a href="ch05.html"
title="Chapter 5. Fonts">Chapter 5</a></em></span>).
On MS-DOS and OS/2 PCs, this is sometimes a problem because
the IBM line drawing characters do not appear in most
fonts. Several commercial fonts provide the appropriate
character set, but so do the freely available IBM Courier
fonts (distributed by IBM for the X11 Consortium). The IBM
Courier fonts are PostScript Type 1 fonts. If you need
TeX <tt>PK</tt> fonts, use the <b>ps2pk</b> program as
described in the section called “<a
href="ch05.html#sec.t1fonts" title="Math Fonts in TeX">the
section called “Math Fonts in TeX”</a>”
in Chapter <a href="ch05.html"
title="Chapter 5. Fonts">Chapter 5</a>.</p>
<p>To use the IBM Courier fonts to print captured screens,
you will need <tt>AFM</tt> files<a id="id2898938"
class="indexterm" name="id2898938"></a> that have the
correct encoding vector. <tt>AFM</tt> files with the IBM
OEM character set encoding are available from the CTAN
archives in the directory <tt>fonts/courier</tt>.</p>
<p>After the appropriate font is available, you are almost
ready to reproduce a captured screen. One problem remains:
TeX cannot \input binary files. Because screen dumps
frequently contain characters from outside the normal ASCII
range, they must be considered binary in this context. To
overcome this difficulty, it is necessary to process the
screen dump and convert it into a text file. The
<b>Perl</b> script in Example <a
href="apd.html#ex.txt2verb"
title="Example D.8. txt2verb.pl">Example D.8</a>
in Appendix <a href="apd.html"
title="Appendix D. Long Examples">Appendix D</a>,
<span class="emphasis"><em><a href="apd.html"
title="Appendix D. Long Examples">Appendix D</a></em></span>,
will perform this conversion.</p>
<p>After conversion, the TeX code shown in Example <a
href="ch06.html#ex.texscreencapt"
title="Example 6.9. Script for Inserting a Captured Text Screen">
Example 6.9</a> will insert the screen. This code will
work in both Plain TeX and LaTeX. Similar code can be
written for other formats. Figure <a
href="ch06.html#fig.textshot"
title="Figure 6.15. A text mode screen dump.">Figure 6.15</a>
was produced with this code.</p>
<div class="example">
<a id="ex.texscreencapt" name="ex.texscreencapt"></a>
<p class="title"><b>Example 6.9. Script for
Inserting a Captured Text Screen</b></p>
<pre class="programlisting">
<a type="simple" show="embed" actuate="onLoad"
href="screendump.sty"></a>
</pre>
</div>
</div>
<div class="footnotes">
<br />
<hr width="100" align="left" />
<div class="footnote">
<p><sup>[<a id="ftn.id2884093" name="ftn.id2884093"
href="#id2884093">79</a>]</sup> {Some devices, most
notably plotters, don't work this way. They really draw
lines and curves with physical pens.}</p>
</div>
<div class="footnote">
<p><sup>[<a id="ftn.id2891727" name="ftn.id2891727"
href="#id2891727">80</a>]</sup> And probably any other
format derived from Plain TeX.</p>
</div>
<div class="footnote">
<p><sup>[<a id="ftn.id2892937" name="ftn.id2892937"
href="#id2892937">81</a>]</sup> {<b>dvimsp</b> has been
replaced by <b>dvidot</b> in the beta test
distributions.}</p>
</div>
<div class="footnote">
<p><sup>[<a id="ftn.id2893346" name="ftn.id2893346"
href="#id2893346">82</a>]</sup> {In fairness, the degree
of difficulty depends on the platform you work on. Some
systems, like the Amiga, have very good support for
PostScript output, even on non-PostScript devices.
Alternatively, if you have a fast computer, the extra
translation through <b>Ghostscript</b> may be quite
painless.}</p>
</div>
<div class="footnote">
<p><sup>[<a id="ftn.id2893914" name="ftn.id2893914"
href="#id2893914">83</a>]</sup> {The <tt>epsfig.sty</tt>
style relies on <tt>epsf.tex</tt><a id="id2893934"
class="indexterm" name="id2893934"></a> to provide
low-level support for including EPS images. The
<tt>epsf.tex</tt> file is part of the <b>dvips</b>
distribution.}</p>
</div>
<div class="footnote">
<p><sup>[<a id="ftn.id2896732" name="ftn.id2896732"
href="#id2896732">84</a>]</sup> {Under MS-DOS and OS/2,
remember that the command processor performs variable
substitution with the percent sign. Use two consecutive
percent signs.}</p>
</div>
</div>
</div>
<div class="navfooter">
<table width="100%" summary="Navigation table">
<tr>
<td width="40%" align="left"><a
title="Chapter 5. Fonts" href="ch05.html"><img
src="figures/nav-prev.png" alt="Prev" border="0" />
</a> </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"> <a
title="Chapter 7. International Considerations"
href="ch07.html"><img src="figures/nav-next.png"
alt="Next" border="0" /></a></td>
</tr>
<tr>
<td width="40%" align="left">
Chapter 5. Fonts </td>
<td width="20%" align="center"><a
title="Part II. Elements of a Complex Document"
href="pt02.html"><img src="figures/nav-up.png" alt="Up"
border="0" /></a></td>
<td width="40%" align="right">
 Chapter 7. International
Considerations</td>
</tr>
</table>
</div>
</body>
</html>
|