summaryrefslogtreecommitdiff
path: root/elpa/auctex-13.1.3/auctex.info
blob: b9ac9eefb3d198c08340fa6c9a0a62ad9a2ad0ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
This is auctex.info, produced by makeinfo version 6.8 from auctex.texi.

This manual is for AUCTeX (version 13.1.3 from 2022-04-16), a
sophisticated TeX environment for Emacs.

   Copyright (C) 1992-1995, 2001, 2002, 2004-2022 Free Software
Foundation, Inc.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.3 or any later version published by the Free Software
     Foundation; with no Invariant Sections, no Front-Cover Texts and no
     Back-Cover Texts.  A copy of the license is included in the section
     entitled "GNU Free Documentation License."
INFO-DIR-SECTION Emacs
START-INFO-DIR-ENTRY
* AUCTeX: (auctex).     A sophisticated TeX environment for Emacs.
END-INFO-DIR-ENTRY

INFO-DIR-SECTION TeX
START-INFO-DIR-ENTRY
* AUCTeX: (auctex).     A sophisticated TeX environment for Emacs.
END-INFO-DIR-ENTRY


File: auctex.info,  Node: Top,  Next: Copying,  Up: (dir)

AUCTeX
******

This manual may be copied under the conditions spelled out in *note
Copying this Manual::.

   AUCTeX is an integrated environment for editing LaTeX, ConTeXt,
docTeX, Texinfo, and TeX files.

   Although AUCTeX contains a large number of features, there are no
reasons to despair.  You can continue to write TeX and LaTeX documents
the way you are used to, and only start using the multiple features in
small steps.  AUCTeX is not monolithic, each feature described in this
manual is useful by itself, but together they provide an environment
where you will make very few LaTeX errors, and makes it easy to find the
errors that may slip through anyway.

   It is a good idea to make a printout of AUCTeX's reference card
'tex-ref.tex' or one of its typeset versions.

   If you want to make AUCTeX aware of style files and multifile
documents right away, insert the following in your init file (usually
'~/.emacs.d/init.el').

     (setq TeX-auto-save t)
     (setq TeX-parse-self t)
     (setq-default TeX-master nil)

   Another thing you should enable is RefTeX, a comprehensive solution
for managing cross references, bibliographies, indices, document
navigation and a few other things.  (*Note (reftex)Installation::.)

   For detailed information about the preview-latex subsystem of AUCTeX,
see *note Introduction: (preview-latex)Top.

   There is a mailing list for general discussion about AUCTeX: write a
mail with "subscribe" in the subject to <auctex-request@gnu.org> to join
it.  Send contributions to <auctex@gnu.org>.

   Bug reports should go to <bug-auctex@gnu.org>, suggestions for new
features, and pleas for help should go to either <auctex-devel@gnu.org>
(the AUCTeX developers), or to <auctex@gnu.org> if they might have
general interest.  Please use the command 'M-x TeX-submit-bug-report
<RET>' to report bugs if possible.  You can subscribe to a low-volume
announcement list by sending "subscribe" in the subject of a mail to
<info-auctex-request@gnu.org>.

* Menu:

* Copying::                     Copying
* Introduction::                Introduction to AUCTeX
* Editing::                     Editing the Document Source
* Display::                     Controlling Screen Display
* Processing::                  Starting Processors, Viewers and Other Programs
* Customization::               Customization and Extension
* Appendices::                  Copying, Changes, Development, FAQ, Texinfo mode
* Indices::                     Indices

 -- The Detailed Node Listing --

Introduction

* Summary::                     Overview of AUCTeX
* Installation::                Installing AUCTeX
* Quick Start::                 Quick Start

Editing the Document Source

* Quotes::                      Inserting double quotes
* Font Specifiers::             Inserting Font Specifiers
* Sectioning::                  Inserting chapters, sections, etc.
* Environments::                Inserting Environment Templates
* Mathematics::                 Entering Mathematics
* Completion::                  Completion of macros
* Commenting::                  Commenting text
* Indenting::                   Reflecting syntactic constructs with whitespace
* Filling::                     Automatic and manual line breaking

Inserting Environment Templates

* Equations::                   Equations
* Floats::                      Floats
* Itemize-like::                Itemize-like Environments
* Tabular-like::                Tabular-like Environments
* Customizing Environments::    Customizing Environments

Controlling Screen Display

* Font Locking::                Font Locking
* Folding::                     Folding Macros and Environments
* Outline::                     Outlining the Document
* Narrowing::                   Restricting display and editing to a portion of the buffer
* Prettifying::                 Displaying Greek and math macros as Unicode characters

Font Locking

* Fontification of macros::     Fontification of macros
* Fontification of quotes::     Fontification of quotes
* Fontification of math::       Fontification of math constructs
* Verbatim content::            Verbatim macros and environments
* Faces::                       Faces used by font-latex
* Known problems::              Known fontification problems

Starting Processors, Viewers and Other Programs

* Commands::                    Invoking external commands.
* Viewing::                     Invoking external viewers.
* Debugging::                   Debugging TeX and LaTeX output.
* Checking::                    Checking the document.
* Control::                     Controlling the processes.
* Cleaning::                    Cleaning intermediate and output files.
* Documentation::               Documentation about macros and packages.

Viewing the Formatted Output

* Starting Viewers::            Starting viewers
* I/O Correlation::             Forward and inverse search

Catching the errors

* Ignoring warnings::           Controlling warnings to be reported
* Error overview::              List of all errors and warnings

Customization and Extension

* Multifile::                   Multifile Documents
* Parsing Files::               Automatic Parsing of TeX Files
* Internationalization::        Language Support
* Automatic::                   Automatic Customization
* Style Files::                 Writing Your Own Style Support

Language Support

* European::                    Using AUCTeX with European Languages
* Japanese::                    Using AUCTeX with Japanese

Automatic Customization

* Automatic Global::            Automatic Customization for the Site
* Automatic Private::           Automatic Customization for a User
* Automatic Local::             Automatic Customization for a Directory

Writing Your Own Style Support

* Simple Style::                A Simple Style File
* Adding Macros::               Adding Support for Macros
* Adding Environments::         Adding Support for Environments
* Adding Other::                Adding or Examining Other Information
* Hacking the Parser::          Automatic Extraction of New Things

Copying, Changes, Development, FAQ

* Copying this Manual::
* Changes::
* Development::
* FAQ::
* Texinfo mode::

Copying this Manual

* GNU Free Documentation License:: License for copying this manual.

Indices

* Key Index::
* Function Index::
* Variable Index::
* Concept Index::



File: auctex.info,  Node: Copying,  Next: Introduction,  Prev: Top,  Up: Top

Copying
*******

AUCTeX primarily consists of Lisp files for Emacs, but there are also
installation scripts and files and TeX support files.  All of those are
"free"; this means that everyone is free to use them and free to
redistribute them on a free basis.  The files of AUCTeX are not in the
public domain; they are copyrighted and there are restrictions on their
distribution, but these restrictions are designed to permit everything
that a good cooperating citizen would want to do.  What is not allowed
is to try to prevent others from further sharing any version of these
programs that they might get from you.

   Specifically, we want to make sure that you have the right to give
away copies of the files that constitute AUCTeX, that you receive source
code or else can get it if you want it, that you can change these files
or use pieces of them in new free programs, and that you know you can do
these things.

   To make sure that everyone has such rights, we have to forbid you to
deprive anyone else of these rights.  For example, if you distribute
copies of parts of AUCTeX, you must give the recipients all the rights
that you have.  You must make sure that they, too, receive or can get
the source code.  And you must tell them their rights.

   Also, for our own protection, we must make certain that everyone
finds out that there is no warranty for AUCTeX.  If any parts are
modified by someone else and passed on, we want their recipients to know
that what they have is not what we distributed, so that any problems
introduced by others will not reflect on our reputation.

   The precise conditions of the licenses for the files currently being
distributed as part of AUCTeX are found in the General Public Licenses
that accompany them.  This manual specifically is covered by the GNU
Free Documentation License (*note Copying this Manual::).


File: auctex.info,  Node: Introduction,  Next: Editing,  Prev: Copying,  Up: Top

1 Introduction
**************

* Menu:

* Summary::                     Overview of AUCTeX
* Installation::                Installing AUCTeX
* Quick Start::                 Quick Start


File: auctex.info,  Node: Summary,  Next: Installation,  Up: Introduction

1.1 Overview of AUCTeX
======================

AUCTeX is a comprehensive customizable integrated environment for
writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX using
Emacs.

   It supports you in the insertion of macros, environments, and
sectioning commands by providing completion alternatives and prompting
for parameters.  It automatically indents your text as you type it and
lets you format a whole file at once.  The outlining and folding
facilities provide you with a focused and clean view of your text.

   AUCTeX lets you process your source files by running TeX and related
tools (such as output filters, post processors for generating indices
and bibliographies, and viewers) from inside Emacs.  AUCTeX lets you
browse through the errors TeX reported, while it moves the cursor
directly to the reported error, and displays some documentation for that
particular error.  This will even work when the document is spread over
several files.

   One component of AUCTeX that LaTeX users will find attractive is
preview-latex, a combination of folding and in-source previewing that
provides true "What You See Is What You Get" experience in your
sourcebuffer, while letting you retain full control.

   More detailed information about the features and usage of AUCTeX can
be found in the remainder of this manual.

   AUCTeX is written entirely in Emacs Lisp, and hence you can easily
add new features for your own needs.  It is a GNU project and
distributed under the 'GNU General Public License Version 3'.

   The most recent version is always available at
<https://ftp.gnu.org/pub/gnu/auctex/>.

   WWW users may want to check out the AUCTeX page at
<https://www.gnu.org/software/auctex/>.

   For comprehensive information about how to install AUCTeX *Note
Installation::, or *note Installation under MS Windows::, respectively.

   If you are considering upgrading AUCTeX, the recent changes are
described in *note Changes::.

   If you want to discuss AUCTeX with other users or its developers,
there are several mailing lists you can use.

   Send a mail with the subject "subscribe" to <auctex-request@gnu.org>
in order to join the general discussion list for AUCTeX.  Articles
should be sent to <auctex@gnu.org>.  In a similar way, you can subscribe
to the <info-auctex@gnu.org> list for just getting important
announcements about AUCTeX.  The list <bug-auctex@gnu.org> is for bug
reports which you should usually file with the 'M-x
TeX-submit-bug-report <RET>' command.  If you want to address the
developers of AUCTeX themselves with technical issues, they can be found
on the discussion list <auctex-devel@gnu.org>.


File: auctex.info,  Node: Installation,  Next: Quick Start,  Prev: Summary,  Up: Introduction

1.2 Installing AUCTeX
=====================

The modern and strongly recommended way of installing AUCTeX is by using
the Emacs package manager integrated in Emacs 24 and greater (ELPA).
Simply do 'M-x list-packages <RET>', mark the auctex package for
installation with 'i', and hit 'x' to execute the installation
procedure.  That's all.

   'use-package' users can use this simple recipe in their
'user-init-file' which essentially does the same as the manual
installation explained above.

     (use-package tex
       :ensure auctex)

   Using the ELPA version has several advantages.  Besides being
platform and OS independent, you will receive intermediate bugfix
releases between major AUCTeX releases conveniently.  For past ELPA
releases, see <https://elpa.gnu.org/packages/auctex.html>.  Once the
installation is completed, you can skip the rest of this section and
proceed to *note Quick Start::.

   The remainder of this section is about installing AUCTeX from a
release tarball or from a checkout of the AUCTeX repository.

   Installing AUCTeX should be simple: merely './configure', 'make', and
'make install' for a standard site-wide installation (most other
installations can be done by specifying a '--prefix=...' option).

   On many systems, this will already activate the package, making its
modes the default instead of the built-in modes of Emacs.  If this is
not the case, consult *note Loading the package::.  Please read through
this document fully before installing anything.  The installation
procedure has changed as compared to earlier versions.  Users of
MS Windows are asked to consult *Note Installation under MS Windows::.

* Menu:

* Prerequisites::
* Configure::
* Build/install and uninstall::
* Loading the package::
* Advice for package providers::
* Advice for non-privileged users::
* Installation under MS Windows::
* Customizing::


File: auctex.info,  Node: Prerequisites,  Next: Configure,  Up: Installation

1.2.1 Prerequisites
-------------------

   * GNU Emacs 25.1 or higher

     Using preview-latex requires a version of Emacs compiled with image
     support.

     Windows
          Precompiled versions are available from
          <https://ftp.gnu.org/gnu/emacs/windows/>.
     macOS
          For an overview of precompiled versions of Emacs for macOS see
          for example <https://www.emacswiki.org/emacs/EmacsForMacOS>.
     GNU/Linux
          Most GNU/Linux distributions nowadays provide a recent variant
          of Emacs via their package repositories.
     Self-compiled
          Compiling Emacs yourself requires a C compiler and a number of
          tools and development libraries.  Details are beyond the scope
          of this manual.  Instructions for checking out the source code
          can be found at <https://savannah.gnu.org/git/?group=emacs>.

   * A working TeX installation

     Well, AUCTeX would be pointless without that.  Processing
     documentation requires TeX, LaTeX and Texinfo during installation.
     preview-latex requires Dvips or 'dvipng' for its operation in DVI
     mode.  The default configuration of AUCTeX is tailored for
     TeX Live-based distributions, but can be adapted easily.

   * A recent Ghostscript

     This is needed for operation of preview-latex in both DVI and PDF
     mode.  Ghostscript version 7.07 or newer is required.

   * GNU make

     Recent AUCTeX uses GNU make specific capabilities in the Makefiles.
     If your OS's default 'make' command is not GNU make, you have to
     obtain it in order to build AUCTeX by yourself.  GNU make is
     sometimes provided under the name 'gmake' in your OS's binary
     package system.

   * The Texinfo package

     Strictly speaking, you can get away without it if you are building
     from the distribution tarball, have not modified any files and
     don't need a printed version of the manual: the pregenerated info
     file is included in the tarball.  At least version 4.0 is required.

   For some known issues with various software, see *note
(preview-latex)Known problems::.


File: auctex.info,  Node: Configure,  Next: Build/install and uninstall,  Prev: Prerequisites,  Up: Installation

1.2.2 Configure
---------------

The first step is to configure the source code, telling it where various
files will be.  To do so, run

     ./configure OPTIONS

   (Note: if you have fetched AUCTeX from Git rather than a regular
release, you will have to first follow the instructions in
'README.GIT').

   On many machines, you will not need to specify any options, but if
'configure' cannot determine something on its own, you'll need to help
it out with one of these options:

'--prefix=PREFIX'
     All automatic placements for package components will be chosen from
     sensible existing hierarchies below this: directories like 'man',
     'share' and 'bin' are supposed to be directly below PREFIX.

     Only if no workable placement can be found there, in some cases an
     alternative search will be made in a prefix deduced from a suitable
     binary.

     '/usr/local' is the default PREFIX, intended to be suitable for a
     site-wide installation.  If you are packaging this as an operating
     system component for distribution, the setting '/usr' will probably
     be the right choice.  See *note Advice for package providers:: for
     detail.

     If you are planning to install the package as a single
     non-priviledged user, you will typically set PREFIX to your home
     directory.  Consult *note Advice for non-privileged users:: for
     addtional instructions.

'--with-emacs=/PATH/TO/EMACS'
     If you are using a pretest which isn't in your 'PATH', or
     'configure' is not finding the right Emacs executable, you can
     specify it with this option.

'--with-lispdir=LISPDIR'
     This option specifies the location of the 'site-lisp' directory
     within 'load-path' under which the files will get installed (the
     bulk will get installed in a subdirectory).  './configure' should
     figure this out by itself.

'--with-auctexstartfile=auctex.el'
'--with-previewstartfile=preview-latex.el'
     This is the name of the respective startup files.  If LISPDIR
     contains a subdirectory 'site-start.d', the start files are placed
     there, and 'site-start.el' should load them automatically.  Please
     be aware that you must not move the start files after installation
     since other files are found _relative_ to them.

'--with-packagelispdir=auctex'
     This is the directory where the bulk of the package gets located.
     The startfile adds this into 'load-path'.

'--with-auto-dir=/DIR'
     You can use this option to specify the directory containing
     automatically generated information by 'M-x
     TeX-auto-generate-global <RET>'.  It is not necessary for most TeX
     installs, but may be used if you don't like the directory that
     configure is suggesting.

'--help'
     This is not an option specific to AUCTeX.  A number of standard
     options to 'configure' exist, and we do not have the room to
     describe them here; a short description of each is available, using
     '--help'.

'--disable-preview'
     This disables configuration and installation of preview-latex.
     This option is not actually recommended.  If your Emacs does not
     support images, you should really upgrade to a newer version.
     Distributors should, if possible, refrain from distributing AUCTeX
     and preview-latex separately in order to avoid confusion and
     upgrade hassles if users install partial packages on their own.

'--with-texmf-dir=/DIR'
'--without-texmf-dir'
     This option is used for specifying a TDS-compliant directory
     hierarchy.  Using '--with-texmf-dir=/DIR' you can specify where the
     TeX TDS directory hierarchy resides, and the TeX files will get
     installed in '/DIR/tex/latex/preview/'.

     If you use the '--without-texmf-dir' option, the TeX-related files
     will be kept in the Emacs Lisp tree, and at runtime the 'TEXINPUTS'
     environment variable will be made to point there.  You can install
     those files into your own TeX tree at some later time with 'M-x
     preview-install-styles <RET>'.

'--with-tex-dir=/DIR'
     If you want to specify an exact directory for the preview TeX
     files, use '--with-tex-dir=/DIR'.  In this case, the files will be
     placed in '/DIR', and you'll also need the following option:

'--with-doc-dir=/DIR'
     This option may be used to specify where the TeX documentation
     goes.  It is to be used when you are using '--with-tex-dir=/DIR',
     but is normally not necessary otherwise.


File: auctex.info,  Node: Build/install and uninstall,  Next: Loading the package,  Prev: Configure,  Up: Installation

1.2.3 Build/install and uninstall
---------------------------------

Once 'configure' has been run, simply enter

     make

at the prompt to byte-compile the lisp files, extract the TeX files and
build the documentation files.  To install the files into the locations
chosen earlier, type

     make install

You may need special privileges to install, e.g., if you are installing
into system directories.

   Should you want to completely remove the installed package, in the
same directory you built AUCTeX run

     make uninstall

You will need administration privileges if you installed the package
into system directories.


File: auctex.info,  Node: Loading the package,  Next: Advice for package providers,  Prev: Build/install and uninstall,  Up: Installation

1.2.4 Loading the package
-------------------------

You can detect the successful activation of AUCTeX and preview-latex in
the menus after loading a LaTeX file like 'circ.tex': AUCTeX then gives
you a 'Command' menu, and preview-latex gives you a 'Preview' menu.

   With Emacs (or if you explicitly disabled use of the package system),
the startup files 'auctex.el' and 'preview-latex.el' may already be in a
directory of the 'site-start.d/' variety if your Emacs installation
provides it.  In that case they should be automatically loaded on
startup and nothing else needs to be done.  If not, they should at least
have been placed somewhere in your 'load-path'.  You can then load them
by placing the lines

     (load "auctex.el" nil t t)
     (load "preview-latex.el" nil t t)
into your init file such as 'init.el' or '.emacs'.

   If you explicitly used '--with-lispdir', you may need to add the
specified directory into Emacs' 'load-path' variable by adding something
like

     (add-to-list 'load-path "~/elisp")
before the above lines into your Emacs startup file.

   For site-wide activation in GNU Emacs, see *Note Advice for package
providers::.

   Once activated, the modes provided by AUCTeX are used per default for
all supported file types.  If you want to change the modes for which it
is operative instead of the default, use
     M-x customize-option <RET> TeX-modes <RET>

   If you want to remove a preinstalled AUCTeX completely before any of
its modes have been used,
     (unload-feature 'tex-site)
should accomplish that.


File: auctex.info,  Node: Advice for package providers,  Next: Advice for non-privileged users,  Prev: Loading the package,  Up: Installation

1.2.5 Providing AUCTeX as a package
-----------------------------------

As a package provider, you should make sure that your users will be
served best according to their intentions, and keep in mind that a
system might be used by more than one user, with different preferences.

   There are people that prefer the built-in Emacs modes for editing TeX
files, in particular plain TeX users.  There are various ways to tell
AUCTeX even after auto-activation that it should not get used, and they
are described in *note Introduction to AUCTeX: Introduction.

   So if you have users that don't want to use the preinstalled AUCTeX,
they can easily get rid of it.  Activating AUCTeX by default is
therefore a good choice.

   If the installation procedure did not achieve this already by placing
'auctex.el' and 'preview-latex.el' into a possibly existing
'site-start.d' directory, you can do this by placing

     (load "auctex.el" nil t t)
     (load "preview-latex.el" nil t t)

in the system-wide 'site-start.el'.

   The '--without-texmf-dir' option can be convenient for systems that
are intended to support more than a single TeX distribution.  Since more
often than not TeX packages for operating system distributions are
either much more outdated or much less complete than separately provided
systems like TeX Live, this method may be generally preferable when
providing packages.

   The following package structure would be adequate for a typical fully
supported Unix-like installation:

'preview-tetex'
     Style files and documentation for 'preview.sty', placed into a TeX
     tree where it is accessible from the teTeX executables usually
     delivered with a system.  If there are other commonly used TeX
     system packages, it might be appropriate to provide separate
     packages for those.
'auctex-emacs-tetex'
     This package will require the installation of 'preview-tetex' and
     will record in 'TeX-macro-global' where to find the TeX tree.  It
     is also a good idea to run
          emacs -batch -f TeX-auto-generate-global
     when either AUCTeX or teTeX get installed or upgraded.  If your
     users might want to work with a different TeX distribution
     (nowadays pretty common), instead consider the following:
'auctex-emacs'
     This package will be compiled with '--without-texmf-dir' and will
     consequently contain the 'preview' style files in its private
     directory.  It will probably not be possible to initialize
     'TeX-macro-global' to a sensible value, so running
     'TeX-auto-generate-global' does not appear useful.  This package
     would neither conflict with nor provide 'preview-tetex'.


File: auctex.info,  Node: Advice for non-privileged users,  Next: Installation under MS Windows,  Prev: Advice for package providers,  Up: Installation

1.2.6 Installation for non-privileged users
-------------------------------------------

Often people without system administration privileges want to install
software for their private use.  In that case you need to pass more
options to the 'configure' script.

   The main expedient is using the '--prefix' option to the 'configure'
script, and let it point to the personal home directory.  In that way,
resulting binaries will be installed under the 'bin' subdirectory of
your home directory, manual pages under 'man' and so on.  It is
reasonably easy to maintain a bunch of personal software, since the
prefix argument is supported by most 'configure' scripts.

   You often need to specify '--with-lispdir' option as well.  If you
haven't installed Emacs under your home directory and use Emacs
installed in system directories, the 'configure' script might not be
able to figure out suitable place to install lisp files under your home
directory.  In that case, the 'configure' script would silently choose,
by default, the 'site-lisp' directory within 'load-path' for the place,
where administration privileges are usually required to put relevant
files.  Thus you will have to tell the 'configure' script explicitly
where to put those files by, e.g.,
'--with-lispdir='/home/myself/share/emacs/site-lisp''.

   You'll have to add something like
'/home/myself/share/emacs/site-lisp' to your 'load-path' variable, if it
isn't there already.

   In addition, you will have to tell 'configure' script where to
install TeX-related files such as 'preview.sty' if preview-latex isn't
disabled.  It is enough to specify '--with-texmf-dir=$HOME/texmf' for
most typical cases, but you have to create the direcotry '$HOME/texmf'
in advance if it doesn't exist.  If this prescription doesn't work,
consider using one or more of the options '--with-texmf-dir=/DIR',
'--without-texmf-dir', '--with-tex-dir=/DIR' and '--with-doc-dir=/DIR'.
See *note Configure:: for detail of these options.

   Now here is another thing to ponder: perhaps you want to make it easy
for other users to share parts of your personal Emacs configuration.  In
general, you can do this by writing '~myself/' anywhere where you
specify paths to something installed in your personal subdirectories,
not merely '~/', since the latter, when used by other users, will point
to non-existent files.

   For yourself, it will do to manipulate environment variables in your
'.profile' resp. '.login' files.  But if people will be copying just
Elisp files, their copies will not work.  While it would in general be
preferable if the added components where available from a shell level,
too (like when you call the standalone info reader, or try using
'preview.sty' for functionality besides of Emacs previews), it will be a
big help already if things work from inside of Emacs.

   Here is how to do the various parts:

Making the Elisp available
..........................

In GNU Emacs, it should be sufficient if people just do

     (load "~myself/share/emacs/site-lisp/auctex.el" nil t t)
     (load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t)
where the path points to your personal installation.  The rest of the
package should be found relative from there without further ado.

Making the Info files available
...............................

For making the info files accessible from within Elisp, something like
the following might be convenient to add into your or other people's
startup files:

     (eval-after-load 'info
        '(add-to-list 'Info-directory-list "~myself/info"))

Making the LaTeX style available
................................

If you want others to be able to share your installation, you should
configure it using '--without-texmf-dir', in which case things should
work as well for them as for you.

1.2.6.1 Using AUCTeX from local Git repo
........................................

With the techniques described above, it is also possible to use AUCTeX
directly from a local Git repository.  Let's assume you have your Git
repositories under '~/development/'.

   First, you have to fetch a copy of the AUCTeX Git repository.  In a
shell, change directory to '~/development/' and do:
     git clone https://git.savannah.gnu.org/git/auctex.git

   Now change directory to '~/development/auctex' and run
'./autogen.sh'.  Next thing is to run 'configure' like this:
     ./configure --without-texmf-dir --with-lispdir=.

When finished, simply enter
     make
and you're finished.  Note that the 'make install' step is not
necessary.

   Now you have to tell Emacs about the plan.  The following variables
must be set in your init file because their normal values are only
correct when AUCTeX is installed:
     (setq TeX-data-directory "~/development/auctex"
           TeX-lisp-directory TeX-data-directory)

The info files will be available with this:
     (eval-after-load 'info
        '(add-to-list 'Info-additional-directory-list
                      "~/development/auctex/doc"))

Now you're ready to load 'auctex.el' and 'preview-latex.el' out of this
directory:
     (load "~/development/auctex/auctex.el" nil t t)
     (load "~/development/auctex/preview-latex.el" nil t t)


File: auctex.info,  Node: Installation under MS Windows,  Next: Customizing,  Prev: Advice for non-privileged users,  Up: Installation

1.2.7 Installation under MS Windows
-----------------------------------

In a Nutshell
.............

The following are brief installation instructions for the impatient.  In
case you don't understand some of this, run into trouble of some sort,
or need more elaborate information, refer to the detailed instructions
further below.

  1. Install the prerequisites, i.e. GNU Emacs, MSYS or Cygwin, a TeX
     system, and Ghostscript.

  2. Open the MSYS shell or a Cygwin shell and change to the directory
     containing the unzipped file contents.

  3. Configure AUCTeX:

     For Emacs: Many people like to install AUCTeX into the pseudo file
     system hierarchy set up by the Emacs installation.  Assuming Emacs
     is installed in 'C:/Program Files/Emacs' and the directory for
     local additions of your TeX system, e.g. MiKTeX, is
     'C:/localtexmf', you can do this by typing the following statement
     at the shell prompt:

          ./configure --prefix='C:/Program Files/Emacs' \
            --infodir='C:/Program Files/Emacs/info' \
            --with-texmf-dir='C:/localtexmf'

     The commands above is example for common usage.  More on
     configuration options can be found in the detailed installation
     instructions below.

     If the configuration script failed to find all required programs,
     make sure that these programs are in your system path and add
     directories containing the programs to the 'PATH' environment
     variable if necessary.  Here is how to do that in W2000/XP:

       1. On the desktop, right click "My Computer" and select
          properties.
       2. Click on "Advanced" in the "System Properties" window.
       3. Select "Environment Variables".
       4. Select "path" in "System Variables" and click "edit".  Move to
          the front in the line (this might require scrolling) and add
          the missing path including drive letter, ended with a
          semicolon.

  4. If there were no further error messages, type

          make

     In case there were, please refer to the detailed description below.

  5. Finish the installation by typing

          make install

Detailed Installation Instructions
..................................

Installation of AUCTeX under Windows is in itself not more complicated
than on other platforms.  However, meeting the prerequisites might
require more work than on some other platforms, and feel less natural.

   If you are experiencing any problems, even if you think they are of
your own making, be sure to report them to <auctex-devel@gnu.org> so
that we can explain things better in future.

   Windows is a problematic platform for installation scripts.  The main
problem is that the installation procedure requires consistent file
names in order to find its way in the directory hierarchy, and Windows
path names are a mess.

   The installation procedure tries finding stuff in system search paths
and in Emacs paths.  For that to succeed, you have to use the same
syntax and spelling and case of paths everywhere: in your system search
paths, in Emacs' 'load-path' variable, as argument to the scripts.  If
your path names contain spaces or other 'shell-unfriendly' characters,
most notably backslashes for directory separators, place the whole path
in '"double quote marks"' whenever you specify it on a command line.

   Avoid 'helpful' magic file names like '/cygdrive/c' and
'C:\PROGRA~1\' like the plague.  It is quite unlikely that the scripts
will be able to identify the actual file names involved.  Use the full
paths, making use of normal Windows drive letters like ' 'C:/Program
Files/Emacs' ' where required, and using the same combination of upper-
and lowercase letters as in the actual files.  File names containing
shell-special characters like spaces or backslashes (if you prefer that
syntax) need to get properly quoted to the shell: the above example used
single quotes for that.

   Ok, now here are the steps to perform:

  1. You need to unpack the AUCTeX distribution (which you seemingly
     have done since you are reading this).  It must be unpacked in a
     separate installation directory outside of your Emacs file
     hierarchy: the installation will later copy all necessary files to
     their final destination, and you can ultimately remove the
     directory where you unpacked the files.

     Line endings are a problem under Windows.  The distribution
     contains only text files, and theoretically most of the involved
     tools should get along with that.  However, the files are processed
     by various utilities, and it is conceivable that not all of them
     will use the same line ending conventions.  If you encounter
     problems, it might help if you try unpacking (or checking out) the
     files in binary mode, if your tools allow that.

     If you don't have a suitable unpacking tool, skip to the next step:
     this should provide you with a working 'unzip' command.

  2. The installation of AUCTeX will require the MSYS tool set from
     <http://www.mingw.org/> or the Cygwin tool set from
     <https://cygwin.com/>.  The latter is slower and larger (the
     download size of the base system is about 15 MB) but comes with a
     package manager that allows for updating the tool set and
     installing additional packages like, for example, the spell checker
     aspell.

     If Cygwin specific paths like '/cygdrive/c' crop up in the course
     of the installation, using a non-Cygwin Emacs could conceivably
     cause trouble.  Using Cygwin either for everything or nothing might
     save headaches, _if_ things don't work out.

  3. Install a current version of Emacs from
     <https://ftp.gnu.org/gnu/emacs/windows/>.

  4. You need a working TeX installation.  One popular installation
     under Windows is MiKTeX (https://miktex.org/).  Another much more
     extensive system is TeX Live (https://www.tug.org/texlive/) which
     is rather close to its Unix cousins.

  5. A working copy of Ghostscript (https://www.ghostscript.com/) is
     required for preview-latex operation.  Examining the output from
          gswin32c -h
     on a Windows command line should tell you whether your Ghostscript
     supports the 'png16m' device needed for PNG support.  MiKTeX
     apparently comes with its own Ghostscript called 'mgs.exe'.

  6. Perl (https://www.perl.org/) is needed for rebuilding the
     documentation if you are working with a copy from Git or have
     touched documentation source files in the preview-latex part.  If
     the line endings of the file 'preview/latex/preview.dtx' don't
     correspond with what Perl calls '\n' when reading text files,
     you'll run into trouble.

  7. Now the fun stuff starts.  If you have not yet done so, unpack the
     AUCTeX distribution into a separate directory after rereading the
     instructions for unpacking above.

  8. Ready for takeoff.  Start some shell (typically 'bash') capable of
     running 'configure', change into the installation directory and
     call './configure' with appropriate options.

     Typical options you'll want to specify will be
     '--prefix=DRIVE:/PATH/TO/EMACS-HIERARCHY'
          which tells 'configure' where to perform the installation.  It
          may also make 'configure' find Emacs automatically; if this
          doesn't happen, try '--with-emacs' as described below.  All
          automatic detection of files and directories restricts itself
          to directories below the PREFIX or in the same hierarchy as
          the program accessing the files.  Usually, directories like
          'man', 'share' and 'bin' will be situated right under PREFIX.

          This option also affects the defaults for placing the Texinfo
          documentation files (see also '--infodir' below) and
          automatically generated style hooks.

          If you have a central directory hierarchy (not untypical with
          Cygwin) for such stuff, you might want to specify its root
          here.  You stand a good chance that this will be the only
          option you need to supply, as long as your TeX-related
          executables are in your system path, which they better be for
          AUCTeX's operation, anyway.

     '--with-emacs'
          if you are installing for a version of Emacs.  You can use
          '--with-emacs=DRIVE:/PATH/TO/EMACS' to specify the name of the
          installed Emacs executable, complete with its path if
          necessary (if Emacs is not within a directory specified in
          your 'PATH' environment setting).

     '--with-lispdir=DRIVE:/PATH/TO/SITE-LISP'
          This option tells a place in 'load-path' below which the files
          are situated.  The startup files 'auctex.el' and
          'preview-latex.el' will get installed here unless a
          subdirectory 'site-start.d' exists which will then be used
          instead.  The other files from AUCTeX will be installed in a
          subdirectory called 'auctex'.

          If you think that you need a different setup, please refer to
          the full installation instructions in *note Configure::.

     '--infodir=DRIVE:/PATH/TO/INFO/DIRECTORY'
          If you are installing into an Emacs directory, info files have
          to be put into the 'info' folder below that directory.  The
          configuration script will usually try to install into the
          folder 'share/info', so you have to override this by
          specifying something like '--infodir='C:/Program Files/info''
          for the configure call.

     '--with-auto-dir=DRIVE:/DIR'
          Directory containing automatically generated information.  You
          should not normally need to set this, as '--prefix' should
          take care of this.

     '--disable-preview'
          Use this option if your Emacs version is unable to support
          image display.

     '--with-texmf-dir=DRIVE:/DIR'
          This will specify the directory where your TeX installation
          sits.  If your TeX installation does not conform to the TDS
          (TeX directory standard), you may need to specify more options
          to get everything in place.

     For more information about any of the above and additional options,
     see *note Configure::.

     Some executables might not be found in your path.  That is not a
     good idea, but you can get around by specifying environment
     variables to 'configure':
          GS="DRIVE:/PATH/TO/GSWIN32C.EXE" ./configure ...
     should work for this purpose.  'gswin32c.exe' is the usual name for
     the required _command line_ executable under Windows; in contrast,
     'gswin32.exe' is likely to fail.

     As an alternative to specifying variables for the 'configure' call
     you can add directories containing the required executables to the
     'PATH' variable of your Windows system.  This is especially a good
     idea if Emacs has trouble finding the respective programs later
     during normal operation.

  9. Run 'make' in the installation directory.

  10. Run 'make install' in the installation directory.

  11. With Emacs, activation of AUCTeX and preview-latex depends on a
     working 'site-start.d' directory or similar setup, since then the
     startup files 'auctex.el' and 'preview-latex.el' will have been
     placed there.  If this has not been done, you should be able to
     load the startup files manually with
          (load "auctex.el" nil t t)
          (load "preview-latex.el" nil t t)
     in either a site-wide 'site-start.el' or your personal startup file
     (usually accessible as '~/.emacs' or '~/.emacs.d/init.el' from
     within Emacs).

     The default configuration of AUCTeX is probably not the best fit
     for Windows systems with MiKTeX.  You might want to add
          (require 'tex-mik)
     after loading 'auctex.el' and 'preview-latex.el' in order to get
     more appropriate values for some customization options.

     You can always use

          M-x customize-group <RET> AUCTeX <RET>

     in order to customize more stuff, or use the 'Customize' menu.

  12. Load 'circ.tex' into Emacs and see if you get the 'Command' menu.
     Try using it to LaTeX the file.

  13. Check whether the 'Preview' menu is available in this file.  Use
     it to generate previews for the document.

     If this barfs and tells you that image type 'png' is not supported,
     you can either add PNG support to your Emacs installation or choose
     another image format to be used by preview-latex.

     Adding support for an image format usually involves the
     installation of a library, e.g. from <http://gnuwin32.sf.net/>.  If
     you got your Emacs from <https://www.gnu.org/> you might want to
     check its README file
     (https://ftp.gnu.org/gnu/emacs/windows/README) for details.

     A different image format can be chosen by setting the variable
     'preview-image-type'.  While it is recommended to keep the 'dvipng'
     or 'png' setting, you can temporarily select a different format
     like 'pnm' to check if the lack of PNG support is the only problem
     with your Emacs installation.

     Try adding the line

          (setq preview-image-type 'pnm)

     to your init file for a quick test.  You should remove the line
     after the test again, because PNM files take away *vast* amounts of
     disk space, and thus also of load/save time.

   Well, that about is all.  Have fun!


File: auctex.info,  Node: Customizing,  Prev: Installation under MS Windows,  Up: Installation

1.2.8 Customizing
-----------------

Most of the site-specific customization should already have happened
during configuration of AUCTeX.  Any further customization can be done
with customization buffers directly in Emacs.  Just type 'M-x
customize-group <RET> AUCTeX <RET>' to open the customization group for
AUCTeX or use the menu entries provided in the mode menus.  Editing the
file 'tex-site.el' as suggested in former versions of AUCTeX should not
be done anymore because the installation routine will overwrite those
changes.

   You might check some options with a special significance.  They are
accessible directly by typing 'M-x customize-option <RET> <option>
<RET>'.

 -- User Option: TeX-macro-global
     Directories containing the site's TeX style files.

   Normally, AUCTeX will only allow you to complete macros and
environments which are built-in, specified in AUCTeX style files or
defined by yourself.  If you issue the 'M-x TeX-auto-generate-global'
command after loading AUCTeX, you will be able to complete on all macros
available in the standard style files used by your document.  To do
this, you must set this variable to a list of directories where the
standard style files are located.  The directories will be searched
recursively, so there is no reason to list subdirectories explicitly.
Automatic configuration will already have set the variable for you if it
could use the program 'kpsewhich'.  In this case you normally don't have
to alter anything.


File: auctex.info,  Node: Quick Start,  Prev: Installation,  Up: Introduction

1.3 Quick Start
===============

AUCTeX is a powerful program offering many features and configuration
options.  If you are new to AUCTeX this might be deterrent.  Fortunately
you do not have to learn everything at once.  This Quick Start Guide
will give you the knowledge of the most important commands and enable
you to prepare your first LaTeX document with AUCTeX after only a few
minutes of reading.

   In this introduction, we assume that AUCTeX is already installed on
your system.  If this is not the case, you should read the file
'INSTALL' in the base directory of the unpacked distribution tarball.
These installation instructions are available in this manual as well,
*note Installation::.  We also assume that you are familiar with the way
keystrokes are written in Emacs manuals.  If not, have a look at the
Emacs Tutorial in the Help menu.

   If AUCTeX is installed in any other way than from the Emacs package
manager (ELPA), you might still need to activate it, by inserting

     (load "auctex.el" nil t t)
in your user init file.(1)

   If AUCTeX is installed from ELPA, the installation procedure already
cares about loading AUCTeX correctly and you *must not* have the line
above in your init file.  Note that this also applies if you have the
following line in your init file

     (package-initialize)

   In order to get support for many of the LaTeX packages you will use
in your documents, you should enable document parsing as well, which can
be achieved by putting

     (setq TeX-auto-save t)
     (setq TeX-parse-self t)
into your init file.  Finally, if you often use '\include' or '\input',
you should make AUCTeX aware of the multifile document structure.  You
can do this by inserting

     (setq-default TeX-master nil)

   into your init file.  Each time you open a new file, AUCTeX will then
ask you for a master file.

* Menu:

* Editing Facilities::          Functions for editing TeX files
* Processing Facilities::       Creating and viewing output, debugging

   ---------- Footnotes ----------

   (1) This usually is a file in your home directory called '.emacs', or
'.emacs.d/init.el'.


File: auctex.info,  Node: Editing Facilities,  Next: Processing Facilities,  Up: Quick Start

1.3.1 Functions for editing TeX files
-------------------------------------

1.3.1.1 Making your TeX code more readable
..........................................

AUCTeX can do syntax highlighting of your source code, that means
commands will get special colors or fonts.  This is enabled by default.
You can disable it locally by typing 'M-x font-lock-mode <RET>'.

   AUCTeX will indent new lines to indicate their syntactical
relationship to the surrounding text.  For example, the text of a
'\footnote' or text inside of an environment will be indented relative
to the text around it.  If the indenting has gotten wrong after adding
or deleting some characters, use <TAB> to reindent the line, 'M-q' for
the whole paragraph, or 'M-x LaTeX-fill-buffer <RET>' for the whole
buffer.

1.3.1.2 Entering sectioning commands
....................................

Insertion of sectioning macros, that is '\chapter', '\section',
'\subsection', etc. and accompanying '\label' commands may be eased by
using 'C-c C-s'.  You will be asked for the section level.  As nearly
everywhere in AUCTeX, you can use the <TAB> or <SPC> key to get a list
of available level names, and to auto-complete what you started typing.
Next, you will be asked for the printed title of the section, and last
you will be asked for a label to be associated with the section.

1.3.1.3 Inserting environments
..............................

Similarly, you can insert environments, that is '\begin{}'-'\end{}'
pairs: Type 'C-c C-e', and select an environment type.  Again, you can
use <TAB> or <SPC> to get a list, and to complete what you type.
Actually, the list will not only provide standard LaTeX environments,
but also take your '\documentclass' and '\usepackage' commands into
account if you have parsing enabled by setting 'TeX-parse-self' to 't'.
If you use a couple of environments frequently, you can use the <up> and
<down> arrow keys (or 'M-p' and 'M-n') in the minibuffer to get back to
the previously inserted commands.

   Some environments need additional arguments.  Often, AUCTeX knows
about this and asks you to enter a value.

1.3.1.4 Inserting macros
........................

'C-c C-m', or simply 'C-c RET' will give you a prompt that asks you for
a LaTeX macro.  You can use <TAB> for completion, or the <up>/<down>
arrow keys (or 'M-p' and 'M-n') to browse the command history.  In many
cases, AUCTeX knows which arguments a macro needs and will ask you for
that.  It even can differentiate between mandatory and optional
arguments--for details, see *note Completion::.

   An additional help for inserting macros is provided by the
possibility to complete macros right in the buffer.  With point at the
end of a partially written macro, you can complete it by typing
'M-<TAB>'.

1.3.1.5 Changing the font
.........................

AUCTeX provides convenient keyboard shortcuts for inserting macros which
specify the font to be used for typesetting certain parts of the text.
They start with 'C-c C-f', and the last 'C-' combination tells AUCTeX
which font you want:

'C-c C-f C-b'
     Insert bold face '\textbf{-!-}' text.

'C-c C-f C-i'
     Insert italics '\textit{-!-}' text.

'C-c C-f C-e'
     Insert _emphasized_ '\emph{-!-}' text.

'C-c C-f C-s'
     Insert slanted '\textsl{-!-}' text.

'C-c C-f C-r'
     Insert roman '\textrm{-!-}' text.

'C-c C-f C-f'
     Insert sans serif '\textsf{-!-}' text.

'C-c C-f C-t'
     Insert typewriter '\texttt{-!-}' text.

'C-c C-f C-c'
     Insert SMALL CAPS '\textsc{-!-}' text.

'C-c C-f C-d'
     Delete the innermost font specification containing point.

   If you want to change font attributes of existing text, mark it as an
active region, and then invoke the commands.  If no region is selected,
the command will be inserted with empty braces, and you can start typing
the changed text.

   Most of those commands will also work in math mode, but then macros
like '\mathbf' will be inserted.

1.3.1.6 Other useful features
.............................

AUCTeX also tries to help you when inserting the right "quote" signs for
your language, dollar signs to typeset math, or pairs of braces.  It
offers shortcuts for commenting out text ('C-c ;' for the current region
or 'C-c %' for the paragraph you are in).  The same keystrokes will
remove the % signs, if the region or paragraph is commented out yet.
With 'TeX-fold-mode', you can hide certain parts (like footnotes,
references etc.) that you do not edit currently.  Support for Emacs'
outline mode is provided as well.  And there's more, but this is beyond
the scope of this Quick Start Guide.


File: auctex.info,  Node: Processing Facilities,  Prev: Editing Facilities,  Up: Quick Start

1.3.2 Creating and viewing output, debugging
--------------------------------------------

1.3.2.1 One Command for LaTeX, helpers, viewers, and printing
.............................................................

If you have typed some text and want to run LaTeX (or TeX, or other
programs--see below) on it, type 'C-c C-c'.  If applicable, you will be
asked whether you want to save changes, and which program you want to
invoke.  In many cases, the choice that AUCTeX suggests will be just
what you want: first 'latex', then a viewer.  If a 'latex' run produces
or changes input files for 'makeindex', the next suggestion will be to
run that program, and AUCTeX knows that you need to run 'latex' again
afterwards--the same holds for BibTeX.

   When no processor invocation is necessary anymore, AUCTeX will
suggest to run a viewer, or you can chose to create a PostScript file
using 'dvips', or to directly print it.

   Actually, there is another command which comes in handy to compile
documents: type 'C-c C-a' ('TeX-command-run-all') and AUCTeX will
compile the document for you until it is ready and then run the viewer.
This is the same as issuing repeatedly 'C-c C-c' and letting AUCTeX
guess the next command to run.

   At this place, a warning needs to be given: First, although AUCTeX is
really good in detecting the standard situations when an additional
'latex' run is necessary, it cannot detect it always.  Second, the
creation of PostScript files or direct printing currently only works
when your output file is a DVI file, not a PDF file.

   Ah, you didn't know you can do both?  That brings us to the next
topic.

1.3.2.2 Choosing an output format
.................................

From a LaTeX file, you can produce DVI output, or a PDF file directly
via 'pdflatex'.  You can switch on source specials for easier navigation
in the output file, or tell 'latex' to stop after an error (usually
'--noninteractive' is used, to allow you to detect all errors in a
single run).

   These options are controlled by toggles, the keystrokes should be
easy to memorize:

'C-c C-t C-p'
     This command toggles between DVI and PDF output

'C-c C-t C-i'
     toggles interactive mode

'C-c C-t C-s'
     toggles SyncTeX (or source specials) support

'C-c C-t C-o'
     toggles usage of Omega/lambda.

   There is also another possibility: compile the document with 'tex'
(or 'latex') and then convert the resulting DVI file to PDF using
'dvips'-'ps2pdf' sequence or 'dvipdfmx' command.  If you want to go by
this route, customize 'TeX-PDF-from-DVI' option.  Then AUCTeX will
suggest you to run the appropriate command when you type 'C-C C-c'.  For
details, see *note Processor Options::.

1.3.2.3 Debugging LaTeX
.......................

When AUCTeX runs a program, it creates an output buffer in which it
displays the output of the command.  If there is a syntactical error in
your file, 'latex' will not complete successfully.  AUCTeX will tell you
that, and you can get to the place where the first error occured by
pressing 'C-c `' (the last character is a backtick).  The view will be
split in two windows, the output will be displayed in the lower buffer,
and both buffers will be centered around the place where the error
ocurred.  You can then try to fix it in the document buffer, and use the
same keystrokes to get to the next error.  This procedure may be
repeated until all errors have been dealt with.  By pressing 'C-c C-w'
('TeX-toggle-debug-boxes') you can toggle whether AUCTeX should notify
you of overfull and underfull boxes in addition to regular errors.

   Issue 'M-x TeX-error-overview <RET>' to see a nicely formatted list
of all errors and warnings reported by the compiler.

   If a command got stuck in a seemingly infinite loop, or you want to
stop execution for other reasons, you can use 'C-c C-k' (for "kill").
Similar to 'C-l', which centers the buffer you are in around your
current position, 'C-c C-l' centers the output buffer so that the last
lines added at the bottom become visible.

1.3.2.4 Running LaTeX on parts of your document
...............................................

If you want to check how some part of your text looks like, and do not
want to wait until the whole document has been typeset, then mark it as
a region and use 'C-c C-r'.  It behaves just like 'C-c C-c', but it only
uses the document preamble and the region you marked.

   If you are using '\include' or '\input' to structure your document,
try 'C-c C-b' while you are editing one of the included files.  It will
run 'latex' only on the current buffer, using the preamble from the
master file.


File: auctex.info,  Node: Editing,  Next: Display,  Prev: Introduction,  Up: Top

2 Editing the Document Source
*****************************

The most commonly used commands/macros of AUCTeX are those which simply
insert templates for often used TeX, LaTeX, or ConTeXt constructs, like
font changes, handling of environments, etc.  These features are very
simple, and easy to learn, and help you avoid mistakes like mismatched
braces, or '\begin{}'-'\end{}' pairs.

   Apart from that this chapter contains a description of some features
for entering more specialized sorts of text, for formatting the source
by indenting and filling and for navigating through the document.

* Menu:

* Quotes::                      Inserting quotes, dollars, and braces
* Font Specifiers::             Inserting Font Specifiers
* Sectioning::                  Inserting chapters, sections, etc.
* Environments::                Inserting Environment Templates
* Mathematics::                 Entering Mathematics
* Completion::                  Completion of macros
* Marking::                     Marking Environments, Sections, or Texinfo Nodes
* Commenting::                  Commenting text
* Indenting::                   Reflecting syntactic constructs with whitespace
* Filling::                     Automatic and manual line breaking


File: auctex.info,  Node: Quotes,  Next: Font Specifiers,  Up: Editing

2.1 Insertion of Quotes, Dollars, and Braces
============================================

Quotation Marks
---------------

In TeX, literal double quotes '"like this"' are seldom used, instead two
single quotes are used '``like this'''.  To help you insert these
efficiently, AUCTeX allows you to continue to press '"' to insert two
single quotes.  To get a literal double quote, press '"' twice.

 -- Command: TeX-insert-quote COUNT
     ('"') Insert the appropriate quote marks for TeX.

     Inserts the value of 'TeX-open-quote' (normally '``') or
     'TeX-close-quote' (normally '''') depending on the context.  With
     prefix argument, always inserts '"' characters.

 -- User Option: TeX-open-quote
     String inserted by typing '"' to open a quotation.  (*Note
     European::, for language-specific quotation mark insertion.)

 -- User Option: TeX-close-quote
     String inserted by typing '"' to close a quotation.  (*Note
     European::, for language-specific quotation mark insertion.)

 -- User Option: TeX-quote-after-quote
     Determines the behavior of '"'.  If it is non-nil, typing '"' will
     insert a literal double quote.  The respective values of
     'TeX-open-quote' and 'TeX-close-quote' will be inserted after
     typing '"' once again.

   The 'babel' package provides special support for the requirements of
typesetting quotation marks in many different languages.  If you use
this package, either directly or by loading a language-specific style
file, you should also use the special commands for quote insertion
instead of the standard quotes shown above.  AUCTeX is able to recognize
several of these languages and will change quote insertion accordingly.
*Note European::, for details about this feature and how to control it.

   In case you are using the 'csquotes' package, you should customize
'LaTeX-csquotes-open-quote', 'LaTeX-csquotes-close-quote' and
'LaTeX-csquotes-quote-after-quote'.  The quotation characters will only
be used if both variables--'LaTeX-csquotes-open-quote' and
'LaTeX-csquotes-close-quote'--are non-empty strings.  But then the
'csquotes'-related values will take precedence over the
language-specific ones.

Dollar Signs
------------

In AUCTeX, dollar signs should match like they do in TeX.  This has been
partially implemented, we assume dollar signs always match within a
paragraph.  By default, the first '$' you insert in a paragraph will do
nothing special.  The second '$' will match the first.  This will be
indicated by moving the cursor temporarily over the first dollar sign.

 -- Command: TeX-insert-dollar ARG
     ('$') Insert dollar sign.

     Show matching dollar sign if this dollar sign end the TeX math
     mode.

     With optional ARG, insert that many dollar signs.

   TeX and LaTeX users often look for a way to insert inline equations
like '$...$' or '\(...\)' simply typing '$'.  AUCTeX helps them through
the customizable variable 'TeX-electric-math'.

 -- User Option: TeX-electric-math
     If the variable is non-nil and you type '$' outside math mode,
     AUCTeX will automatically insert the opening and closing symbols
     for an inline equation and put the point between them.  The opening
     symbol will blink when 'blink-matching-paren' is non-nil.  If
     'TeX-electric-math' is nil, typing '$' simply inserts '$' at point,
     this is the default.

     Besides 'nil', possible values for this variable are '(cons "$"
     "$")' for TeX inline equations '$...$', and '(cons "\\(" "\\)")'
     for LaTeX inline equations '\(...\)'.

     If the variable is non-nil and point is inside math mode right
     between a couple of single dollars, pressing '$' will insert
     another pair of dollar signs and leave the point between them.
     Thus, if 'TeX-electric-math' is set to '(cons "$" "$")' you can
     easily obtain a TeX display equation '$$...$$' by pressing '$'
     twice in a row.  (Note that you should not use double dollar signs
     in LaTeX because this practice can lead to wrong spacing in typeset
     documents.)

     In addition, when the variable is non-nil and there is an active
     region outside math mode, typing '$' will put around the active
     region symbols for opening and closing inline equation and keep the
     region active, leaving point after the closing symbol.  By pressing
     repeatedly '$' while the region is active you can toggle between an
     inline equation, a display equation, and no equation.  To be
     precise, '$...$' is replaced by '$$...$$', whereas '\(...\)' is
     replaced by '\[...\]'.

   If you want to automatically insert '$...$' in plain TeX files, and
'\(...\)' in LaTeX files by pressing '$', add the following to your init
file
     (add-hook 'plain-TeX-mode-hook
               (lambda () (set (make-local-variable 'TeX-electric-math)
                               (cons "$" "$"))))
     (add-hook 'LaTeX-mode-hook
               (lambda () (set (make-local-variable 'TeX-electric-math)
                               (cons "\\(" "\\)"))))

   Note that Texinfo mode does nothing special for '$'.  It inserts
dollar sign(s) just in the same way as the other normal keys do.

Braces
------

To avoid unbalanced braces, it is useful to insert them pairwise.  You
can do this by typing 'C-c {'.

 -- Command: TeX-insert-braces
     ('C-c {') Make a pair of braces and position the cursor to type
     inside of them.  If there is an active region, put braces around it
     and leave point after the closing brace.

   When writing complex math formulas in LaTeX documents, you sometimes
need to adjust the size of braces with pairs of macros like
'\left'-'\right', '\bigl'-'\bigr' and so on.  You can avoid unbalanced
pairs with the help of 'TeX-insert-macro', bound to 'C-c C-m' or 'C-c
<RET>' (*note Completion::).  If you insert left size adjusting macros
such as '\left', '\bigl' etc. with 'TeX-insert-macro', it asks for left
brace to use and supplies automatically right size adjusting macros such
as '\right', '\bigr' etc. and corresponding right brace in addtion to
the intended left macro and left brace.

   The completion by 'TeX-insert-macro' also applies when entering
macros such as '\langle', '\lfloor' and '\lceil', which produce the left
part of the paired braces.  For example, inserting '\lfloor' by 'C-c
C-m' is immediately followed by the insertion of '\rfloor'.  In
addition, if the point was located just after '\left' or its friends,
the corresponding '\right' etc. will be inserted in front of '\rfloor'.
In both cases, active region is honored.

   As a side effect, when 'LaTeX-math-mode' (*note Mathematics::) is on,
just typing '`(' inserts not only '\langle', but also '\rangle'.

   If you do not like such auto completion at all, it can be disabled by
a user option.

 -- User Option: TeX-arg-right-insert-p
     If this option is turned off, the automatic supply of the right
     macros and braces is suppressed.

   When you edit LaTeX documents, you can enable automatic brace pairing
when typing '(', '{' and '['.

 -- User Option: LaTeX-electric-left-right-brace
     If this option is on, just typing '(', '{' or '[' immediately adds
     the corresponding right brace ')', '}' or ']'.  The point is left
     after the opening brace.  If there is an active region, braces are
     put around it.

     They recognize the preceding backslash or size adjusting macros
     such as '\left', '\bigl' etc., so the following completions will
     occur:

        * (when typing single left brace)

             - '(' -> '()'

             - '{' -> '{}'

             - '[' -> '[]'

        * (when typing left brace just after a backslash)

             - '\(' -> '\(\)'

             - '\{' -> '\{\}'

             - '\[' -> '\[\]'

        * (when typing just after '\left' or '\bigl')

             - '\left(' -> '\left(\right)'

             - '\bigl[' -> '\bigl[\bigr]'

        * (when typing just after '\Bigl\')

             - '\Bigl\{' -> '\Bigl\{\Bigr\}'

     This auto completion feature may be a bit annoying when editing an
     already existing LaTeX document.  In that case, use 'C-u 1' or
     'C-q' before typing '(', '{' or '['.  Then no completion is done
     and just a single left brace is inserted.  In fact, with optional
     prefix ARG, just that many open braces are inserted without any
     completion.


File: auctex.info,  Node: Font Specifiers,  Next: Sectioning,  Prev: Quotes,  Up: Editing

2.2 Inserting Font Specifiers
=============================

Perhaps the most used keyboard commands of AUCTeX are the short-cuts
available for easy insertion of font changing macros.

   If you give an argument (that is, type 'C-u') to the font command,
the innermost font will be replaced, i.e. the font in the TeX group
around point will be changed.  The following table shows the available
commands, with '-!-' indicating the position where the text will be
inserted.

'C-c C-f C-b'
     Insert bold face '\textbf{-!-}' text.

'C-c C-f C-m'
     Insert medium face '\textmd{-!-}' text.

'C-c C-f C-i'
     Insert italics '\textit{-!-}' text.

'C-c C-f C-e'
     Insert _emphasized_ '\emph{-!-}' text.

'C-c C-f C-s'
     Insert slanted '\textsl{-!-}' text.

'C-c C-f C-r'
     Insert roman '\textrm{-!-}' text.

'C-c C-f C-f'
     Insert sans serif '\textsf{-!-}' text.

'C-c C-f C-t'
     Insert typewriter '\texttt{-!-}' text.

'C-c C-f C-c'
     Insert SMALL CAPS '\textsc{-!-}' text.

'C-c C-f C-l'
     Insert upper lower case '\textulc{-!-}' text.

'C-c C-f C-w'
     Insert SWASH '\textsw{-!-}' text.

'C-c C-f C-n'
     Insert normal '\textnormal{-!-}' text.

'C-c C-f C-d'
     Delete the innermost font specification containing point.

 -- Command: TeX-font REPLACE WHAT
     ('C-c C-f') Insert template for font change command.

     If REPLACE is not nil, replace current font.  WHAT determines the
     font to use, as specified by 'TeX-font-list'.

 -- User Option: TeX-font-list
     List of fonts used by 'TeX-font'.

     Each entry is a list with three elements.  The first element is the
     key to activate the font.  The second element is the string to
     insert before point, and the third element is the string to insert
     after point.  An optional fourth element means always replace if
     not nil.

 -- User Option: LaTeX-font-list
     List of fonts used by 'TeX-font' in LaTeX mode.  It has the same
     structure as 'TeX-font-list'.


File: auctex.info,  Node: Sectioning,  Next: Environments,  Prev: Font Specifiers,  Up: Editing

2.3 Inserting chapters, sections, etc.
======================================

Insertion of sectioning macros, that is '\chapter', '\section',
'\subsection', etc. and accompanying '\label''s may be eased by using
'C-c C-s'.  This command is highly customizable, the following describes
the default behavior.

   When invoking you will be asked for a section macro to insert.  An
appropriate default is automatically selected by AUCTeX, that is either:
at the top of the document; the top level sectioning for that document
style, and any other place: The same as the last occurring sectioning
command.

   Next, you will be asked for the actual name of that section, and last
you will be asked for a label to be associated with that section.  The
label will be prefixed by the value specified in 'LaTeX-section-hook'.

 -- Command: LaTeX-section ARG
     ('C-c C-s') Insert a sectioning command.

     Determine the type of section to be inserted, by the argument ARG.

        * If ARG is nil or missing, use the current level.
        * If ARG is a list (selected by C-u), go downward one level.
        * If ARG is negative, go up that many levels.
        * If ARG is positive or zero, use absolute level:
             + 0 : part
             + 1 : chapter
             + 2 : section
             + 3 : subsection
             + 4 : subsubsection
             + 5 : paragraph
             + 6 : subparagraph

     The following variables can be set to customize the function.

     'LaTeX-section-hook'
          Hooks to be run when inserting a section.
     'LaTeX-section-label'
          Prefix to all section references.

   The precise behavior of 'LaTeX-section' is defined by the contents of
'LaTeX-section-hook'.

 -- User Option: LaTeX-section-hook
     List of hooks to run when a new section is inserted.

     The following variables are set before the hooks are run

     'LaTeX-level'
          Numeric section level, default set by prefix arg to
          'LaTeX-section'.
     'LaTeX-name'
          Name of the sectioning command, derived from 'LaTeX-level'.
     'LaTeX-title'
          The title of the section, default to an empty string.
     'LaTeX-toc'
          Entry for the table of contents list, default nil.
     'LaTeX-done-mark'
          Position of point afterwards, default nil meaning after the
          inserted text.

     A number of hooks are already defined.  Most likely, you will be
     able to get the desired functionality by choosing from these hooks.

     'LaTeX-section-heading'
          Query the user about the name of the sectioning command.
          Modifies 'LaTeX-level' and 'LaTeX-name'.
     'LaTeX-section-title'
          Query the user about the title of the section.  Modifies
          'LaTeX-title'.
     'LaTeX-section-toc'
          Query the user for the toc entry.  Modifies 'LaTeX-toc'.
     'LaTeX-section-section'
          Insert LaTeX section command according to 'LaTeX-name',
          'LaTeX-title', and 'LaTeX-toc'.  If 'LaTeX-toc' is nil, no toc
          entry is inserted.  If 'LaTeX-toc' or 'LaTeX-title' are empty
          strings, 'LaTeX-done-mark' will be placed at the point they
          should be inserted.
     'LaTeX-section-label'
          Insert a label after the section command.  Controlled by the
          variable 'LaTeX-section-label'.

     To get a full featured 'LaTeX-section' command, insert

          (setq LaTeX-section-hook
                '(LaTeX-section-heading
                  LaTeX-section-title
                  LaTeX-section-toc
                  LaTeX-section-section
                  LaTeX-section-label))

     in your init file such as 'init.el' or '.emacs'.

   The behavior of 'LaTeX-section-label' is determined by the variable
'LaTeX-section-label'.

 -- User Option: LaTeX-section-label
     Default prefix when asking for a label.

     If it is a string, it is used unchanged for all kinds of sections.
     If it is nil, no label is inserted.  If it is a list, the list is
     searched for a member whose car is equal to the name of the
     sectioning command being inserted.  The cdr is then used as the
     prefix.  If the name is not found, or if the cdr is nil, no label
     is inserted.

     By default, chapters have a prefix of 'cha:' while sections and
     subsections have a prefix of 'sec:'.  Labels are not automatically
     inserted for other types of sections.


File: auctex.info,  Node: Environments,  Next: Mathematics,  Prev: Sectioning,  Up: Editing

2.4 Inserting Environment Templates
===================================

A large apparatus is available that supports insertions of environments,
that is '\begin{}' -- '\end{}' pairs.

   AUCTeX is aware of most of the actual environments available in a
specific document.  This is achieved by examining your '\documentclass'
command, and consulting a precompiled list of environments available in
a large number of styles.

   Most of these are described further in the following sections, and
you may easily specify more.  *Note Customizing Environments::.

   You insert an environment with 'C-c C-e', and select an environment
type.  Depending on the environment, AUCTeX may ask more questions about
the optional parts of the selected environment type.  With 'C-u C-c C-e'
you will change the current environment.

 -- Command: LaTeX-environment ARG
     ('C-c C-e') AUCTeX will prompt you for an environment to insert.
     At this prompt, you may press <TAB> or <SPC> to complete a
     partially written name, and/or to get a list of available
     environments.  After selection of a specific environment AUCTeX may
     prompt you for further specifications.

     If the optional argument ARG is non-nil (i.e. you have given a
     prefix argument), the current environment is modified and no new
     environment is inserted.

   AUCTeX helps you adding labels to environments which use them, such
as 'equation', 'figure', 'table', etc... When you insert one of the
supported environments with 'C-c C-e', you will be automatically
prompted for a label.  You can select the prefix to be used for such
environments with the 'LaTeX-label-alist' variable.
 -- User Option: LaTeX-label-alist
     List the prefixes to be used for the label of each supported
     environment.

     This is an alist whose car is the environment name, and the cdr
     either the prefix or a symbol referring to one.

     If the name is not found, or if the cdr is nil, no label is
     automatically inserted for that environment.

     If you want to automatically insert a label for a environment but
     with an empty prefix, use the empty string '""' as the cdr of the
     corresponding entry.

   As a default selection, AUCTeX will suggest the environment last
inserted or, as the first choice the value of the variable
'LaTeX-default-environment'.

 -- User Option: LaTeX-default-environment
     Default environment to insert when invoking 'LaTeX-environment'
     first time.  When the current environment is 'document', it is
     overriden by 'LaTeX-default-document-environment'.

 -- Variable: LaTeX-default-document-environment
     Default environment when invoking 'LaTeX-environment' and the
     current environment is 'document'.  It is intended to be used in
     LaTeX class style files.  For example, in 'beamer.el' it is set to
     'frame', in 'letter.el' to 'letter', and in 'slides.el' to 'slide'.

   If the document is empty, or the cursor is placed at the top of the
document, AUCTeX will default to insert a 'document' environment
prompting also for the insertion of '\documentclass' and '\usepackage'
macros.  You will be prompted for a new package until you enter nothing.
If you do not want to insert any '\usepackage' at all, just press <RET>
at the first 'Packages' prompt.

   AUCTeX distinguishes normal and expert environments.  By default, it
will offer completion only for normal environments.  This behavior is
controlled by the user option 'TeX-complete-expert-commands'.

 -- User Option: TeX-complete-expert-commands
     Complete macros and environments marked as expert commands.

     Possible values are nil, t, or a list of style names.

     nil
          Don't complete expert commands (default).
     t
          Always complete expert commands.
     (STYLES ...)
          Only complete expert commands of STYLES.

* Menu:

* Equations::                   Equations
* Floats::                      Floats
* Itemize-like::                Itemize-like Environments
* Tabular-like::                Tabular-like Environments
* Customizing Environments::    Customizing Environments

   You can close the current environment with 'C-c ]', but we suggest
that you use 'C-c C-e' to insert complete environments instead.

 -- Command: LaTeX-close-environment
     ('C-c ]') Insert an '\end' that matches the current environment.

   AUCTeX offers keyboard shortcuts for moving point to the beginning
and to the end of the current environment.
 -- Command: LaTeX-find-matching-begin
     ('C-M-a') Move point to the '\begin' of the current environment.

     If this command is called inside a comment and
     'LaTeX-syntactic-comments' is enabled, try to find the environment
     in commented regions with the same comment prefix.

 -- Command: LaTeX-find-matching-end
     ('C-M-e') Move point to the '\end' of the current environment.

     If this command is called inside a comment and
     'LaTeX-syntactic-comments' is enabled, try to find the environment
     in commented regions with the same comment prefix.


File: auctex.info,  Node: Equations,  Next: Floats,  Up: Environments

2.4.1 Equations
---------------

When inserting equation-like environments, the '\label' will have a
default prefix, which is controlled by the following variables:

 -- User Option: LaTeX-equation-label
     Prefix to use for 'equation' labels.

 -- User Option: LaTeX-eqnarray-label
     Prefix to use for 'eqnarray' labels.

 -- User Option: LaTeX-amsmath-label
     Prefix to use for amsmath equation labels.  Amsmath equations
     include 'align', 'alignat', 'xalignat', 'multline', 'flalign' and
     'gather'.


File: auctex.info,  Node: Floats,  Next: Itemize-like,  Prev: Equations,  Up: Environments

2.4.2 Floats
------------

Figures and tables (i.e., floats) may also be inserted using AUCTeX.
After choosing either 'figure' or 'table' in the environment list
described above, you will be prompted for a number of additional things.

FLOAT POSITION
     This is the optional argument of float environments that controls
     how they are placed in the final document.  In LaTeX this is a
     sequence of the letters 'htbp' as described in the LaTeX manual.
     The value will default to the value of 'LaTeX-float'.

CAPTION
     This is the caption of the float.  The default is to insert the
     caption at the bottom of the float.  You can specify floats where
     the caption should be placed at the top with
     'LaTeX-top-caption-list'.

SHORT CAPTION
     If the specified caption is greater than a specific length, then a
     short caption is prompted for and it is inserted as an optional
     argument to the '\caption' macro.  The length that a caption needs
     to be before prompting for a short version is controlled by
     'LaTeX-short-caption-prompt-length'.

LABEL
     The label of this float.  The label will have a default prefix,
     which is controlled by the variables 'LaTeX-figure-label' and
     'LaTeX-table-label'.

   Moreover, you will be asked if you want the contents of the float
environment to be horizontally centered.  Upon a positive answer a
'\centering' macro will be inserted at the beginning of the float
environment.

 -- User Option: LaTeX-float
     Default placement for floats.

 -- User Option: LaTeX-figure-label
     Prefix to use for figure labels.

 -- User Option: LaTeX-table-label
     Prefix to use for table labels.

 -- User Option: LaTeX-top-caption-list
     List of float environments with top caption.

 -- User Option: LaTeX-short-caption-prompt-length
     Number of chars a caption should be before prompting for a short
     caption.


File: auctex.info,  Node: Itemize-like,  Next: Tabular-like,  Prev: Floats,  Up: Environments

2.4.3 Itemize-like Environments
-------------------------------

In an itemize-like environment, nodes (i.e., '\item's) may be inserted
using 'C-c <LFD>'.

 -- Command: LaTeX-insert-item
     ('C-c <LFD>') Close the current item, move to the next line and
     insert an appropriate '\item' for the current environment.  That
     is, 'itemize' and 'enumerate' will have '\item ' inserted, while
     'description' will have '\item[] ' inserted.

 -- User Option: TeX-arg-item-label-p
     If non-nil, you will always be asked for optional label in items.
     Otherwise, you will be asked only in description environments.


File: auctex.info,  Node: Tabular-like,  Next: Customizing Environments,  Prev: Itemize-like,  Up: Environments

2.4.4 Tabular-like Environments
-------------------------------

When inserting Tabular-like environments, that is, 'tabular' 'array'
etc., you will be prompted for a template for that environment.  Related
variables:

 -- User Option: LaTeX-default-format
     Default format string for array and tabular environments.

 -- User Option: LaTeX-default-width
     Default width for minipage and tabular* environments.

 -- User Option: LaTeX-default-position
     Default position string for array and tabular environments.  If
     nil, act like the empty string is given, but don't prompt for a
     position.

   AUCTeX calculates the number of columns from the format string and
inserts the suitable number of ampersands.

   You can use 'C-c <LFD>' ('LaTeX-insert-item') to terminate rows in
these environments.  It supplies line break macro '\\' and inserts the
suitable number of ampersands on the next line.  AUCTeX also supports
the '*{num}{cols}' notation (which may contain another '*'-expression)
in the format string when calculating the number of ampersands.  Please
note that 'num' and 'cols' must be enclosed in braces; expressions like
'*2l' are not recognized correctly by the algorithm.

 -- Command: LaTeX-insert-item
     ('C-c <LFD>') Close the current row with '\\', move to the next
     line and insert an appropriate number of ampersands for the current
     environment.

   Similar supports are provided for various amsmath environments such
as 'align', 'gather', 'alignat', 'matrix' etc.  Try typing 'C-c <LFD>'
in these environments.  It recognizes the current environment and does
the appropriate job depending on the context.


File: auctex.info,  Node: Customizing Environments,  Prev: Tabular-like,  Up: Environments

2.4.5 Customizing Environments
------------------------------

*Note Adding Environments::, for how to customize the list of known
environments.


File: auctex.info,  Node: Mathematics,  Next: Completion,  Prev: Environments,  Up: Editing

2.5 Entering Mathematics
========================

TeX is written by a mathematician, and has always contained good support
for formatting mathematical text.  AUCTeX supports this tradition, by
offering a special minor mode for entering text with many mathematical
symbols.  You can enter this mode by typing 'C-c ~'.

 -- Command: LaTeX-math-mode
     ('C-c ~') Toggle LaTeX Math mode.  This is a minor mode rebinding
     the key 'LaTeX-math-abbrev-prefix' to allow easy typing of
     mathematical symbols.  '`' will read a character from the keyboard,
     and insert the symbol as specified in 'LaTeX-math-default' and
     'LaTeX-math-list'.  If given a prefix argument, the symbol will be
     surrounded by dollar signs.

   You can use another prefix key (instead of '`') by setting the
variable 'LaTeX-math-abbrev-prefix'.

   To enable LaTeX Math mode by default, add the following in your init
file such as 'init.el' or '.emacs':
     (add-hook 'LaTeX-mode-hook #'LaTeX-math-mode)

 -- User Option: LaTeX-math-abbrev-prefix
     A string containing the prefix of 'LaTeX-math-mode' commands; This
     value defaults to '`'.

     The string has to be a key or key sequence in a format understood
     by the 'kbd' macro.  This corresponds to the syntax usually used in
     the manuals for Emacs Lisp.

   The variable 'LaTeX-math-list' allows you to add your own mappings.

 -- User Option: LaTeX-math-list
     A list containing user-defined keys and commands to be used in
     LaTeX Math mode.  Each entry should be a list of two to four
     elements.

     First, the key to be used after 'LaTeX-math-abbrev-prefix' for
     macro insertion.  The key can be a character (e.g. '?o') for a
     single stroke or a string (e.g. '"o a"') for a multi-stroke
     binding.  If it is nil, the symbol has no associated keystroke (it
     is available in the menu, though).

     Second, a string representing the name of the macro (without a
     leading backslash.)

     Third, a string representing the name of a submenu the command
     should be added to.  Use a list of strings in case of nested menus.

     Fourth, the position of a Unicode character to be displayed in the
     menu alongside the macro name.  This is an integer value.

 -- User Option: LaTeX-math-menu-unicode
     Whether the LaTeX Math menu should try using Unicode for effect.
     Your Emacs built must be able to display include Unicode characters
     in menus for this feature.

   AUCTeX's reference card 'tex-ref.tex' includes a list of all math
mode commands.

   AUCTeX can help you write subscripts and superscripts in math
constructs by automatically inserting a pair of braces after typing <_>
or <^> respectively and putting point between the braces.  In order to
enable this feature, set the variable 'TeX-electric-sub-and-superscript'
to a non-nil value.

 -- User Option: TeX-electric-sub-and-superscript
     If non-nil, insert braces after typing <^> and <_> in math mode.

   You can automatically turn off input methods, used to input non-ascii
characters, when you begin to enter math constructs.

 -- User Option: TeX-math-input-method-off-regexp
     Input method matching this regular expression is turned off when
     '$' is typed to begin math mode or a math environment is inserted
     by 'C-c C-e' ('LaTeX-environment').


File: auctex.info,  Node: Completion,  Next: Marking,  Prev: Mathematics,  Up: Editing

2.6 Completion
==============

Emacs lisp programmers probably know the 'lisp-complete-symbol' command
which was bound to 'M-<TAB>' until completion-at-point became the new
standard completion facility (see below).  Users of the wonderful ispell
mode know and love the 'ispell-complete-word' command from that package.
Similarly, AUCTeX has a 'TeX-complete-symbol' command, by default bound
to 'M-<TAB>' which is equivalent to 'C-M-i'.  Using
'TeX-complete-symbol' makes it easier to type and remember the names of
long LaTeX macros.

   In order to use 'TeX-complete-symbol', you should write a backslash
and the start of the macro.  Typing 'M-<TAB>' will now complete as much
of the macro, as it unambiguously can.  For example, if you type
''\renewc'' and then 'M-<TAB>', it will expand to ''\renewcommand''.
But there's more: if point is just after '\begin{', then
'TeX-complete-symbol' will complete LaTeX environments, etc.  This is
controlled by 'TeX-complete-list'.

 -- Command: TeX-complete-symbol
     ('M-<TAB>') Complete TeX symbol before point.

 -- Variable: TeX-complete-list
     List of ways to complete the preceding text.

     Each entry is a list with the following elements:

       1. Regexp matching the preceding text or a predicate of arity 0
          which returns non-nil and sets 'match-data' appropriately if
          it is applicable.
       2. A number indicating the subgroup in the regexp containing the
          text.
       3. A function returning an alist of possible completions.
       4. Text to append after a succesful completion.

     Or alternatively:

       1. Regexp matching the preceding text.
       2. Function to do the actual completion.

   More recent Emacs versions have a new completion mechanism.  Modes
may define and register custom 'completion-at-point' functions and when
the user invokes 'completion-at-point' (usually bound to 'M-<TAB>'), all
such registered functions are consulted for checking for possible
completions.  Modern completion UIs like company-mode support this
completion-at-point facility.

 -- Function: TeX--completion-at-point
     AUCTeX's completion-at-point function which is automatically added
     to 'completion-at-point-functions' in TeX and LaTeX buffers.

     It offers the same completion candidates as would
     'TeX-complete-symbol' (and is also controlled by
     'TeX-complete-list') except that it doesn't fall back on
     'ispell-complete-word' which would be awkward with completion UIs
     like company-mode.

   A more direct way to insert a macro is with 'TeX-insert-macro', bound
to 'C-c C-m' which is equivalent to 'C-c <RET>'.  It has the advantage
over completion that it knows about the argument of most standard LaTeX
macros, and will prompt for them.  It also knows about the type of the
arguments, so it will for example give completion for the argument to
'\include'.  Some examples are listed below.

 -- Command: TeX-insert-macro
     ('C-c C-m' or 'C-c <RET>') Prompt (with completion) for the name of
     a TeX macro, and if AUCTeX knows the macro, prompt for each
     argument.

   As a default selection, AUCTeX will suggest the macro last inserted
or, as the first choice the value of the variable 'TeX-default-macro'.

 -- User Option: TeX-default-macro
     Default macro to insert when invoking 'TeX-insert-macro' first
     time.

 -- User Option: TeX-insert-macro-default-style
     Specifies whether 'TeX-insert-macro' will ask for all optional
     arguments.

     If set to the symbol 'show-optional-args', 'TeX-insert-macro' asks
     for optional arguments of TeX marcos, unless the previous optional
     argument has been rejected.  If set to 'show-all-optional-args',
     'TeX-insert-macro' asks for all optional arguments.
     'mandatory-args-only', 'TeX-insert-macro' asks only for mandatory
     arguments.  When 'TeX-insert-macro' is called with prefix argument
     ('C-u'), it's the other way round.

     Note that for some macros, there are special mechanisms, e.g.
     'TeX-arg-cite-note-p' and 'LaTeX-includegraphics-options-alist'.

   A faster alternative is to enable the option 'TeX-electric-escape'.

 -- User Option: TeX-electric-escape
     If this is non-nil, typing the TeX escape character '\' will invoke
     the command 'TeX-electric-macro'.

     In Texinfo mode, the command is invoked by '@' instead.

   The difference between 'TeX-insert-macro' and 'TeX-electric-macro' is
that space key <SPC> will complete and exit from the minibuffer in
'TeX-electric-macro'.  Use <TAB> if you merely want to complete.

 -- Command: TeX-electric-macro
     Prompt (with completion) for the name of a TeX macro, and if AUCTeX
     knows the macro, prompt for each argument.  Space (<SPC>) will
     complete and exit.

   By default AUCTeX will put an empty set braces '{}' after a macro
with no arguments to stop it from eating the next whitespace.  This is
suppressed inside math mode and can be disabled totally by setting
'TeX-insert-braces' to nil.

 -- User Option: TeX-insert-braces
     If non-nil, append a empty pair of braces after inserting a macro
     with no arguments.

 -- User Option: TeX-insert-braces-alist
     Control the insertion of a pair of braces after a macro on a per
     macro basis.

     This variable is an alist.  Each element is a cons cell, whose car
     is the macro name, and the cdr is non-nil or nil, depending on
     whether a pair of braces should be, respectively, appended or not
     to the macro.

     If a macro has an element in this variable, AUCTeX will use its
     value to decide what to do, whatever the value of the variable
     'TeX-insert-braces'.

   Completions work because AUCTeX can analyze TeX files, and store
symbols in Emacs Lisp files for later retrieval.  *Note Automatic::, for
more information.

   AUCTeX distinguishes normal and expert macros.  By default, it will
offer completion only for normal commands.  This behavior can be
controlled using the user option 'TeX-complete-expert-commands'.

 -- User Option: TeX-complete-expert-commands
     Complete macros and environments marked as expert commands.

     Possible values are nil, t, or a list of style names.

     nil
          Don't complete expert commands (default).
     t
          Always complete expert commands.
     (STYLES ...)
          Only complete expert commands of STYLES.

   AUCTeX will also make completion for many macro arguments, for
example existing labels when you enter a '\ref' macro with
'TeX-insert-macro' or 'TeX-electric-macro', and BibTeX entries when you
enter a '\cite' macro.  For this kind of completion to work, parsing
must be enabled as described in *note Parsing Files::.  For '\cite' you
must also make sure that the BibTeX files have been saved at least once
after you enabled automatic parsing on save, and that the basename of
the BibTeX file does not conflict with the basename of one of TeX files.


File: auctex.info,  Node: Marking,  Next: Commenting,  Prev: Completion,  Up: Editing

2.7 Marking Environments, Sections, or Texinfo Nodes
====================================================

You can mark the current environment by typing 'C-c .', or the current
section by typing 'C-c *'.

   In Texinfo documents you can type 'C-M-h' to mark the current node.

   When the region is set, the point is moved to its beginning and the
mark to its end.

* Menu:

* Marking (LaTeX):: LaTeX Commands for Marking Environments and Sections
* Marking (Texinfo):: Texinfo Commands for Marking Environments, Sections, and Nodes


File: auctex.info,  Node: Marking (LaTeX),  Next: Marking (Texinfo),  Up: Marking

2.7.1 LaTeX Commands for Marking Environments and Sections
----------------------------------------------------------

 -- Command: LaTeX-mark-section
     ('C-c *') Set mark at end of current logical section, and point at
     top.

     With a non-nil prefix argument, mark only the region from the
     current section start to the next sectioning command.  Thereby
     subsections are not being marked.  Otherwise, any included
     subsections are also marked along with current section.

 -- Command: LaTeX-mark-environment
     ('C-c .') Set mark to the end of the current environment and point
     to the matching beginning.

     If a prefix argument is given, mark the respective number of
     enclosing environments.  The command will not work properly if
     there are unbalanced begin-end pairs in comments and verbatim
     environments.


File: auctex.info,  Node: Marking (Texinfo),  Prev: Marking (LaTeX),  Up: Marking

2.7.2 Texinfo Commands for Marking Environments and Sections
------------------------------------------------------------

 -- Command: Texinfo-mark-section
     ('C-c *') Mark the current section, with inclusion of any
     containing node.

     The current section is detected as starting by any of the
     structuring commands matched by the regular expression in the
     variable 'outline-regexp' which in turn is a regular expression
     matching any element of the variable 'texinfo-section-list'.

     With a non-nil prefix argument, mark only the region from the
     current section start to the next sectioning command.  Thereby
     subsections are not being marked.  Otherwise, any included
     subsections are also marked.

     Note that when the current section is starting immediately after a
     node command, then the node command is also marked as part of the
     section.

 -- Command: Texinfo-mark-environment
     ('C-c .') Set mark to the end of the current environment and point
     to the matching beginning.

     If a prefix argument is given, mark the respective number of
     enclosing environments.  The command will not work properly if
     there are unbalanced begin-end pairs in comments and verbatim
     environments.

 -- Command: Texinfo-mark-node
     ('C-M-h') Mark the current node.  This is the node in which point
     is located.  It is starting at the previous occurrence of the
     keyword '@node' and ending at next occurrence of the keywords
     '@node' or '@bye'.


File: auctex.info,  Node: Commenting,  Next: Indenting,  Prev: Marking,  Up: Editing

2.8 Commenting
==============

It is often necessary to comment out temporarily a region of TeX or
LaTeX code.  This can be done with the commands 'C-c ;' and 'C-c %'.
'C-c ;' will comment out all lines in the current region, while 'C-c %'
will comment out the current paragraph.  Type 'C-c ;' again to uncomment
all lines of a commented region, or 'C-c %' again to uncomment all
comment lines around point.  These commands will insert or remove a
single '%' respectively.

 -- Command: TeX-comment-or-uncomment-region
     ('C-c ;') Add or remove '%' from the beginning of each line in the
     current region.  Uncommenting works only if the region encloses
     solely commented lines.  If AUCTeX should not try to guess if the
     region should be commented or uncommented the commands
     'TeX-comment-region' and 'TeX-uncomment-region' can be used to
     explicitly comment or uncomment the region in concern.

 -- Command: TeX-comment-or-uncomment-paragraph
     ('C-c %') Add or remove '%' from the beginning of each line in the
     current paragraph.  When removing '%' characters the paragraph is
     considered to consist of all preceding and succeeding lines
     starting with a '%', until the first non-comment line.


File: auctex.info,  Node: Indenting,  Next: Filling,  Prev: Commenting,  Up: Editing

2.9 Indenting
=============

Indentation means the addition of whitespace at the beginning of lines
to reflect special syntactical constructs.  This makes it easier to see
the structure of the document, and to catch errors such as a missing
closing brace.  Thus, the indentation is done for precisely the same
reasons that you would indent ordinary computer programs.

   Indentation is done by LaTeX environments and by TeX groups, that is
the body of an environment is indented by the value of
'LaTeX-indent-level' (default 2).  Also, items of an 'itemize-like'
environment are indented by the value of 'LaTeX-item-indent', default
-2.  (Items are identified with the help of 'LaTeX-item-regexp'.)  If
more environments are nested, they are indented 'accumulated' just like
most programming languages usually are seen indented in nested
constructs.

   You can explicitly indent single lines, usually by pressing <TAB>, or
marked regions by calling 'indent-region' on it.  If you have
'auto-fill-mode' enabled and a line is broken while you type it, Emacs
automatically cares about the indentation in the following line.  If you
want to have a similar behavior upon typing <RET>, you can customize the
variable 'TeX-newline-function' and change the default of 'newline'
which does no indentation to 'newline-and-indent' which indents the new
line or 'reindent-then-newline-and-indent' which indents both the
current and the new line.

   There are certain LaTeX environments which should be indented in a
special way, like 'tabular' or 'verbatim'.  Those environments may be
specified in the variable 'LaTeX-indent-environment-list' together with
their special indentation functions.  Taking the 'verbatim' environment
as an example you can see that 'current-indentation' is used as the
indentation function.  This will stop AUCTeX from doing any indentation
in the environment if you hit <TAB> for example.

   There are environments in 'LaTeX-indent-environment-list' which do
not bring a special indentation function with them.  This is due to the
fact that first the respective functions are not implemented yet and
second that filling will be disabled for the specified environments.
This shall prevent the source code from being messed up by accidently
filling those environments with the standard filling routine.  If you
think that providing special filling routines for such environments
would be an appropriate and challenging task for you, you are invited to
contribute.  (*Note Filling::, for further information about the filling
functionality.)

   The check for the indentation function may be enabled or disabled by
customizing the variable 'LaTeX-indent-environment-check'.

   For tabular-like environments, AUCTeX has a built-in function to
indent according to preceding '&' signs and assigns it to all known
tabular-like environments in the default value of
'LaTeX-indent-environment-list'.

   As a side note with regard to formatting special environments: Newer
Emacsen include 'align.el' and therefore provide some support for
formatting 'tabular' and 'tabbing' environments with the function
'align-current' which will nicely align columns in the source code.

   AUCTeX is able to format commented parts of your code just as any
other part.  This means LaTeX environments and TeX groups in comments
will be indented syntactically correct if the variable
'LaTeX-syntactic-comments' is set to t.  If you disable it, comments
will be filled like normal text and no syntactic indentation will be
done.

   Following you will find a list of most commands and variables related
to indenting with a small summary in each case:

'<TAB>'
     'LaTeX-indent-line' will indent the current line.

'<LFD>'
'C-j'
     'newline-and-indent' inserts a new line (much like <RET>) and moves
     the cursor to an appropriate position by the left margin.

     Most keyboards nowadays lack a linefeed key and 'C-j' may be
     tedious to type.  Therefore you can customize AUCTeX to perform
     indentation upon typing <RET> as well.  The respective option is
     called 'TeX-newline-function'.

 -- User Option: LaTeX-indent-environment-list
     List of environments with special indentation.  The second element
     in each entry is the function to calculate the indentation level in
     columns.

 -- User Option: LaTeX-indent-level
     Number of spaces to add to the indentation for each '\begin' not
     matched by a '\end'.

 -- User Option: LaTeX-item-indent
     Number of spaces to add to the indentation for '\item''s in list
     environments.

 -- User Option: TeX-brace-indent-level
     Number of spaces to add to the indentation for each '{' not matched
     by a '}'.

 -- User Option: LaTeX-syntactic-comments
     If non-nil comments will be filled and indented according to LaTeX
     syntax.  Otherwise they will be filled like normal text.

 -- User Option: TeX-newline-function
     Used to specify the function which is called when <RET> is pressed.
     This will normally be 'newline' which simply inserts a new line.
     In case you want to have AUCTeX do indentation as well when you
     press <RET>, use the built-in functions 'newline-and-indent' or
     'reindent-then-newline-and-indent'.  The former inserts a new line
     and indents the following line, i.e. it moves the cursor to the
     right position and therefore acts as if you pressed <LFD>.  The
     latter function additionally indents the current line.  If you
     choose 'Other', you can specify your own fancy function to be
     called when <RET> is pressed.

   AUCTeX treats by default '\[...\]' math mode as a regular environment
and indents it accordingly.  If you do not like such behavior you only
need to remove '\|\[' and '\|\]' from 'LaTeX-begin-regexp' and
'LaTeX-end-regexp' variables respectively.

   A closely related topic is indenting of text enclosed in square
brackets, parentheses and other pairs.  AUCTeX offers two variables
which control if indentation happens inside these pairs.

 -- User Option: TeX-indent-open-delimiters
     This variable contains additional opening delimiters which increase
     indentation.  For example add '[' to this variable to get text
     after a square bracket indented.

 -- User Option: TeX-indent-close-delimiters
     This is the accompanying variable to 'TeX-indent-open-delimiters'
     decreasing the indentation again.  This variable should contain ']'
     if 'TeX-indent-open-delimiters' is set like described above.

Note that this is an opt-in feature, both variables are initially set to
an empty string.  That is because it introduces non-trivial side effects
to include '[' and ']' in 'TeX-indent-open-delimiters' and
'TeX-indent-close-delimiters'; if you only have an opening square
bracket in your text without closing it, wrong indentation persists in
the following text.  For example, in math expression, half-open
intervals are frequently written as '[0,10)' or '[0,10['.  In such
cases, you can put the closing part as a comment in the same line in
order to have correct indentation after that:
     $[0,10)$ % ]
     $[0,10[$ % ]]

   Another example is '\left'-'\right' pair in equations.  Similar
workarounds are available:
     \begin{equation}
       \left[ % ]
         xyz
       \right] % [
       abc
     \end{equation}

   You can include parens '()' also in 'TeX-indent-open-delimiters' and
'TeX-indent-close-delimiters' to enable indent inside them.  Be prepared
for similar side effects when you do.

   Note that commented curly braces '{' and '}' aren't counted when
AUCTeX computes indentation.


File: auctex.info,  Node: Filling,  Prev: Indenting,  Up: Editing

2.10 Filling
============

Filling deals with the insertion of line breaks to prevent lines from
becoming wider than what is specified in 'fill-column'.  The linebreaks
will be inserted automatically if 'auto-fill-mode' is enabled.  In this
case the source is not only filled but also indented automatically as
you write it.

   'auto-fill-mode' can be enabled for AUCTeX by calling
'turn-on-auto-fill' in one of the hooks AUCTeX is running.  *Note Modes
and Hooks::.  As an example, if you want to enable 'auto-fill-mode' in
'LaTeX-mode', put the following into your init file:

     (add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)

   You can manually fill explicitly marked regions, paragraphs,
environments, complete sections, or the whole buffer.  (Note that manual
filling in AUCTeX will indent the start of the region to be filled in
contrast to many other Emacs modes.)

   There are some syntactical constructs which are handled specially
with regard to filling.  These are so-called "code comments" and
"paragraph commands".

   Code comments are comments preceded by code or text in the same line.
Upon filling a region, code comments themselves will not get filled.
Filling is done from the start of the region to the line with the code
comment and continues after it.  In order to prevent overfull lines in
the source code, a linebreak will be inserted before the last
non-comment word by default.  This can be changed by customizing
'LaTeX-fill-break-before-code-comments'.  If you have overfull lines
with code comments you can fill those explicitly by calling
'LaTeX-fill-paragraph' or pressing 'M-q' with the cursor positioned on
them.  This will add linebreaks in the comment and indent subsequent
comment lines to the column of the comment in the first line of the code
comment.  In this special case 'M-q' only acts on the current line and
not on the whole paragraph.

   Lines with '\par' are treated similarly to code comments, i.e. '\par'
will be treated as paragraph boundary which should not be followed by
other code or text.  But it is not treated as a real paragraph boundary
like an empty line where filling a paragraph would stop.

   Paragraph commands like '\section' or '\noindent' (the list of
commands is defined by 'LaTeX-paragraph-commands') are often to be
placed in their own line(s).  This means they should not be consecuted
with any preceding or following adjacent lines of text.  AUCTeX will
prevent this from happening if you do not put any text except another
macro after the end of the last brace of the respective macro.  If there
is other text after the macro, AUCTeX regards this as a sign that the
macro is part of the following paragraph.

   Here are some examples:

     \begin{quote}
       text text text text

     \begin{quote}\label{foo}
       text text text text

   If you press 'M-q' on the first line in both examples, nothing will
change.  But if you write

     \begin{quote} text
       text text text text
and press 'M-q', you will get

     \begin{quote} text text text text text

   Besides code comments and paragraph commands, another speciality of
filling in AUCTeX involves commented lines.  You should be aware that
these comments are treated as islands in the rest of the LaTeX code if
syntactic filling is enabled.  This means, for example, if you try to
fill an environment with 'LaTeX-fill-environment' and have the cursor
placed on a commented line which does not have a surrounding environment
inside the comment, AUCTeX will report an error.

   The relevant commands and variables with regard to filling are:

'C-c C-q C-p'
     'LaTeX-fill-paragraph' will fill and indent the current paragraph.

'M-q'
     Alias for 'C-c C-q C-p'

'C-c C-q C-e'
     'LaTeX-fill-environment' will fill and indent the current
     environment.  This may e.g. be the 'document' environment, in which
     case the entire document will be formatted.

'C-c C-q C-s'
     'LaTeX-fill-section' will fill and indent the current logical
     sectional unit.

'C-c C-q C-r'
     'LaTeX-fill-region' will fill and indent the current region.

 -- User Option: LaTeX-fill-break-at-separators
     List of separators before or after which respectively linebreaks
     will be inserted if they do not fit into one line.  The separators
     can be curly braces, brackets, switches for inline math ('$', '\(',
     '\)') and switches for display math ('\[', '\]').  Such formatting
     can be useful to make macros and math more visible or to prevent
     overfull lines in the LaTeX source in case a package for displaying
     formatted TeX output inside the Emacs buffer, like preview-latex,
     is used.

 -- User Option: LaTeX-fill-break-before-code-comments
     Code comments are comments preceded by some other text in the same
     line.  When a paragraph containing such a comment is to be filled,
     the comment start will be seen as a border after which no line
     breaks will be inserted in the same line.  If the option
     'LaTeX-fill-break-before-code-comments' is enabled (which is the
     default) and the comment does not fit into the line, a line break
     will be inserted before the last non-comment word to minimize the
     chance that the line becomes overfull.

 -- User Option: LaTeX-fill-excluded-macros
     A list of macro names (without leading backslash) for whose
     arguments filling should be disabled.  Typically, you will want to
     add macros here which have long, multi-line arguments.  An example
     is '\pgfplotstabletypeset' from the pgfplotstable package which is
     used as shown in the following listing:

     \pgfplotstabletypeset[skip first n=4]{%
       XYZ Format,
       Version 1.234
       Date 2010-09-01
       @author Mustermann
       A B C
       1 2 3
       4 5 6
     }


File: auctex.info,  Node: Display,  Next: Processing,  Prev: Editing,  Up: Top

3 Controlling Screen Display
****************************

It is often desirable to get visual help of what markup code in a text
actually does without having to decipher it explicitly.  For this
purpose Emacs and AUCTeX provide font locking (also known as syntax
highlighting) which visually sets off markup code like macros or
environments by using different colors or fonts.  For example text to be
typeset in italics can be displayed with an italic font in the editor as
well, or labels and references get their own distinct color.

   While font locking helps you grasp the purpose of markup code and
separate markup from content, the markup code can still be distracting.
AUCTeX lets you hide those parts and show them again at request with its
built-in support for hiding macros and environments which we call
folding here.

   Besides folding of macros and environments, AUCTeX provides support
for Emacs' outline mode which lets you narrow the buffer content to
certain sections of your text by hiding the parts not belonging to these
sections.

   Moreover, you can focus in a specific portion of the code by
narrowing the buffer to the desired region.  AUCTeX provides also
functions to narrow the buffer to the current group and to LaTeX
environments.

   AUCTeX also provides some WYSIWYG features.

   First, you can customize 'font-latex-fontify-script' to enable
special formatting of '^' superscripts and '_' subscripts (*note Font
Locking::).

   Secondly, AUCTeX with GNU Emacs 25 or later can display certain math
macros using Unicode characters, e.g., '\alpha' as α.  This is called
prettification and is lightweight and reasonable robust (*note
Prettifying::).

   A more accurate approach is provided by preview-latex, a subsystem of
AUCTeX, see *note Introduction: (preview-latex)Top.  This system uses
LaTeX to generate images that are then displayed in your buffer.  It is
extremely accurate but can be fragile with some packages (like older pgf
versions).

   Please note that you can use prettification and preview-latex
together.

* Menu:

* Font Locking::                Font Locking
* Folding::                     Folding Macros and Environments
* Outline::                     Outlining the Document
* Narrowing::                   Restricting display and editing to a portion of the buffer
* Prettifying::                 Displaying Greek and math macros as Unicode characters


File: auctex.info,  Node: Font Locking,  Next: Folding,  Up: Display

3.1 Font Locking
================

Font locking is supposed to improve readability of the source code by
highlighting certain keywords with different colors or fonts.  It
thereby lets you recognize the function of markup code to a certain
extent without having to read the markup command.  For general
information on controlling font locking with Emacs' Font Lock mode, see
*note Font Lock Mode: (emacs)Font Lock.

 -- User Option: TeX-install-font-lock
     Once font locking is enabled globally or for the major modes
     provided by AUCTeX, the font locking patterns and functionality of
     font-latex are activated by default.  You can switch to a different
     font locking scheme or disable font locking in AUCTeX by
     customizing the variable 'TeX-install-font-lock'.

     Besides font-latex AUCTeX ships with a scheme which is derived from
     Emacs' default LaTeX mode and activated by choosing
     'tex-font-setup'.  Be aware that this scheme is not coupled with
     AUCTeX's style system and not the focus of development.  Therefore
     and due to font-latex being much more feature-rich the following
     explanations will only cover font-latex.

     In case you want to hook in your own fontification scheme, you can
     choose 'other' and insert the name of the function which sets up
     your font locking patterns.  If you want to disable fontification
     in AUCTeX completely, choose 'ignore'.

   font-latex provides many options for customization which are
accessible with 'M-x customize-group <RET> font-latex <RET>'.  For this
description the various options are explained in conceptional groups.

* Menu:

* Fontification of macros::     Fontification of macros
* Fontification of quotes::     Fontification of quotes
* Fontification of math::       Fontification of math constructs
* Verbatim content::            Verbatim macros and environments
* Faces::                       Faces used by font-latex
* Known problems::              Known fontification problems


File: auctex.info,  Node: Fontification of macros,  Next: Fontification of quotes,  Up: Font Locking

3.1.1 Fontification of macros
-----------------------------

Highlighting of macros can be customized by adapting keyword lists which
can be found in the customization group 'font-latex-keywords'.

   Three types of macros can be handled differently with respect to
fontification:

  1. Commands of the form '\foo[bar]{baz}' which consist of the macro
     itself, optional arguments in square brackets and mandatory
     arguments in curly braces.  For the command itself the face
     'font-lock-keyword-face' will be used and for the optional
     arguments the face 'font-lock-variable-name-face'.  The face
     applied to the mandatory argument depends on the macro class
     represented by the respective built-in variables.
  2. Declaration macros of the form '{\foo text}' which consist of the
     macro which may be enclosed in a TeX group together with text to be
     affected by the macro.  In case a TeX group is present, the macro
     will get the face 'font-lock-keyword-face' and the text will get
     the face configured for the respective macro class.  If no TeX
     group is present, the latter face will be applied to the macro
     itself.
  3. Simple macros of the form '\foo' which do not have any arguments or
     groupings.  The respective face will be applied to the macro
     itself.

   Customization variables for '\foo[bar]{baz}' type macros allow both
the macro name and the sequence of arguments to be specified.  The
latter is done with a string which can contain the characters
'*'
     indicating the existence of a starred variant for the macro,
'['
     for optional arguments in brackets,
'{'
     for mandatory arguments in braces,
'\'
     for mandatory arguments consisting of a single macro and
'|'
     as a prefix indicating that two alternatives are following.
   For example the specifier for '\documentclass' would be '[{' because
the macro has one optional followed by one mandatory argument.  The
specifier for '\newcommand' would be '*|{\[[{' because there is a
starred variant, the mandatory argument following the macro name can be
a macro or a TeX group which can be followed by two optional arguments
and the last token is a mandatory argument in braces.

   Customization variables for the '{\foo text}' and '\foo' types are
simple lists of strings where each entry is a macro name (without the
leading backslash).

General macro classes
---------------------

font-latex provides keyword lists for different macro classes which are
described in the following table:

'font-latex-match-function-keywords'
     Keywords for macros defining or related to functions, like
     '\newcommand'.
     Type: '\macro[...]{...}'
     Face: 'font-lock-function-name-face'

'font-latex-match-reference-keywords'
     Keywords for macros defining or related to references, like '\ref'.
     Type: '\macro[...]{...}'
     Face: 'font-lock-constant-face'

'font-latex-match-textual-keywords'
     Keywords for macros specifying textual content, like '\caption'.
     Type: '\macro[...]{...}'
     Face: 'font-lock-type-face'

'font-latex-match-variable-keywords'
     Keywords for macros defining or related to variables, like
     '\setlength'.
     Type: '\macro[...]{...}'
     Face: 'font-lock-variable-name-face'

'font-latex-match-warning-keywords'
     Keywords for important macros, e.g. affecting line or page break,
     like '\clearpage'.
     Type: '\macro'
     Face: 'font-latex-warning-face'

Sectioning commands
-------------------

Sectioning commands are macros like '\chapter' or '\section'.  For these
commands there are two fontification schemes which may be selected by
customizing the variable 'font-latex-fontify-sectioning'.

 -- User Option: font-latex-fontify-sectioning
     Per default sectioning commands will be shown in a larger,
     proportional font, which corresponds to a number for this variable.
     The font size varies with the sectioning level, e.g. '\part'
     ('font-latex-sectioning-0-face') has a larger font than
     '\paragraph' ('font-latex-sectioning-5-face').  Typically, values
     from 1.05 to 1.3 for 'font-latex-fontify-sectioning' give best
     results, depending on your font setup.  If you rather like to use
     the base font and a different color, set the variable to the symbol
     'color'.  In this case the face 'font-lock-type-face' will be used
     to fontify the argument of the sectioning commands.

   You can make font-latex aware of your own sectioning commands be
adding them to the keyword lists:
'font-latex-match-sectioning-0-keywords'
('font-latex-sectioning-0-face') ...
'font-latex-match-sectioning-5-keywords'
('font-latex-sectioning-5-face').

   Related to sectioning there is special support for slide titles which
may be fontified with the face 'font-latex-slide-title-face'.  You can
add macros which should appear in this face by customizing the variable
'font-latex-match-slide-title-keywords'.

Commands for changing fonts
---------------------------

LaTeX provides various macros for changing fonts or font attributes.
For example, you can select an italic font with '\textit{...}' or bold
with '\textbf{...}'.  An alternative way to specify these fonts is to
use special macros in TeX groups, like '{\itshape ...}' for italics and
'{\bfseries ...}' for bold.  As mentioned above, we call the former
variants commands and the latter declarations.

   Besides the macros for changing fonts provided by LaTeX there is an
infinite number of other macros--either defined by yourself for logical
markup or defined by macro packages--which affect the font in the
typeset text.  While LaTeX's built-in macros and macros of packages
known by AUCTeX are already handled by font-latex, different keyword
lists per type style and macro type are provided for entering your own
macros which are listed in the table below.

'font-latex-match-bold-command-keywords'
     Keywords for commands specifying a bold type style.
     Face: 'font-latex-bold-face'
'font-latex-match-italic-command-keywords'
     Keywords for commands specifying an italic font.
     Face: 'font-latex-italic-face'
'font-latex-match-math-command-keywords'
     Keywords for commands specifying a math font.
     Face: 'font-latex-math-face'
'font-latex-match-type-command-keywords'
     Keywords for commands specifying a typewriter font.
     Face: 'font-lock-type-face'
'font-latex-match-bold-declaration-keywords'
     Keywords for declarations specifying a bold type style.
     Face: 'font-latex-bold-face'
'font-latex-match-italic-declaration-keywords'
     Keywords for declarations specifying an italic font.
     Face: 'font-latex-italic-face'
'font-latex-match-type-declaration-keywords'
     Keywords for declarations specifying a typewriter font.
     Face: 'font-latex-type-face'

Deactivating defaults of built-in keyword classes
-------------------------------------------------

font-latex ships with predefined lists of keywords for the classes
described above.  You can disable these defaults per class by
customizing the variable 'font-latex-deactivated-keyword-classes'.  This
is a list of strings for keyword classes to be deactivated.  Valid
entries are "warning", "variable", "biblatexnoarg", "biblatex",
"reference", "function" , "sectioning-0", "sectioning-1",
"sectioning-2", "sectioning-3", "sectioning-4", "sectioning-5",
"slide-title", "textual", "bold-command", "italic-command",
"math-command", "type-command", "bold-declaration",
"italic-declaration", "type-declaration".

   You can also get rid of certain keywords only.  For example if you
want to remove highlighting of footnotes as references you can put the
following stanza into your init file:

     (eval-after-load "font-latex"
       '(setq-default
         font-latex-match-reference-keywords-local
         (remove (assoc-string "footnote"
                 font-latex-match-reference-keywords-local)
                     font-latex-match-reference-keywords-local)))

   But note that this means fiddling with font-latex's internals and is
not guaranteed to work in future versions of font-latex.

User-defined keyword classes
----------------------------

In case the customization options explained above do not suffice for
your needs, you can specify your own keyword classes by customizing the
variable 'font-latex-user-keyword-classes'.

 -- User Option: font-latex-user-keyword-classes
     Every keyword class consists of four parts, a name, a list of
     keywords, a face and a specifier for the type of macros to be
     highlighted.

     When adding new entries, you have to use unique values for the
     class names, i.e. they must not clash with names of the built-in
     keyword classes or other names given by you.  Additionally the
     names must not contain spaces.

     The list of keywords defines which commands and declarations should
     be covered by the keyword class.  A keyword can either be a simple
     command name omitting the leading backslash or a list consisting of
     the command name and a string specifying the sequence of arguments
     for the command.

     The face argument can either be an existing face or face attributes
     made by you.

     There are three alternatives for the type of keywords--"Command
     with arguments", "Declaration inside TeX group" and "Command
     without arguments"--which correspond with the macro types explained
     above.


File: auctex.info,  Node: Fontification of quotes,  Next: Fontification of math,  Prev: Fontification of macros,  Up: Font Locking

3.1.2 Fontification of quotes
-----------------------------

Text in quotation marks is displayed with the face
'font-latex-string-face'.  Besides the various forms of opening and
closing double and single quotation marks, so-called guillemets (<<, >>)
can be used for quoting.  Because there are two styles of using
them--French style: << text >>; German style: >>text<<--you can
customize the variable 'font-latex-quotes' to tell font-latex which type
you are using if the correct value cannot be derived from document
properties.

 -- User Option: font-latex-quotes
     The default value of 'font-latex-quotes' is 'auto' which means that
     font-latex will try to derive the correct type of quotation mark
     matching from document properties like the language option supplied
     to the babel LaTeX package.

     If the automatic detection fails for you and you mostly use one
     specific style you can set it to a specific language-dependent
     value as well.  Set the value to 'german' if you are using >>German
     quotes<< and to 'french' if you are using << French quotes >>.
     font-latex will recognize the different ways these quotes can be
     given in your source code, i.e. ('"<', '">'), ('<<', '>>') and the
     respective 8-bit variants.

     If you set 'font-latex-quotes' to nil, quoted content will not be
     fontified.


File: auctex.info,  Node: Fontification of math,  Next: Verbatim content,  Prev: Fontification of quotes,  Up: Font Locking

3.1.3 Fontification of mathematical constructs
----------------------------------------------

In LaTeX mathematics can be indicated by a variety of different methods:
toggles (like dollar signs), macros and environments.  Math constructs
known by font-latex are displayed with the face 'font-latex-math-face'.
Support for dollar signs and shorthands like '\(...\)' or '\[...\]' is
built-in and not customizable.  Support for other math macros and
environments can be adapted by customizing the variables
'font-latex-match-math-command-keywords' and 'texmathp-tex-commands'
respectively.  It is no longer recommended to customize
'font-latex-math-environments'.

   To convert your customization in 'font-latex-math-environments' into
'texmathp-tex-commands', please register your own math environments,
together with starred variants if any, as entries of 'env-on' type in
'texmathp-tex-commands', then clear out 'font-latex-math-environments'.
You have to restart Emacs for this new customization to take effect for
fontification.

   In order to make math constructs more readable, font-latex displays
subscript and superscript parts in a smaller font and raised or lowered
respectively.  This fontification feature can be controlled with the
variables 'font-latex-fontify-script' and 'font-latex-script-display'.

 -- User Option: font-latex-fontify-script
     If non-nil, fontify subscript and superscript strings.  Concretely,
     this means that the scripts are raised or lowered.

     Another possiblity is setting this variable to the symbol
     'multi-level'.  In this case, in a formula x^{y^z}, y is raised
     above and smaller than x, and z is raised above and smaller than y.
     With many script levels, the text might become too small to be
     readable.  (See 'font-latex-fontify-script-max-level' below.)

     Lastly, you can set this variable to 'invisible' whose behavior is
     like 'multi-level', and in addition the super-/subscript characters
     ^ and _ are not displayed.

 -- User Option: font-latex-fontify-script-max-level
     Maximum scriptification level for which script faces are applied.

     The faces 'font-latex-superscript-face' and
     'font-latex-subscript-face' define custom ':height' values < 1.0.
     Therefore, scripts are displayed with a slightly smaller font than
     normal math text.  If 'font-latex-fontify-script' is 'multi-level'
     or 'invisible', the font size becomes too small to be readable
     after a few levels.  This option allows to specify the maximum
     level after which the size of the script text won’t be shrunken
     anymore.

     For example, in the expression x^{y^{z^a_b}}, x has scriptification
     level 0, y has level 1, z has level 2, and both a and b have
     scriptification level 3.

     If 'font-latex-fontify-script-max-level' was 2, then z, a, and b
     would have the same font size.  If it was 3 or more, then a and b
     were smaller than z just in the same way as z is smaller than y and
     y is smaller than x.

   The script characters '^' and '_' themselves are also fontified with
an own face named 'font-latex-script-char-face'.

 -- User Option: font-latex-script-display
     Display specification for subscript and superscript content.  The
     car is used for subscript, the cdr is used for superscript.  The
     feature is implemented using so-called display properties.  For
     information on what exactly to specify for the values, see *note
     Other Display Specifications: (elisp)Other Display Specs.


File: auctex.info,  Node: Verbatim content,  Next: Faces,  Prev: Fontification of math,  Up: Font Locking

3.1.4 Verbatim macros and environments
--------------------------------------

Usually it is not desirable to have content to be typeset verbatim
highlighted according to LaTeX syntax.  Therefore this content will be
fontified uniformly with the face 'font-latex-verbatim-face'.

   font-latex differentiates three different types of verbatim
constructs for fontification.  Macros with special characters like | as
delimiters, macros with braces, and environments.  Which macros and
environments are recognized is controlled by the variables
'LaTeX-verbatim-macros-with-delims',
'LaTeX-verbatim-macros-with-braces', and 'LaTeX-verbatim-environments'
respectively.


File: auctex.info,  Node: Faces,  Next: Known problems,  Prev: Verbatim content,  Up: Font Locking

3.1.5 Faces used by font-latex
------------------------------

In case you want to change the colors and fonts used by font-latex
please refer to the faces mentioned in the explanations above and use
'M-x customize-face <RET> <face> <RET>'.  All faces defined by
font-latex are accessible through a customization group by typing 'M-x
customize-group <RET> font-latex-highlighting-faces <RET>'.


File: auctex.info,  Node: Known problems,  Prev: Faces,  Up: Font Locking

3.1.6 Known fontification problems
----------------------------------

In certain cases the fontification machinery fails to interpret buffer
contents correctly.  This can lead to color bleed, i.e. large parts of a
buffer get fontified with an inappropriate face.  A typical situation
for this to happen is the use of a dollar sign ('$') in a verbatim macro
or environment.  If font-latex is not aware of the verbatim construct,
it assumes the dollar sign to be a toggle for mathematics and fontifies
the following buffer content with the respective face until it finds a
closing dollar sign or till the end of the buffer.

   As a remedy you can make the verbatim construct known to font-latex
(*note Verbatim content::).  If this is not possible, you can insert a
commented dollar sign ('%$') at the next suitable end of line as a quick
workaround.  In docTeX documents, '^^A$' is also available for similar
purpose.


File: auctex.info,  Node: Folding,  Next: Outline,  Prev: Font Locking,  Up: Display

3.2 Folding Macros and Environments
===================================

A popular complaint about markup languages like TeX and LaTeX is that
there is too much clutter in the source text and that one cannot focus
well on the content.  There are macros where you are only interested in
the content they are enclosing, like font specifiers where the content
might already be fontified in a special way by font locking.  Or macros
the content of which you only want to see when actually editing it, like
footnotes or citations.  Similarly you might find certain environments
or comments distracting when trying to concentrate on the body of your
document.

   With AUCTeX's folding functionality you can collapse those items and
replace them by a fixed string, the content of one of their arguments,
or a mixture of both.  If you want to make the original text visible
again in order to view or edit it, move point sideways onto the
placeholder (also called display string) or left-click with the mouse
pointer on it.  The macro or environment will unfold automatically, stay
open as long as point is inside of it and collapse again once you move
point out of it.  (Note that folding of environments currently does not
work in every AUCTeX mode.)

   In order to use this feature, you have to activate 'TeX-fold-mode'
which will activate the auto-reveal feature and the necessary commands
to hide and show macros and environments.  You can activate the mode in
a certain buffer by typing the command 'M-x TeX-fold-mode <RET>' or
using the keyboard shortcut 'C-c C-o C-f'.  If you want to use it every
time you edit a LaTeX document, add it to a hook:

     (add-hook 'LaTeX-mode-hook (lambda ()
                                  (TeX-fold-mode 1)))

   If it should be activated in all AUCTeX modes, use 'TeX-mode-hook'
instead of 'LaTeX-mode-hook'.

   Once the mode is active there are several commands available to hide
and show macros, environments and comments:

 -- Command: TeX-fold-buffer
     ('C-c C-o C-b') Hide all foldable items in the current buffer
     according to the setting of 'TeX-fold-type-list'.

     If you want to have this done automatically every time you open a
     file, add it to a hook and make sure the function is called after
     font locking is set up for the buffer.  The following code should
     accomplish this:

          (add-hook 'find-file-hook #'TeX-fold-buffer t)

     The command can be used any time to refresh the whole buffer and
     fold any new macros and environments which were inserted after the
     last invocation of the command.

 -- User Option: TeX-fold-type-list
     List of symbols determining the item classes to consider for
     folding.  This can be macros, environments and comments.  Per
     default only macros and environments are folded.

 -- User Option: TeX-fold-force-fontify
     In order for all folded content to get the right faces, the whole
     buffer has to be fontified before folding is carried out.
     'TeX-fold-buffer' therefore will force fontification of unfontified
     regions.  As this will prolong the time folding takes, you can
     prevent forced fontification by customizing the variable
     'TeX-fold-force-fontify'.

 -- User Option: TeX-fold-auto
     By default, a macro inserted with 'TeX-insert-macro' ('C-c C-m')
     will not be folded.  Set this variable to a non-nil value to
     aumatically fold macros as soon as they are inserted.

 -- User Option: TeX-fold-preserve-comments
     By default items found in comments will be folded.  If your
     comments often contain unfinished code this might lead to problems.
     Give this variable a non-nil value and foldable items in your
     comments will be left alone.

 -- User Option: TeX-fold-unfold-around-mark
     When this variable is non-nil and there is an active regione, text
     around the mark will be kept unfolded.

 -- Command: TeX-fold-region
     ('C-c C-o C-r') Hide all configured macros in the marked region.

 -- Command: TeX-fold-paragraph
     ('C-c C-o C-p') Hide all configured macros in the paragraph
     containing point.

 -- Command: TeX-fold-macro
     ('C-c C-o C-m') Hide the macro on which point currently is located.
     If the name of the macro is found in 'TeX-fold-macro-spec-list',
     the respective display string will be shown instead.  If it is not
     found, the name of the macro in sqare brackets or the default
     string for unspecified macros
     ('TeX-fold-unspec-macro-display-string') will be shown, depending
     on the value of the variable 'TeX-fold-unspec-use-name'.

 -- Command: TeX-fold-env
     ('C-c C-o C-e') Hide the environment on which point currently is
     located.  The behavior regarding the display string is analogous to
     'TeX-fold-macro' and determined by the variables
     'TeX-fold-env-spec-list' and 'TeX-fold-unspec-env-display-string'
     respectively.

 -- Command: TeX-fold-math
     Hide the math macro on which point currently is located.  If the
     name of the macro is found in 'TeX-fold-math-spec-list', the
     respective display string will be shown instead.  If it is not
     found, the name of the macro in sqare brackets or the default
     string for unspecified macros
     ('TeX-fold-unspec-macro-display-string') will be shown, depending
     on the value of the variable 'TeX-fold-unspec-use-name'.

 -- Command: TeX-fold-comment
     ('C-c C-o C-c') Hide the comment point is located on.

 -- Command: TeX-fold-clearout-buffer
     ('C-c C-o b') Permanently unfold all macros and environments in the
     current buffer.

 -- Command: TeX-fold-clearout-region
     ('C-c C-o r') Permanently unfold all macros and environments in the
     marked region.

 -- Command: TeX-fold-clearout-paragraph
     ('C-c C-o p') Permanently unfold all macros and environments in the
     paragraph containing point.

 -- Command: TeX-fold-clearout-item
     ('C-c C-o i') Permanently show the macro or environment on which
     point currently is located.  In contrast to temporarily opening the
     macro when point is moved sideways onto it, the macro will be
     permanently unfolded and will not collapse again once point is
     leaving it.

 -- Command: TeX-fold-dwim
     ('C-c C-o C-o') Hide or show items according to the current
     context.  If there is folded content, unfold it.  If there is a
     marked region, fold all configured content in this region.  If
     there is no folded content but a macro or environment, fold it.

   In case you want to use a different prefix than 'C-c C-o' for these
commands you can customize the variable 'TeX-fold-command-prefix'.
(Note that this will not change the key binding for activating the
mode.)

   The commands above will only take macros or environments into
consideration which are specified in the variables
'TeX-fold-macro-spec-list' or 'TeX-fold-env-spec-list' respectively.

 -- User Option: TeX-fold-macro-spec-list
     List of replacement specifiers and macros to fold.  The specifier
     can be a string, an integer or a function symbol.

     If you specify a string, it will be used as a display replacement
     for the whole macro.  Numbers in braces, brackets, parens or angle
     brackets will be replaced by the respective macro argument.  For
     example '{1}' will be replaced by the first mandatory argument of
     the macro.  One can also define alternatives within the specifier
     which are used if an argument is not found.  Alternatives are
     separated by '||'.  They are most useful with optional arguments.
     As an example, the default specifier for '\item' is '[1]:||*' which
     means that if there is an optional argument, its value is shown
     followed by a colon.  If there is no optional argument, only an
     asterisk is used as the display string.

     If you specify a number as the first element, the content of the
     respective mandatory argument of a LaTeX macro will be used as the
     placeholder.

     If the first element is a function symbol, the function will be
     called with all mandatory arguments of the macro and the result of
     the function call will be used as a replacement for the macro.

     The placeholder is made by copying the text from the buffer
     together with its properties, i.e. its face as well.  If
     fontification has not happened when this is done (e.g. because of
     lazy font locking) the intended fontification will not show up.  As
     a workaround you can leave Emacs idle a few seconds and wait for
     stealth font locking to finish before you fold the buffer.  Or you
     just re-fold the buffer with 'TeX-fold-buffer' when you notice a
     wrong fontification.

 -- User Option: TeX-fold-env-spec-list
     List of display strings or argument numbers and environments to
     fold.  Argument numbers refer to the '\begin' statement.  That
     means if you have e.g. '\begin{tabularx}{\linewidth}{XXX} ...
     \end{tabularx}' and specify 3 as the argument number, the resulting
     display string will be "XXX".

 -- User Option: TeX-fold-math-spec-list
     List of display strings and math macros to fold.

   The variables 'TeX-fold-macro-spec-list', 'TeX-fold-env-spec-list',
and 'TeX-fold-math-spec-list' apply to any AUCTeX mode.  If you want to
make settings which are only applied to LaTeX mode, you can use the
mode-specific variables 'LaTeX-fold-macro-spec-list',
'LaTeX-fold-env-spec-list', and 'LaTeX-fold-math-spec-list'

 -- User Option: TeX-fold-unspec-macro-display-string
     Default display string for macros which are not specified in
     'TeX-fold-macro-spec-list'.

 -- User Option: TeX-fold-unspec-env-display-string
     Default display string for environments which are not specified in
     'TeX-fold-env-spec-list'.

 -- User Option: TeX-fold-unspec-use-name
     If non-nil the name of the macro or environment surrounded by
     square brackets is used as display string, otherwise the defaults
     specified in 'TeX-fold-unspec-macro-display-string' or
     'TeX-fold-unspec-env-display-string' respectively.

   When you hover with the mouse pointer over folded content, its
original text will be shown in a tooltip or the echo area depending on
Tooltip mode being activate.  In order to avoid exorbitantly big
tooltips and to cater for the limited space in the echo area the content
will be cropped after a certain amount of characters defined by the
variable 'TeX-fold-help-echo-max-length'.

 -- User Option: TeX-fold-help-echo-max-length
     Maximum length of original text displayed in a tooltip or the echo
     area for folded content.  Set it to zero in order to disable this
     feature.


File: auctex.info,  Node: Outline,  Next: Narrowing,  Prev: Folding,  Up: Display

3.3 Outlining the Document
==========================

AUCTeX supports the standard outline minor mode using LaTeX/ConTeXt
sectioning commands as header lines.  *Note Outline Mode: (emacs)Outline
Mode.

   You can add your own headings by setting the variable
'TeX-outline-extra'.

 -- Variable: TeX-outline-extra
     List of extra TeX outline levels.

     Each element is a list with two entries.  The first entry is the
     regular expression matching a header, and the second is the level
     of the header.  A '^' is automatically prepended to the regular
     expressions in the list, so they must match text at the beginning
     of the line.

     See 'LaTeX-section-list' or 'ConTeXt-INTERFACE-section-list' for
     existing header levels.

   The following example add '\item' and '\bibliography' headers, with
'\bibliography' at the same outline level as '\section', and '\item'
being below '\subparagraph'.

     (setq TeX-outline-extra
           '(("[ \t]*\\\\\\(bib\\)?item\\b" 7)
             ("\\\\bibliography\\b" 2)))

   You may want to check out the unbundled 'out-xtra' package for even
better outline support.  It is available from your favorite emacs lisp
archive.


File: auctex.info,  Node: Narrowing,  Next: Prettifying,  Prev: Outline,  Up: Display

3.4 Narrowing
=============

Sometimes you want to focus your attention to a limited region of the
code.  You can do that by restricting the text addressable by editing
commands and hiding the rest of the buffer with the narrowing functions,
*note (emacs)Narrowing::.  In addition, AUCTeX provides a couple of
other commands to narrow the buffer to a group, i.e. a region enclosed
in a pair of curly braces, and to LaTeX environments.

 -- Command: TeX-narrow-to-group
     ('C-x n g') Make text outside current group invisible.

 -- Command: LaTeX-narrow-to-environment COUNT
     ('C-x n e') Make text outside current environment invisible.  With
     optional argument COUNT keep visible that number of enclosing
     environmens.

   Like other standard narrowing functions, the above commands are
disabled.  Attempting to use them asks for confirmation and gives you
the option of enabling them; if you enable the commands, confirmation
will no longer be required for them.


File: auctex.info,  Node: Prettifying,  Prev: Narrowing,  Up: Display

3.5 Prettifying
===============

Emacs 25 is able to prettify symbols in programming language buffers,
*note (emacs)Misc for Programs::.  The canonical example is to display
'(lambda () ...)' as '(λ () ...)' in Lisp buffers.

   AUCTeX can use this feature in order to display certain math macros
and greek letters using their Unicode representation, too.  For example,
the TeX code '\alpha \times \beta' will be displayed as 'α × β'.  When
point is on one of the characters, it'll be unprettified automatically,
meaning you see the verbatim text again.  For this behaviour however you
need to set 'prettify-symbols-unprettify-at-point' to t or 'right-edge'
which will unprettify the symbol when point moves into or near it.

   To enable prettification in AUCTeX, simply add
'prettify-symbols-mode' to 'TeX-mode-hook'.  If you enabled
prettification globally with 'global-prettify-symbols-mode', then it's
automatically enabled in AUCTeX, too.

   You can also add custom symbol unicode-character pairs for
prettification by adding to 'tex--prettify-symbols-alist'.  Note that
this variable is part of Emacs' stock 'tex-mode.el' and used by that and
AUCTeX.


File: auctex.info,  Node: Processing,  Next: Customization,  Prev: Display,  Up: Top

4 Starting Processors, Viewers and Other Programs
*************************************************

The most powerful features of AUCTeX may be those allowing you to run
TeX, LaTeX, ConTeXt and other external commands like BibTeX and
'makeindex' from within Emacs, viewing and printing the results, and
moreover allowing you to _debug_ your documents.

   AUCTeX comes with a special tool bar for TeX and LaTeX which provides
buttons for the most important commands.  You can enable or disable it
by customizing the options 'plain-TeX-enable-toolbar' and
'LaTeX-enable-toolbar' in the 'TeX-tool-bar' customization group.  You
can also customize the buttons by the options 'TeX-bar-TeX-buttons',
'TeX-bar-TeX-all-button-alists', 'TeX-bar-LaTeX-buttons' and
'TeX-bar-LaTeX-button-alist'.

* Menu:

* Commands::                    Invoking external commands.
* Viewing::                     Invoking external viewers.
* Debugging::                   Debugging TeX and LaTeX output.
* Checking::                    Checking the document.
* Control::                     Controlling the processes.
* Cleaning::                    Cleaning intermediate and output files.
* Documentation::               Documentation about macros and packages.


File: auctex.info,  Node: Commands,  Next: Viewing,  Up: Processing

4.1 Executing Commands
======================

Formatting the document with TeX, LaTeX or ConTeXt, viewing with a
previewer, printing the document, running BibTeX, making an index, or
checking the document with 'lacheck' or 'chktex' all require running an
external command.

* Menu:

* Starting a Command::          Starting a Command on a Document or Region
* Selecting a Command::         Selecting and Executing a Command
* Processor Options::           Options for TeX Processors


File: auctex.info,  Node: Starting a Command,  Next: Selecting a Command,  Up: Commands

4.1.1 Starting a Command on a Document or Region
------------------------------------------------

There are two ways to run an external command, you can either run it on
the current document with 'TeX-command-master', or on the current region
with 'TeX-command-region'.  A special case of running TeX on a region is
'TeX-command-buffer' which differs from 'TeX-command-master' if the
current buffer is not its own master file.

 -- Command: TeX-command-master
     ('C-c C-c') Query the user for a command, and run it on the master
     file associated with the current buffer.  The name of the master
     file is controlled by the variable 'TeX-master'.  The available
     commands are controlled by the variable 'TeX-command-list'.

 -- Command: TeX-command-region
     ('C-c C-r') Query the user for a command, and run it on the
     contents of the selected region.  The region contents are written
     into the region file, after extracting the header and trailer from
     the master file.  If mark is inactive (which can happen with
     Transient Mark mode), use the old region.  See also the command
     'TeX-pin-region' about how to fix a region.

     The name of the region file is controlled by the variable
     'TeX-region'.  The name of the master file is controlled by the
     variable 'TeX-master'.  The header is all text up to the line
     matching the regular expression 'TeX-header-end'.  The trailer is
     all text from the line matching the regular expression
     'TeX-trailer-start'.  The available commands are controlled by the
     variable 'TeX-command-list'.

 -- Command: TeX-command-buffer
     ('C-c C-b') Query the user for a command, and apply it to the
     contents of the current buffer.  The buffer contents are written
     into the region file, after extracting the header and trailer from
     the master file.  The command is then actually run on the region
     file.  See above for details.

 -- Command: LaTeX-command-section
     ('C-c C-z') Query the user for a command, and apply it to the
     current section (or part, chapter, subsection, paragraph, or
     subparagraph).  What makes the current section is determined by
     'LaTeX-command-section-level' which can be enlarged/shrunken using
     'LaTeX-command-section-change-level' ('C-c M-z').  The given
     numeric prefix arg is added to the current value of
     'LaTeX-command-section-level'.  By default,
     'LaTeX-command-section-level' is initialized with the current
     document's 'LaTeX-largest-level'.  The buffer contents are written
     into the region file, after extracting the header and trailer from
     the master file.  The command is then actually run on the region
     file.  See 'TeX-command-region' for details.

   It is also possible to compile automatically the whole document until
it is ready with a single command: 'TeX-command-run-all'.

 -- Command: TeX-command-run-all
     ('C-c C-a') Compile the current document until an error occurs or
     it is finished.  If compilation finishes successfully, run the
     viewer at the end.

   Here are some relevant variables.

 -- User Option: TeX-region
     The name of the file for temporarily storing the text when
     formatting the current region.

 -- User Option: TeX-header-end
     A regular expression matching the end of the header.  By default,
     this is '\begin{document}' in LaTeX mode and '%**end of header' in
     plain TeX mode.

 -- User Option: TeX-trailer-start
     A regular expression matching the start of the trailer.  By
     default, this is '\end{document}' in LaTeX mode and '\bye' in plain
     TeX mode.

   If you want to change the values of 'TeX-header-end' and
'TeX-trailer-start' you can do this for all files by setting the
variables in a mode hook or per file by specifying them as file
variables (*note (emacs)File Variables::).

 -- Command: TeX-pin-region
     ('C-c C-t C-r') If you don't have a mode like Transient Mark mode
     active, where marks get disabled automatically, the region would
     need to get properly set before each call to 'TeX-command-region'.
     If you fix the current region with 'C-c C-t C-r', then it will get
     used for more commands even though mark and point may change.  An
     explicitly activated mark, however, will always define a new region
     when calling 'TeX-command-region'.

   If the last process you started was on the region, the commands
described in *note Debugging:: and *note Control:: will work on that
process, otherwise they will work on the process associated with the
current document.

   Don't run more than one process at the same time.  AUCTeX doesn't
support simultaneous typeset including region typeset.  Wait for the
previous process to finish before you start a new process, in particular
when you are editing multiple documents in parallel.  This limitation
applies for preview by preview-latex as well.


File: auctex.info,  Node: Selecting a Command,  Next: Processor Options,  Prev: Starting a Command,  Up: Commands

4.1.2 Selecting and Executing a Command
---------------------------------------

Once you started the command selection with 'C-c C-c', 'C-c C-r' or 'C-c
C-b' you will be prompted for the type of command.  AUCTeX will try to
guess which command is appropriate in the given situation and propose it
as default.  Usually this is a processor like 'TeX' or 'LaTeX' if the
document was changed or a viewer if the document was just typeset.
Other commands can be selected in the minibuffer with completion support
by typing <TAB>.

   The available commands are defined by the variable
'TeX-command-list'.  Per default it includes commands for typesetting
the document (e.g. 'LaTeX'), for viewing the output ('View'), for
printing ('Print'), for generating an index ('Index') or for spell
checking ('Spell') to name but a few.  You can also add your own
commands by adding entries to 'TeX-command-list'.  Refer to its doc
string for information about its syntax.  You might also want to look at
'TeX-expand-list' to learn about the expanders you can use in
'TeX-command-list'.

   Note that the default of the variable occasionally changes.
Therefore it is advisable to add to the list rather than overwriting it.
You can do this with a call to 'add-to-list' in your init file.  For
example, if you wanted to add a command for running a program called
'foo' on the master or region file, you could do this with the following
form.

     (eval-after-load "tex"
       '(add-to-list 'TeX-command-list
                     '("Foo" "foo %s" TeX-run-command t t :help "Run foo")
                     t))

   As mentioned before, AUCTeX will try to guess what command you want
to invoke.  If you want to use another command than 'TeX', 'LaTeX' or
whatever processor AUCTeX thinks is appropriate for the current mode,
set the variable 'TeX-command-default'.  You can do this for all files
by setting it in a mode hook or per file by specifying it as a file
variable (*note (emacs)File Variables::).

 -- User Option: TeX-command-default
     The default command to run in this buffer.  Must be an entry in
     'TeX-command-list'.

   In case you use biblatex in a document, when automatic parsing is
enabled AUCTeX checks the value of 'backend' option given to biblatex at
load time to decide whether to use BibTeX or Biber for bibliography
processing.  Should AUCTeX fail to detect the right backend, you can use
the file local 'LaTeX-biblatex-use-Biber' variable.
 -- Variable: LaTeX-biblatex-use-Biber
     If this boolean variable is set as file local, it tells to AUCTeX
     whether to use Biber with biblatex.  In this case, the
     autodetection of the biblatex backend will be overridden.  You may
     want to set locally this variable if automatic parsing is not
     enabled.

   After confirming a command to execute, AUCTeX will try to save any
buffers related to the document, and check if the document needs to be
reformatted.  If the variable 'TeX-save-query' is non-nil, AUCTeX will
query before saving each file.  By default AUCTeX will check emacs
buffers associated with files in the current directory, in one of the
'TeX-macro-private' directories, and in the 'TeX-macro-global'
directories.  You can change this by setting the variable
'TeX-check-path'.

 -- User Option: TeX-check-path
     Directory path to search for dependencies.

     If nil, just check the current file.  Used when checking if any
     files have changed.

   When performing spell checking on a document or a region (invoked
through AUCTeX's 'Spell' command or 'M-x ispell <RET>'), you want the
spell checking program to skip certain macro arguments and environments,
most notably the arguments of referencing macros and the contents of
verbatim environments.  The skipped parts are controlled by variable
'ispell-tex-skip-alists' provided by 'ispell.el'.  AUCTeX has a library
which can be added to this variable depending on the value of
'TeX-ispell-extend-skip-list' which is set to 't' by default.

 -- User Option: TeX-ispell-extend-skip-list
     This boolean option controls whether AUCTeX activates its extension
     for skipping certain macro arguments and environments when spell
     checking.

     When non-'nil', AUCTeX loads the file 'tex-ispell.el' and adds its
     content to 'ispell-tex-skip-alists'.  This library can and will
     never be complete, but the interface can be used to add selected
     and private macro names within your init file or on a file local
     basis.

     'ispell-tex-skip-alists' has the following structure:
          (defvar ispell-tex-skip-alists
            '((;; First list
               ("\\\\addcontentsline"         ispell-tex-arg-end 2)
               ("\\\\\\([aA]lph\\|arabic\\)"  ispell-tex-arg-end)
               ("\\\\makebox"                 ispell-tex-arg-end 0)
               ("\\\\documentclass" . "\\\\begin{document}"))
              (;; Second list
               ("\\(figure\\|table\\)\\*?"  ispell-tex-arg-end 0)
               ("list"                      ispell-tex-arg-end 2)
               ("verbatim\\*?" . "\\\\end{verbatim\\*?}")))
            "Lists of regions to be skipped in TeX mode.
          First list is used raw.
          Second list has key placed inside \\begin{}.")
     Each item is an alist and the structure of it is described in
     'ispell-skip-region-alist':
          (defvar ispell-skip-region-alist
            '((...))
            "Alist expressing beginning and end of regions not to spell check.
          The alist key must be a regular expression.
          Valid forms include:
            (KEY) - just skip the key.
            (KEY . REGEXP) - skip to the end of REGEXP.
                             REGEXP may be string or symbol.
            (KEY REGEXP) - skip to end of REGEXP.  REGEXP must be a string.
            (KEY FUNCTION ARGS) - FUNCTION called with ARGS
                                  returns end of region.")

     Let's go through the first list of 'ispell-tex-skip-alists' line by
     line:
          ("\\\\addcontentsline"         ispell-tex-arg-end 2)
     'KEY' is the string '"\\\\addcontentsline"', 'FUNCTION' is
     'ispell-tex-arg-end' called with 'ARGS', here '2'.
     'ispell-tex-arg-end' is a function provided by 'ispell.el' which
     skips as many subsequent optional arguments in square brackets as
     it sees and then skips 'ARGS' number of mandatory arguments in
     braces.  Omitting 'ARGS' means skip '1' mandatory argument.  In
     practice, when you have something like this in your document:
          \addcontentsline{toc}{chapter}{Some text}
     The first two arguments are left out and 'Some text' will be spell
     checked.  For the next line
          ("\\\\\\([aA]lph\\|arabic\\)"  ispell-tex-arg-end)
     the name of the counter as argument is skipped.  Next line is
          ("\\\\makebox"                 ispell-tex-arg-end 0)
     where only optional arguments are skipped, the first mandatory
     argument is checked, e.g.
          \makebox[0pt][l]{Some text}
     Finally, the next line
          ("\\\\documentclass" . "\\\\begin{document}"))
     ensures that the entire preamble of a document is discarded.
     Second list works the same; it is more convenient for environments
     since 'KEY' is wrapped inside '\begin{}'.

     AUCTeX provides two functions to add items to car and cdr of
     'ispell-tex-arg-end', namely 'TeX-ispell-skip-setcar' and
     'TeX-ispell-skip-setcdr'.  The argument of these functions is
     exactly as in 'ispell-tex-skip-alists'.  Additions can be done via
     init file, e.g.:
          (eval-after-load "tex-ispell"
            '(progn
               (TeX-ispell-skip-setcar
                '(("\\\\mymacro" ispell-tex-arg-end)))
               (TeX-ispell-skip-setcdr
                '(("myverbatim" . "\\\\end{myverbatim}")))))

     Another possibility is to use file local additions at the end of
     your TeX file, e.g.:
          %%% Local Variables:
          %%% mode: latex
          %%% TeX-master: t
          %%% eval: (TeX-ispell-skip-setcar '(("\\\\mymacro" . "{[-0-9]+}")))
          %%% End:

     Finally, AUCTeX provides a function called 'TeX-ispell-tex-arg-end'
     which sees more arguments than 'ispell-tex-arg-end'.  Refer to its
     doc string for more information.

   AUCTeX also provides a facility to skip the argument of in-line
verbatim macros like '\Verb' from 'fancyvrb.sty' or '\mintinline' from
'minted.sty'.  Characters delimiting the verbatim text are stored in
'TeX-ispell-verb-delimiters'.

 -- User Option: TeX-ispell-verb-delimiters
     String with delimiters recognized for in-line verbatim macros.
     This variable is initialized to '!|#~"*/+^-'.  Since this string is
     used to build a character alternative inside a regular expression,
     special characters '^' and '-' should come last.  Other characters
     like opening brace '{', asterisk '*' or at sign '@' should be
     avoided as they are not recognized by 'font-latex.el'.


File: auctex.info,  Node: Processor Options,  Prev: Selecting a Command,  Up: Commands

4.1.3 Options for TeX Processors
--------------------------------

There are some options you can customize affecting which processors are
invoked or the way this is done and which output they produce as a
result.  These options control if DVI or PDF output should be produced,
if TeX should be started in interactive or nonstop mode, if source
specials or a SyncTeX file should be produced for making inverse and
forward search possible or which TeX engine should be used instead of
regular TeX, like PDFTeX, Omega or XeTeX, and the style error messages
are printed with.

 -- Command: TeX-PDF-mode
     ('C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a
     buffer-local minor mode which is enabled by default.  You can
     customize 'TeX-PDF-mode' to give it a different default or set it
     as a file local variable on a per-document basis.  This option
     usually results in calling either PDFTeX or ordinary TeX.

 -- User Option: TeX-DVI-via-PDFTeX
     If this is set, DVI will also be produced by calling PDFTeX,
     setting '\pdfoutput=0'.  This makes it possible to use PDFTeX
     features like character protrusion even when producing DVI files.
     Contemporary TeX distributions do this anyway, so that you need not
     enable the option within AUCTeX.

 -- Command: TeX-interactive-mode
     ('C-c C-t C-i') This command toggles the interactive mode of
     AUCTeX, a global minor mode.  You can customize
     'TeX-interactive-mode' to give it a different default.  In
     interactive mode, TeX will pause with an error prompt when errors
     are encountered and wait for the user to type something.

 -- Command: TeX-source-correlate-mode
     ('C-c C-t C-s') Toggles support for forward and inverse search.
     Forward search refers to jumping to the place in the previewed
     document corresponding to where point is located in the document
     source and inverse search to the other way round.  *Note I/O
     Correlation::.

     You can permanently activate 'TeX-source-correlate-mode' by
     customizing the variable 'TeX-source-correlate-mode'.  There is a
     bunch of customization options for the mode, use 'M-x
     customize-group <RET> TeX-view <RET>' to find out more.

     AUCTeX is aware of three different means to do I/O correlation:
     source specials (only DVI output), the pdfsync LaTeX package (only
     PDF output) and SyncTeX.  The choice between source specials and
     SyncTeX can be controlled with the variable
     'TeX-source-correlate-method'.

     Should you use source specials it has to be stressed _very_
     strongly however, that source specials can cause differences in
     page breaks and spacing, can seriously interfere with various
     packages and should thus _never_ be used for the final version of a
     document.  In particular, fine-tuning the page breaks should be
     done with source specials switched off.

   Sometimes you are requested, by journal rules or packages, to compile
the document into DVI output.  Thus, if you want a PDF document in the
end you can either use XeTeX engine, see below for information about how
to set engines, or compile the document with 'tex' and then convert to
PDF with 'dvips'-'ps2pdf' before viewing it.  In addition, current
Japanese TeX engines cannot generate PDF directly so they rely on
DVI-to-PDF converters.  Usually 'dvipdfmx' command is used for this
purpose.  You can use the 'TeX-PDF-from-DVI' variable to let AUCTeX know
you want to generate the final PDF by converting a DVI file.

 -- User Option: TeX-PDF-from-DVI
     This option controls if and how to produce a PDF file by converting
     a DVI file.

     When 'TeX-PDF-mode' is non-nil, if 'TeX-PDF-from-DVI' is non-nil
     too the document is compiled to DVI instead of PDF.  When the
     document is ready, 'C-c C-c' will suggest to run the converter to
     PDF or an intermediate format.

     If non-nil, 'TeX-PDF-from-DVI' should be the name of the command in
     'TeX-command-list', as a string, used to convert the DVI file to
     PDF or to an intermediate format.  Values currently supported are:
        * '"Dvips"': the DVI file is converted to PS with 'dvips'.
          After successfully running it, 'ps2pdf' will be the default
          command to convert the PS file to PDF.
        * '"Dvipdfmx"': the DVI file is converted to PDF with
          'dvipdfmx'.
     (case is significant; note the uppercase 'D' in both strings) When
     the PDF file is finally ready, the next suggested command will be
     'View' to open the viewer.

     This option can also be set as a file local variable, in order to
     use this conversion on a per-document basis.

     Recall the whole sequence of 'C-c C-c' commands can be replaced by
     the single 'C-c C-a'.

   AUCTeX also allows you to easily select different TeX engines for
processing, either by using the entries in the 'TeXing Options' submenu
below the 'Command' menu or by calling the function 'TeX-engine-set'.
These eventually set the variable 'TeX-engine' which you can also modify
directly.

 -- User Option: TeX-engine
     This variable allows you to choose which TeX engine should be used
     for typesetting the document, i.e. the executables which will be
     used when you invoke the 'TeX' or 'LaTeX' commands.  The value
     should be one of the symbols defined in 'TeX-engine-alist-builtin'
     or 'TeX-engine-alist'.  The symbols 'default', 'xetex', 'luatex'
     and 'omega' are available from the built-in list.

   Note that 'TeX-engine' is buffer-local, so setting the variable
directly or via the above mentioned menu or function will not take
effect in other buffers.  If you want to activate an engine for all
AUCTeX modes, set 'TeX-engine' in your init file, e.g. by using 'M-x
customize-option <RET>'.  If you want to activate it for a certain
AUCTeX mode only, set the variable in the respective mode hook.  If you
want to activate it for certain files, set it through file variables
(*note (emacs)File Variables::).

   Should you need to change the executable names related to the
different engine settings, there are some variables you can tweak.
Those are 'TeX-command', 'LaTeX-command', 'TeX-Omega-command',
'LaTeX-Omega-command', 'ConTeXt-engine' and 'ConTeXt-Omega-engine'.  The
rest of the executables is defined directly in
'TeX-engine-alist-builtin'.  If you want to override an entry from that,
add an entry to 'TeX-engine-alist' that starts with the same symbol as
that the entry in the built-in list and specify the executables you want
to use instead.  You can also add entries to 'TeX-engine-alist' in order
to add support for engines not covered per default.

 -- User Option: TeX-engine-alist
     Alist of TeX engines and associated commands.  Each entry is a list
     with a maximum of five elements.  The first element is a symbol
     used to identify the engine.  The second is a string describing the
     engine.  The third is the command to be used for plain TeX.  The
     fourth is the command to be used for LaTeX.  The fifth is the
     command to be used for the '--engine' parameter of ConTeXt's
     'texexec' program.  Each command can either be a variable or a
     string.  An empty string or nil means there is no command
     available.

   In some systems, Emacs cannot inherit the 'PATH' environment variable
from the shell and thus AUCTeX may not be able to run TeX commands.
Before running them, AUCTeX checks if it is able to find those commands
and will warn you in case it fails.  You can skip this test by changing
the option 'TeX-check-TeX'.

 -- User Option: TeX-check-TeX
     If non-nil, AUCTeX will check if it is able to find a working TeX
     distribution before running TeX, LaTeX, ConTeXt, etc.  It actually
     checks if can run 'TeX-command' command or the shell returns a
     command not found error.  The error code returned by the shell in
     this case can be set in 'TeX-check-TeX-command-not-found' option.

   Some LaTeX packages requires the document to be compiled with a
specific engine.  Notable examples are 'fontspec' and 'polyglossia'
packages, which require LuaTeX and XeTeX engines.  If you try to compile
a document which loads one of such packages and the set engine is not
one of those allowed you will be asked to select a different engine
before running the LaTeX command.  If you do not want to be warned by
AUCTeX in these cases, customize the option 'TeX-check-engine'.

 -- User Option: TeX-check-engine
     This boolean option controls whether AUCTeX should check the
     correct engine has been set before running LaTeX commands.

   As shown above, AUCTeX handles in a special way most of the main
options that can be given to the TeX processors.  When you need to pass
to the TeX processor arbitrary options not handled by AUCTeX, you can
use the file local variable 'TeX-command-extra-options'.
 -- User Option: TeX-command-extra-options
     String with the extra options to be given to the TeX processor.
     For example, if you need to enable the shell escape feature to
     compile a document, add the following line to the list of local
     variables of the source file:
          %%% TeX-command-extra-options: "-shell-escape"
     By default this option is not safe as a file-local variable because
     a specially crafted document compiled with shell escape enabled can
     be used for malicious purposes.

   You can customize AUCTeX to show the processor output as it is
produced.

 -- User Option: TeX-show-compilation
     If non-nil, the output of TeX compilation is shown in another
     window.

   You can instruct TeX to print error messages in the form
'file:line:error' which is similar to the way many compilers format
them.

 -- User Option: TeX-file-line-error
     If non-nil, TeX will produce 'file:line:error' style error
     messages.

   ConTeXt users can choose between Mark II and Mark IV versions.  This
is controlled by 'ConTeXt-Mark-version' option.

 -- User Option: ConTeXt-Mark-version
     This variables specifies which version of Mark should be used.
     Values currently supported are '"II"', the default, and '"IV"'.  It
     can be set globally using customization interface or on a per-file
     basis, by specifying it as a file variable.


File: auctex.info,  Node: Viewing,  Next: Debugging,  Prev: Commands,  Up: Processing

4.2 Viewing the Formatted Output
================================

AUCTeX allows you to start external programs for previewing the
formatted output of your document.

* Menu:

* Starting Viewers::            Starting viewers
* I/O Correlation::             Forward and inverse search


File: auctex.info,  Node: Starting Viewers,  Next: I/O Correlation,  Up: Viewing

4.2.1 Starting Viewers
----------------------

Viewers are normally invoked by pressing 'C-c C-c' once the document is
formatted, which will propose the 'View' command, or by activating the
respective entry in the Command menu.  Alternatively you can type 'C-c
C-v' which calls the function 'TeX-view'.

 -- Command: TeX-view
     ('C-c C-v') Start a viewer without confirmation.  The viewer is
     started either on a region or the master file, depending on the
     last command issued.  This is especially useful for jumping to the
     location corresponding to point in the viewer when using
     'TeX-source-correlate-mode'.

   AUCTeX will try to guess which type of viewer (DVI, PostScript or
PDF) has to be used and what options are to be passed over to it.  This
decision is based on the output files present in the working directory
as well as the class and style options used in the document.  For
example, if there is a DVI file in your working directory, a DVI viewer
will be invoked.  In case of a PDF file it will be a PDF viewer.  If you
specified a special paper format like 'a5paper' or use the 'landscape'
option, this will be passed to the viewer by the appropriate options.
Especially some DVI viewers depend on this kind of information in order
to display your document correctly.  In case you are using 'pstricks' or
'psfrag' in your document, a DVI viewer cannot display the contents
correctly and a PostScript viewer will be invoked instead.

   The association between the tests for the conditions mentioned above
and the viewers is made in the variable 'TeX-view-program-selection'.
Therefore this variable is the starting point for customization if you
want to use other viewers than the ones suggested by default.

 -- User Option: TeX-view-program-selection
     This is a list of predicates and viewers which is evaluated from
     front to back in order to find out which viewer to call under the
     given conditions.  In the first element of each list item you can
     reference one or more predicates defined in
     'TeX-view-predicate-list' or 'TeX-view-predicate-list-builtin'.  In
     the second element you can reference a viewer defined in
     'TeX-view-program-list' or 'TeX-view-program-list-builtin'.  The
     viewer of the first item with a positively evaluated predicate is
     selected.

   So 'TeX-view-program-selection' only contains references to the
actual implementations of predicates and viewer commands respectively
which can be found elsewhere.  AUCTeX comes with a set of preconfigured
predicates and viewer commands which are stored in the variables
'TeX-view-predicate-list-builtin' and 'TeX-view-program-list-builtin'
respectively.  If you are not satisfied with those and want to overwrite
one of them or add your own definitions, you can do so via the variables
'TeX-view-predicate-list' and 'TeX-view-program-list'.

 -- User Option: TeX-view-predicate-list
     This is a list of predicates for viewer selection and invocation.
     The first element of each list item is a symbol and the second
     element a Lisp form to be evaluated.  The form should return nil if
     the predicate is not fulfilled.

     A built-in predicate from 'TeX-view-predicate-list-builtin' can be
     overwritten by defining a new predicate with the same symbol.

 -- User Option: TeX-view-program-list
     This is a list of viewer specifications each consisting of a
     symbolic name and either a command line or a function to be invoked
     when the viewer is called.  If a command line is used, parts of it
     can be conditionalized by prefixing them with predicates from
     'TeX-view-predicate-list' or 'TeX-view-predicate-list-builtin'.
     (See the doc string for the exact format to use.)  The command line
     can also contain placeholders as defined in 'TeX-expand-list' and
     'TeX-expand-list-builtin' which are expanded before the viewer is
     called.

     The third element of each item is a string, or a list of strings,
     with the name of the executable, or executables, needed to open the
     output file in the viewer.  Placeholders defined in
     'TeX-expand-list' and 'TeX-expand-list-builtin' can be used here.
     This element is optional and is used to check whether the viewer is
     actually available on the system.

     A built-in viewer spec from 'TeX-view-program-list-builtin' can be
     overwritten by defining a new viewer spec with the same name.

   After the viewer is called via either the 'View' command or the key
stroke 'C-c C-v', the window system focus goes and stays on the viewer.
If you prefer that the focus is pulled back to Emacs immediately after
that and you are using evince-compatible viewer, customize the option
'TeX-view-enince-keep-focus'.

 -- User Option: TeX-view-evince-keep-focus
     When this option is non-nil and the viewer is compatible with
     evince, the focus is pulled back to Emacs immediately after the
     viewer is invoked or refreshed from within AUCTeX.

   Note that the viewer selection and invocation as described above will
only work if certain default settings in AUCTeX are intact.  For one,
the whole viewer selection machinery will only be triggered if there is
no '%V' expander in 'TeX-expand-list'.  So if you have trouble with the
viewer invocation you might check if there is an older customization of
the variable in place.  In addition, the use of a function in
'TeX-view-program-list' only works if the 'View' command in
'TeX-command-list' makes use of the hook 'TeX-run-discard-or-function'.


File: auctex.info,  Node: I/O Correlation,  Prev: Starting Viewers,  Up: Viewing

4.2.2 Forward and Inverse Search
--------------------------------

Forward and inverse search refer to the correlation between the document
source in the editor and the typeset document in the viewer.  Forward
search allows you to jump to the place in the previewed document
corresponding to a certain line in the document source and inverse
search vice versa.

   AUCTeX supports three methods for forward and inverse search: source
specials (only DVI output), the pdfsync LaTeX package (only PDF output)
and SyncTeX (any type of output).  If you want to make use of forward
and inverse searching with source specials or SyncTeX, switch on
'TeX-source-correlate-mode'.  *Note Processor Options::, on how to do
that.  The use of the pdfsync package is detected automatically if
document parsing is enabled.  Customize the variable
'TeX-source-correlate-method' to select the method to use.

 -- User Option: TeX-source-correlate-method
     Method to use for enabling forward and inverse search.  This can be
     'source-specials' if source specials should be used, 'synctex' if
     SyncTeX should be used, or 'auto' if AUCTeX should decide.

     When the variable is set to 'auto', AUCTeX will always use SyncTeX
     if your 'latex' processor supports it, source specials otherwise.
     You must make sure your viewer supports the same method.

     It is also possible to specify a different method depending on the
     output, either DVI or PDF, by setting the variable to an alist of
     the kind
          ((dvi . '<source-specials or synctex>')
           (pdf . '<source-specials or synctex>'))
     in which the CDR of each entry is a symbol specifying the method to
     be used in the corresponding mode.  The default value of the
     variable is
          ((dvi . source-specials)
           (pdf . synctex))
     which is compatible with the majority of viewers.

   Forward search happens automatically upon calling the viewer, e.g. by
typing 'C-c C-v' ('TeX-view').  This will open the viewer or bring it to
front and display the output page corresponding to the position of point
in the source file.  AUCTeX will automatically pass the necessary
command line options to the viewer for this to happen.

   You can also make special mouse event do forward search at the
clicked position.  Use 'TeX-source-correlate-map'(1) and
'TeX-view-mouse' like this:
     (eval-after-load "tex"
       '(define-key TeX-source-correlate-map [C-down-mouse-1]
                    #'TeX-view-mouse))
   This example binds 'C-down-mouse-1', which usually opens a concise
menu to select buffer, to the command to do forward search.

   Upon opening the viewer you will be asked if you want to start a
server process (Gnuserv or Emacs server) which is necessary for inverse
search.  This happens only if there is no server running already.  You
can customize the variable 'TeX-source-correlate-start-server' to
inhibit the question and always or never start the server respectively.

 -- User Option: TeX-source-correlate-start-server
     If 'TeX-source-correlate-mode' is active and a viewer is invoked,
     the default behavior is to ask if a server process should be
     started.  Set this variable to 't' if the question should be
     inhibited and the server should always be started.  Set it to 'nil'
     if the server should never be started.  Inverse search will not be
     available in the latter case.

   Inverse search, i.e. jumping to the part of your document source in
Emacs corresponding to a certain position in the viewer, is triggered
from the viewer, typically by a mouse click.  Refer to the documentation
of your viewer to find out how it has to be configured and what you have
to do exactly.  In xdvi you normally have to use 'C-down-mouse-1'.

   Note that inverse search with the Evince PDF viewer or its MATE fork
Atril might fail in raising the Emacs frame after updating point in your
document's buffer.  There is simply no way to raise the Emacs frame
reliably accross different operating systems and different window
managers with their different focus stealing policies.  If the Emacs
frame is not raised after performing an inverse search from Evince or
Atril, you can customize the following option.

 -- User Option: TeX-raise-frame-function
     A function that will be called after performing an inverse search
     from Evince or Atril in order to raise the current Emacs frame.

     If your Emacs frame is already raised in that situation, just leave
     this variable set to its default value 'raise-frame'.  Otherwise,
     here are some alternative settings that work for some users.

          ;; Alternative 1: For some users, `x-focus-frame' works.
          (setq TeX-raise-frame-function #'x-focus-frame)

          ;; Alternative 2: Under GNOME 3.20 (and probably others), it
          ;; seems some focus stealing prevention policy prohibits that
          ;; some window gets the focus immediately after the user has
          ;; clicked in some other window.  Here waiting a bit before
          ;; issuing the request seems to work.
          (setq TeX-raise-frame-function
                (lambda ()
                  (run-at-time 0.5 nil #'x-focus-frame)))

          ;; Alternative 3: Use the external wmctrl tool in order to
          ;; force Emacs into the focus.
          (setq TeX-raise-frame-function
                (lambda ()
                  (call-process
                   "wmctrl" nil nil nil "-i" "-R"
                   (frame-parameter (selected-frame) 'outer-window-id))))

   ---------- Footnotes ----------

   (1) The keymap name is 'TeX-source-correlate-map', not
'TeX-source-correlate-mode-map'.  Actually, this keymap isn't
implemented as minor mode map of 'TeX-source-correlate-mode', in order
that its bindings don't affect buffers outside of AUCTeX.


File: auctex.info,  Node: Debugging,  Next: Checking,  Prev: Viewing,  Up: Processing

4.3 Catching the errors
=======================

Once you've formatted your document you may 'debug' it, i.e. browse
through the errors (La)TeX reported.  You may also have a look at a
nicely formatted list of all errors and warnings reported by the
compiler.

 -- Command: TeX-next-error ARG REPARSE
     ('C-c `') Go to the next error reported by TeX.  The view will be
     split in two, with the cursor placed as close as possible to the
     error in the top view.  In the bottom view, the error message will
     be displayed along with some explanatory text.

     An optional numeric ARG, positive or negative, specifies how many
     error messages to move.  A negative ARG means to move back to
     previous error messages, see also 'TeX-previous-error'.

     The optional REPARSE argument makes AUCTeX reparse the error
     message buffer and start the debugging from the first error.  This
     can also be achieved by calling the function with a prefix argument
     ('C-u').

 -- Command: TeX-previous-error ARG
     ('M-g p') Go to the previous error reported by TeX.  An optional
     numeric ARG specifies how many error messages to move backward.
     This is like calling 'TeX-next-error' with a negative argument.

   The command 'TeX-previous-error' works only if AUCTeX can parse the
whole TeX log buffer.  This is controlled by the 'TeX-parse-all-errors'
variable.

 -- User Option: TeX-parse-all-errors
     If t, AUCTeX automatically parses the whole output log buffer right
     after running a TeX command, in order to collect all warnings and
     errors.  This makes it possible to navigate back and forth between
     the error messages using 'TeX-next-error' and 'TeX-previous-error'.
     This is the default.  If nil, AUCTeX does not parse the whole
     output log buffer and 'TeX-previous-error' cannot be used.

   As default, AUCTeX will display a special help buffer containing the
error reported by TeX along with the documentation.  There is however an
'expert' option, which allows you to display the real TeX output.

 -- User Option: TeX-display-help
     If t AUCTeX will automatically display a help text whenever an
     error is encountered using 'TeX-next-error' ('C-c `').  If nil a
     terse information about the error is displayed in the echo area.
     If 'expert' AUCTeX will display the output buffer with the raw TeX
     output.

* Menu:

* Ignoring warnings::         Controlling warnings to be reported
* Error overview::            List of all errors and warnings


File: auctex.info,  Node: Ignoring warnings,  Next: Error overview,  Up: Debugging

4.3.1 Controlling warnings to be reported
-----------------------------------------

Normally AUCTeX will only report real errors, but you may as well ask it
to report 'bad boxes' and warnings as well.

 -- Command: TeX-toggle-debug-bad-boxes
     ('C-c C-t C-b') Toggle whether AUCTeX should stop at bad boxes
     (i.e. overfull and underfull boxes) as well as normal errors.  The
     boolean option 'TeX-debug-bad-boxes' is set accordingly.

 -- Command: TeX-toggle-debug-warnings
     ('C-c C-t C-w') Toggle whether AUCTeX should stop at warnings as
     well as normal errors.  The boolean option 'TeX-debug-warnings' is
     set accordingly.

   While many users desire to have warnings reported after compilation,
there are certain warnings that are considered unimportant and users
want to ignore them.  For a more fine-grained control of what kinds of
warnings should be shown after compilation, AUCTeX provides other
options.

 -- User Option: TeX-ignore-warnings
     Controls which warnings are to be ignored.

     It can be a regexp matching the message of the warnings to be
     ignored.

     More advanced users can set also this option to a symbol with the
     name of a custom function taking as arguments all the information
     of the warning listed in 'TeX-error-list' variable, except the last
     one about whether to ignore the warning.  See the code of
     'TeX-warning' function and the documentation of 'TeX-error-list'
     for more details.

 -- Command: TeX-toggle-suppress-ignored-warnings
     ('C-c C-t C-x') Toggle whether AUCTeX should actually hide the
     ignored warnings specified with 'TeX-ignore-warnings'.  The boolean
     option 'TeX-suppress-ignored-warnings' is set accordingly.  If this
     is nil, all warnings are shown, even those matched by
     'TeX-ignore-warnings', otherwise these are hidden.

     Note that 'TeX-debug-warnings' takes the precedence: if it is nil,
     all warnings are hidden in any case.


File: auctex.info,  Node: Error overview,  Prev: Ignoring warnings,  Up: Debugging

4.3.2 List of all errors and warnings
-------------------------------------

When the option 'TeX-parse-all-errors' is non-nil, you will be also able
to open an overview of all errors and warnings reported by the TeX
compiler.

 -- Command: TeX-error-overview
     Show an overview of the errors and warnings occurred in the last
     TeX run.

     In this window you can visit the error on which point is by
     pressing <RET>, and visit the next or previous issue by pressing
     <n> or <p> respectively.  A prefix argument to these keys specifies
     how many errors to move forward or backward.  You can visit an
     error also by clicking on its message.  Jump to error point in the
     source code with <j>, and use <l> see the error in the log buffer.
     In addition, you can toggle visibility of bad boxes, generic
     warnings, and ignored warnings with <b>, <w>, and <x>, respectively
     (see *note Ignoring warnings:: for details).  Press <q> to quit the
     overview.

 -- User Option: TeX-error-overview-open-after-TeX-run
     When this boolean variable is non-nil, the error overview will be
     automatically opened after running TeX if there are errors or
     warnings to show.

   The error overview is opened in a new window of the current frame by
default, but you can change this behavior by customizing the option
'TeX-error-overview-setup'.

 -- User Option: TeX-error-overview-setup
     Controls the frame setup of the error overview.  The possible value
     is: 'separate-frame'; with a nil value the current frame is used
     instead.

     The parameters of the separate frame can be set with the
     'TeX-error-overview-frame-parameters' option.

     If the display does not support multi frame, the current frame will
     be used regardless of the value of this variable.


File: auctex.info,  Node: Checking,  Next: Control,  Prev: Debugging,  Up: Processing

4.4 Checking for problems
=========================

Running TeX or LaTeX will only find regular errors in the document, not
examples of bad style.  Furthermore, description of the errors may often
be confusing.  The utilities 'lacheck' and 'chktex' can be used to find
style errors, such as forgetting to escape the space after an
abbreviation or using '...' instead of '\ldots' and other similar
problems.  You start 'lacheck' with 'C-c C-c Check <RET>' and 'chktex'
with 'C-c C-c ChkTeX <RET>'.  The result will be a list of errors in the
'*compilation*' buffer.  You can go through the errors with 'C-x `'
('next-error', *note (emacs)Compilation::), which will move point to the
location of the next error.

   Alternatively, you may want in-buffer notation.  AUCTeX provides
support for this using the Flymake package in Emacs 26 or newer (*note
(Flymake)Using Flymake:: for details).  To enable, call 'M-x
flymake-mode <RET>' in the buffer or enable it in all buffers by adding
this to your init file:
     (add-hook 'LaTeX-mode-hook #'flymake-mode)
   Note that AUCTeX currently only provides support for using 'chktex'
as the flymake backend.

   Each of the two utilities 'lacheck' and 'chktex' will find some
errors the other doesn't, but 'chktex' is more configurable, allowing
you to create your own errors.  You may need to install the programs
before using them.  You can get 'lacheck' from
URL:<https://www.ctan.org/pkg/lacheck> and 'chktex' from
URL:<https://www.ctan.org/pkg/chktex>.  TeX Live contains both.


File: auctex.info,  Node: Control,  Next: Cleaning,  Prev: Checking,  Up: Processing

4.5 Controlling the output
==========================

A number of commands are available for controlling the output of an
application running under AUCTeX

 -- Command: TeX-kill-job
     ('C-c C-k') Kill currently running external application.  This may
     be either of TeX, LaTeX, previewer, BibTeX, etc.

 -- Command: TeX-recenter-output-buffer
     ('C-c C-l') Recenter the output buffer so that the bottom line is
     visible.

 -- Command: TeX-home-buffer
     ('C-c ^') Go to the 'master' file in the document associated with
     the current buffer, or if already there, to the file where the
     current process was started.

   Additionally, output files produced by AUCTeX can be placed in a
separate directory.

 -- User Option: TeX-output-dir
     Set this option to the path of a directory where output files will
     be placed.  The output files include those that are produced by
     applications running under AUCTeX, temporary files related to
     region processing and the preview-latex files.  If a relative path
     is specified, it is interpreted as being relative to the master
     file in a mutlifile document.

     This is a buffer local variable and must be set separately for all
     documents and all files in a multifile document.  For example,

          %%% Local Variables:
          %%% mode: latex
          %%% TeX-output-dir: "build"
          %%% End:

     Alternatively, you may use 'setq-default' to set the default value
     of this option or set it as a directory local variable (*note
     (emacs)Directory Variables::).

     Note that a non-nil value of 'TeX-output-dir' might be incompatible
     with some TeX commands and macros.  In particular, the LaTeX macro
     '\include' is known to not work with this option.  Some TeX
     packages which produce intermediary files might also be
     incompatible.  A possible workaround for those packages is to
     append the value of 'TeX-output-dir' to the environment variables
     'TEXINPUTS' and 'BIBINPUTS'.


File: auctex.info,  Node: Cleaning,  Next: Documentation,  Prev: Control,  Up: Processing

4.6 Cleaning intermediate and output files
==========================================

 -- Command: TeX-clean
     Remove generated intermediate files.  In case a prefix argument is
     given, remove output files as well.

     Canonical access to the function is provided by the 'Clean' and
     'Clean All' entries in 'TeX-command-list', invokable with 'C-c C-c'
     or the Command menu.

     The patterns governing which files to remove can be adapted
     separately for each AUCTeX mode by means of the following
     variables:
        * 'plain-TeX-clean-intermediate-suffixes'
        * 'plain-TeX-clean-output-suffixes'
        * 'LaTeX-clean-intermediate-suffixes'
        * 'LaTeX-clean-output-suffixes'
        * 'docTeX-clean-intermediate-suffixes'
        * 'docTeX-clean-output-suffixes'
        * 'Texinfo-clean-intermediate-suffixes'
        * 'Texinfo-clean-output-suffixes'
        * 'ConTeXt-clean-intermediate-suffixes'
        * 'ConTeXt-clean-output-suffixes'
        * 'AmSTeX-clean-intermediate-suffixes'
        * 'AmSTeX-clean-output-suffixes'

 -- User Option: TeX-clean-confirm
     Control if deletion of intermediate and output files has to be
     confirmed before it is actually done.  If non-nil, ask before
     deleting files.


File: auctex.info,  Node: Documentation,  Prev: Cleaning,  Up: Processing

4.7 Documentation about macros and packages
===========================================

 -- Command: TeX-documentation-texdoc
     ('C-c ?') Get documentation about the packages installed on your
     system, using 'texdoc' to find the manuals.  The function will
     prompt for the name of packages.  If point is on a word, this will
     be suggested as default.

     If the command is called with a prefix argument, you will be shown
     a list of manuals of the given package among to choose.

     The command can be invoked by the key binding mentioned above as
     well as the 'Find Documentation...' entry in the mode menu.


File: auctex.info,  Node: Customization,  Next: Appendices,  Prev: Processing,  Up: Top

5 Customization and Extension
*****************************

* Menu:

* Modes and Hooks::             Modes and Hooks
* Multifile::                   Multifile Documents
* Parsing Files::               Automatic Parsing of TeX Files
* Internationalization::        Language Support
* Automatic::                   Automatic Customization
* Style Files::                 Writing Your Own Style Support


File: auctex.info,  Node: Modes and Hooks,  Next: Multifile,  Up: Customization

5.1 Modes and Hooks
===================

AUCTeX supports a wide variety of derivatives and extensions of TeX.
Besides plain TeX those are LaTeX, AMS-TeX, ConTeXt, Texinfo and docTeX.
For each of them there is a separate major mode in AUCTeX and each major
mode runs 'text-mode-hook', 'TeX-mode-hook' as well as a hook special to
the mode in this order.  (As an exception, Texinfo mode does not run
'TeX-mode-hook'.)  The following table provides an overview of the
respective mode functions and hooks.

Type        Mode function      Hook
-------------------------------------------------------
Plain TeX   'plain-tex-mode'   'plain-TeX-mode-hook'
LaTeX       'latex-mode'       'LaTeX-mode-hook'
AMS-TeX     'ams-tex-mode'     'AmS-TeX-mode-hook'
ConTeXt     'context-mode'     'ConTeXt-mode-hook'
Texinfo     'texinfo-mode'     'Texinfo-mode-hook'
DocTeX      'doctex-mode'      'docTeX-mode-hook'

   If you need to make a customization via a hook which is only relevant
for one of the modes listed above, put it into the respective mode hook,
if it is relevant for any AUCTeX mode, add it to 'TeX-mode-hook' and if
it is relevant for all text modes, append it to 'text-mode-hook'.

   Other useful hooks are listed below.

 -- Variable: TeX-after-compilation-finished-functions
     Hook which is run after the TeX/LaTeX processor has successfully
     finished compiling your document.  (*Note Processing::, for finding
     out how to compile your document.)  Each function in the hook is
     run with the compiled output document as its argument.

     This is useful for automatically refreshing the viewer after
     re-compilation especially when using Emacs viewers such as DocView
     or PDF Tools.  The function 'TeX-revert-document-buffer' can be
     added to the hook for this purpose.


File: auctex.info,  Node: Multifile,  Next: Parsing Files,  Prev: Modes and Hooks,  Up: Customization

5.2 Multifile Documents
=======================

You may wish to spread a document over many files (as you are likely to
do if there are multiple authors, or if you have not yet discovered the
power of the outline commands (*note Outline::)).  This can be done by
having a "master" file in which you include the various files with the
TeX macro '\input' or the LaTeX macro '\include'.  These files may also
include other files themselves.  However, to format the document you
must run the commands on the top level master file.

   When you, for example, ask AUCTeX to run a command on the master
file, it has no way of knowing the name of the master file.  By default,
it will assume that the current file is the master file.  If you insert
the following in your init file ('init.el' or '.emacs'), AUCTeX will use
a more advanced algorithm.

     (setq-default TeX-master nil) ; Query for master file.

   In this case, AUCTeX will ask for the name of the master file
associated with the buffer.  To avoid asking you again, AUCTeX will
automatically insert the name of the master file as a file variable
(*note (emacs)File Variables::).  You can also insert the file variable
yourself, by putting the following text at the end of your files.

     %%% Local Variables:
     %%% TeX-master: "master"
     %%% End:

   You should always set this variable to the name of the top level
document.  If you always use the same name for your top level documents,
you can set 'TeX-master' in your init file such as 'init.el' or
'.emacs'.

     (setq-default TeX-master "master") ; All master files called "master".

 -- User Option: TeX-master
     The master file associated with the current buffer.  If the file
     being edited is actually included from another file, then you can
     tell AUCTeX the name of the master file by setting this variable.
     If there are multiple levels of nesting, specify the top level
     file.

     If this variable is 'nil', AUCTeX will query you for the name.

     If the variable is 't', then AUCTeX will assume the file is a
     master file itself.

     If the variable is 'shared', then AUCTeX will query for the name,
     but will not change the file.

     If the variable is 'dwim', AUCTeX will try to avoid querying by
     attempting to "do what I mean"; and then change the file.

 -- User Option: TeX-one-master
     Regular expression matching ordinary TeX files.

     You should set this variable to match the name of all files, for
     which it is a good idea to append a 'TeX-master' file variable
     entry automatically.  When AUCTeX adds the name of the master file
     as a file variable, it does not need to ask next time you edit the
     file.

     If you dislike AUCTeX automatically modifying your files, you can
     set this variable to '"<none>"'.  By default, AUCTeX will modify
     any file with an extension of '.tex', '.texi' or '.dtx'.

 -- Command: TeX-master-file-ask
     ('C-c _') Query for the name of a master file and add the
     respective File Variables (*note (emacs)File Variables::) to the
     file for setting this variable permanently.

     AUCTeX will not ask for a master file when it encounters existing
     files.  This function shall give you the possibility to insert the
     variable manually.

   AUCTeX keeps track of macros, environments, labels, and style files
that are used in a given document.  For this to work with multifile
documents, AUCTeX has to have a place to put the information about the
files in the document.  This is done by having an 'auto' subdirectory
placed in the directory where your document is located.  Each time you
save a file, AUCTeX will write information about the file into the
'auto' directory.  When you load a file, AUCTeX will read the
information in the 'auto' directory about the file you loaded _and the
master file specified by 'TeX-master'_.  Since the master file (perhaps
indirectly) includes all other files in the document, AUCTeX will get
information from all files in the document.  This means that you will
get from each file, for example, completion for all labels defined
anywhere in the document.

   AUCTeX will create the 'auto' directory automatically if
'TeX-auto-save' is non-nil.  Without it, the files in the document will
not know anything about each other, except for the name of the master
file.  *Note Automatic Local::.

 -- Command: TeX-save-document
     ('C-c C-d') Save all buffers known to belong to the current
     document.

 -- User Option: TeX-save-query
     If non-nil, then query the user before saving each file with
     'TeX-save-document'.


File: auctex.info,  Node: Parsing Files,  Next: Internationalization,  Prev: Multifile,  Up: Customization

5.3 Automatic Parsing of TeX Files
==================================

AUCTeX depends heavily on being able to extract information from the
buffers by parsing them.  Since parsing the buffer can be somewhat slow,
the parsing is initially disabled.  You are encouraged to enable them by
adding the following lines to your init file such as 'init.el' or
'.emacs'.

     (setq TeX-parse-self t) ; Enable parse on load.
     (setq TeX-auto-save t) ; Enable parse on save.

   The latter command will make AUCTeX store the parsed information in
an 'auto' subdirectory in the directory each time the TeX files are
stored, *note Automatic Local::.  If AUCTeX finds the pre-parsed
information when loading a file, it will not need to reparse the buffer.
The information in the 'auto' directory is also useful for multifile
documents, *note Multifile::, since it allows each file to access the
parsed information from all the other files in the document.  This is
done by first reading the information from the master file, and then
recursively the information from each file stored in the master file.

   The variables can also be set on a per file basis, by changing the
file local variables.

     %%% Local Variables:
     %%% TeX-parse-self: t
     %%% TeX-auto-save: t
     %%% End:

   Even when you have disabled the automatic parsing, you can force the
generation of style information by pressing 'C-c C-n'.  This is often
the best choice, as you will be able to decide when it is necessary to
reparse the file.

 -- User Option: TeX-parse-self
     Parse file after loading it if no style hook is found for it.

 -- User Option: TeX-auto-save
     Automatically save style information when saving the buffer.

 -- Command: TeX-normal-mode ARG
     ('C-c C-n') Remove all information about this buffer, and apply the
     style hooks again.  Save buffer first including style information.
     With optional argument, also reload the style hooks.

   When AUCTeX saves your buffer, it can optionally convert all tabs in
your buffer into spaces.  Tabs confuse AUCTeX's error message parsing
and so should generally be avoided.  However, tabs are significant in
some environments, and so by default AUCTeX does not remove them.  To
convert tabs to spaces when saving a buffer, insert the following in
your init file such as 'init.el' or '.emacs':

     (setq TeX-auto-untabify t)

 -- User Option: TeX-auto-untabify
     Automatically remove all tabs from a file before saving it.

   Instead of disabling the parsing entirely, you can also speed it
significantly up by limiting the information it will search for (and
store) when parsing the buffer.  You can do this by setting the default
values for the buffer local variables 'TeX-auto-regexp-list' and
'TeX-auto-parse-length' in your init file such as 'init.el' or '.emacs'.

     ;; Only parse LaTeX class and package information.
     (setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list)
     ;; The class and package information is usually near the beginning.
     (setq-default TeX-auto-parse-length 2000)

   This example will speed the parsing up significantly, but AUCTeX will
no longer be able to provide completion for labels, macros,
environments, or bibitems specified in the document, nor will it know
what files belong to the document.

   These variables can also be specified on a per file basis, by
changing the file local variables.

     %%% Local Variables:
     %%% TeX-auto-regexp-list: TeX-auto-full-regexp-list
     %%% TeX-auto-parse-length: 999999
     %%% End:

 -- User Option: TeX-auto-regexp-list
     List of regular expressions used for parsing the current file.

 -- User Option: TeX-auto-parse-length
     Maximal length of TeX file that will be parsed.

   The pre-specified lists of regexps are defined below.  You can use
these before loading AUCTeX by quoting them, as in the example above.

 -- Constant: TeX-auto-empty-regexp-list
     Parse nothing

 -- Constant: LaTeX-auto-minimal-regexp-list
     Only parse LaTeX class and packages.

 -- Constant: LaTeX-auto-label-regexp-list
     Only parse LaTeX labels.

 -- Constant: LaTeX-auto-index-regexp-list
     Only parse LaTeX index and glossary entries.

 -- Constant: LaTeX-auto-class-regexp-list
     Only parse macros in LaTeX classes and packages.

 -- Constant: LaTeX-auto-pagestyle-regexp-list
     Only parse LaTeX pagestyles.

 -- Constant: LaTeX-auto-counter-regexp-list
     Only parse LaTeX counters.

 -- Constant: LaTeX-auto-length-regexp-list
     Only parse LaTeX lengths.

 -- Constant: LaTeX-auto-savebox-regexp-list
     Only parse LaTeX saveboxes.

 -- Constant: LaTeX-auto-regexp-list
     Parse common LaTeX commands.

 -- Constant: plain-TeX-auto-regexp-list
     Parse common plain TeX commands.

 -- Constant: TeX-auto-full-regexp-list
     Parse all TeX and LaTeX commands that AUCTeX can use.


File: auctex.info,  Node: Internationalization,  Next: Automatic,  Prev: Parsing Files,  Up: Customization

5.4 Language Support
====================

TeX and Emacs are usable for European (Latin, Cyrillic, Greek) based
languages.  Some LaTeX and EmacsLisp packages are available for easy
typesetting and editing documents in European languages.

   All Emacs versions supported by current AUCTeX can handle CJK
(Chinese, Japanese, and Korean) languages by default.

   In most cases, special versions of TeX engines are needed for
high-quality typesetting of CJK languages: CTeX and ChinaTeX for
Chinese, ASCII pTeX, upTeX and NTT jTeX for Japanese, HLaTeX and kTeX
for Korean.  They are necessary as well when you want to typeset
documents saved in their domestic encodings such as 'Shift-JIS'.
Currently, AUCTeX offers native support for pTeX, upTeX and jTeX only.

   If you don't need fine tuning in the result with respect to the
typesetting rules of their respective national standards, most unicode
based TeX engines, e.g. LuaTeX and XeTeX, can handle CJK languages by
default if they are encoded in UTF-8.  The CJK-LaTeX package is provided
for supporting CJK scripts in a standard LaTeX document.

* Menu:

* European::                    Using AUCTeX with European Languages
* Japanese::                    Using AUCTeX with Japanese


File: auctex.info,  Node: European,  Next: Japanese,  Up: Internationalization

5.4.1 Using AUCTeX with European Languages
------------------------------------------

5.4.1.1 Typing and Displaying Non-ASCII Characters
..................................................

First you will need a way to write non-ASCII characters.  You can either
use macros, or teach TeX about the ISO character sets.  I prefer the
latter, it has the advantage that the usual standard emacs word movement
and case change commands will work.

   Recommended encoding for LaTeX document is UTF-8.  Recent LaTeX2e has
native support for UTF-8.  If your LaTeX2e is not recent enough, just
add '\usepackage[utf8]{inputenc}'.

   You can still use ISO 8859 Latin 1 encoding with
'\usepackage[latin1]{inputenc}'.

   To be able to display non-ASCII characters you will need an
appropriate font.  All Emacs versions supported by current AUCTeX can
display 8-bit characters, provided that suitable fonts are installed.

   A compromise is to use an European character set when editing the
file, and convert to TeX macros when reading and writing the files.

'iso-cvt.el'
     Much like 'iso-tex.el' but is bundled with Emacs 19.23 and later.

'X-Symbol'
     a much more complete package for Emacs that can also handle a lot
     of mathematical characters and input methods.

5.4.1.2 Style Files for Different Languages
...........................................

AUCTeX supports style files for several languages.  Each style file may
modify AUCTeX to better support the language, and will run a language
specific hook that will allow you to for example change ispell
dictionary, or run code to change the keyboard remapping.  The following
will for example choose a Danish dictionary for documents including
'\usepackage[danish]{babel}'.  This requires parsing to be enabled,
*note Parsing Files::.

     (add-hook 'TeX-language-dk-hook
               (lambda () (ispell-change-dictionary "danish")))

   The following style files are recognized:

'brazilian'
'brazil'
     Runs style hook 'TeX-language-pt-br-hook'.  Gives '"' word syntax,
     makes the <"> key inserts '``' or '''' depending on context.
     Typing <"> twice will insert a literal '"'.  Typing <-> twice will
     insert '"=', three times '--'.

'bulgarian'
     Runs style hook 'TeX-language-bg-hook'.  Gives '"' word syntax,
     makes the <"> key insert a literal '"'.  Typing <"> twice will
     insert '"`' or '"'' depending on context.  Typing <-> twice will
     insert '"=', three times '--'.

'czech'
     Runs style hook 'TeX-language-cz-hook'.  Pressing <"> will insert
     '\uv{' and '}' depending on context.

'danish'
     Runs style hook 'TeX-language-dk-hook'.  Pressing <"> will insert
     '"`' and '"'' depending on context.  Typing <-> twice will insert
     '"=', i.e. a hyphen string allowing hyphenation in the composing
     words.

'dutch'
     Runs style hook 'TeX-language-nl-hook'.

'english'
'australian'
'canadian'
'newzealand'
     Runs style hook 'TeX-language-en-hook'.

'frenchb'
'francais'
     Runs style hook 'TeX-language-fr-hook'.  Pressing <"> will insert
     '\og' and '\fg' depending on context.  Note that the language name
     for customizing 'TeX-quote-language-alist' is 'french'.

'german'
'ngerman'
     Runs style hook 'TeX-language-de-hook'.  Gives '"' word syntax,
     makes the <"> key insert a literal '"'.  Pressing the key twice
     will give you opening or closing German quotes ('"`' or '"'').
     Typing <-> twice will insert '"=', three times '--'.

'icelandic'
     Runs style hook 'TeX-language-is-hook'.  Gives '"' word syntax,
     makes the <"> key insert a literal '"'.  Typing <"> twice will
     insert '"`' or '"'' depending on context.  Typing <-> twice will
     insert '"=', three times '--'.

'italian'
     Runs style hook 'TeX-language-it-hook'.  Pressing <"> will insert
     '"<' and '">' depending on context.

'polish'
     Runs style hook 'TeX-language-pl-hook'.  Gives '"' word syntax and
     makes the <"> key insert a literal '"'.  Pressing <"> twice will
     insert '"`' or '"'' depending on context.

'polski'
     Runs style hook 'TeX-language-pl-hook'.  Makes the <"> key insert a
     literal '"'.  Pressing <"> twice will insert ',,' or '''' depending
     on context.

'portuguese'
'portuges'
     Runs style hook 'TeX-language-pt-hook'.  Gives '"' word syntax,
     makes the <"> key inserts '"<' or '">' depending on context.
     Typing <"> twice will insert a literal '"'.  Typing <-> twice will
     insert '"=', three times '--'.  Note that the language name for
     customizing 'TeX-quote-language-alist' is 'portuguese'.

'slovak'
     Runs style hook 'TeX-language-sk-hook'.  Pressing <"> will insert
     '\uv{' and '}' depending on context.

'swedish'
     Runs style hook 'TeX-language-sv-hook'.  Pressing <"> will insert
     ''''.  Typing <-> twice will insert '"=', three times '--'.

   Replacement of language-specific hyphen strings like '"=' with dashes
does not require to type <-> three times in a row.  You can put point
after the hypen string anytime and trigger the replacement by typing
<->.

   In case you are not satisfied with the suggested behavior of quote
and hyphen insertion you can change it by customizing the variables
'TeX-quote-language-alist' and 'LaTeX-babel-hyphen-language-alist'
respectively.

 -- User Option: TeX-quote-language-alist
     Used for overriding the default language-specific quote insertion
     behavior.  This is an alist where each element is a list consisting
     of four items.  The first item is the name of the language in
     concern as a string.  See the list of supported languages above.
     The second item is the opening quotation mark.  The third item is
     the closing quotation mark.  Opening and closing quotation marks
     can be specified directly as strings or as functions returning a
     string.  The fourth item is a boolean controlling quote insertion.
     It should be non-nil if if the special quotes should only be used
     after inserting a literal '"' character first, i.e. on second key
     press.

 -- User Option: LaTeX-babel-hyphen-language-alist
     Used for overriding the behavior of hyphen insertion for specific
     languages.  Every element in this alist is a list of three items.
     The first item should specify the affected language as a string.
     The second item denotes the hyphen string to be used as a string.
     The third item, a boolean, controls the behavior of hyphen
     insertion and should be non-nil if the special hyphen should be
     inserted after inserting a literal '-' character, i.e. on second
     key press.

   The defaults of hyphen insertion are defined by the variables
'LaTeX-babel-hyphen' and 'LaTeX-babel-hyphen-after-hyphen' respectively.

 -- User Option: LaTeX-babel-hyphen
     String to be used when typing <->.  This usually is a hyphen
     alternative or hyphenation aid provided by 'babel' and the related
     language style files, like '"=', '"~' or '"-'.

     Set it to an empty string or nil in order to disable
     language-specific hyphen insertion.

 -- User Option: LaTeX-babel-hyphen-after-hyphen
     Control insertion of hyphen strings.  If non-nil insert normal
     hyphen on first key press and swap it with the language-specific
     hyphen string specified in the variable 'LaTeX-babel-hyphen' on
     second key press.  If nil do it the other way round.


File: auctex.info,  Node: Japanese,  Prev: European,  Up: Internationalization

5.4.2 Using AUCTeX with Japanese TeX
------------------------------------

To write Japanese text with AUCTeX, you need the versions of TeX and
Emacs that support Japanese.  AUCTeX supports three Japanese TeX engines
by default: NTT jTeX, ASCII pTeX and upTeX.

   Activate 'japanese-plain-tex-mode' or 'japanese-latex-mode' to use
the Japanese TeX engines.  If it doesn't work, send mail to Masayuki
Ataka <masayuki.ataka@gmail.com> or Ikumi Keita
<ikumikeita@jcom.home.ne.jp>, who currently concern with stuff related
to Japanese in AUCTeX.  None of the primary AUCTeX maintainers
understand Japanese, so they cannot help you.

   It is recommended to enable 'TeX-parse-self' for typical Japanese
LaTeX users.  When enabled, 'japanese-latex-mode' selects the suitable
Japanese TeX engine automatically based on the class file name (such as
'jbook', 'jsarticle' and 'tjreport') and its option.  *Note Parsing
Files::.

   It is important to select the suitable Japanese TeX engine because
the selected engine determines the command name such as 'platex' and
'uptex' to typeset the document.  If you find that wrong command is
used, check the value of 'TeX-engine' on that buffer.  If the value does
not suit the current document, change the value by the 'TeXing Options'
submenu below the 'Command' menu.  *Note Processor Options::.

   To make the selected engine to persist across Emacs sessions, there
are two ways from which you can choose one according to your needs:

  1. If you use a specific engine (almost) exclusively, customize the
     option 'japanese-TeX-engine-default'.

      -- User Option: japanese-TeX-engine-default
          The default 'TeX-engine' in Japanese TeX mode.

          The default value is 'ptex'.
  2. If you want to set the engine on a per file basis, use the file
     local variables to set 'TeX-engine'.

     Here is a sample code to set 'TeX-engine' to 'uptex':

          %%% Local Variables:
          %%% mode: japanese-latex
          %%% TeX-engine: uptex
          %%% End:

   In the both cases above, the valid value is one of 'ptex', 'jtex' and
'uptex'.

   You can override the command names associated with the above three
engines or define your own engine by customizing 'TeX-engine-alist'.
*Note Processor Options::.

   It is sometimes necessary to use an engine which differs from the one
AUCTeX selects automatically.  For example, even when you want to use
'j-article' document class deliberately with ASCII pLaTeX, AUCTeX
selects NTT jLaTeX command if 'TeX-parse-self' is enabled, because
'j-article' originally belongs to NTT jLaTeX.  In such cases, use the
file local variable method above to select the engine you intend to use.

   If you usually use AUCTeX in Japanese, setting the following
variables is useful.

 -- User Option: TeX-default-mode
     Mode to enter for a new file when it cannot be determined whether
     the file is plain TeX or LaTeX or what.

     If you want to enter Japanese LaTeX mode whenever this may happen,
     set the variable like this:
          (setq TeX-default-mode 'japanese-latex-mode)

 -- User Option: japanese-LaTeX-default-style
     The default style/class when creating a new Japanese LaTeX
     document.

     The default value is '"jarticle"'.

   It is recommended also for Japanese users to customize the option
'TeX-PDF-from-DVI' to '"Dvipdfmx"'.  *Note Processor Options::.

   There are three customize options with regard to the encoding of
Japanese text.

 -- User Option: japanese-TeX-use-kanji-opt-flag
     If non-nil, AUCTeX adds '-kanji' option to the typesetting command
     when 'TeX-engine' is 'ptex'.

   Usually AUCTeX guesses the right coding systems for input to and
output from the Japanese TeX process, but you can override them by the
following two customize options.

 -- User Option: TeX-japanese-process-input-coding-system
     If non-nil, used for encoding input to Japanese TeX process.  When
     'nil', AUCTeX tries to choose suitable coding system.

 -- User Option: TeX-japanese-process-output-coding-system
     If non-nil, used for decoding output from Japanese TeX process.
     When 'nil', AUCTeX tries to choose suitable coding system.

   The former customize options 'japanese-TeX-command-default',
'japanese-LaTeX-command-default' and 'japanese-TeX-command-list' are
removed from AUCTeX.  Use 'japanese-TeX-engine-default' instead.  If you
need to customize the executable file name such as '"latex"', the
options for them, or both, customize 'TeX-engine-alist'.

   The following two additional font commands are available in LaTeX
mode buffer.

'C-c C-f g'
     Insert gothic font command '\textgt{-!-}' or '\mathgt{-!-}'
     depending on the context.

'C-c C-f m'
     Insert mincho font command '\textmc{-!-}' or '\mathmc{-!-}'
     depending on the context.

   Although they are meaningful only with 'ptex' and 'uptex' engines, it
won't matter in buffers with other engines.

   See 'tex-jp.el' for more information.


File: auctex.info,  Node: Automatic,  Next: Style Files,  Prev: Internationalization,  Up: Customization

5.5 Automatic Customization
===========================

Since AUCTeX is so highly customizable, it makes sense that it is able
to customize itself.  The automatic customization consists of scanning
TeX files and extracting symbols, environments, and things like that.

   The automatic customization is done on three different levels.  The
global level is the level shared by all users at your site, and consists
of scanning the standard TeX style files, and any extra styles added
locally for all users on the site.  The private level deals with those
style files you have written for your own use, and use in different
documents.  You may have a '~/lib/TeX/' directory where you store useful
style files for your own use.  The local level is for a specific
directory, and deals with writing customization for the files for your
normal TeX documents.

   If compared with the environment variable 'TEXINPUTS', the global
level corresponds to the directories built into TeX.  The private level
corresponds to the directories you add yourself, except for '.', which
is the local level.

* Menu:

* Automatic Global::            Automatic Customization for the Site
* Automatic Private::           Automatic Customization for a User
* Automatic Local::             Automatic Customization for a Directory

   By default AUCTeX will search for customization files in all the
global, private, and local style directories, but you can also set the
path directly.  This is useful if you for example want to add another
person's style hooks to your path.  Please note that all matching files
found in 'TeX-style-path' are loaded, and all hooks defined in the files
will be executed.

 -- User Option: TeX-style-path
     List of directories to search for AUCTeX style files.

   By default, when AUCTeX searches a directory for files, it will
recursively search through subdirectories.

 -- User Option: TeX-file-recurse
     Whether to search TeX directories recursively: nil means do not
     recurse, a positive integer means go that far deep in the directory
     hierarchy, t means recurse indefinitely.

   By default, AUCTeX will ignore files named '.', '..', 'SCCS', 'RCS',
and 'CVS'.

 -- User Option: TeX-ignore-file
     Regular expression matching file names to ignore.

     These files or directories will not be considered when searching
     for TeX files in a directory.


File: auctex.info,  Node: Automatic Global,  Next: Automatic Private,  Up: Automatic

5.5.1 Automatic Customization for the Site
------------------------------------------

Assuming that the automatic customization at the global level was done
when AUCTeX was installed, your choice is now: will you use it?  If you
use it, you will benefit by having access to all the symbols and
environments available for completion purposes.  The drawback is slower
load time when you edit a new file and perhaps too many confusing
symbols when you try to do a completion.

   You can disable the automatic generated global style hooks by setting
the variable 'TeX-auto-global' to nil.

 -- User Option: TeX-macro-global
     Directories containing the site's TeX style files.

 -- User Option: TeX-style-global
     Directory containing hand generated TeX information.

     These correspond to TeX macros shared by all users of a site.

 -- User Option: TeX-auto-global
     Directory containing automatically generated information.

     For storing automatic extracted information about the TeX macros
     shared by all users of a site.


File: auctex.info,  Node: Automatic Private,  Next: Automatic Local,  Prev: Automatic Global,  Up: Automatic

5.5.2 Automatic Customization for a User
----------------------------------------

You should specify where you store your private TeX macros, so AUCTeX
can extract their information.  The extracted information will go to the
directories listed in 'TeX-auto-private'

   Use 'M-x TeX-auto-generate <RET>' to extract the information.

 -- User Option: TeX-macro-private
     Directories where you store your personal TeX macros.  The value
     defaults to the directories listed in the 'TEXINPUTS' and
     'BIBINPUTS' environment variables or to the respective directories
     in '$TEXMFHOME' of 'kpsewhich' setting if no results can be
     obtained from the environment variables.

 -- User Option: TeX-auto-private
     List of directories containing automatically generated AUCTeX style
     files.  These correspond to the personal TeX macros.

 -- Command: TeX-auto-generate TEX AUTO
     ('M-x TeX-auto-generate <RET>') Generate style hook for TEX and
     store it in AUTO.  If TEX is a directory, generate style hooks for
     all files in the directory.

 -- User Option: TeX-style-private
     List of directories containing hand generated AUCTeX style files.
     These correspond to the personal TeX macros.


File: auctex.info,  Node: Automatic Local,  Prev: Automatic Private,  Up: Automatic

5.5.3 Automatic Customization for a Directory
---------------------------------------------

AUCTeX can update the style information about a file each time you save
it, and it will do this if the directory 'TeX-auto-local' exists.
'TeX-auto-local' is by default set to '"auto"', so simply creating an
'auto' directory will enable automatic saving of style information.

   The advantage of doing this is that macros, labels, etc. defined in
any file in a multifile document will be known in all the files in the
document.  The disadvantage is that saving will be slower.  To disable,
set 'TeX-auto-local' to nil.

 -- User Option: TeX-style-local
     Directory containing hand generated TeX information.

     These correspond to TeX macros found in the current directory.

 -- User Option: TeX-auto-local
     Directory containing automatically generated TeX information.

     These correspond to TeX macros found in the current directory.


File: auctex.info,  Node: Style Files,  Prev: Automatic,  Up: Customization

5.6 Writing Your Own Style Support
==================================

*Note Automatic::, for a discussion about automatically generated
global, private, and local style files.  The hand generated style files
are equivalent, except that they by default are found in 'style'
directories instead of 'auto' directories.

* Menu:

* Simple Style::                A Simple Style File
* Adding Macros::               Adding Support for Macros
* Adding Environments::         Adding Support for Environments
* Adding Other::                Adding or Examining Other Information
* Hacking the Parser::          Automatic Extraction of New Things

   If you write some useful support for a public TeX style file, please
send it to us.


File: auctex.info,  Node: Simple Style,  Next: Adding Macros,  Up: Style Files

5.6.1 A Simple Style File
-------------------------

Here is a simple example of a style file.

     ;;; book.el - Special code for book style.

     (TeX-add-style-hook
      "book"
      (lambda ()
        (LaTeX-largest-level-set "part"))
      TeX-dialect)

   The example is from the AUCTeX sources and is loaded for any LaTeX
document using the book document class (or style before LaTeX2e).  (Note
that the above code is much simplified for explanatory purpose.)  The
file specifies that the largest kind of section in such a document is
'part'.  The interesting thing to notice is that the style file defines
an (anonymous) function, and adds it to the list of loaded style hooks
by calling 'TeX-add-style-hook'.

   The first time the user indirectly tries to access some
style-specific information, such as the largest sectioning command
available, the style hooks for all files directly or indirectly read by
the current document are executed.  The actual files will only be
evaluated once, but the hooks will be called for each buffer using the
style file.

   Note that the basename of the style file and the name of the style
hook should usually be identical.

 -- Function: TeX-add-style-hook STYLE HOOK &optional DIALECT-EXPR
     Add HOOK to the list of functions to run when we use the TeX file
     STYLE and the current dialect is one in the set derived from
     DIALECT-EXPR.  When DIALECT-EXPR is omitted, then HOOK is allowed
     to be run whatever the current dialect is.

     DIALECT-EXPR may be one of:

        * A symbol indicating a singleton containing one basic TeX
          dialect, this symbol shall be selected among:
          ':latex'
               For all files in LaTeX mode, or any mode derived thereof.
          ':bibtex'
               For all files in BibTeX mode, or any mode derived
               thereof.
          ':texinfo'
               For all files in Texinfo mode.
          ':plain-tex'
               For all files in plain-TeX mode, or any mode derived
               thereof.
          ':context'
               For all files in ConTeXt mode.
          ':classopt'
               For class options of LaTeX document.  This is provided as
               pseudo-dialect for style hooks associated with class
               options.
        * A logical expression like:
          '(or DIALECT-EXPRESSION1 ... DIALECT-EXPRESSION_N)'
               For union of the sets of dialects corresponding to
               DIALECT-EXPRESSION1 through DIALECT-EXPRESSION_N
          '(and DIALECT-EXPRESSION1 ... DIALECT-EXPRESSION_N)'
               For intersection of the sets of dialects corresponding to
               DIALECT-EXPRESSION1 through DIALECT-EXPRESSION_N
          '(nor DIALECT-EXPRESSION1 ... DIALECT-EXPRESSION_N)'
               For complement of the union sets of dialects
               corresponding to DIALECT-EXPRESSION1 through
               DIALECT-EXPRESSION_N relatively to the set of all
               supported dialects
          '(not DIALECT-EXPR)'
               For complement set of dialect corresponding to
               DIALECT-EXPR relatively to the set of all supported
               dialects

   In case of adding a style hook for LaTeX, when calling function
'TeX-add-style-hook' it is thought more futureproof for argument
DIALECT-EXPR to pass constant 'TeX-dialect' currently defined to
':latex', rather than passing ':latex' directly.

 -- Constant: TeX-dialect
     Default dialect for use with function 'TeX-add-style-hook' for
     argument DIALECT-EXPR when the hook is to be run only on LaTeX
     file, or any mode derived thereof.


File: auctex.info,  Node: Adding Macros,  Next: Adding Environments,  Prev: Simple Style,  Up: Style Files

5.6.2 Adding Support for Macros
-------------------------------

The most common thing to define in a style hook is new symbols (TeX
macros).  Most likely along with a description of the arguments to the
function, since the symbol itself can be defined automatically.

   Here are a few examples from 'latex.el'.

     (TeX-add-style-hook
      "latex"
      (lambda ()
        (TeX-add-symbols
         '("arabic" TeX-arg-counter)
         '("label" TeX-arg-define-label)
         '("ref" TeX-arg-ref)
         '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t)
         '("newtheorem" TeX-arg-define-environment
           [ TeX-arg-environment "Numbered like" ]
           t [ TeX-arg-counter "Within counter" ]))))

 -- Function: TeX-add-symbols SYMBOL ...
     Add each SYMBOL to the list of known symbols.

   Each argument to 'TeX-add-symbols' is a list describing one symbol.
The head of the list is the name of the symbol, the remaining elements
describe each argument.

   If there are no additional elements, the symbol will be inserted with
point inside braces.  Otherwise, each argument of this function should
match an argument of the TeX macro.  What is done depends on the
argument type.

   If a macro is defined multiple times, AUCTeX will choose the one with
the longest definition (i.e. the one with the most arguments).

   Thus, to overwrite
             '("tref" 1) ; one argument
   you can specify
             '("tref" TeX-arg-ref ignore) ; two arguments

   'ignore' is a function that does not do anything, so when you insert
a 'tref' you will be prompted for a label and no more.

   You can use the following types of specifiers for arguments:

'string'
     Use the string as a prompt to prompt for the argument.

'number'
     Insert that many braces, leave point inside the first.  0 and -1
     are special.  0 means that no braces are inserted.  -1 means that
     braces are inserted around the macro and an active region (e.g.
     '{\tiny foo}').  If there is no active region, no braces are
     inserted.

'nil'
     Insert empty braces.

't'
     Insert empty braces, leave point between the braces.

'other symbols'
     Call the symbol as a function.  You can define your own hook, or
     use one of the predefined argument hooks.

'list'
     If the car is a string, insert it as a prompt and the next element
     as initial input.  Otherwise, call the car of the list with the
     remaining elements as arguments.

'vector'
     Optional argument.  If it has more than one element, parse it as a
     list, otherwise parse the only element as above.  Use square
     brackets instead of curly braces, and is not inserted on empty user
     input.

   A lot of argument hooks have already been defined.  The first
argument to all hooks is a flag indicating if it is an optional
argument.  It is up to the hook to determine what to do with the
remaining arguments, if any.  Typically the next argument is used to
overwrite the default prompt.

'TeX-arg-conditional'
     Implements if EXPR THEN ELSE.  If EXPR evaluates to true, parse
     THEN as an argument list, else parse ELSE as an argument list.

'TeX-arg-literal'
     Insert its arguments into the buffer.  Used for specifying extra
     syntax for a macro.

'TeX-arg-free'
     Parse its arguments but use no braces when they are inserted.

'TeX-arg-eval'
     Evaluate arguments and insert the result in the buffer.

'TeX-arg-label'
     Prompt for a label completing with known labels.  If RefTeX is
     active, prompt for the reference format.

'TeX-arg-ref'
     Prompt for a label completing with known labels.  If RefTeX is
     active, do not prompt for the reference format.  Usually, reference
     macros should use this function instead of 'TeX-arg-label'.

'TeX-arg-index-tag'
     Prompt for an index tag.  This is the name of an index, not the
     entry.

'TeX-arg-index'
     Prompt for an index entry completing with known entries.

'TeX-arg-length'
     Prompt for a LaTeX length completing with known lengths.

'TeX-arg-macro'
     Prompt for a TeX macro with completion.

'TeX-arg-date'
     Prompt for a date, defaulting to the current date.  The format of
     the date is specified by the 'TeX-date-format' option.  If you want
     to change the format when the 'babel' package is loaded with a
     specific language, set 'TeX-date-format' inside the appropriate
     language hook (for details *note European::).

'TeX-arg-version'
     Prompt for the version of a file, using as initial input the
     current date.

'TeX-arg-environment'
     Prompt for a LaTeX environment with completion.

'TeX-arg-cite'
     Prompt for a BibTeX citation.  If the variable
     'TeX-arg-cite-note-p' is non-nil, ask also for optional note in
     citations.

'TeX-arg-counter'
     Prompt for a LaTeX counter completing with known counters.

'TeX-arg-savebox'
     Prompt for a LaTeX savebox completing with known saveboxes.

'TeX-arg-file'
     Prompt for a filename in the current directory, and use it with the
     extension.

'TeX-arg-file-name'
     Prompt for a filename and use as initial input the name of the file
     being visited in the current buffer, with extension.

'TeX-arg-file-name-sans-extension'
     Prompt for a filename and use as initial input the name of the file
     being visited in the current buffer, without extension.

'TeX-arg-input-file'
     Prompt for the name of an input file in TeX's search path, and use
     it without the extension.  Run the style hooks for the file.  (Note
     that the behavior (type of prompt and inserted file name) of the
     function can be controlled by the variable
     'TeX-arg-input-file-search'.)

'TeX-arg-define-label'
     Prompt for a label completing with known labels.  Add label to list
     of defined labels.

'TeX-arg-define-length'
     Prompt for a LaTeX length completing with known lengths.  Add
     length to list of defined lengths.

'TeX-arg-define-macro'
     Prompt for a TeX macro with completion.  Add macro to list of
     defined macros.

'TeX-arg-define-environment'
     Prompt for a LaTeX environment with completion.  Add environment to
     list of defined environments.

'TeX-arg-define-cite'
     Prompt for a BibTeX citation.

'TeX-arg-define-counter'
     Prompt for a LaTeX counter.

'TeX-arg-define-savebox'
     Prompt for a LaTeX savebox.

'TeX-arg-document'
     Prompt for a LaTeX document class, using 'LaTeX-default-style' as
     default value and 'LaTeX-default-options' as default list of
     options.  If the variable 'TeX-arg-input-file-search' is t, you
     will be able to complete with all LaTeX classes available on your
     system, otherwise classes listed in the variable 'LaTeX-style-list'
     will be used for completion.  It is also provided completion for
     options of many common classes.

'LaTeX-arg-usepackage'
     Prompt for LaTeX packages.  If the variable
     'TeX-arg-input-file-search' is t, you will be able to complete with
     all LaTeX packages available on your system.  It is also provided
     completion for options of many common packages.

'TeX-arg-bibstyle'
     Prompt for a BibTeX style file completing with all style available
     on your system.

'TeX-arg-bibliography'
     Prompt for BibTeX database files completing with all databases
     available on your system.

'TeX-arg-corner'
     Prompt for a LaTeX side or corner position with completion.

'TeX-arg-lr'
     Prompt for a LaTeX side with completion.

'TeX-arg-tb'
     Prompt for a LaTeX side with completion.

'TeX-arg-pagestyle'
     Prompt for a LaTeX pagestyle with completion.

'TeX-arg-verb'
     Prompt for delimiter and text.

'TeX-arg-verb-delim-or-brace'
     Prompt for delimiter and text.  This function is similar to
     'TeX-arg-verb', but is intended for macros which take their
     argument enclosed in delimiters or in braces.

'TeX-arg-pair'
     Insert a pair of numbers, use arguments for prompt.  The numbers
     are surrounded by parentheses and separated with a comma.

'TeX-arg-size'
     Insert width and height as a pair.  No arguments.

'TeX-arg-coordinate'
     Insert x and y coordinates as a pair.  No arguments.

'LaTeX-arg-author'
     Prompt for document author, using 'LaTeX-default-author' as initial
     input.

'TeX-read-hook'
     Prompt for a LaTeX hook and return it.

'TeX-arg-hook'
     Prompt for a LaTeX hook and insert it as a TeX macro argument.

'TeX-read-key-val'
     Prompt for a 'key=value' list of options and return them.

'TeX-arg-key-val'
     Prompt for a 'key=value' list of options and insert it as a TeX
     macro argument.

   If you add new hooks, you can assume that point is placed directly
after the previous argument, or after the macro name if this is the
first argument.  Please leave point located after the argument you are
inserting.  If you want point to be located somewhere else after all
hooks have been processed, set the value of 'TeX-exit-mark'.  It will
point nowhere, until the argument hook sets it.

   Some packages provide macros that are rarely useful to non-expert
users.  Those should be marked as expert macros using
'TeX-declare-expert-macros'.

 -- Function: TeX-declare-expert-macros STYLE MACROS...
     Declare MACROS as expert macros of STYLE.

     Expert macros are completed depending on
     'TeX-complete-expert-commands'.


File: auctex.info,  Node: Adding Environments,  Next: Adding Other,  Prev: Adding Macros,  Up: Style Files

5.6.3 Adding Support for Environments
-------------------------------------

Adding support for environments is very much like adding support for TeX
macros, except that each environment normally only takes one argument,
an environment hook.  The example is again a short version of
'latex.el'.

     (TeX-add-style-hook
      "latex"
      (lambda ()
        (LaTeX-add-environments
         '("document" LaTeX-env-document)
         '("enumerate" LaTeX-env-item)
         '("itemize" LaTeX-env-item)
         '("list" LaTeX-env-list))))

   It is completely up to the environment hook to insert the
environment, but the function 'LaTeX-insert-environment' may be of some
help.  The hook will be called with the name of the environment as its
first argument, and extra arguments can be provided by adding them to a
list after the hook.

   For simple environments with arguments, for example defined with
'\newenvironment', you can make AUCTeX prompt for the arguments by
giving the prompt strings in the call to 'LaTeX-add-environments'.  The
fact that an argument is optional can be indicated by wrapping the
prompt string in a vector.

   For example, if you have defined a 'loop' environment with the three
arguments FROM, TO, and STEP, you can add support for them in a style
file.

     %% loop.sty

     \newenvironment{loop}[3]{...}{...}

     ;; loop.el

     (TeX-add-style-hook
      "loop"
      (lambda ()
        (LaTeX-add-environments
         '("loop" "From" "To" "Step"))))

   If an environment is defined multiple times, AUCTeX will choose the
one with the longest definition.  Thus, if you have an enumerate style
file, and want it to replace the standard LaTeX enumerate hook above,
you could define an 'enumerate.el' file as follows, and place it in the
appropriate style directory.

     (TeX-add-style-hook
      "latex"
      (lambda ()
        (LaTeX-add-environments
         '("enumerate" LaTeX-env-enumerate foo))))

     (defun LaTeX-env-enumerate (environment &optional _ignore) ...)

   The symbol 'foo' will be passed to 'LaTeX-env-enumerate' as the
second argument, but since we only added it to overwrite the definition
in 'latex.el' it is just ignored.

 -- Function: LaTeX-add-environments ENV ...
     Add each ENV to list of loaded environments.

 -- Function: LaTeX-insert-environment ENV [ EXTRA ]
     Insert environment of type ENV, with optional argument EXTRA.

   Following is a list of available hooks for 'LaTeX-add-environments':

'LaTeX-env-item'
     Insert the given environment and the first item.

'LaTeX-env-figure'
     Insert the given figure-like environment with a caption and a
     label.

'LaTeX-env-array'
     Insert the given array-like environment with position and column
     specifications.

'LaTeX-env-label'
     Insert the given environment with a label.

'LaTeX-env-list'
     Insert the given list-like environment, a specifier for the label
     and the first item.

'LaTeX-env-minipage'
     Insert the given minipage-like environment with position and width
     specifications.

'LaTeX-env-tabular*'
     Insert the given tabular*-like environment with width, position and
     column specifications.

'LaTeX-env-picture'
     Insert the given environment with width and height specifications.

'LaTeX-env-bib'
     Insert the given environment with a label for a bibitem.

'LaTeX-env-contents'
     Insert the given environment with a filename as its argument.

'LaTeX-env-args'
     Insert the given environment with arguments.  You can use this as a
     hook in case you want to specify multiple complex arguments just
     like in elements of 'TeX-add-symbols'.  This is most useful if the
     specification of arguments to be prompted for with strings and
     strings wrapped in a vector as described above is too limited.

     Here is an example from 'listings.el' which calls a function with
     one argument in order to prompt for a 'key=value' list to be
     inserted as an optional argument of the 'lstlisting' environment:

          (LaTeX-add-environments
           '("lstlisting" LaTeX-env-args
             [TeX-arg-key-val LaTeX-listings-key-val-options]))

   Some packages provide environments that are rarely useful to
non-expert users.  Those should be marked as expert environments using
'LaTeX-declare-expert-environments'.

 -- Function: LaTeX-declare-expert-environments STYLE ENVIRONMENTS...
     Declare ENVIRONMENTS as expert environments of STYLE.

     Expert environments are completed depending on
     'TeX-complete-expert-commands'.


File: auctex.info,  Node: Adding Other,  Next: Hacking the Parser,  Prev: Adding Environments,  Up: Style Files

5.6.4 Adding or Examining Other Information
-------------------------------------------

5.6.4.1 Adding bibliographies in style hooks
............................................

You can also specify bibliographical databases and labels in the style
file.  This is probably of little use, since this information will
usually be automatically generated from the TeX file anyway.

 -- Function: LaTeX-add-bibliographies BIBLIOGRAPHY ...
     Add each BIBLIOGRAPHY to list of loaded bibliographies.

 -- Function: LaTeX-add-labels LABEL ...
     Add each LABEL to the list of known labels.

5.6.4.2 Examining Package/Class Options
.......................................

In LaTeX documents, style hooks can find the package names and those
options given as optional argument(s) of '\usepackage' in
'LaTeX-provided-package-options'.

 -- Variable: LaTeX-provided-package-options
     Buffer local variable holding alist of options provided to LaTeX
     packages.  Each element is a cons cell '(PACKAGE . OPTION-LIST)'.
     For example, its value will be
            (("babel" . ("german"))
             ("geometry" . ("a4paper" "top=2cm" "left=2.5cm" "right=2.5cm"))
             ...)

   You can examine whether there is a specific package-option pair by
'LaTeX-provided-package-options-member'.

 -- Function: LaTeX-provided-package-options-member PACKAGE OPTION
     Return non-'nil' if OPTION has been given to PACKAGE.  The value is
     actually the tail of the list of options given to PACKAGE.

   There are similar facilities for class names and those options given
in '\documentclass' declaration.

 -- Variable: LaTeX-provided-class-options
     Buffer local variable holding alist of options provided to LaTeX
     classes.  Each element is a cons cell '(CLASS . OPTION-LIST)'.  For
     example, its value will be
            (("book" . ("a4paper" "11pt" "openany" "fleqn"))
             ...)

 -- Function: LaTeX-provided-class-options-member CLASS OPTION
     Return non-'nil' if OPTION has been given to CLASS.  The value is
     actually the tail of the list of options given to CLASS.

 -- Function: LaTeX-match-class-option REGEXP
     Check if a documentclass option matching REGEXP is active.  Return
     first found class option matching REGEXP, or nil if not found.

   These functions are also useful to implement customized predicate(s)
in 'TeX-view-predicate-list'.  *Note Starting Viewers::.

5.6.4.3 Adding Support for Option Completion
............................................

When the user inserts '\usepackage' by 'C-c C-m', AUCTeX asks for the
optional arguments after the package name is given.  The style file of
that package can provide completion support for the optional arguments.

 -- Variable: LaTeX-PACKAGENAME-package-options
     List of optional arguments available for the package.

   Here is an excerption from 'acronym.el':
     (defvar LaTeX-acronym-package-options
       '("footnote" "nohyperlinks" "printonlyused" "withpage"
         "smaller" "dua" "nolist")
       "Package options for the acronym package.")

   When the package accepts key-value style optional arguments, more
sophisticated completion support is needed.  The package style file can
provide dynamic completion support by custom elisp function.

 -- Function: LaTeX-PACKAGENAME-package-options
     This function should ask the user for optional arguments and return
     them as a string, instead of built-in option query facility.  When
     this function is defined, AUCTeX calls it with no argument.

   Here is an excerption from 'acro.el':
     (defun LaTeX-acro-package-options ()
       "Prompt for package options for the acro package."
       (TeX-read-key-val t LaTeX-acro-package-options-list))

   As you can see in the above example, a utility function
'TeX-read-key-val' is available to read key-value pair(s) from users.

   Note that 'defvar' or 'defun' of 'LaTeX-PACKAGENAME-package-options'
should be at the top level of the style file and not inside the style
hook, because the style hook is not yet called when the user inputs the
optional arguments in response to 'C-c C-m'.

   There are similar facilities for class options.  When the user
inserts '\documentclass' by 'C-c C-e', the respective class style file
can provide completion support for the optional arguments.

 -- Variable: LaTeX-CLASSNAME-class-options
     List of optional arguments available for the class.

 -- Function: LaTeX-CLASSNAME-class-options
     Which see.


File: auctex.info,  Node: Hacking the Parser,  Prev: Adding Other,  Up: Style Files

5.6.5 Automatic Extraction of New Things
----------------------------------------

The automatic TeX information extractor works by searching for regular
expressions in the TeX files, and storing the matched information.  You
can add support for new constructs to the parser, something that is
needed when you add new commands to define symbols.

   For example, in the file 'macro.tex' I define the following macro.

     \newcommand{\newmacro}[5]{%
     \def#1{#3\index{#4@#5~cite{#4}}\nocite{#4}}%
     \def#2{#5\index{#4@#5~cite{#4}}\nocite{#4}}%
     }

   AUCTeX will automatically figure out that 'newmacro' is a macro that
takes five arguments.  However, it is not smart enough to automatically
see that each time we use the macro, two new macros are defined.  We can
specify this information in a style hook file.

     ;;; macro.el --- Special code for my own macro file.

     ;;; Code:

     (defvar TeX-newmacro-regexp
       '("\\\\newmacro{\\\\\\([a-zA-Z]+\\)}{\\\\\\([a-zA-Z]+\\)}"
         (1 2) TeX-auto-multi)
       "Matches \\newmacro definitions.")

     (defvar TeX-auto-multi nil
       "Temporary for parsing \\newmacro definitions.")

     (defun TeX-macro-cleanup ()
       "Move symbols from `TeX-auto-multi' to `TeX-auto-symbol'."
       (mapc (lambda (list)
               (mapc (lambda (symbol)
                       (setq TeX-auto-symbol
                             (cons symbol TeX-auto-symbol)))
                     list))
             TeX-auto-multi))

     (defun TeX-macro-prepare ()
       "Clear `Tex-auto-multi' before use."
       (setq TeX-auto-multi nil))

     (add-hook 'TeX-auto-prepare-hook #'TeX-macro-prepare)
     (add-hook 'TeX-auto-cleanup-hook #'TeX-macro-cleanup)

     (TeX-add-style-hook
      "macro"
      (lambda ()
        (TeX-auto-add-regexp TeX-newmacro-regexp)
        (TeX-add-symbols '("newmacro"
                           TeX-arg-macro
                           (TeX-arg-macro "Capitalized macro: \\")
                           t
                           "BibTeX entry: "
                           nil))))

     ;;; macro.el ends here

   When this file is first loaded, it adds a new entry to
'TeX-newmacro-regexp', and defines a function to be called before the
parsing starts, and one to be called after the parsing is done.  It also
declares a variable to contain the data collected during parsing.
Finally, it adds a style hook which describes the 'newmacro' macro, as
we have seen it before.

   So the general strategy is: Add a new entry to 'TeX-newmacro-regexp'.
Declare a variable to contain intermediate data during parsing.  Add
hook to be called before and after parsing.  In this case, the hook
before parsing just initializes the variable, and the hook after parsing
collects the data from the variable, and adds them to the list of
symbols found.

 -- Variable: TeX-auto-regexp-list
     List of regular expressions matching TeX macro definitions.

     The list has the following format ((REGEXP MATCH TABLE) ...), that
     is, each entry is a list with three elements.

     REGEXP.  Regular expression matching the macro we want to parse.

     MATCH.  A number or list of numbers, each representing one
     parenthesized subexpression matched by REGEXP.

     TABLE.  The symbol table to store the data.  This can be a
     function, in which case the function is called with the argument
     MATCH.  Use 'TeX-match-buffer' to get match data.  If it is not a
     function, it is presumed to be the name of a variable containing a
     list of match data.  The matched data (a string if MATCH is a
     number, a list of strings if MATCH is a list of numbers) is put in
     front of the table.

 -- Variable: TeX-auto-prepare-hook nil
     List of functions to be called before parsing a TeX file.

 -- Variable: TeX-auto-cleanup-hook nil
     List of functions to be called after parsing a TeX file.


File: auctex.info,  Node: Appendices,  Next: Indices,  Prev: Customization,  Up: Top

Appendix A Copying, Changes, Development, FAQ, Texinfo Mode
***********************************************************

* Menu:

* Copying this Manual::
* Changes::
* Development::
* FAQ::
* Texinfo mode::


File: auctex.info,  Node: Copying this Manual,  Next: Changes,  Up: Appendices

A.1 Copying this Manual
=======================

The copyright notice for this manual is:

   This manual is for AUCTeX (version 13.1.3 from 2022-04-16), a
sophisticated TeX environment for Emacs.

   Copyright (C) 1992-1995, 2001, 2002, 2004-2022 Free Software
Foundation, Inc.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.3 or any later version published by the Free Software
     Foundation; with no Invariant Sections, no Front-Cover Texts and no
     Back-Cover Texts.  A copy of the license is included in the section
     entitled "GNU Free Documentation License."

   The full license text can be read here:

* Menu:

* GNU Free Documentation License:: License for copying this manual.


File: auctex.info,  Node: GNU Free Documentation License,  Up: Copying this Manual

A.1.1 GNU Free Documentation License
------------------------------------

                     Version 1.3, 3 November 2008

     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software
     Foundation, Inc.  <https://fsf.org/>

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

  0. PREAMBLE

     The purpose of this License is to make a manual, textbook, or other
     functional and useful document "free" in the sense of freedom: to
     assure everyone the effective freedom to copy and redistribute it,
     with or without modifying it, either commercially or
     noncommercially.  Secondarily, this License preserves for the
     author and publisher a way to get credit for their work, while not
     being considered responsible for modifications made by others.

     This License is a kind of "copyleft", which means that derivative
     works of the document must themselves be free in the same sense.
     It complements the GNU General Public License, which is a copyleft
     license designed for free software.

     We have designed this License in order to use it for manuals for
     free software, because free software needs free documentation: a
     free program should come with manuals providing the same freedoms
     that the software does.  But this License is not limited to
     software manuals; it can be used for any textual work, regardless
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
     instruction or reference.

  1. APPLICABILITY AND DEFINITIONS

     This License applies to any manual or other work, in any medium,
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
     grants a world-wide, royalty-free license, unlimited in duration,
     to use that work under the conditions stated herein.  The
     "Document", below, refers to any such manual or work.  Any member
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.

     A "Modified Version" of the Document means any work containing the
     Document or a portion of it, either copied verbatim, or with
     modifications and/or translated into another language.

     A "Secondary Section" is a named appendix or a front-matter section
     of the Document that deals exclusively with the relationship of the
     publishers or authors of the Document to the Document's overall
     subject (or to related matters) and contains nothing that could
     fall directly within that overall subject.  (Thus, if the Document
     is in part a textbook of mathematics, a Secondary Section may not
     explain any mathematics.)  The relationship could be a matter of
     historical connection with the subject or with related matters, or
     of legal, commercial, philosophical, ethical or political position
     regarding them.

     The "Invariant Sections" are certain Secondary Sections whose
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.

     The "Cover Texts" are certain short passages of text that are
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
     that says that the Document is released under this License.  A
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     be at most 25 words.

     A "Transparent" copy of the Document means a machine-readable copy,
     represented in a format whose specification is available to the
     general public, that is suitable for revising the document
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".

     Examples of suitable formats for Transparent copies include plain
     ASCII without markup, Texinfo input format, LaTeX input format,
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.

     The "Title Page" means, for a printed book, the title page itself,
     plus such following pages as are needed to hold, legibly, the
     material this License requires to appear in the title page.  For
     works in formats which do not have any title page as such, "Title
     Page" means the text near the most prominent appearance of the
     work's title, preceding the beginning of the body of the text.

     The "publisher" means any person or entity that distributes copies
     of the Document to the public.

     A section "Entitled XYZ" means a named subunit of the Document
     whose title either is precisely XYZ or contains XYZ in parentheses
     following text that translates XYZ in another language.  (Here XYZ
     stands for a specific section name mentioned below, such as
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
     To "Preserve the Title" of such a section when you modify the
     Document means that it remains a section "Entitled XYZ" according
     to this definition.

     The Document may include Warranty Disclaimers next to the notice
     which states that this License applies to the Document.  These
     Warranty Disclaimers are considered to be included by reference in
     this License, but only as regards disclaiming warranties: any other
     implication that these Warranty Disclaimers may have is void and
     has no effect on the meaning of this License.

  2. VERBATIM COPYING

     You may copy and distribute the Document in any medium, either
     commercially or noncommercially, provided that this License, the
     copyright notices, and the license notice saying this License
     applies to the Document are reproduced in all copies, and that you
     add no other conditions whatsoever to those of this License.  You
     may not use technical measures to obstruct or control the reading
     or further copying of the copies you make or distribute.  However,
     you may accept compensation in exchange for copies.  If you
     distribute a large enough number of copies you must also follow the
     conditions in section 3.

     You may also lend copies, under the same conditions stated above,
     and you may publicly display copies.

  3. COPYING IN QUANTITY

     If you publish printed copies (or copies in media that commonly
     have printed covers) of the Document, numbering more than 100, and
     the Document's license notice requires Cover Texts, you must
     enclose the copies in covers that carry, clearly and legibly, all
     these Cover Texts: Front-Cover Texts on the front cover, and
     Back-Cover Texts on the back cover.  Both covers must also clearly
     and legibly identify you as the publisher of these copies.  The
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.

     If the required texts for either cover are too voluminous to fit
     legibly, you should put the first ones listed (as many as fit
     reasonably) on the actual cover, and continue the rest onto
     adjacent pages.

     If you publish or distribute Opaque copies of the Document
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.

     It is requested, but not required, that you contact the authors of
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.

  4. MODIFICATIONS

     You may copy and distribute a Modified Version of the Document
     under the conditions of sections 2 and 3 above, provided that you
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:

       A. Use in the Title Page (and on the covers, if any) a title
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.

       B. List on the Title Page, as authors, one or more persons or
          entities responsible for authorship of the modifications in
          the Modified Version, together with at least five of the
          principal authors of the Document (all of its principal
          authors, if it has fewer than five), unless they release you
          from this requirement.

       C. State on the Title page the name of the publisher of the
          Modified Version, as the publisher.

       D. Preserve all the copyright notices of the Document.

       E. Add an appropriate copyright notice for your modifications
          adjacent to the other copyright notices.

       F. Include, immediately after the copyright notices, a license
          notice giving the public permission to use the Modified
          Version under the terms of this License, in the form shown in
          the Addendum below.

       G. Preserve in that license notice the full lists of Invariant
          Sections and required Cover Texts given in the Document's
          license notice.

       H. Include an unaltered copy of this License.

       I. Preserve the section Entitled "History", Preserve its Title,
          and add to it an item stating at least the title, year, new
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.

       J. Preserve the network location, if any, given in the Document
          for public access to a Transparent copy of the Document, and
          likewise the network locations given in the Document for
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.

       K. For any section Entitled "Acknowledgements" or "Dedications",
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
          acknowledgements and/or dedications given therein.

       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.

       M. Delete any section Entitled "Endorsements".  Such a section
          may not be included in the Modified Version.

       N. Do not retitle any existing section to be Entitled
          "Endorsements" or to conflict in title with any Invariant
          Section.

       O. Preserve any Warranty Disclaimers.

     If the Modified Version includes new front-matter sections or
     appendices that qualify as Secondary Sections and contain no
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.

     You may add a section Entitled "Endorsements", provided it contains
     nothing but endorsements of your Modified Version by various
     parties--for example, statements of peer review or that the text
     has been approved by an organization as the authoritative
     definition of a standard.

     You may add a passage of up to five words as a Front-Cover Text,
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.

     The author(s) and publisher(s) of the Document do not by this
     License give permission to use their names for publicity for or to
     assert or imply endorsement of any Modified Version.

  5. COMBINING DOCUMENTS

     You may combine the Document with other documents released under
     this License, under the terms defined in section 4 above for
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
     unmodified, and list them all as Invariant Sections of your
     combined work in its license notice, and that you preserve all
     their Warranty Disclaimers.

     The combined work need only contain one copy of this License, and
     multiple identical Invariant Sections may be replaced with a single
     copy.  If there are multiple Invariant Sections with the same name
     but different contents, make the title of each such section unique
     by adding at the end of it, in parentheses, the name of the
     original author or publisher of that section if known, or else a
     unique number.  Make the same adjustment to the section titles in
     the list of Invariant Sections in the license notice of the
     combined work.

     In the combination, you must combine any sections Entitled
     "History" in the various original documents, forming one section
     Entitled "History"; likewise combine any sections Entitled
     "Acknowledgements", and any sections Entitled "Dedications".  You
     must delete all sections Entitled "Endorsements."

  6. COLLECTIONS OF DOCUMENTS

     You may make a collection consisting of the Document and other
     documents released under this License, and replace the individual
     copies of this License in the various documents with a single copy
     that is included in the collection, provided that you follow the
     rules of this License for verbatim copying of each of the documents
     in all other respects.

     You may extract a single document from such a collection, and
     distribute it individually under this License, provided you insert
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.

  7. AGGREGATION WITH INDEPENDENT WORKS

     A compilation of the Document or its derivatives with other
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
     copyright resulting from the compilation is not used to limit the
     legal rights of the compilation's users beyond what the individual
     works permit.  When the Document is included in an aggregate, this
     License does not apply to the other works in the aggregate which
     are not themselves derivative works of the Document.

     If the Cover Text requirement of section 3 is applicable to these
     copies of the Document, then if the Document is less than one half
     of the entire aggregate, the Document's Cover Texts may be placed
     on covers that bracket the Document within the aggregate, or the
     electronic equivalent of covers if the Document is in electronic
     form.  Otherwise they must appear on printed covers that bracket
     the whole aggregate.

  8. TRANSLATION

     Translation is considered a kind of modification, so you may
     distribute translations of the Document under the terms of section
     4.  Replacing Invariant Sections with translations requires special
     permission from their copyright holders, but you may include
     translations of some or all Invariant Sections in addition to the
     original versions of these Invariant Sections.  You may include a
     translation of this License, and all the license notices in the
     Document, and any Warranty Disclaimers, provided that you also
     include the original English version of this License and the
     original versions of those notices and disclaimers.  In case of a
     disagreement between the translation and the original version of
     this License or a notice or disclaimer, the original version will
     prevail.

     If a section in the Document is Entitled "Acknowledgements",
     "Dedications", or "History", the requirement (section 4) to
     Preserve its Title (section 1) will typically require changing the
     actual title.

  9. TERMINATION

     You may not copy, modify, sublicense, or distribute the Document
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense, or distribute it is void,
     and will automatically terminate your rights under this License.

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.

  10. FUTURE REVISIONS OF THIS LICENSE

     The Free Software Foundation may publish new, revised versions of
     the GNU Free Documentation License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.  See
     <https://www.gnu.org/licenses/>.

     Each version of the License is given a distinguishing version
     number.  If the Document specifies that a particular numbered
     version of this License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that specified version or of any later version that has been
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Document.

  11. RELICENSING

     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
     World Wide Web server that publishes copyrightable works and also
     provides prominent facilities for anybody to edit those works.  A
     public wiki that anybody can edit is an example of such a server.
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
     site means any set of copyrightable works thus published on the MMC
     site.

     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
     license published by Creative Commons Corporation, a not-for-profit
     corporation with a principal place of business in San Francisco,
     California, as well as future copyleft versions of that license
     published by that same organization.

     "Incorporate" means to publish or republish a Document, in whole or
     in part, as part of another Document.

     An MMC is "eligible for relicensing" if it is licensed under this
     License, and if all works that were first published under this
     License somewhere other than this MMC, and subsequently
     incorporated in whole or in part into the MMC, (1) had no cover
     texts or invariant sections, and (2) were thus incorporated prior
     to November 1, 2008.

     The operator of an MMC Site may republish an MMC contained in the
     site under CC-BY-SA on the same site at any time before August 1,
     2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents
----------------------------------------------------

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:

       Copyright (C)  YEAR  YOUR NAME.
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.3
       or any later version published by the Free Software Foundation;
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
       Texts.  A copy of the license is included in the section entitled ``GNU
       Free Documentation License''.

   If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this:

         with the Invariant Sections being LIST THEIR TITLES, with
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
         being LIST.

   If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

   If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.


File: auctex.info,  Node: Changes,  Next: Development,  Prev: Copying this Manual,  Up: Appendices

A.2 Changes and New Features
============================

News since last release
-----------------------

   * AUCTeX now requires GNU Emacs 25.1 or higher.

   * AUCTeX tracks the change in Emacs where initial inputs in the
     minibuffer during queries are getting phased out.  Queries for the
     mandatory arguments of macros and environments are adjusted where
     applicable.  The value which will be used after hitting 'RET'
     without other input is shown in the prompt in parentheses prefixed
     with 'default'.  For this change the signature of the function
     'TeX-arg-length' is altered.  The old argument list was:
          (defun TeX-arg-length (optional &optional prompt
                                          initial-input definition default)

     whereas the new one is:
          (defun TeX-arg-length (optional &optional prompt
                                          default initial-input definition)

     Note the position change of 'DEFAULT'.

   * Indenting of conditionals is improved.  Code inside constructs like
     '\ifx . \else . \fi' is correctly indented.  An interface for style
     files is also introduced which can add their macros to the
     indentation engine.  Check the file 'algpseudocode.el' for an
     example.

   * You can optionally enable indent inside square brackets '[]' by new
     user options 'TeX-indent-open-delimiters' and
     'TeX-indent-close-delimiters'.  *Note Indenting::.

   * Now 'tex-buf.el' is merged into 'tex.el' and no longer exists.  If
     your personal code has '(require 'tex-buf)', one of the following
     prescriptions would serve.
       1. Remove '(require 'tex-buf)'.
       2. Replace it with '(require 'tex)'.
       3. Replace it with '(require 'latex)'.

News in 13.1
------------

   * In math environments 'gather', 'gather*', 'gathered', 'multline'
     and 'multline*', fill commands such as 'M-q' and 'C-c C-q C-e' are
     disabled.  This sorts out the inconsistency between those and
     'equation', 'displaymath' environments, in latter of which filling
     is already disabled.

     If you want filling in such environments, customize
     'LaTeX-indent-environment-list' to remove them.

     Auto fill continues to work in such environment anyway.

     In addition, AUCTeX adds support of alignment at '&' sign in
     'align'-like environments such as 'alignat', 'aligned' and so on,
     as well as 'matrix'-like environments such as 'pmatrix', 'bmatrix'
     and so on.

   * Now two commands 'Texindex' and 'Texi2dvi' are available when you
     type 'C-c C-c' in Texinfo mode.  The command 'Texindex' runs
     'texindex' on index files and 'Texi2dvi' runs 'pdftexi2dvi' or
     'texi2dvi' according to the value of 'TeX-PDF-mode'.

     So you can typeset Texinfo documents into PDF or DVI format from
     within AUCTeX.

   * AUCTeX's own help messages for LaTeX errors are now shown only for
     LaTeX runs.  AUCTeX shows raw error/warning messages found in
     '.log' files for runs of formats other than LaTeX, such as plain
     TeX, ConTeXt and Texinfo, as it does even for LaTeX runs when it
     can't find a matching entry in its own help message catalogue.

     Due to this change, customize option 'TeX-error-description-list'
     can no longer have a fallback entry that matches any error.  If
     your customized value includes such entry, typically '(".*" . "No
     help available")', please remove it.

   * Two functions 'TeX-split-string' and 'TeX-assoc' are now obsolete
     and will be removed in future release.  If your personal code uses
     these functions, use 'split-string' and 'assoc-string' instead.

   * The function 'TeX-read-key-val' now accepts a function call as
     second argument.  This change should help AUCTeX style writers who
     use 'TeX-arg-key-val' and have to deal with dynamic key-values.
     Example of usage:
          (TeX-add-style-hook "foo"
           (lambda ()
             (TeX-add-symbols
              '("bar" (TeX-arg-key-val (function-returning-key-val))))))

   * Since AUCTeX 12.2, 'C-x C-w' accidentally disabled the parse on
     save in that buffer, even when you enabled 'TeX-auto-save' option.
     This bug was fixed.

   * AUCTeX now requires GNU Emacs 24.3 or higher.

   * Old implementations for viewers were discarded, as announced long
     before.  The variables 'TeX-output-view-style' and 'TeX-view-style'
     have no effect now.  The former placeholders '%v' and '%vv' in
     'TeX-command-list' are ignored.

   * AUCTeX now uses lexical binding which has been introduced in Emacs
     24.  This change should have no user-visible effect and require no
     manual adaptions except in the following cases.

        - Entries added to the customization variable 'TeX-expand-list'
          also had access to variables 'command' and 'pos'.  Those are
          now properly declared and named 'TeX-expand-command' and
          'TeX-expand-pos'.

        - Entries added to the customization variable 'TeX-expand-list'
          had access to a variable 'file' which was bound to
          'TeX-active-master', i.e., it evaluated to either the master
          or region file.  This usage must be replaced with either
          'TeX-active-master' or 'TeX-active-master-with-quotes'.

        - Viewer entries in 'TeX-view-program-list' also had access to a
          variable 'file' which was bound to the name of the master or
          region file without extension.  Instead, the function
          'TeX-active-master' has to be used now.

        - Macro argument parsing functions could set a variable
          'exit-mark' to the buffer position where point should be left
          after all arguments have been read.  This variable is now
          named 'TeX-exit-mark'.

        - The functions in 'LaTeX-section-hook' had access or modified
          the previously undeclared variables 'title', 'name', 'level',
          'done-mark', and 'toc'.  These variables are now properly
          declared and have the 'LaTeX-' prefix, e.g.,
          'LaTeX-done-mark'.

        - The functions in 'ConTeXt-numbered-section-hook' and
          'ConTeXt-unnumbered-section-hook' had access or modified the
          previously undeclared variables 'title', 'name', 'level',
          'done-mark', and 'reference'.  These variables are now
          properly declared and have the 'ConTeXt-' prefix, e.g.,
          'ConTeXt-title'.

        - The functions in 'TeX-translate-location-hook' could access
          and modify the free variables 'file', 'line', 'error',
          'offset', 'context', and 'string'.  Those are now properly
          declared variables with the prefix 'TeX-translate-location-',
          e.g., 'TeX-translate-location-file'.

   * The constant 'LaTeX-dialect' has been renamed to 'TeX-dialect' and
     moved from 'latex.el' to 'tex.el'.  'LaTeX-dialect' now is an
     obsolete alias.

   * The style 'latexinfo.el' is removed from AUCTeX.  'latexinfo.el'
     was meant to support latexinfo which in return was a LaTeX-2.09
     extension of Texinfo, but didn't manage to replace Texinfo.

   * The style 'siunitx.el' is updated to support package version 3.
     Key-value options provided by older package versions are removed,
     deprecated macros and units are not supported anymore.

   * AUCTeX has preliminary support for LaTeX-hooks.  Hooks provided by
     LaTeX kernel are known and available for completion in
     '\AddToHook', '\RemoveFromHook' and '\AddToHookNext'.

   * AUCTeX is now able to place all generated output files, including
     those that are produced by applications running under AUCTeX,
     temporary files related to region processing and preview-latex
     files, in an output directory.  To use this feature, set the new
     user option 'TeX-output-dir' to the absolute path of the output
     directory or a relative path which would be interpreted as being
     relative to the master file in a multifile document.

     Note that this feature doesn't work if the document includes sub
     file placed in sub directory below the main file via '\include'
     command.

   * Many other bugs were fixed.

News in 12.3
------------

   * Support for 'PSTricks' is now PDF-oriented.  AUCTeX no longer turns
     off PDF mode for 'PSTricks' documents even without 'pst-pdf'.  It
     now sets up 'TeX-PDF-from-DVI' option so that PDF output is
     generated when 'TeX-PDF-mode' is enabled (default).  Users who want
     DVI output should disable PDF mode explicitly by file local
     variable, or customize 'TeX-PDF-mode' to 'nil'.

   * The function 'font-latex-update-font-lock' has been obsoleted in
     order to fix 'bug#37945'.  That function was used by several style
     files in order to refresh fontification after adding new symbols or
     verbatim constructs.  It is better to call 'font-lock-flush' in the
     former case and 'font-latex-set-syntactic-keywords' in the latter
     case.  The function 'font-latex-update-font-lock' still exists as a
     no-op which only shows a warning explaining how to update font-lock
     as mentioned above.

   * Math expression highlighting was improved.  Highlighting for
     documents with a lot of inline math expressions '$...$' won't get
     scrambled now ('bug#33139').

     In addition, it is no longer recommended to customize
     'font-latex-math-environments'.  Use 'texmathp-tex-commands'
     instead.  *Note Fontification of math::.

   * AUCTeX tracks changes in LaTeX2e 2020-02-02 release.  AUCTeX
     supports the improvements to LaTeX font selection mechanism (NFSS).
     New macros like '\textsw' or '\textulc' are added to font insertion
     keyboard commands.  *Note Font Specifiers::, for details.  Further,
     the entries in the menu 'LaTeX', 'Insert Font' are reorganized and
     adjusted accordingly.

     Macros previously provided by 'textcomp.sty' are now part of LaTeX
     kernel.  AUCTeX tracks this change as well and support for the new
     macro '\legacyoldstylenums' is added.

   * Insertion of environments in LaTeX documents (i.e. 'C-c C-e') was
     improved.  The former code had a few bugs, which sometimes resulted
     in either spurious empty line or spurious comment prefix, or both,
     especially when the region is active.  Those bugs are now fixed.

   * More bugs fixed, other minor features implemented.

News in 12.2
------------

   * AUCTeX reflects the changes in LaTeX2e 2019-10-01 release.
     'filecontents' environment now takes an optional argument and can
     be used anywhere in a document.  The macros '\Ref' and
     '\labelformat' are moved from 'varioref.sty' to LaTeX kernel.
     'amsmath' has a new macro '\overunderset'.

   * A new method is implemented in preview-latex to adjust the
     foreground colors of generated images to those of Emacs, when the
     LaTeX command produces PDF.  The traditional method became invalid
     because of the change introduced in Ghostscript 9.27.
     Unfortunately, the new method doesn't work due to a bug in
     Ghostscript 9.27 and is valid only for Ghostscript > 9.27.  There
     is also a fallback method for gs 9.27 users which displays plain
     "black on white" images.  For successful function of preview-latex,
     the users are encouraged to set up the new user option
     'preview-pdf-color-adjust-method' to choose appropriate option
     among the three: new, traditional and fallback method.

   * AUCTeX has support for the Flymake package in Emacs 26 or newer.
     To enable, call 'M-x flymake-mode <RET>' or add this to your
     '.emacs' file:
          (add-hook 'LaTeX-mode-hook #'flymake-mode)

   * The way the option 'TeX-record-buffer' is used was corrected.  It
     was used in just the opposite way as the document says.  Erase the
     customization if you have customized this option since it now acts
     in reverse to your expectation.

   * A former customize option 'japanese-TeX-command-list' is removed.
     Use 'japanese-TeX-engine-default', or if it's really necessary,
     customize 'TeX-command-list' directly if the task which the option
     used to carry is required.

   * Support for standard LaTeX without e-TeX extension is now very
     limited.  It doesn't work if raw TeX code is put on the command
     line to invoke 'latex' command.  It also fails for region
     compilation ('C-c C-r' and so on) with documents of non-ascii file
     name.  In addition, it no longer works with preview-latex.  We
     consider this incompatibility is permissible because e-TeX
     extension is enabled for standard LaTeX by default long ago.  LaTeX
     variants such as XeLaTeX and LuaLaTeX are not affected.

   * Key binds in Texinfo mode are improved.  Typing '$', '^', '_' and
     '\' now just self-inserts without pointless side effects in Texinfo
     mode.

     In addition, the option 'TeX-electric-escape' is now effective in
     Texinfo mode.  When it is enabled, typing '@' will invoke
     'TeX-electric-macro' offering completion in similar style with
     other TeX modes of AUCTeX.

   * Fontification support for 'biblatex' package is improved and
     updated to macros provided by package version 3.12.  For qualified
     lists, at least 2 mandatory arguments are fontified.

   * Support for column specifiers 'w' and 'W' provided by 'array'
     package is added to 'array.el'.  The correct counting of columns
     only works when the 'align' parameter is enclosed in braces, e.g.,
     'w{l}{3cm}'.  The short version 'wl{3cm}' is not supported.

   * Entries for 'PDF Tools' are added in
     'TeX-view-program-list-builtin' for Windows and macOS. This viewer
     can be configured under these operating systems with an entry like
     this in an init file:
          (setq TeX-view-program-selection '((output-pdf "PDF Tools")))

   * Several other bugs were fixed, many minor features were added.

News in 12.1
------------

   * AUCTeX now requires GNU Emacs 24 or higher.  Support for XEmacs has
     been dropped.

   * Besides the change in the supported version of Emacs, there has
     been no functional change in this release, which is equivalent to
     version 11.92.

News in 11.92
-------------

   * preview-latex is compatible with Ghostscript 9.22 where the
     operator '.runandhide' is removed.  All occurrences of
     '.runandhide' in preview-latex are replaced by alternative code
     making it work with Ghostscript 9.22 again.

   * AUCTeX has a new customize option
     'TeX-math-input-method-off-regexp'.  When you begin to input a math
     formula, the current input method is turned off if its name matches
     this regular expression.

     In fact this variable was introduced long before, but has not been
     documented in info files nor turned into a customize option with
     'defcustom' until this release.

   * The window system focus is pulled back to Emacs when viewing with
     evince-compatible viewers if a new customize option
     'TeX-view-evince-keep-focus' is non-nil.

   * The usual dose of bug fixes was administered.

News in 11.91
-------------

   * Now AUCTeX has a logo.  The LaTeX code to create it is available in
     the 'etc/' directory of the package.

   * Add support for 'upmendex', an extension of 'makeindex' capable of
     sorting indexes by unicode based ICU.

   * Fix preview-latex to interact correctly with Japanese LaTeX.  The
     parsing routine was made robust not to be confused by the 7-bit
     encoding of Japanese text and the necessary option to LaTeX command
     is kept even when preamble caching is enabled.

   * The new "Glossaries" entry in 'TeX-command-list' runs the command
     'makeglossaries'.

   * Fontification of control symbols has been improved.  Characters
     defined in 'font-latex-match-simple-exclude-list' do not receive
     any fontification.  In DocTeX mode, the character '_' is removed
     from 'font-latex-match-simple-exclude-list' in order to fontify
     macros like '\__module_foo:nnn' correctly.

   * Fontification of math environments has been improved.  Optional
     and/or mandatory argument(s) to environments are not fontified.

   * 'preview.sty' loads 'luatex85.sty' if possible and should be
     compatible with newer luaTeX versions.

   * AUCTeX has a new customize option 'TeX-ispell-verb-delimiters'.
     This string contains usual characters used as delimiters for
     in-line verbatim macros like '\verb'.  Text between delimiters
     after an in-line verbatim macro will be skipped during spell
     checking.

   * Fontification of in-line verbatim macros has been improved.
     'font-latex.el' recognizes an optional or a mandatory argument for
     macros like '\Verb' from 'fancyvrb.sty', '\mint' and '\mintinline'
     from 'minted.sty' and fontifies verbatim content correctly.

   * AUCTeX can put and parse labels in optional argument of
     environments.  Inserting labels is done by new function
     'LaTeX-env-label-as-keyval'.  A new customize option
     'LaTeX-listing-label' is available as prefix to labels in code
     typesetting environments, e.g. 'lstlisting' environment provided by
     'listings' package.  'LaTeX-listing-label' defaults to 'lst:'.
     Parsing of labels for later referencing relies on two requirements:
       1. Label should come as last key-value argument, and
       2. label must be enclosed in braces, e.g.
               \begin{lstlisting}[caption=Some Caption,label={lst:foo}]
               ...
               \end{lstlisting}

   * The function 'LaTeX-label' now takes a second optional argument
     'NO-INSERT'.  When non-'nil', 'LaTeX-label' reads a label and
     returns it as a string.  This argument is also passed to any
     function bound to 'LaTeX-label-function' (see next item).

   * *Incompatible change:* The signature for the function passed with
     the customize option 'LaTeX-label-function' has changed.  The
     function bound to this variable is now expected to take an optional
     second argument 'NO-INSERT'.  When this argument is non-'nil', the
     function should read and only return a label as a string; insertion
     is done by another function.

   * Directory local variables were ineffective for
     'japanese-latex-mode' and 'japanese-plain-tex-mode'.  This bug was
     fixed.  (This was actually done in AUCTeX 11.90, but not
     advertised)

   * The output of Japanese text from Japanese TeX engines is decoded
     correctly for most cases, according to the encoding of the TeX
     documents and the locale.  The difference between MS Windows, macOS
     and unix-like OS is taken into account.  (This was actually done in
     AUCTeX 11.90, but not advertised)

   * Quite a few new LaTeX packages are supported.

   * As usual, many bugs were fixed.

News in 11.90
-------------

   * In addition to the completion performed by 'TeX-complete-symbol',
     AUCTeX now also supports the new Emacs standard completion-at-point
     facility (see the Emacs command 'completion-at-point').  This also
     means that modern completion UIs like company-mode work out of the
     box in TeX and LaTeX buffers.  *Note Completion::, for details.

   * Completion is now aware of being inside a math environment and then
     completes math macros.

   * AUCTeX is able to display several levels of super- and subscripts,
     each one raised above and a bit smaller than its basis.  For this
     feature, have a look at the customize options
     'font-latex-fontify-script' (especially the new values
     'multi-level' and 'invisible') and
     'font-latex-fontify-script-max-level'.  Also, the script characters
     '^' and '_' are also fontified with a special face named
     'font-latex-script-char-face'.  *Note Fontification of math::, for
     details.

   * Parsing of format specification in various tabular environments has
     been improved.  The function 'LaTeX-insert-item' ('C-c <LFD>')
     inserts suitable number of ampersands for '*{num}{cols}'
     constructs.  Style files for LaTeX packages 'tabularx', 'tabulary',
     'longtable', 'dcolumn' and 'siunitx' are adapted to take advantage
     of this improvement.

   * AUCTeX has a new Ispell dictionary 'tex-ispell.el' for macros and
     environments which will be skipped during spell checking.  The
     activiation of this feature is controlled by a new customize option
     'TeX-ispell-extend-skip-list', which is set to 't' and activated by
     default.

   * AUCTeX has a new customize option 'TeX-raise-frame-function' that
     is currently only used by Evince and Atril inverse search to raise
     the Emacs frame.

   * When inserting a new float, AUCTeX will now prompt for a
     short-caption if the length of the caption provided is greater than
     a certain size.  This size is controlled via a new user option
     'LaTeX-short-caption-prompt-length'.

   * Parsing of the compilation log has been reworked.  You should
     encounter fewer mistaken files while navigating through errors and
     warnings.

   * Two new user options, 'TeX-ignore-warnings' and
     'TeX-suppress-ignored-warnings', allow ignoring certain warnings
     after compilation of the document.  *Note Ignoring warnings::, for
     details.

   * A new option, 'TeX-PDF-from-DVI', controls if and how to produce a
     PDF file by converting a DVI file.  This supersedes
     'TeX-PDF-via-dvips-ps2pdf' which is still recognized but marked as
     obsolete and may be removed in future releases.

   * Support for a number of external viewers has been added:
        * Atril viewer.  Forward and inverse search requires version
          1.9.1 or later to work.

        * dviout viewer on Windows.  Note that this setup works when
          'TeX-source-correlate-method' is set to use 'source-specials'
          for DVI, e.g.:
               (setq TeX-source-correlate-method
                     '((dvi . source-specials)
                       (pdf . synctex)))
          which is the default.

        * SumatraPDF viewer on Windows.

        * Zathura viewer.  Forward and inverse search requires a recent
          version of the program to work (3.4 or later).

   * A new function, 'TeX-documentation-texdoc', for reading
     documentation with 'texdoc' has been added.  'TeX-doc' is still
     available but now 'C-c ?' runs 'TeX-documentation-texdoc'.

   * AUCTeX has a new custom option
     'LaTeX-reftex-cite-format-auto-activate' which controls the
     automatic activation of citation formats provided by RefTeX when a
     style file is loaded and RefTeX is enabled.  Currently,
     'biblatex.el', 'harvard.el', 'jurabib.el' and 'natbib.el' use this
     feature.  If you have customized 'reftex-cite-format' and want to
     use your settings, you should set this variable to 'nil'.

   * AUCTeX now has limited support for the TikZ package.  For the
     moment, this includes some basic support for prompting the user of
     arguments to the '\draw' macro.

   * The style 'graphicx.el' went through a bigger overhaul.  The
     optional argument of command '\includegraphics' now supports
     key-val query; keys can independently be chosen anytime by pressing
     the <,> key.  As a side effect, the variable
     'LaTeX-includegraphics-options-alist' is now no-op and is removed
     from 'tex-style.el'.  You can safely remove any customization of it
     from your init file.  The mandatory argument of '\includegraphics'
     knows about image file extensions supported by the used engine and
     offers them for inclusion.

   * Support for other LaTeX packages was improved, and style files for
     several new packages were added.

   * Many bugs were crushed along the way.

News in 11.89
-------------

   * You can now run all commands needed to compile a document and then
     open the viewer with a single command: 'TeX-command-run-all', bound
     to 'C-c C-a'.

   * Commands such as 'LaTeX' and 'View' can now be executed
     conveniently on the current section (or part, chapter, subsection,
     etc).  See 'LaTeX-command-section' and
     'LaTeX-command-section-change-level'.  *Note Starting a Command::,
     for details.

   * Forward and backward search with Evince now also work when only a
     region of the document is compiled/viewed.

   * To open the PDF output file you can now use also PDF Tools, a
     document viewer for Emacs.  With it, as a plus, forward and
     backward search is accurate at word level.

   * With new option 'TeX-PDF-via-dvips-ps2pdf' it is possible to
     compile a document to DVI and then convert it to PDF using
     'dvips'-'ps2pdf' before viewing it.

   * New option 'TeX-file-line-error' allows to select file:line:error
     style for error messages.

   * Indent '\[...\]' math mode as a regular environment by default.

   * Now AUCTeX suggests to run 'makeindex' when appropriate.

   * 'TeX-view-program-list' can contain, as third optional element of
     each item, the name of the executable(s) needed to open the viewer.

   * 'TeX-expand-list' variable has been split into 'TeX-expand-list'
     and 'TeX-expand-list-builtin'.  Only the former is intended to be
     customized by the user, the latter contains built-in expanders.
     You might want to keep in 'TeX-expand-list' only new expansion
     strings.

   * Before running commands like TeX and LaTeX, now AUCTeX performs
     some checks.  If 'TeX-check-TeX' is non-nil, it will test whether a
     working TeX distribution is actually present in the system and
     available to Emacs.  Instead, when 'TeX-check-engine' is non-nil,
     before running LaTeX commands AUCTeX will check whether the correct
     engine has been set, based upon known restrictions posed by LaTeX
     packages.

   * Basic support to ConTeXt Mark IV has been added.  Users can now
     select the Mark version to be used with new option
     'ConTeXt-Mark-version', and AUCTeX is able to catch error messages
     in the output log of a Mark IV document.

   * Support for tons of LaTeX packages has been added.

   * Numbers of bugs have been fixed, many minor features have been
     added.

News in 11.88
-------------

   * 'TeX-PDF-mode' is now enabled by default.

   * Now 'TeX-previous-error' works with TeX commands if the new option
     'TeX-parse-all-errors' is non-nil, which is the default.  When this
     option is non-nil, an overview of errors and warnings reported by
     the TeX compiler can be opened with 'M-x TeX-error-overview <RET>'.
     *Note Debugging::, for details.

   * Style file authors are encouraged to distinguish common from expert
     macros and environments, and mark the latter using
     'TeX-declare-expert-macros' and
     'LaTeX-declare-expert-environments'.

     Users can then restrict completion using
     'TeX-complete-expert-commands'.

   * Management of LaTeX package options in the parser was improved.
     You might need to reparse your documents, especially if you loaded
     the 'babel' package with language options.

   * Now you can insert '$...$' or '\(...\)' by typing a single '$'.  To
     do this, customize the new option 'TeX-electric-math'.
     'TeX-math-close-double-dollar' was removed.  *Note Quotes::, for
     details.

   * 'C-c <RET> documentclass <RET>' completes with all available LaTeX
     classes, if the 'TeX-arg-input-file-search' variable is non-nil.
     Completion for class options of the standard LaTeX classes is
     provided as well.

   * New user options 'LaTeX-default-author',
     'LaTeX-fontspec-arg-font-search',
     'LaTeX-fontspec-font-list-default', 'TeX-date-format', and
     'TeX-insert-braces-alist'.  A new possible value
     ('show-all-optional-args') for 'TeX-insert-macro-default-style' was
     added.  The default value of 'TeX-source-correlate-method' has been
     changed.

   * 'biblatex' support was greatly expanded.  If parsing is enabled,
     AUCTeX looks at 'backend' option to decide whether to use Biber or
     BibTeX.  The 'LaTeX-biblatex-use-Biber' variable was changed to be
     file local only and is no more customizable.

   * With some LaTeX classes, the default environment suggested by
     'LaTeX-environment' ('C-c C-e') when the current environment is
     'document' was changed.  With 'beamer' class the default
     environment is 'frame', with 'letter' it is 'letter', with 'slides'
     it is 'slide'.

   * Brace pairing feature was enhanced in LaTeX documents.  Support for
     '\bigl', '\Bigl', '\biggl' and '\Biggl', the same as the one for
     '\left', was added to 'TeX-insert-macro'.  For example, 'C-c <RET>
     bigl <RET> ( <RET>' inserts '\bigl(\bigr)'.

     You can insert brace pair '()', '{}' and '[]' by typing a single
     left brace if the new user option 'LaTeX-electric-left-right-brace'
     is enabled.

     Macros '\langle', '\lfloor' and '\lceil', which produce the left
     part of the paired braces, are treated similarly as '(', '{' and
     '[' during the course of 'TeX-insert-macro'.  *Note Quotes::, for
     details.

   * Support for dozens of LaTeX packages was added.

   * Tabular-like environments ('tabular', 'tabular*', 'tabularx',
     'tabulary', 'array', 'align', ...)  are indented in a nicer and
     more informative way when the column values of a table line are
     written across multiple lines in the tex file.

   * The suitable number of ampersands are inserted when you insert
     'array', 'tabular' and 'tabular*' environments with 'C-c C-e'.
     Similar experience is obtained if you terminate rows in these
     environments with 'C-c <LFD>'.  It supplies line break macro '\\'
     and inserts the suitable number of ampersands on the next line.

     Similar supports are provided for various 'amsmath' environments.

     *Note Tabular-like::, for details.

   * Commands for narrowing to a group ('TeX-narrow-to-group') and to
     LaTeX environments ('LaTeX-narrow-to-environment') were added.

   * Now arbitrary options can be passed to the TeX processor on a per
     file basis using the 'TeX-command-extra-options' option.  *Note
     Processor Options::, for details.

   * Now 'C-c C-e document <RET>', in an empty document, prompts for
     '\usepackage' macros in addition to '\documentclass'.

   * 'TeX-add-style-hook' has now a third argument to tell AUCTeX for
     which dialect (LaTeX, Texinfo or BibTeX) the style hook is
     registers.  Labelling style hook by dialect will avoid applying
     them not in the right context.

   * There have been lots of bug fixes and feature additions.

News in 11.87
-------------

   * AUCTeX now supports Biber in conjunction with biblatex in addition
     to BibTeX.

   * Each AUCTeX mode now has its own abbrev table.  On Emacsen which
     provide the possibility to inherit abbrevs from other tables, the
     abbrevs from the Text mode abbrev table are available as well.
     Newly defined abbrevs are written to the mode-specific tables,
     though.

   * The file 'tex-fptex.el' was removed.

   * Forward/backward search for Evince has been improved.  If Emacs is
     compiled with DBUS support and a recent Evince version (3.x) is
     installed, the communication goes over the desktop bus instead of
     the command line, resulting in more accurate positioning of point
     in Emacs and highlighting of the target paragraph in Evince.

   * A problem where Ghostscript threw an '/invalidfileaccess' error
     when running preview-latex was fixed.

   * A lot of smaller fixes and additions have been made.

News in 11.86
-------------

   * Parsing of LaTeX output was improved.  It is now less likely that
     AUCTeX opens a non-existent file upon calling 'TeX-next-error'; a
     problem for example encountered when using MiKTeX 2.8.  In addition
     quoted file names as emitted by MiKTeX are now supported.

   * A new framework for the definition and selection of viewers was
     implemented.  If you have customizations regarding viewers you will
     have to redo them in this new framework or reenable the old one.
     *Note Starting Viewers::, for details.

   * Comprehensive editing support for PSTricks was added.

   * Support for various LaTeX packages was added, e.g. 'tabularx',
     'CJK', and 'hyperref'.

   * An easy way to switch between TeX engines (PDFTeX, LuaTeX, XeTeX,
     Omega) was added.

   * Support for SyncTeX was added.  This involves the command line
     options for LaTeX and the viewer.

   * Folding can now be customized to use macro arguments as replacement
     text.

   * 'preview.sty' now works with XeTeX.

   * A lot of smaller and larger bugs have been squashed.

News in 11.85
-------------

   * Font locking has been improved significantly.  It is now less prone
     to color bleeding which could lead to high resource usage.  In
     addition it now includes information about LaTeX macro syntax and
     can indicate syntactically incorrect macros in LaTeX mode.

   * The license was updated to GPLv3.

   * Support for the nomencl, flashcards and comment LaTeX packages as
     well as the Icelandic language option of babel were added.

   * Support for folding of math macros was added.

   * Lots of minor bugs in features and documentation fixed.

News in 11.84
-------------

   * There have been problems with the '-without-texmf-dir' option to
     'configure' when the value of '-with-kpathsea-sep' was set or
     determined for an installation system with a default different from
     that of the runtime system.  'with-kpathsea-sep' has been removed;
     the setting is now usually determined at runtime.

     Due to this and other problems, preview-latex in the released
     XEmacs package failed under Windows or with anything except recent
     21.5 XEmacsen.

   * AUCTeX and preview-latex have been changed in order to accommodate
     file names containing spaces.  preview-latex now tolerates bad
     PostScript code polluting the stack (like some Omega fonts).

   * 'preview.sty' had in some cases failed to emit PostScript header
     specials.

   * Support for folding of comments was added.

   * The 'polish' language option of the babel LaTeX package as well as
     the polski LaTeX package are now supported.  Most notably this
     means that AUCTeX will help to insert quotation marks as defined by
     'polish.sty' ('"`..."'') and 'polski.sty' (',,...''').

   * The TeX tool bar is now available and enabled by default in plain
     TeX mode.  *Note Processing Facilities::.

   * Bug fix in the display of math subscripts and superscripts.

   * Bug fix 'TeX-doc' for Emacs 21.

   * There has been quite a number of other bug fixes to various
     features and documentation across the board.

News in 11.83
-------------

   * The new function 'TeX-doc' provides easy access to documentation
     about commands and packages or information related to TeX and
     friends in general.  *Note Documentation::.

   * You can now get rid of generated intermediate and output files by
     means of the new 'Clean' and 'Clean All' entries in
     'TeX-command-list' accessible with 'C-c C-c' or the Command menu.
     *Note Cleaning::.

   * Support for forward search with PDF files was added.  That means
     you can jump to a place in the output file corresponding to the
     position in the source file.  *Note Viewing::.

     Adding support for this feature required the default value of the
     variable 'TeX-output-view-style' to be changed.  Please make sure
     you either remove any customizations overriding the new default or
     incorporate the changes into your customizations if you want to use
     this feature.

   * TeX error messages of the '-file-line-error' kind are now
     understood in AUCTeX and preview-latex (parsers are still
     separate).

   * Bug fix in XyMTeX support.

   * The LaTeX tool bar is now enabled by default.  *Note Processing
     Facilities::.

News in 11.82
-------------

   * Support for the MinionPro LaTeX package was added.

   * Warnings and underfull/overfull boxes are now being indicated in
     the echo area after a LaTeX run, if the respective debugging
     options are activated with 'TeX-toggle-debug-warnings' ('C-c C-t
     C-w') or 'TeX-toggle-debug-bad-boxes' ('C-c C-t C-b').  In this
     case 'TeX-next-error' will find these warnings in addition to
     normal errors.

     The key binding 'C-c C-w' for 'TeX-toggle-debug-bad-boxes' (which
     was renamed from 'TeX-toggle-debug-boxes') now is deprecated.

   * AUCTeX now can automatically insert a pair of braces after typing
     <_> or <^> in math constructs if the new variable
     'TeX-electric-sub-and-superscript' is set to a non-nil value.

   * Some language-specific support for French was added.  There now is
     completion support for the commands provided by the 'frenchb' (and
     'francais') options of the babel LaTeX package and easier input of
     French quotation marks ('\og ...\fg') which can now be inserted by
     typing <">.

   * Completion support for options of some LaTeX packages was added.

   * Already in version 11.81 the way to activate AUCTeX changed
     substantially.  This should now be done with '(load "auctex.el" nil
     t t)' instead of the former '(require 'tex-site)'.  Related to this
     change 'tex-mik.el' does not load 'tex-site.el' anymore.  That
     means if you used only '(require 'tex-mik)' in order to activate
     AUCTeX, you have to add '(load "auctex.el" nil t t)' before the
     latter statement.  *Note Loading the package::.

   * Handling of verbatim constructs was consolidated across AUCTeX.
     This resulted in the font-latex-specific variables
     'font-latex-verb-like-commands', 'font-latex-verbatim-macros', and
     'font-latex-verbatim-environments' being removed and the more
     general variables 'LaTeX-verbatim-macros-with-delims',
     'LaTeX-verbatim-macros-with-braces', and
     'LaTeX-verbatim-environments' being added.

   * The output of a BibTeX run is now checked for warnings and errors,
     which are reported in the echo area.

   * The aliases for 'font-latex-title-fontify' were removed.  Use
     'font-latex-fontify-sectioning' instead.

   * The problem that Japanese macros where broken across lines was
     fixed.

   * Various bug fixes.

News in 11.81
-------------

   * 'LaTeX-mark-section' now marks subsections of a given section as
     well.  The former behavior is available via the prefix argument.

   * preview-latex which was previously available separately became a
     subsystem of AUCTeX.  There is no documented provision for building
     or installing preview-latex separately.  It is still possible to
     use and install AUCTeX without preview-latex, however.

   * The installation procedures have been overhauled and now also
     install startup files as part of the process (those had to be
     copied manually previously).  You are advised to remove previous
     installations of AUCTeX and preview-latex before starting the
     installation procedure.  A standard installation from an unmodified
     tarball no longer requires Makeinfo or Perl.

     Also note that the way AUCTeX is supposed to be activated changed.
     Instead of '(require 'tex-site)' you should now use '(load
     "auctex.el" nil t t)'.  While the former method may still work, the
     new method has the advantage that you can deactivate a preactivated
     AUCTeX with the statement '(unload-feature 'tex-site)' before any
     of its modes have been used.  This may be important especially for
     site-wide installations.

   * Support for the babel LaTeX package was added.

   * Folding a buffer now ensures that the whole buffer is fontified
     before the actual folding is carried out.  If this results in
     unbearably long execution times, you can fall back to the old
     behavior of relying on stealth font locking to do this job in the
     background by customizing the variable 'TeX-fold-force-fontify'.

   * Folded content now reveals part of its original text in a tooltip
     or the echo area when hovering with the mouse pointer over it.

   * The language-specific insertion of quotation marks was generalized.
     The variables 'LaTeX-german-open-quote',
     'LaTeX-german-close-quote', 'LaTeX-german-quote-after-quote',
     'LaTeX-italian-open-quote', 'LaTeX-italian-close-quote', and
     'LaTeX-italian-quote-after-quote' are now obsolete.  If you are not
     satisfied with the default settings, you should customize
     'TeX-quote-language-alist' instead.

   * Similar to language-specific quote insertion, AUCTeX now helps you
     with hyphens in different languages as well.  *Note European::, for
     details.

   * Fill problems in Japanese text introduced in AUCTeX 11.55 were
     fixed.  AUCTeX tries not to break lines between 1-byte and 2-byte
     chars.  These features will work in Chinese text, too.

   * The scaling factor of the fontification of sectioning commands can
     now be customized using the variable
     'font-latex-fontify-sectioning'.  This variable was previously
     called 'font-latex-title-fontify'; In this release we provide an
     alias but this will disappear in one of the the next releases.  The
     faces for the sectioning commands are now called
     'font-latex-sectioning-N-face' (N=0...5) instead of
     'font-latex-title-N-face' (N=1...4).  Analogously the names of the
     variables holding the related keyword lists were changed from
     'font-latex-title-N-keywords' to
     'font-latex-sectioning-N-keywords'.  *Note Font Locking::, for
     details.  Make sure to adjust your customizations.

   * Titles in beamer slides marked by the "\frametitle" command are
     know displayed with the new face 'font-latex-slide-title-face'.
     You can add macros to be highlighted with this face to
     'font-latex-match-slide-title-keywords'.

   * Of course a lot of bugs have been fixed.

News in 11.55
-------------

   * A bug was fixed which lead to the insertion of trailing whitespace
     during filling.  In particular extra spaces were added to sentence
     endings at the end of lines.  You can make this whitespace visible
     by setting the variable 'show-trailing-whitespace' to 't'.  If you
     want to delete all trailing whitespace in a buffer, type 'M-x
     delete-trailing-whitespace <RET>'.

   * A bug was fixed which lead to a '*Compile-Log*' buffer popping up
     when the first LaTeX file was loaded in an Emacs session.

   * On some systems the presence of an outdated Emacspeak package lead
     to the error message 'File mode specification error: (error
     "Variable binding depth exceeds max-specpdl-size")'.  Precautions
     were added which prevent this error from happening.  But
     nevertheless, it is advised to upgrade or uninstall the outdated
     Emacspeak package.

   * The value of 'TeX-macro-global' is not determined during
     configuration anymore but at load time of AUCTeX.  Consequently the
     associated configuration option '--with-tex-input-dirs' was
     removed.

   * Support for the LaTeX Japanese classes 'jsarticle' and 'jsbook' was
     added.

News in 11.54
-------------

   * The parser (used e.g. for 'TeX-auto-generate-global') was extended
     to recognize keywords common in LaTeX packages and classes, like
     "\DeclareRobustCommand" or "\RequirePackage".  Additionally a bug
     was fixed which led to duplicate entries in AUCTeX style files.

   * Folding can now be done for paragraphs and regions besides single
     constructs and the whole buffer.  With the new 'TeX-fold-dwim'
     command content can both be hidden and shown with a single key
     binding.  In course of these changes new key bindings for unfolding
     commands where introduced.  The old bindings are still present but
     will be phased out in future releases.

   * Info files of the manual now have a .info extension.

   * There is an experimental tool bar support now.  It is not activated
     by default.  If you want to use it, add
          (add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar)
     to your init file.

   * The manual now contains a new chapter "Quick Start".  It explains
     the main features and how to use them, and should be enough for a
     new user to start using AUCTeX.

   * A new section "Font Locking" was added to the manual which explains
     syntax highlighting in AUCTeX and its customization.  Together with
     the sections related to folding and outlining, the section is part
     of the new chapter "Display".

   * Keywords for syntax highlighting of LaTeX constructs to be typeset
     in bold, italic or typewriter fonts may now be customized.  Besides
     the built-in classes, new keyword classes may be added by
     customizing the variable 'font-latex-user-keyword-classes'.  The
     customization options can be found in the customization group
     'font-latex-keywords'.

   * Verbatim content is now displayed with the 'fixed-pitch' face.
     (GNU Emacs only)

   * Syntax highlighting should not spill out of verbatim content
     anymore.  (GNU Emacs only)

   * Verbatim commands like '\verb|...|' will not be broken anymore
     during filling.

   * You can customize the completion for graphic files with
     'LaTeX-includegraphics-read-file'.

   * Support for the LaTeX packages 'url', 'listings', 'jurabib' and
     'csquotes' was added with regard to command completion and syntax
     highlighting.

   * Performance of fontification and filling was improved.

   * Insertion of nodes in Texinfo mode now supports completion of
     existing node names.

   * Setting the variable 'LaTeX-float' to 'nil' now means that you will
     not be prompted for the float position of figures and tables.  You
     can get the old behaviour of 'nil' by setting the variable to '""',
     i.e. an empty string.  See also *note Floats::.

   * The XEmacs-specific bug concerning 'overlays-at' was fixed.

   * Lots of bug fixes.

News in 11.53
-------------

   * The LaTeX math menu can include Unicode characters if your Emacs
     built supports it.  See the variable 'LaTeX-math-menu-unicode',
     *note Mathematics::.

   * Bug fixes for XEmacs.

   * Completion for graphic files in the TeX search path has been added.

   * 'start' is used for the viewer for MiKTeX and fpTeX.

   * The variable 'TeX-fold-preserve-comments' can now be customized to
     deactivate folding in comments.

News in 11.52
-------------

   * Installation and menus under XEmacs work again (maybe for the first
     time).

   * Fontification of subscripts and superscripts is now disabled when
     the fontification engine is not able to support it properly.

   * Bug fixes in the build process.

News in 11.51
-------------

   * PDFTeX and Source Special support did not work with ConTeXt, this
     has been fixed.  Similar for Source Special support under Windows.

   * Omega support has been added.

   * Bug fixes in the build process.

   * 'TeX-fold' now supports folding of environments in Texinfo mode.

News in 11.50
-------------

   * The use of source specials when processing or viewing the document
     can now be controlled with the new 'TeX-source-specials' minor mode
     which can be toggled via an entry in the Command menu or the key
     binding 'C-c C-t C-s'.  If you have customized the variable
     'TeX-command-list', you have to re-initialize it for this to work.
     This means to open a customization buffer for the variable by
     typing 'M-x customize-variable <RET> TeX-command-list <RET>',
     selecting "Erase Customization" and do your customization again
     with the new default.

   * The content of the command menu now depends on the mode (plain TeX,
     LaTeX, ConTeXt etc.).  Any former customization of the variable
     'TeX-command-list' has to be erased.  Otherwise the command menu
     and the customization will not work correctly.

   * Support for hiding and auto-revealing macros, e.g. footnotes or
     citations, and environments in a buffer was added, *note Folding::.

   * You can now control if indentation is done upon typing <RET> by
     customizing the variable 'TeX-newline-function', *note Indenting::.

   * Limited support for 'doc.sty' and 'ltxdoc.cls' ('dtx' files) was
     added.  The new docTeX mode provides functionality for editing
     documentation parts.  This includes formatting (indenting and
     filling), adding and completion of macros and environments while
     staying in comments as well as syntax highlighting.  (Please note
     that the mode is not finished yet.  For example syntax highlighting
     does not work yet in XEmacs.)

   * For macro completion in docTeX mode the AUCTeX style files
     'doc.el', 'ltxdoc.el' and 'ltx-base.el' were included.  The latter
     provides general support for low-level LaTeX macros and may be used
     with LaTeX class and style files as well.  It is currently not
     loaded automatically for those files.

   * Support for ConTeXt with a separate ConTeXt mode is now included.
     Macro definitions for completion are available in Dutch and
     English.

   * The filling and indentation code was overhauled and is now able to
     format commented parts of the source syntactically correct.  Newly
     available functionality and customization options are explained in
     the manual.

   * Filling and indentation in XEmacs with preview-latex and activated
     previews lead to the insertion of whitespace before multi-line
     previews.  AUCTeX now contains facilities to prevent this problem.

   * If 'TeX-master' is set to 't', AUCTeX will now query for a master
     file only when a new file is opened.  Existing files will be left
     alone.  The new function 'TeX-master-file-ask' (bound to 'C-c _' is
     provided for adding the variable manually.

   * Sectioning commands are now shown in a larger font on display
     devices which support such fontification.  The variable
     'font-latex-title-fontify' can be customized to restore the old
     appearance, i.e. the usage of a different color instead of a change
     in size.

   * Support for 'alphanum.sty', 'beamer.cls', 'booktabs.sty',
     'captcont.sty', 'emp.sty', 'paralist.sty', 'subfigure.sty' and
     'units.sty'/'nicefrac.sty' was added.  Credits go to the authors
     mentioned in the respective AUCTeX style files.

   * Inserting graphics with 'C-c <RET> includegraphics <RET>' was
     improved.  See the variable 'LaTeX-includegraphics-options-alist'.

   * If 'LaTeX-default-position' is 'nil', don't prompt for position
     arguments in Tabular-like environments, see *note Tabular-like::.

   * Completion for available packages when using 'C-c <RET> usepackage
     <RET>' was improved on systems using the kpathsea library.

   * The commenting functionality was fixed.  The separate functions for
     commenting and uncommenting were unified in one function for
     paragraphs and regions respectively which do both.

   * Syntax highlighting can be customized to fontify quotes delimited
     by either >>German<< or <<French>> quotation marks by changing the
     variable 'font-latex-quotes'.

   * Certain TeX/LaTeX keywords for functions, references, variables and
     warnings will now be fontified specially.  You may add your own
     keywords by customizing the variables
     'font-latex-match-function-keywords',
     'font-latex-match-reference-keywords',
     'font-latex-match-variable-keywords' and
     'font-latex-match-warning-keywords'.

   * If you include the style files 'german' or 'ngerman' in a document
     (directly or via the 'babel' package), you should now customize
     'LaTeX-german-open-quote', 'LaTeX-german-close-quote' and
     'LaTeX-german-quote-after-quote' instead of 'TeX-open-quote',
     'TeX-close-quote' and 'TeX-quote-after-quote' if you want to
     influence the type of quote insertion.

   * Upon viewing an output file, the right viewer and command line
     options for it are now determined automatically by looking at the
     extension of the output file and certain options used in the source
     file.  The behavior can be adapted or extended respectively by
     customizing the variable 'TeX-output-view-style'.

   * You can control whether 'TeX-insert-macro' ('C-c <RET>') ask for
     all optional arguments by customizing the variable
     'TeX-insert-macro-default-style', *note Completion::.

   * 'TeX-run-discard' is now able to completely detach a process that
     it started.

   * The build process was enhanced and is now based on 'autoconf'
     making installing AUCTeX a mostly automatic process.  See *note
     Installation:: and *note Installation under MS Windows:: for
     details.

News in 11.14
-------------

   * Many more LaTeX and LaTeX2e commands are supported.  Done by
     Masayuki Ataka <ataka@milk.freemail.ne.jp>

News in 11.12
-------------

   * Support for the KOMA-Script classes.  Contributed by Mark Trettin
     <Mark.Trettin@gmx.de>.

News in 11.11
-------------

   * Support for 'prosper.sty', see <http://prosper.sourceforge.net/>.
     Contributed by Phillip Lord <p.lord@russet.org.uk>.

News in 11.10
-------------

   * 'comment-region' now inserts %% by default.  Suggested by "Davide
     G. M. Salvetti" <salve@debian.org>>.

News in 11.06
-------------

   * You can now switch between using the 'font-latex' (all emacsen),
     the 'tex-font' (Emacs 21 only) or no special package for font
     locking.  Customize 'TeX-install-font-lock' for this.

News in 11.04
-------------

   * Now use -t landscape by default when landscape option appears.
     Suggested by Erik Frisk <frisk@isy.liu.se>.

News in 11.03
-------------

   * Use 'tex-fptex.el' for fpTeX support.  Contributed by Fabrice
     Popineau <Fabrice.Popineau@supelec.fr>.

News in 11.02
-------------

   * New user option 'LaTeX-top-caption-list' specifies environments
     where the caption should go at top.  Contributed by
     <ataka@milk.freemail.ne.jp> (Masayuki Ataka).

   * Allow explicit dimensions in 'graphicx.sty'.  Contributed by
     <ataka@milk.freemail.ne.jp> (Masayuki Ataka).

   * Limited support for 'verbatim.sty'.  Contributed by
     <ataka@milk.freemail.ne.jp> (Masayuki Ataka).

   * Better support for amsmath items.  Patch by
     <ataka@milk.freemail.ne.jp> (Masayuki Ataka).

   * More accurate error parsing.  Added by David Kastrup
     <David.Kastrup@t-online.de>.

News in 11.01
-------------

   * Bug fixes.

Older versions
--------------

See the file 'history.texi' for older changes.


File: auctex.info,  Node: Development,  Next: FAQ,  Prev: Changes,  Up: Appendices

A.3 Future Development
======================

The following sections describe future development of AUCTeX.  Besides
mid-term goals, bug reports and requests we cannot fix or honor right
away are being gathered here.  If you have some time for Emacs Lisp
hacking, you are encouraged to try to provide a solution to one of the
following problems.  If you don't know Lisp, you may help us to improve
the documentation.  It might be a good idea to discuss proposed changes
on the mailing list of AUCTeX first.

* Menu:

* Mid-term Goals::
* Wishlist::
* Bugs::


File: auctex.info,  Node: Mid-term Goals,  Next: Wishlist,  Up: Development

A.3.1 Mid-term Goals
--------------------

   * Integration of preview-latex into AUCTeX

     As of AUCTeX 11.81 preview-latex is a part of AUCTeX in the sense
     that the installation routines were merged and preview-latex is
     being packaged with AUCTeX.

     Further integration will happen at the backend.  This involves
     folding of error parsing and task management of both packages which
     will ease development efforts and avoid redundant work.

   * Error help catalogs

     Currently, the help for errors is more or less hardwired into
     'latex.el'.  For supporting error help in other languages, it would
     be sensible to instead arrange error messages in language-specific
     files, make a common info file from all such catalogs in a given
     language and look the error texts up in an appropriate index.  The
     user would then specify a preference list of languages, and the
     errors would be looked up in the catalogs in sequence until they
     were identified.

   * Combining 'docTeX' with RefTeX

     Macro cross references should also be usable for document
     navigation using RefTeX.

   * Fix remove-style feature

     Currently 'TeX-remove-style' implementation isn't good.  It is
     common practice that major mode functions directly add macros and
     environments via 'TeX-add-symbols' and 'LaTeX-add-environments',
     but those macros and environments are lost once 'TeX-remove-style'
     runs.  It is necessary to run major mode function, by e.g.
     'normal-mode', again to recover them, but that makes no point in
     running 'TeX-remove-style' itself because major mode function kills
     all buffer-local variables.

     As of AUCTeX 12.3, 'TeX-remove-style' is no longer used by any
     other codes.

   * Document 'LaTeX-insert-into-commments',
     'TeX-translate-location-hook', and usage of ConTeXt mode.


File: auctex.info,  Node: Wishlist,  Next: Bugs,  Prev: Mid-term Goals,  Up: Development

A.3.2 Wishlist
--------------

   * Simplify tool bar implementation.  The library 'toolbar-x.el' was
     developed as an abstraction layer to absorb difference between
     XEmacs and GNU Emacs.  Now that XEmacs is no longer supported, the
     library, together with 'tex-bar.el' as a whole, can be much
     simplified (or even unified).

   * Documentation lookup for macros

     A parser could gather information about which macros are defined in
     which LaTeX packages and store the information in a hashtable which
     can be used in a backend for 'TeX-doc' in order to open the
     matching documentation for a given macro.  The information could
     also be used to insert an appropriate '\usepackage' statement if
     the user tries to insert a macro for which the respective package
     has not been requested yet.

   * Improvements to error reporting

     Fringe indicators for errors in the main text would be nice.

   * A math entry grid

     A separate frame with a table of math character graphics to click
     on in order to insert the respective sequence into the buffer (cf.
     the "grid" of 'x-symbol').

   * Crossreferencing support

     It would be nice if you could index process your favorite
     collection of '.dtx' files (such as the LaTeX source), just call a
     command on arbitrary control sequence, and get either the DVI
     viewer opened right at the definition of that macro (using Source
     Specials), or the source code of the '.dtx' file.

   * Better plain TeX support

     For starters, 'LaTeX-math-mode' is not very LaTeX-specific in the
     first place, and similar holds for indentation and formatting.

   * Page count when compiling should (optionally) go to modeline of the
     window where the compilation command was invoked, instead of the
     output window.  Suggested by Karsten Tinnefeld
     <tinnefeld@irb.informatik.uni-dortmund.de>.

   * Command to insert a macrodefinition in the preamble, without moving
     point from the current location.  Suggested by "Jeffrey C. Ely"
     <ely@nwu.edu>.

   * A database of all commands defined in all stylefiles.  When a
     command or environment gets entered that is provided in one of the
     styles, insert the appropriate '\usepackage' in the preamble.

   * A way to add and overwrite math mode entries in style files, and to
     decide where they should be.  Suggested by Remo Badii
     <Remo.Badii@psi.ch>.

   * Create template for (first) line of tabular environment.

   * I think prompting for the master is the intended behaviour.  It
     corresponds to a 'shared' value for 'TeX-master'.

     There should probably be a 'none' value which wouldn't query for
     the master, but instead disable all features that relies on
     'TeX-master'.

     This default value for 'TeX-master' could then be controled with
     mapping based on the extension.

   * Use index files (when available) to speed up 'C-c C-m include
     <RET>'.

   * Option not to calculate very slow completions like for 'C-c C-m
     include <RET>'.

   * Font menu should be created from 'TeX-font-list'.

   * Installation procedure written purely in emacs lisp.

   * Included PostScript files should also be counted as part of the
     document.

   * A nice hierarchical by-topic organization of all officially
     documented LaTeX macros, available from the menu bar.

   * 'TeX-command-default' should be set from the master file, if not
     set locally.  Suggested by Peter Whaite <peta@cim.mcgill.ca>.

   * Make AUCTeX work with 'crypt++'.  Suggested by Chris Moore
     <Chris.Moore@src.bae.co.uk>.

   * Make AUCTeX work with 'longlines'.  This would also apply to
     preview-latex, though it might make sense to unify error processing
     before attempting this.

   * The 'Spell' command should apply to all files in a document.  Maybe
     it could try to restrict to files that have been modified since
     last spell check?  Suggested by Ravinder Bhumbla
     <rbhumbla@ucsd.edu>.

   * Make <.> check for abbreviations and sentences ending with capital
     letters.

   * Use Emacs 19 minibuffer history to choose between previewers, and
     other stuff.  Suggested by John Interrante
     <interran@uluru.Stanford.EDU>.

   * Documentation of variables that can be set in a style hook.

     We need a list of what can safely be done in an ordinary style
     hook.  You can not set a variable that AUCTeX depends on, unless
     AUCTeX knows that it has to run the style hooks first.

     Here is the start of such a list.

     'LaTeX-add-environments'

     'TeX-add-symbols'

     'LaTeX-add-labels'

     'LaTeX-add-bibliographies'

     'LaTeX-largest-level'

   * Outline should be (better) supported in TeX mode.

     At least, support headers, trailers, as well as
     'TeX-outline-extra'.

   * 'TeX-header-start' and 'TeX-trailer-end'.

     We might want these, just for fun (and outlines)

   * Plain TeX and LaTeX specific header and trailer expressions.

     We should have a way to globally specify the default value of the
     header and trailer regexps.

   * Get closer to original 'TeX-mode' keybindings.

     A third initialization file ('tex-mode.el') containing an emulator
     of the standard 'TeX-mode' would help convince some people to
     change to AUCTeX.

   * Use markers in 'TeX-error-list' to remember buffer positions in
     order to be more robust with regard to line numbers and changed
     files.

   * Finish the Texinfo mode.  For one thing, many Texinfo mode commands
     do not accept braces around their arguments.

   * Hook up the letter environment with 'bbdb.el'.


File: auctex.info,  Node: Bugs,  Prev: Wishlist,  Up: Development

A.3.3 Bugs
----------

   * The style hooks automatically generated by parsing files for
     'example.dtx', 'example.sty', 'example.drv' and 'example.bib' all
     clash.  Bad.  Clash with hand-written style hooks should be removed
     by dialect discrimination -- to be checked.

   * 'C-c `' should always stay in the current window, also when it
     finds a new file.

   * Do not overwrite emacs warnings about existing auto-save files when
     loading a new file.

   * Maybe the regexp for matching a TeX symbol during parsing should be
     '"\\\\\\([a-zA-Z]+\\|.\\)"' --
     <thiemann@informatik.uni-tuebingen.de> Peter Thiemann.

   * AUCTeX should not parse verbatim environments.

   * Make '`' check for math context in 'LaTeX-math-mode'.  and simply
     self insert if not in a math context.

   * Make 'TeX-insert-dollar' more robust.  Currently it can be fooled
     by '\mbox''es and escaped double dollar for example.

   * Correct indentation for tabbing, table, and math environments.


File: auctex.info,  Node: FAQ,  Next: Texinfo mode,  Prev: Development,  Up: Appendices

A.4 Frequently Asked Questions
==============================

  1. Something is not working correctly.  What should I do?

     Well, you might have guessed it, the first place to look is in the
     available documentation packaged with AUCTeX.  This could be the
     release notes (in the 'RELEASE' file) or the news section of the
     manual in case you are experiencing problems after an upgrade, the
     'INSTALL' file in case you are having problems with the
     installation, the section about bugs in the manual in case you
     encountered a bug or the relevant sections in the manual for other
     related problems.

     If this did not help, you can send a bug report to the AUCTeX bug
     reporting list by using the command 'M-x TeX-submit-bug-report
     <RET>'.  But before you do this, you can try to get more
     information about the problem at hand which might also help you
     locate the cause of the error yourself.

     First, you can try to generate a so-called backtrace which shows
     the functions involved in a program error.  In order to do this,
     start Emacs with the command line 'emacs --debug-init' and/or put
     the line

          (setq debug-on-error t)

     as the first line into your init file.  After Emacs has started,
     you can load a file which triggers the error and a new window
     should pop up showing the backtrace.  If you get such a backtrace,
     please include it in the bug report.

     Second, you can try to figure out if something in your personal or
     site configuration triggers the error by starting Emacs without
     such customizations.  You can do this by invoking Emacs with the
     following command line, depending on the installation scheme of
     AUCTeX and your OS:
        * If you installed AUCTeX from ELPA, use 'emacs -q -no-site-file
          --eval "(progn (setq package-load-list '((auctex t)))
          (package-initialize))"'.  The '--eval' option activates only
          AUCTeX among all installed EPLA packages.
        * If you installed AUCTeX via traditional 'configure'-'make'
          scheme, use 'emacs -q -no-site-file -l auctex'.  The '-l'
          option loads 'auctex.el' which you normally do in your init
          file.
        * In both above cases, use 'runemacs' instead of 'emacs' on
          windows.

     After you have started Emacs like this, you can load the file
     triggering the error.  If everything is working now, you know that
     you have to search either in the site configuration file or your
     personal init file for statements related to the problem.

  2. What versions of Emacs are supported?

     AUCTeX was tested with GNU Emacs 25.1.  Older versions may work but
     are unsupported.

  3. What should I do when './configure' does not find programs like
     'latex'?

     This is problem often encountered on Windows.  Make sure that the
     'PATH' environment variable includes the directories containing the
     relevant programs, as described in *note (auctex)Installation under
     MS Windows::.

  4. Why doesn't the completion, style file, or multifile stuff work?

     It must be enabled first, insert this in your init file:

          (setq-default TeX-master nil)
          (setq TeX-parse-self t)
          (setq TeX-auto-save t)

     Read also the chapters about parsing and multifile documents in the
     manual.  *Note Parsing Files:: and *note Multifile::.

  5. Why doesn't 'TeX-save-document' work?

     'TeX-check-path' has to contain "'./'" somewhere.

  6. Why is the information in 'foo.tex' forgotten when I save
     'foo.bib'?

     For various reasons, AUCTeX ignores the extension when it stores
     information about a file, so you should use unique base names for
     your files.  E.g. rename 'foo.bib' to 'foob.bib'.

  7. Why doesn't AUCTeX signal when processing a document is done?

     If the message in the minibuffer stays "Type 'C-c C-l' to display
     results of compilation.", you probably have a misconfiguration in
     your init file ('.emacs', 'init.el' or similar).  To track this
     down either search in the '*Messages*' buffer for an error message
     or put '(setq debug-on-error t)' as the first line into your init
     file, restart Emacs and open a LaTeX file.  Emacs will complain
     loudly by opening a debugging buffer as soon as an error occurs.
     The information in the debugging buffer can help you find the cause
     of the error in your init file.

  8. Why does 'TeX-next-error' ('C-c `') fail?

     If 'TeX-file-line-error' is set to nil (not the default), these
     sort of failures might be related to the the fact that when writing
     the log file, TeX puts information related to a file, including
     error messages, between a pair of parentheses.  In this scenario
     AUCTeX determines the file where the error happened by parsing the
     log file and counting the parentheses.  This can fail when there
     are other, unbalanced parentheses present.

     Activating so-called 'file:line:error' messages for the log file
     usually solves this issue, as these kind of messages are are easier
     to parse; however, they may lack some details.  Activation can be
     done either in the configuration of your TeX system (consult its
     manual to see where this is) or by simply keeping the variable
     'TeX-file-line-error' to the default value of non-nil.

  9. What does 'AUC' stand for?

     AUCTeX came into being at Aalborg University in Denmark.  Back then
     the Danish name of the university was Aalborg Universitetscenter;
     'AUC' for short.


File: auctex.info,  Node: Texinfo mode,  Prev: FAQ,  Up: Appendices

A.5 Features specific to AUCTeX's Texinfo major mode
====================================================

AUCTeX includes a major mode for editting Texinfo files.  This major
mode is not the same mode as the native Texinfo mode (*note
(texinfo)Texinfo Mode::) of Emacs, although they have the same name.
However, AUCTeX still relies on a number of functions from the native
Texinfo mode.

   The following text describes which functionality is offered by AUCTeX
and which by the native Texinfo mode.  This should enable you to decide
when to consult the AUCTeX manual and when the manual of the native
mode.  And in case you are a seasoned user of the native mode, the
information should help you to swiftly get to know the AUCTeX-specific
commands.

* Menu:

* Exploiting::                  How AUCTeX and the native mode work together
* Superseding::                 Where the native mode is superseded
* Mapping::                     Where key bindings are mapped to the native mode
* Unbinding::                   Which native mode key bindings are missing


File: auctex.info,  Node: Exploiting,  Next: Superseding,  Up: Texinfo mode

A.5.1 How AUCTeX and the native mode work together
--------------------------------------------------

In a nutshell the split between AUCTeX Texinfo mode, and native Texinfo
mode is as follows:

   * Most of the editing (environment creation, commenting, font command
     insertions) and/or processing commands (e.g. compiling or printing)
     which are available in other AUCTeX modes are also handled by
     AUCTeX in Texinfo mode.

   * Texinfo-related features (e.g. info node linkage or menu creation)
     rely on the commands provided by the native Texinfo mode.  AUCTeX
     provides the key bindings to reach these functions, keeping the
     same keys as in native Texinfo whenever possible, or similar ones
     otherwise.


File: auctex.info,  Node: Superseding,  Next: Mapping,  Prev: Exploiting,  Up: Texinfo mode

A.5.2 Where the native mode is superseded
-----------------------------------------

This section is directed to users of the native Texinfo mode switching
to AUCTeX.  It follows the summary of the native mode (*note
(texinfo)Texinfo Mode Summary::) and lists which of its commands are no
longer of use.

Insert commands
     In the native Texinfo mode, frequently used Texinfo commands can be
     inserted with key bindings of the form 'C-c C-c K' where K differs
     for each Texinfo command; 'c' inserts '@code', 'd' inserts '@dfn',
     'k' '@kbd', etc.

     In AUCTeX commands are inserted with the key binding 'C-c C-m'
     instead which prompts for the macro to be inserted.  For font
     selection commands (like '@b', '@i', or '@emph') and a few related
     ones (like '@var', '@key' or '@code') there are bindings which
     insert the respective macros directly.  They have the form 'C-c C-f
     K' or 'C-c C-f C-K' and call the function 'TeX-font'.  Type 'C-c
     C-f <RET>' to get a list of supported commands.

     Note that the prefix argument is not handled the same way by
     AUCTeX.  Note also that the node insertion command from the native
     mode ('texinfo-insert-@node') can still accessed from the Texinfo
     menu in AUCTeX.

Insert braces
     In AUCTeX braces can be inserted with the same key binding as in
     the native Texinfo mode: 'C-c {'.  But AUCTeX uses its own function
     for the feature: 'TeX-insert-braces'.

Insert environments
     The native Texinfo mode does not insert full environments.
     Instead, it provides the function 'texinfo-insert-@end' (mapped to
     'C-c C-c e') for closing an open environment with a matching '@end'
     statement.

     In AUCTeX you can insert full environments, i.e. both the opening
     and closing statements, with the function 'Texinfo-environment'
     (mapped to 'C-c C-e').

Format info files with makeinfo and TeX
     In the native Texinfo mode there are various functions and bindings
     to format a region or the whole buffer for info or to typeset the
     respective text.  For example, there is 'makeinfo-buffer' (mapped
     to 'C-c C-m C-b') which runs 'makeinfo' on the buffer or there is
     'texinfo-tex-buffer' (mapped to 'C-c C-t C-b') which runs TeX on
     the buffer in order to produce a DVI file.

     In AUCTeX different commands for formatting or typesetting can be
     invoked through the function 'TeX-command-master' (mapped to 'C-c
     C-c').  After typing 'C-c C-c', you can select the desired command,
     e.g 'Makeinfo' or 'TeX', through a prompt in the mini buffer.  Note
     that you can make, say 'Makeinfo', the default by adding this
     statement in your init file:

          (add-hook 'Texinfo-mode-hook
                    (lambda () (setq TeX-command-default "Makeinfo")))

     Note also that 'C-c C-c Makeinfo <RET>' is not completely
     functionally equivalent to 'makeinfo-buffer' as the latter will
     display the resulting info file in Emacs, showing the node
     corresponding to the position in the source file, just after a
     successful compilation.  This is why, while using AUCTeX, invoking
     'makeinfo-buffer' might still be more convenient.

     Note also that in the case of a multifile document, 'C-c C-c' in
     AUCTeX will work on the whole document (provided that the file
     variable 'TeX-master' is set correctly), while 'makeinfo-buffer' in
     the native mode will process only the current buffer, provided at
     the '@setfilename' statement is provided.

Produce indexes and print
     The native Texinfo mode provides the binding 'C-c C-t C-i'
     ('texinfo-texindex') for producing an index and the bindings 'C-c
     C-t C-p' ('texinfo-tex-print') and 'C-c C-t C-q'
     ('tex-show-print-queue') for printing and showing the printer
     queue.  These are superseded by the respective commands available
     through 'C-c C-c' ('TeX-command-master') in AUCTeX: 'Texindex',
     'Print', and 'Queue'.

Kill jobs
     The command 'C-c C-t C-k' ('tex-kill-job') in the native mode is
     superseded by 'C-c C-k' ('TeX-kill-job') in AUCTeX.


File: auctex.info,  Node: Mapping,  Next: Unbinding,  Prev: Superseding,  Up: Texinfo mode

A.5.3 Where key bindings are mapped to the native mode
------------------------------------------------------

This node follows the native Texinfo mode summary (*note
(texinfo)Texinfo Mode Summary::) and lists only those commands to which
AUCTeX provides a keybinding.

   Basically all commands of the native mode related to producing menus
and interlinking nodes are mapped to same or similar keys in AUCTeX,
while a few insertion commands are mapped to AUCTeX-like keys.

'@item' insertion
     The binding 'C-c C-c i' for the insertion of '@item' in the native
     mode is mapped to 'M-<RET>' or 'C-c C-j' in AUCTeX, similar to
     other AUCTeX modes.

'@end' insertion
     The binding 'C-c C-c e' for closing a '@FOO' command by a
     corresponding '@end FOO' statement in the native mode is mapped to
     'C-c ]' in AUCTeX, similar to other AUCTeX modes.

Move out of balanced braces
     The binding 'C-c }' ('up-list') is available both in the native
     mode and in AUCTeX.  (This is because the command is not
     implemented in either mode but a native Emacs command.)  However,
     in AUCTeX, you cannot use 'C-c ]' for this, as it is used for
     '@end' insertion.

Update pointers
     The bindings 'C-c C-u C-n' ('texinfo-update-node') and 'C-c C-u
     C-e' ('texinfo-every-node-update') from the native mode are
     available in AUCTeX as well.

Update menus
     The bindings 'C-c C-u m' ('texinfo-master-menu'), 'C-c C-u C-m'
     ('texinfo-make-menu'), and 'C-c C-u C-a'
     ('texinfo-all-menus-update') from the native mode are available in
     AUCTeX as well.  The command 'texinfo-start-menu-description',
     bound to 'C-c C-c C-d' in the native mode, is bound to 'C-c C-u
     C-d' in AUCTeX instead.


File: auctex.info,  Node: Unbinding,  Prev: Mapping,  Up: Texinfo mode

A.5.4 Which native mode key bindings are missing
------------------------------------------------

The following commands from the native commands might still be useful
when working with AUCTeX, however, they are not accessible with a key
binding any longer.

'@node' insertion
     The node insertion command, mapped to 'C-c C-c n' in the native
     mode, is not mapped to any key in AUCTeX.  You can still access it
     through the Texinfo menu, though.  Another alternative is to use
     the 'C-c C-m' binding for macro insertion in AUCTeX.

Show the section structure
     The command 'texinfo-show-structure' ('C-c C-s') from the native
     mode does not have a key binding in AUCTeX.  The binding is used by
     AUCTeX for sectioning.


File: auctex.info,  Node: Indices,  Prev: Appendices,  Up: Top

Indices
*******

* Menu:

* Key Index::
* Function Index::
* Variable Index::
* Concept Index::


File: auctex.info,  Node: Key Index,  Next: Function Index,  Up: Indices

Key Index
=========