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
|
This file is in the public domain.
==============================================================
Luatex Release 0.88.0 was released 2016011500
==============================================================
This is a next step upto 0.90 and it has the following changes:
- mostly small bug fixes
- a few setters/getters added to the pdf namespace (were in the tex one before)
- The current libraries under libs are now:
* poppler-0.40.0
* mpfr-3.1.3
* luajit-2.1.0-beta1
* gmp-6.1.0
* zziplib-0.13.62
* zlib-1.2.8
* lua52-5.2.4
* pixman-0.32.8
* libpng-1.6.21
* cairo-1.14.6
==============================================================
Luatex beta-0.87.0 was released 2015121700
==============================================================
This is a next step upto 0.90 and it has the following changes:
- image data is no longer stored in the format (it was fragile anyway)
- pdf backend data generated when in ini mode is no longer stored in the format
- (incomplete) \mag support removed from pdf backend (this functionality is
kept in dvi mode)
- there are a couple of improvements that should make luatex run a little bit faster
(but of course that depends on the job at hand)
- some further pending issues / cleanup has been done (but this is not reflected in the
interface)
- there is a new primitive \nospace:
\nospace=1 do now not inject glue for spaces (not even zero glue)
\nospace=2 inject zero glue for spaces
- there are new primitives \hpack, \vpack and \tpack that are like \hbox, \vbox and
\vtop but they don't trigger callbacks
- we no longer keep track of older math character and delimiter definition states,
but this should normally go unnoticed
- from now on only ^^XX, ^^C, ^^^^XXXX and ^^^^^^XXXXXX are supported so no funny odd
values (three and five)
- texio.setescape(0) disables escaping to terminal (a matter of taste)
- the (current) lc codes are now saved with the (current) language when patterns are
loaded unless one hs used \hjcode instead of \lccode; overloading of \hjcodes is
possible (but of course goes ahead of hyphenation which is delayed till parbuilding or
packaging
- active characters can now be set with: \letcharcode123=\foo (experimental)
- there are some experimental new primitives but these will be described when they are
stable (currently being tested)
- there is more backend error reporting and all error messages adn warnings (the non-tex
ones) have been normalized
- of course there are the usual small fixes and additional setters and getters in libraries
(see manual)
==============================================================
Luatex beta-0.85.0 was released 2015111400 (5550)
==============================================================
-- roadmap
The 0.85 release is has a lot of changes. It is the prelude to 0.90 which itself is
a prelude to the 0.95 that will go on texlive 2016. The 1.00 release will happen
around the 2016 context meeting. After that 2.* will become the next experimental
branch (leading to 3.*). The most important changes between 0.80 and 0.85 are mentioned
below. For more information consult the manual.
-- the backend commands
There is a better separation between front- and backend code. Some of the generic
\pdf* commands have been promoted to core primitives (with different names), some
have been removes like ximagecolordepth and ximagebbox have been removed and
all that are left have been organized differently. The backend is now more abstract
and provides three primitives only
\pdfextension <keyword> <optional spec>
\pdfvariable <keyword>
\pdffeedback <keyword>
The first replaces \pdfannot and alike, the second replaces the variables that can
be sused to control behaviour, and the third accesses the read only variables. See
luatex-pdf.tex in the context distribution for a plain definition file.
The big advantage of the separation (basically core (lua)tex + extensions) is that
changes in the backend don't have consequences for the frontend and it's easier to
locate possible issues in the code. We might split a bit more at the lua end too.
-- nodes
The boundary, dir and localpar whatsits are now normal nodes. The xforms and ximage
whatsits are now a special kind of rule nodes (subtypes 1 and 2) and known as box-
and image resources (see manual). Also, empty rules are now a valid subtype (subtype
3) with related commands \nohrule and \novrule.
At the lua end one can now access the fields of a spec subnode directly in the parent,
which has the benefit of more control and robust assignments (no need to check for
writeability) while we keep the concept of shared glue specs (tex internals). By
staying close to traditional TeX the Knuthian documentation still applies in most
cases.
The pdf action nodes are now pdf_action whatsit nodes (so no longer a pseudo core
node).
You can get the node subtypes with the node.subtypes function which adds a layer
of abstraction (foo.subtype = "string" might be added in the future).
-- expansion
The hz optimization already only supported level 2 optimization, but now has a variant
3 that does only stretch glyphs and not kerns. Pending is a change where we go back to
percentages instead of fractions of em.
-- math
The old/new codepath has been checked and italic correction which is fundamental
different between the engines has been (partially) redone.
We now have \mathsurroundskip that replaces mathsurround when it's non zero.
The \mathtoptions (old 1) directive can be used for testing. This primitive is mostly for
ourselves and used for development.
The \Umathcharclass, \Umathcharfam and \Umathcharslot primitives can be used to fetch
properties of a math character.
The new \Uleft, \Uright and \Umiddle fence operators accept "height <dimen>", "depth
<dimen>" and the "noaxis" keyword as well the "exact" keyword for non-fitting ones. There
is also \Uvextension. Optionally one can specify a 'class'.
The \Udelimiter[under|over] and \U[under|over]delimiter primitives accept a width as well
as left, middle and right keywords (for non fitting ones). There is also \Uhextension.
The \abovewithdelimiter command accepts 'exact' as keyword (before the dimension) which nils
the excessive spacing. The normal vgaps still apply.
We have a new fraction primitive \Uskewed with a companion \Uskewedwithdelims. Optional
keywords are 'noaxis' and 'exact'.
There is a new directive \mathdisplayskipmode (esp for controlling the > 0 below skip check).
With \mathscriptsmode you can fix anchoring of scripts (as needed for chemistry).
The \Umathaccent commands accept a width and fraction argument.
-- hyhenation
The discretionary command now accept an optional "penalty <number>" specification
where the penalty will be stored with the node. Default is hyphenpenalty.
-- file io
texio.write/write_nl now writes to file if the first argument is a (valid) number
reference to a file opened at the tex end; you can now open 128 files from the tex end
(0..127) and the system command is no longer executed with 18
-- lua interface
The tex.<internal variable> is hopefully better now. The tex.get* also can handle
the built in registers. Especially prevdepth access should work out ok now.
-- and ...
As usual there are lots of small fixes, improvements, overhauls, small additions,
hopefully all mentioned in the manual.
-- warning
This version is probably not compatible with the macro package that you use as some
engine specific initializations need to take place (\pdf commands) and some node types
have been changed. We now have separated pdf backend commands and the only left
primitive categories are: core, (tex), etex and luatex, so no more pdftex, omega and
umath (where the distinction became to fuzzy). Of course you can still prefix.
==============================================================
Luatex beta-0.81.0 was released 2015100722 (5350)
==============================================================
* A couple of primitives are removed, renamed and/or promoted to core (luatex) primitives.
Here's a summary. It might demand some adaption in the way macro packages initialize so we will mention them here explicitly in advance. As shown below, a simple way to get backward compatibility is to \let old ones to new ones. So,
Updating to this version also might demand an update in the
macro package that you use!
Here we go:
% removed, can be done with callbacks if needed, one can define dimen dummies, like
\newdimen\pdfeachlineheight
\newdimen\pdfeachlinedepth
\newdimen\pdflastlinedepth
\newdimen\pdffirstlineheight
\newdimen\pdfignoreddimen
% removed, were already obsolete, one can \let them
\let\pdftexversion \luatexversion
\let\pdftexrevision\luatexrevision
\let\pdftexbanner \luatexbanner
% promoted (from pdftex), so pdf prefix gone, one can \let them
\let\pdfnormaldeviate \normaldeviate
\let\pdfuniformdeviate\uniformdeviate
\let\pdfsetrandomseed \setrandomseed
\let\pdfrandomseed \randomseed
% promoted (from omega), so pdf prefix gone, one can \let them
\let\pdfpagewidth \pagewidth
\let\pdfpageheight\pageheight
% redundant (etex wins over omega), so \font-less ones gone, one can \let them
\let\chardp\fontchardp
\let\charht\fontcharht
\let\charit\fontcharit
\let\charwd\fontcharwd
% promoted (from aleph)
\pagerightoffset
\pagebottomoffset
% promoted (from pdftex)
\ifincsname
\expanded
\quitvmode
% removed (from pdftex), so *pdf* ones gone, one can \let them
\let\ifpdfabsnum \ifabsnum
\let\ifpdfabsdim \ifabsdim
\let\ifpdfprimitive\ifprimitive
\let\pdfprimitive \primitive
% promoted (from omega)
\pagedir
\bodydir
\pardir
\textdir
\mathdir
% promoted (from aleph)
\boxdir
% promoted (from pdftex)
\lpcode
\rpcode
\efcode
\leftmarginkern
\rightmarginkern
\tagcode
\letterspacefont
% promoted (from pdftex), so *pdf* ones gone, one can \let them
\let\pdfprotrudechars\protrudechars
\let\pdfadjustspacing\adjustspacing
\let\pdfnoligatures \ignoreligaturesinfont
\let\pdffontexpand \expandglyphsinfont
% promoted (from pdftex), so *pdf* ones gone, one can \let them
\let\pdfsavepos \savepos
\let\pdflastxpos\lastxpos
\let\pdflastypos\lastypos
% on the todo list are:
\pdfoutput : \outputmode
\pdfmatrix : will get a normal syntax, no weird { } parsing
\pdfcolorstackinit : might become obsolete
\pdfcolorstack : might become obsolete
So, apart from a few, the \pdf* primitives now relate to the backend only.
% There is also a new primitive:
\hyphenationmin
This one determines the minimum word length (per language).
At the same time we moved the (ex)hyphenpenalties
in the disc nodes so you can inject discretionaries with specific penalties.
There will also be an updated manual.
Hans
* new epdf.openMemStream(s,l,docid)
to create a pdf from a lightuserdata or string.
(experimental, do not use in production.)
* uniform random generator in mplib is now specific for each numbersystem;
* too_precise implemented for binary number system;
* several bug fixes.
==============================================================
Luatex beta-0.80.0 was released 20150319 (5195)
==============================================================
* New library newtokenlib. It will replace the current token lib.
* Fixed a bug on the normal random generator for double/decimal/binary
number systems.
* Several others bugs fixed.
==============================================================
Luatex beta-0.79.3.1 was released 20150122 (5140)
==============================================================
* Fixed a bug in mp.w with a wrong input that gives a seg. fault.
==============================================================
Luatex beta-0.79.3 was released 20150121 (5130)
==============================================================
* It's now possible with the MinGW compilers to build luatex and luajittex as DLL
for Windows 32bit/64bit. The files are:
libkpathsea-6.dll luajittex.exe luatex.exe texlua52.dll texluajit.dll
In the next release the build.sh script be updated; for the moment just add
"--enable-shared -disable-native-texlive-build " after --disable-all-pkgs
in TL_MAKE.
Building as DLL was tested only for Windows.
* When possibile symbols in the exe are now hidden:
this should avoid conflicts with the loading of dynamic shared object.
* several bugfixes and improvements. The patches for MetaPost
fix seg. faults occourred with wrong inputs.
The functions:
mp_get_numeric_value, mp_get_string_value, mp_get_boolean_value
works if the value is a variable (i.e. not an internal variable,
a loop variable and a macro argument);
only mp_get_numeric_value now has support for loop variable
and internal variable (but still not for macro arguments).
==============================================================
Luatex beta-0.79.2 was released 20141111 (5082)
==============================================================
* WARNING: the structure of the format file is changed.
After the Web2C \TeX's magic constant: "W2TX" there is now
a FORMAT_ID, a 32bit field that cannot be between 0 and 256 (included)
so that there are no conflicts with the preexisting structure
of the format.
The value can be seen with --debug-format and currently is
907 (the sum of the values of the bytes of the ASCII string "don knuth").
* There is a new set of lua functions for StructElement and Attribute,
convenient (even if not indispensable) for tagged pdf.
* several bugfixes and improvements.
==============================================================
Luatex beta-0.79.0 was released 20140328 (4960)
==============================================================
* The luafontloader now returns 'tsidebearing' glyph values
for OT/TT fonts, if applicable.
* new lua variables: stats.luatex_hashtype, stats.luatex_hashchars,
stats.lastluaerrorstring; the luajittex string hash method is now
lua 5.1 compliant which gives better results for similar strings
* new lua functions: tex.init_rand(), tex.uniform_rand(),
tex.normal_rand(), tex.lua_math_randomseed(), tex.lua_math_random(),
tex.show_context(); these helpers make luatex and luajittex compatible
* In the lua node interface, there were often issues with rubbish
in (especially) 'prev' fields because luatex itself never looks
at those values. This is now cleaned up to prevent weird stuff
happening inside lua node processing code.
* pdf.pageattributes, pdf.pagesattributes, pdf.info, pdf.catalog,
pdf.names and pdf.trailer now behave consistent and can be used
to add these properties at the lua end in addition to their \pdf*
counterparts atthe tex end; there are now pdf.get* and pdf.set*
commands for them too (in future versions the old ways can become
obsolete)
* new accessors pdf.geth, pdfgetv, pdfgetpos, getgetmatrix as well
as pdfhasmatrix helpers (in future versions the direct pdf.h and
pdf.v accessor can become obsolete)
* the pdf.pdf* variables have been removed (they were already
obsolete for some years)
* a new properties mechanism for associating lua tables with nodes
that get cleaned up when nodes a freed (see manual for details)
* several improvements to the way temporary (backend) data is stored
at the lua end (better protection, more consistent)
* a 'l' type for user nodes that holds a lua variable (can be set
at the lua end)
* if a late lua node is set at the lua end the string value can be
a function as well which is then executed during serialization to
the backend stream
* Various small speedups
* Various smallish fixes to the node direct interface
* LPeg is now at version 0.12
* Some small fixes to the CFF (font) parsing
* Font file inclusion reporting messages on the terminal now
comply to the texconfig.trace_file_names setting
* Removed some of the additional luafontloader.info() return
information that was added in 0.78.2, but could not work
properly.
* new primitive \luafunction (see manual), with associated
lua.get_functions_table() function
* lua error message reporting has been altered a bit to make
the distinction between \directlua and other lua source code
sources clearer
* Additional pdf document data functionality in the 'pdf' table
has been cleaned up internally
* Additional pdf destination names can now be set via lua.
* New callbacks: finish_pdfpage, show_error_message,
show_lua_error_hook, start_file, stop_file
* Handling of \tracinglostchars is fixed
* Embedded metapost library version is now 1.900
* luajittex is now included in the distribution. One can use
buildjit.sh to build both luatex and luajittex, where
supported by the platform
* Synchronization with the TeXLive sources updated the following
libraries:
* libpng is now 1.6.10
* poppler is now 0.25.2
==============================================================
Luatex beta-0.78.2 was released 20140113 (4748)
==============================================================
* Extended luafontloader's info() function to include data
from the 'pfminfo' and 'names' structure.
* Fixed a bug in the luafontloader library that made loading
some fonts extremely slow (LastResort.ttf)
* Removed a recent extension in the luafontloader library that
made loading fonts with lots of glyphs slow (ArialUnicoce.ttf).
Note: the extension made sure that there were no duplicate
glyph names in the font after loading.
* Restored --recorder output for lua files (dofile/loadfile/io.open)
* One-at-a-time pattern adding from lua used to require enormous
amounts of memory
* luatex's fontloader.to_table() no longer reports 'altuni' table
information for alternates that are solely driven by the font
encoding. This fixes loading time issues for fonts that fill
encodings by copying a single glyph many times, like e.g.
LastResort.ttf from Apple.
* The datestamp no longer appears in any banners. The associated
\luatexdatestamp primitive is deprecated and will be removed
in 0.80.0.
* Synchronization with the TeXLive sources updated the following
libraries:
* cairo is now 1.12.16
* pixman is now 0.32.4
* lua is now 5.2.3
* zlib is now 1.2.8
* poppler is now 0.25.0
* That same TL synchronization also fixes these issues:
* Always write "\nendstream" to the PDF for PDF/A-1b compliance.
* Large file support (>4GB) in Lua
* Big images could overflow on systems where sizeof(long)=4.
* In writing CID CFF fonts to the PDF, and end_dict() was missing.
* Unknown 'post' table versions (found in some broken ttf/otf
fonts) are now treated as-if they specified version 3.0.
* Fix crashes on 32-bit systems caused by bad C header inclusion
order
* Handle '--luac' and '--luaconly' properly
* luatex is now released under GPLv2+, not just GPLv2.
* luatex can now find .ofm metric files even if the extension
is not given explicitly.
* node.unset_attribute() was broken in 0.78.0
* The UTF-8 commandline patch from 0.78.0 for Win32 was removed
again (did not work properly)
==============================================================
Luatex beta-0.78.0 was released 20131231
==============================================================
* Instead of using expanded fonts, just calculate the expanded
width of glyphs where needed, and carry expand info in the
glyph nodes (all based on Hans' suggestions). All font expansion
functions are disabled and most are removed.
* New, faster (but limited) direct node access from lua, see
the manual for details
* Support for Apple Advanced Typography (AAT) information in
fonts is dropped
* Extended build script for mingw/msys (includes 64-bit support)
* Various patches from/via Akira Kakuta for better Win32
integration
* Fixes for some bugs in de pdfscanner library (mostly related
to inline images)
* Maximum hyphenated word length is now 64Kb characters.
* Various patches from Khaled Hosny and Luigi Scarso for the
luafontloader subsystem
* Fix for a crash when re-dumping formats
* Fix for a Selene unicode library bug where some characters in
UTF-8 were incorrectly flagged as having the 'Space' property
* Some smaller fixes
==============================================================
Luatex beta-0.76.0 was released 20130405
==============================================================
* Metapost 1.801.
* Small patches from TeXLive 2013, as well as an update to the
latest libraries (libpng, poppler, etc.)
* Speed up printing (of TeX strings) to the terminal and log.
* New lua function node.end_of_math().
* Fixed a memory leak in the lua function pdfscanner.scan().
==============================================================
Luatex beta-0.75.0 was released 20130301
==============================================================
News:
* New expandable primitive \Uchar.
* Metapost 1.790.
* New version of lnodelib.c with speedups by Hans and Luigi.
Also added some extra sanity checks to the Lua node field
setting functions.
* Support 'umath' in tex.extraprimitives(), so that formats can
make the \Umath* primitives unprefixed, now that they will be
provided by XeTeX as well.
* Removed a bunch of deprecated primitives
* \AlephVersion, \Alephrevision, \Alephversion, \Alephminorversion
* \OmegaVersion, \Omegarevision, \Omegaversion, \Omegaminorversion
* \omathcode, \odelcode, \omathchardef, \omathchar, \omathaccent,
\odelimiter, \oradical
* \Umathbotaccent, \Umathaccents
* Fix large file support.
* Fix Lua's loadfile().
* Removed the cidmap callbacks again (let that be done by user lua
code after the fact).
* Removed the fatal error on fonts where num_glyphs is too high,
as that problem is actually harmless.
* Some compilation issues under Win32 and Solaris resolved.
* Allow math extender objects to be zero width.
* The 'epdf' library has been extended to deal with finding and
saving embedded files (catalog:numEmbeddedFiles() and catalog:
embeddedFile, new EmbFile object).
==============================================================
Luatex beta-0.74.0 was released 20121224
==============================================================
News:
* lua 5.2
There are no patches to the core Lua files; a future version
of luatex will switch to loading the regular lua 5.2 dynamic
library instead of depending on a statically compiled
one.
* A bleeding-edge version of luasocket is included, as there
is no 5.2-compatible official release yet.
* A new lua extension is the two-argument version of
string.dump from Luajit:
string.dump(function f, [boolean strip])
* mpost 1.780
* The implied existence of the following lua libraries is now
deprecated:
debug, unicode.*, luazip, lfs, lpeg, zlib, gzip, md5,
socket.*, profiler, epdf, fontloader, mplib, and
pdfscanner.
Future versions of luatex will load these modules on demand
from dynamic libraries.
Please update your sources to include a 'require' line for
each of the library modules mentioned.
* Two new callbacks: find_cidmap_file and load_cidmap_file
(used by the fontloader to discover .cidmaps)
==============================================================
Luatex beta-0.72.0 was released 20121210
==============================================================
News:
* update various used libraries, including mplib 1.770,
poppler 0.21, libpng 1.5, and lpeg 0.10.2.
* new 'pdfscanner' lua library.
* various OpenType math fixes, including \Umathcharnumdef.
* improved placement of bottom accents.
* various other small fixes that have accumulated over the past
year-and-a-half.
==============================================================
Luatex beta-0.70.1 was released 20110519
==============================================================
News:
* fixed: recorder file location from TL (Akira).
* fixed: missing newline on 'No output' line.
* fixed: relative names in synctex file.
* fixed: 16bit png images in generated %!PDF-1.4.
* fixed: building with (installed) libpng < 1.5.0
* fixed: year in --version output.
* fixed: box output to synctex.
* fixed: FontDescriptor for non-embedded OpenType fonts has an
invalid FontFile3 entry (#654)
* fixed: crash on non-existent images.
* fixed: small memory leak in the ipc code.
* fixed: tex.print() and tex.sprint() don't recognize -2 as the
first argument (#659)
==============================================================
Luatex beta-0.70.0 was released 20110506
==============================================================
News:
* fixed: various changes needed for libpng 1.5.2.
* fixed: node.fields() for nodes without subtype.
* fixed: non-argument use of os.execute().
* fixed: tex.[s|t|]print() with invalid catcode table arguments.
* fixed: recorder filename location with --output-directory.
* fixed: display alignment in TRT mode.
* luatex now uses the standard synctex files from Jérome Laurens.
==============================================================
Luatex beta-0.66.0 was released 20110412
==============================================================
News:
* fixed: linebreak_filter doesn't do its default job when
tex.linebreak is used
* fixed: \escapechar ignored by \meaning
* fixed: wrong px default
* fixed: font kern attribute inheritance
* fixed: "nop" unrecognized in virtual fonts
* fixed: assertion failure in dviluatex when font ptmr8t used
* fixed: tex.settoks for with strings with embedded zeroes
* fixed: an indexing problem with nonexistent font glyphs
* fixed: some crashes and other bugs on the 'subtype' and 'prev'
fields (not all node types have those fields)
* fixed: crash on token.csname_id ("")
* fixed: initialize the statically allocated node's type ids
* fixed: fencepost error in math parameter counting
* fixed: math family numbers > 255 are allowed
* fixed: compilation failure on Hurd
* fixed: a small bug leading to displacements when reading
the AccentTop table
* fixed: \directlua followed by \pdfximage generates error if
draft mode is active
* fixed: a problem with \vadjust pre in alignments
* fixed: a lua stack growing problem in the backend in 0.65.0,
resulting in an inability to create more than a few thousand
generated pages
* fixed: inclusion of Scribus-generated pdfs
* adapt: the default form margin is now zero (was 1bp before)
* adapt: libpng 1.4.4, zzuplib 0.13.60, mplib 1.504
* adapt: small changes to the build system and new imports from
the texlive repository
* feature: new function node.currentattr() queries the current
active attribute list
* feature: Lua font loading; ignore unknown enumeration keys in
MathConstants
* feature: JPEG 2000 image support
* feature: continuing work on the 'epdf' library
* doc: the 'epdf' lua library is now documented
* doc: various other manual corrections
==============================================================
Luatex beta-0.65.0 was released 20101213
==============================================================
News:
* The Aleph and Omega version primitives are deprecated.
* The Apple Snow Leopard Truetype font collections now work
properly.
* Libpng has been updated to 1.4.4, and zlib to 1.2.5.
* New lua functions node.next() and node.prev().
* The already deprecated for some time node.protrusion_skipable()
function has been removed.
* fontloader.apply_featurefile() and fontloader.apply_afmfile()
now return nil,<errortable> on failure.
* The various node list fields in the lua node interface have
been renamed from 'list' to 'head', e.g. tex.box[0].head,
and the 'list' name is deprecated. For now, the deprecation
is silent, as 'list' will stay for quite some time. Please
update your lua source as soon as possible, though.
* The call node.type(<node>) now returns "node". The existing
functionality is otherwise unchanged.
* Luafilesystem has been updated to 1.5.0. NOTE: there is an
incompatible change in the directory iterator method.
* The restriction on linebreak_filter has been eased: at least one
horizontal box should be returned, but that is not necessarily
the last node any more.
* Backward compatibility has been restored for \meaning\mathchar
* node.first_character() has been renamed to node.first_glyph()
to better match its actual functionality.
* The \Umathaccent primitive now supports both/bottom keywords,
and \Umathbotaccent / \Umathaccents are now deprecated.
* The \Umathaccent primitive now also supports the fixed keyword,
which supports non-growing math accents even if the font says
there are extensible variants.
* Ongoing work on the epdf library.
Bugfixes:
* Assignment to \dimen65535 was broken earlier.
* <box>.head.prev is now always initialized to null (0).
* luatex -lua=<script> '\relax' no longer exits immediately,
instead going into interactive mode as it should.
* The \jobname was initialized wrongly for input file names
with multiple dots in them.
* The synctex file is now written in the right place when
--output-directory is given.
* \letterspacefont could cause crashes, especially when combined
with font expansion.
* Luatex would crash on linux32 systems if it was build in an
environment where LFS (>2GB files) was enabled by default.
* Node lists created by node.copy_list() could not be hyphenated
due to an assertion error.
* Synctex support was partially broken since 0.60.0.
* With OpenType math fonts, accents with multiple parts
(like the \vec arrow) forgot to include all parts if the
accentee was too narrow.
* With OpenType math fonts, accents over any class except 0 and 7
were misplaced.
* kpse.lookup("plain", {all = true}) was broken in kpathsea
itself (no extension given as well as --all specified).
* A FontForge bug made Cambria Math accents look bad, and the
placement of math top accents did not allow a marker at the
origin (patches by Stefan Philipp)
* Cut&Paste from PDF was sometimes broken due to bad ToUnicode map.
* Many small manual improvements (thanks to Paul Isambert)
* An other bugfix to lpeg 0.9 (from Roberto Ierusalimsky)
* Some small fixes to writet1.w (from Han The Thanh)
* A build failure because of bad libz configuration on Win32
==============================================================
Luatex beta-0.64.0 was released 20101112
==============================================================
News:
* New lua functions pdf.refobj(), pdf.maxobjnum() and pdf.objtype()
* New lua function node.is_node()
* The max_strings configuration variable's maximum value is
raised to be identical to texlive's maximum (2097151), and
same for param_size (32767).
* The embedded mplib is now 1.503.
* Minor cleanups in the output of fontloader.to_table():
- removed out-of-range altuni's from the output
- don't dump the extra encodings, just the actual font encoding
- export the encoding's name also as 'enc_name' at one level up
- no longer exporting unset macstyles, nor zero uniqueids
- fix creationtime and modification time
* Ongoing work on the epdf library
Bugfixes:
* Fix a bug where an explicit hyphen prevented hyphenation for the
whole rest of the paragraph
* Internal font copying forgot to copy the last font dimen
* os.selfdir() is now documented
* patch quad (\fontdimen6) in \letterspacefont to be compatible
with pdftex
* Multi-page pdf inclusion was very slow in 0.63.0
* Some extra checks added to the handling of glue_spec node
objects in lua code.
* Some node.prev pointers have been corrected (but this is not
quite finished).
* A small fix to lpeg 0.9.
==============================================================
Luatex beta-0.63.0 was released 20100909
==============================================================
News:
* Drop tex.ht[], tex.wd[], tex.dp[].
* Drop OCP support (and associated primitives).
* Add tex.catcode[], tex.lccode[], tex.sfcode[], tex.uccode[],
tex.mathcode[] and tex.delcode[] and associated functions.
* Add CIDset tables to the output pdf where appropriate.
* Added a 'string' field to late_lua nodes on the lua side. This
field does not convert the assigned string to a tokenlist.
* The result of fontloader.open() now has some virtual accessors
(as well as fontloader.to_table).
* There is now a `short reference' in the manual folder
(functionref.pdf)
Bugfixes:
* Fix a crash on an empty font (bugreport #468).
* Fix a crash for extremely long pattern arguments.
* Fix a crash on bad virtual character arguments in lua.
* Fix hyphenation exceptions.
* Prevent linebreak between initial local_par paragraph whatsit
and a following skip (bugreport #437).
* Fix placement of scripts on textstyle big operators in MATH
fonts (bugreport #466).
* Fix a crash on the return value of MPlib's 'postscript'
operation on images.
* Fix a crash on \leftghost & \rightghost in math mode.
==============================================================
Luatex beta-0.62.0 was released 20100823
==============================================================
News:
* LuaTeX now uses libpoppler (0.12.4) instead of xpdf.
* All backend functions now report what file they were searching
for whenever a file cannot be found.
* Input-ed lua files are now mentioned in the fls file if
the --recorder switch is specified on the command line.
* Paragraph indentation hlist nodes and hlist and vlist nodes
generated by alignment rows and cells now have a subtype
(3 for indent box, 4 for rows/columns, 5 for cells).
* The 'epdf' lib is in active development and still growing.
* The 'fontforge' table is finally removed (was deprecated
since 0.40).
Bugfixes:
* A new mplib import fixes two bad bugs in mplib:
- string equality test was wrong
- type declarations could delete pre-existing variables
* PNG images with transparency could create random size
differences in the generated PDF.
* In some special cases, font expansion could cause wrong
spacing in the generated PDF.
* \letterspacefont was broken since a very long time.
* The node subtype of the \leftskip and \rightskip glues was
wrong.
* Some memory leaks have been removed.
* Various manual fixes.
==============================================================
Luatex beta-0.61.0 was released 20100728
==============================================================
New features:
* New lua library 'epdf' for introspection of PDF inclusions,
see the manual for details.
* Mplib version 1.502 is now included (which is still beta,
so be careful).
* new "finish_pdffile" and "pre_dump" callbacks.
* new function pdf.pageref()
* In the lua 'tex' library: assignment to internal glue
parameters is now allowed.
* New lua function tex.error().
Bugfixes:
* Fix for crashes on fonts with bad Panose values.
* Fix for a box placement bug that could sometimes cause text
to overlap.
* Fix for a few small PDF/A1-a compatibility bugs.
* Fix \letterspacefont.
* Fix \Ustopdisplaymath in combination with aligned displays.
* In math delimiters, the last of a chain of predefined sizes
was always ignored if there were also extensible parts.
==============================================================
Luatex beta-0.60.2 was released 20100701
==============================================================
Bugfixes:
* Various small portability fixes, especially for non-gcc
compilers.
* Updated synctex from Jerome Laurens.
* fix bug #406: \pdfliteral hinders hyphenation.
* fix pdf overprinting bug (related to \pdfliteral).
* patch from Akira Kakuto that ensures that only absolute commands
that are inside the %PATH% will be executed in win32's restricted
\write18
* fix a buffer overflow in luafontloader.
* fix cross-platform share-ability of generated formats.
* fix a few typos in the manual.
* fix trashing of the null glue spec by attribute reference code.
* documented the deprecated state and brokenness of otp processing.
==============================================================
Luatex beta-0.60.1 was released 20100428
==============================================================
New features:
* renamed node.skipable() to node.skippable().
* More git discovery patches in getluatexsvnversion.sh.
* Added --warnings=[no|min|yes|max|all] option to build.sh.
* While cross-compiling, build.sh now adds an extra linker switch
to allow win32 exes to use 3G instead of 2G of virtual memory.
Bugfixes:
* os.exec() & os.spawn() handled the environment differently from
os.execute() on Win32 (patch from Tomek)
* Builds with --enable-ipc were broken.
* Assigning and acquiring \fontdimen s from TeX code was broken.
* An initial attempt at fixing bug #372 (\predisplaydirection).
* An attempt to fix \eqno/\leqno placements in mixed direction
\mathdir/\textdir.
* Our local xpdf patch is reverted, it is not needed any more.
* The os.selfdir variable was not documented, as well as broken
on WIN32.
* Fix "\input tikz hello \bye" bug, plus fix one sign error.
* Fix handling of lua script files with UNC names.
==============================================================
Luatex beta-0.60.0 was released 20100404
==============================================================
New features:
* os.name now knows about CYGWIN (from Elie Roux)
* Internal handling of direction specifiers is faster now.
* Each glyph node now has three new virtual read-only fields:
width, height, and depth (values in scaled points, of course)
* There are new functions node.protrusion_skipable() and
tex.badness() (useful for paragraph breaking in lua)
* Also new: tex.linebreak(). See the manual for details.
* All lua errors now report file and line numbers to aid in
debugging.
* Import of metapost 1.211.
* pdf.pdfcatalog will be replaced soon by the new pdf.catalog
pdf.pdfinfo will be replaced soon by the new pdf.info
pdf.pdfnames will be replaced soon by the new pdf.names
pdf.pdftrailer will be replaced soon by the new pdf.trailer
* pdf.pdfmapfile and pdf.pdfmapline are replaced by the new
pdf.mapfile() and pdf.mapline() functions. (a function interface
fits these parameters better because they never return anything).
* New read-write lua variables: pdf.pageattributes, pdf.pageresources,
pdf.pagesresources
* getluatexsvnversion.sh now correctly detects git-svn and still
manages to find a valid SVN revision number (from Patrick Gundlach)
* Many of the source files have been converted to CWEB.
Bug fixes:
* GNU libtool is now used to solve the various technical issues with
dynamic loading of lua modules.
* Error detection in scan_integer_part was wrong due to missing
initialization of OK_so_far (spotted by Javier Mugica)
* Synctex was broken in 0.51-0.52.
* \lastlinefit was broken since ... well, nearly forever.
* Reading of binary files with length zero was broken.
* Trapping of unitialized rules (this was for sloppily created
rule nodes from lua)
* pdf.immediateobj('streamfile') was broken on 64-bit platforms.
* tex.linebreak did not take the given left and right skip, but
instead used the current TeX-side values (bug #356).
* the found 'MAKE' command in build.sh is now fed into configure to fix
problems with that not finding GNU make even when it is actually
installed.
* dofile(<nil>) and loadfile(<nil>) in batch mode now give an
error and continue instead of pointlessly waiting for user input.
* Reverted commit #3417 (the buildpage experiment) as it causes bad
things to happen when items are waiting during page breaks.
* Overrule loaders[4] in --safer mode, make require() behave
closer to normal lua 5.1, and add some nicer error messages
(based on an email and patches from Manuel Pegourie-Gonnard)
* Added an extra sanity check for GDEF loading in luafontloader,
based on a crash caused by Linux' AkaashNormal.ttf.
==============================================================
Luatex beta-0.52.0 was released 20100316
==============================================================
New features:
* Various small manual improvements.
* A better version of getluatexsvnversion.sh, from Tomek.
* node.copy_list() now allows the second (optional) argument to
be nil.
* An import of the current state of the texlive repository
(kpathsea and build system).
Bug fixes:
* An attempt fix for bug #345 (math kerning is not perfect): when the
current math font is a new math font, check against \catcode <cur_c>
== 11 to suppress the italic correction, instead of looking at
the value of space(<cur_f>).
* There is a new <tfmtable> key: 'units_per_em' (defaults to 0).
This is part of a fix for bug #200 (Problem with CFF fonts having
em-size other than 1000): there is a special correction to the
embedded cff font itself and the font scale if the font to be output
is opentype or type1 in unicode encoding and the 'units_per_em
differs' from zero.
<tfmtable>.units_per_em has to be passed back to luatex from
the lua font loading code for this to work.
* A fix for bug #314 (problem with pk file).
* lua code can no longer change the internal preallocated glue_spec
nodes (as that resulted in weird spacing bugs). For this, glue_specs
now have a new field: 'writable'. If that field is false, a copy
has to be made of the glue_spec instead of doing an assignment
to it.
* Setting of \textdir inside the output routine could trash output
on following pages due to a lingering internal variable.
* \pdfthread crashed because the arguments were handled in reverse
order.
==============================================================
Luatex beta-0.51.0 was released 20100312
==============================================================
New features:
* Various small manual improvements.
* The backend message "cannot open Type 1 font file for reading"
now reports which Type1 font it was looking for.
* Fontforge clears some font names at loading time that will be
refilled in at font generation time, but the fontloader should not
do that. Patch from Khaled Hosny.
* New synctex code imported from TeXLive.
* luamd5/md5.h is renamed to luamd5/luamd5.h to avoid confusion.
* Embedded mplib is now 1.209.
* Some experimental tweaking of buildpage_filter, see the manual
for details.
* Luatex now detects kfreebsd (from Alan Braslau)
* The new lua function tex.sp() converts a string to a number
representing scaled points.
* There is now support for revision numbers in the banner and stats
library again.
* The command line help and manual documentation page is extended.
* node.hpack() now also accepts "cal_expand_ratio" and "subst_ex_font"
modifiers.
* node.hpack() and node.vpack() now give back the badness of the box
as second return value.
* node.copy_list() now allows a second (stop) argument, this stopper
is not copied.
* new lua functions in lfs: lfs.readlink() and lfs.shortname().
* new lua function tex.tprint() that can combine multiple catcode
regime prints in one function call.
* new lua sub-table: tex.nest[] (read/write access to the semantic
nest state).
* New lua functions in kpse: kpse.lookup() and kpse.version(). See
the manual for more details.
* New lua function tex.shipout().
Bug fixes:
* There problems in the pdf output for Type3 (pk) fonts.
* Fix a bug that allowed bad commandline quoting.
* Fix a bug that sometimes caused crashes when \pdfprotrudechars.
* The build script now exports CONFIG_SHELL to avoid problems with
/bin/dash.
* The was a bug in the generated /Image /ProcSet.
* status.font_bytes reported the wrong value.
* Lots of compiler warnings are removed (thanks Javier Mugica).
* Patch to fontloader.info() to accept filenames with embedded
parentheses.
* Fix a \write error with docstrip package.
* Fixed a crash on AdobeMyungjoStd-Medium.otf.
* Fix coco stack overflows, needed for lpeg.
* \pdfcompresslevel wasn't initialized for early immediate objects.
* Fix for slanted fonts when HZ was on (slant angle was multiplied).
* When concatenating content streams, put a space between them.
* Allow pfb lines to end with \r as well as \n (for msam10.pfb).
* Fix the internal string->scaled point conversion in the lua
interface.
* Memory leaks in the fontloader removed, thanks to patches from
Elie Roux.
* Fix a crash caused by the combination of coroutines and font.each().
Removed features:
* Support for Type3 .pgc files (nobody used them).
==============================================================
Luatex beta-0.50.0 was released 20091224
==============================================================
New features:
* Fonts now listen also to the 'extend' key in the lua font
metrics table, and the processing for this is done via de
pdf text matrix instead of via the font matrix, which means
it now works for all font types.
* The embedded Metapost library is now at version 1.209.
Dropped features:
* It is no longer possible for fonts from embedded pdf files
to be replaced by / merged with the document fonts of the
enveloping pdf. This regression may be temporary, depending
on how the rewritten font backend will look after beta 0.60.
Bug fixes:
* Use of \middle confused the \mathstyle operation.
* \pdfcolorstack handling was broken.
* node.unset_attribute() had a bug whereby it inverted the
requested result in some cases (the node on which the unset
was called was sometimes the only node at the current level
that *kept* the attribute).
* During font expansion, the internal font copy had one character
information object less than the original, resulting in the
disappearance of a glyph in some fonts when font expansion
was active.
* Placement of operator scripts of OT MATH fonts is adjusted
to be conformant with Word's logic where the italic correction
is only used to tuck in the subscript and for nothing else.
* luafontloader.open() no longer writes directly to stderr in
case of internal font errors.
* Any <pdf_refobj_node>.objnum could not be assigned to.
* The lua 'pdf' table could not be assigned to.
* The lua 'md5' library was returning incorrect results on
64-bit architectures.
* Luatex now compiles on GNU Hurd systems.
* Fix segfault when embedding stream file object (these
backend segfaults were a side-effect of the string pool
patches).
==============================================================
Luatex beta-0.47.0 was released 20091218
==============================================================
New features:
* New read-write lua variables pdf.pdfcatalog, pdf.pdfnames,
pdf.pdfinfo, pdf.pdftrailer
* The horizontal mode nodes that are added to lines during line
breaking now inherit the attributes from the first and last node
inside the created line.
* The new function pdf.registerannot(<number>) registers an
annotation object number to be included in the current
page's /Annots list.
* The variables <metrics>.Mathconstants.FractionDelimiterSize
and <metrics>.Mathconstants.FractionDelimiterDisplayStyleSize
are added to the font table. This allows proper setting of the
size parameters for TeX's ...withdelims math primitives.
* The internal representation of the string pool is reorganized
(the pool of string characters is now allocated dynamically),
and as a side-effect the lua variable status.init_pool_ptr
is deprecated and will be removed in a later version. Also,
status.pool_ptr now simply returns the current number of bytes
in use for string characters.
* There are new lua variables pdf.pdfmapline and pdf.pdfmapfile
(write-only strings that mimic \pdfmapline and \pdfmapfile).
* \pdfobj data and attribute are now stored as C strings instead
of as token lists (this should speed up cases with a lot of data).
* Artificially slanted fonts now work via the pdf text matrix
(instead of adjusting the actual font) so that it now also
works for non-Type1 fonts. The lua <metrics>.slant font key is
now obeyed in all cases.
* The lua function font.id(<string>) returns the internal font id
number belonging to a control sequence name.
* Pdf image inclusion is optimized such that objects from an
external pdf will now be included only once even if they are
referenced from multiple inclusions.
Bug fixes:
* Protrusion for non-TLT documents did not work properly for
the hyphenation character.
* \lastbox could not remove the paragraph indent box for non-TLT
documents.
* Pdf images (\pdfximage) are no longer kept open during the
whole run, but closed and reopened. An error is raised if
the file has changed between \pdfximage and \pdfrefximage.
This prevents the 'too many open files' error when lots of
images are included.
* On Win32 Pdf image files are locked during the time that it is
open, to prevent unnoticed file changes by external sources.
* Compilation now again works on FreeBSD.
* Format sharing between 32-bit and 64-bit architectures was
broken.
* Unsetting attributes from lua could sometimes result in
the unset state persisting beyond the current group level.
* If something went wrong in the scanning of pdf action items,
the error message reported the current primitive name
incorrectly.
* Luatex would crash on non-existant pdfs that were referenced
from map file entries.
==============================================================
Luatex beta-0.46.0 was released 20091126
==============================================================
New features:
* The build.sh script now has better support for new MacOSX-es
(patch from Mojca).
* Luatex now has experimental support for dynamic loading of
external compiled lua libraries. Building luatex and loading
external .so/.dll files is reported to work on Windows,
linux and osx, other platforms are still unknown.
* pdf.obj{type="stream"} no longer converts its argument to and
from a tokenlist. This allows the use of binary data in the
"string" argument. Such data does still have to hidden from
the normal file parser by putting the code in a dofile()
or by using string.char(), though.
Bug fixes:
* Luatex 0.45.0 was not able to find truetype nor opentype fonts
if there were no callbacks defined (patch from Pawel).
* 0.45.0 printed the user input instead of the full pathname
for \input-ed tex files.
* The TFM reader now rejects fonts with tfm names that are
longer than 255 characters because such font names cannot
be stored in a DVI file.
* The combination of \immediate\pdfxform followed by a later
\pdfrefxform could cause broken pdf output files because
the box used for the form could have been freed and even
reused already at that moment in time, sometimes resulting
in an invalid transformation matrix.
* The placement of super- and subscripts for displaystyle
\int's in CambriaMath is now better than before. It still
needs a tweak to the metrics though: in the current version,
the italic correction has to be substracted from the width
of the integral sign to get correct placement (context mkiv
does this). to be continued ...
==============================================================
Luatex beta-0.45.0 was released 20091118
==============================================================
New features:
* Loading big OTF fonts via lua is now much faster than before,
at the expense of a bit of precision loss in the calculated
bounding boxes.
* Two new token lists are provided: \pdfxformresources and
\pdfxformattr, as an alternative to \pdfxform keywords.
* \input and \openin now accept braced filenames.
* The \endlinechar can now be set to any value between 0 and 127.
* Luatex can now optionally use kpathsea to find lua require()
files.
* The new primitives \aligntab and \alignmark are aliases for
the use of & and # in alignments.
* \pdfrefximage [width <dimen>] [height <dimen>] [depth <dimen>] <imageref>
overrules settings from \pdfximage for this \pdfrefximage call only
* The print precision for small numbers in lua code (tostring)
has been improved.
* Akira Kakuto suppled a patch that restricts writing to files
with names such as latex.bat etc. (on windows only)
* (un-feature): from now on luatex now only handles 4 direction
specifiers: TLT (latin), TRT (arabic), RTT (cjk), and LTL
(mongolian). The other directions now generate an error.
* (un-feature): xpdf's automatic lower- and uppercasing retry attempts
for nonfound image pdf files has been removed.
* The callbacks hpack_filter, vpack_filter and pre_output_filter
pass on an extra string argument for the direction, when known
(nil == use default).
* The lua functions node.hpack(), node.vpack() and node.dimensions()
now accept an optional direction argument (not given == use default).
* \pdfrefxform [width <dimen>] [height <dimen>] [depth <dimen>] <formref>
scales a form object; similar principle as with \pdfximage: depth alone
doesn't scale, it shifts vertically.
* A change to the relative ordering inside font name discovery for use
by the backend: now it tries <f>.psname first, as that is much less
likely to contain spaces.
* For ttc fonts, now the used subfont name and its index id are printed
to the terminal, and if the backend cannot find a ttc subfont, the
run is aborted.
Bug fixes:
* Prevent crashes for lua-loaded fonts without a (tfm) name.
* Remove spurious newlines in the output pdf that could be the
result of using \pdfximage for an included pdf figure too early.
* Full font embedding for wide otf and ttf fonts now really
works (older versions only pretended that it did work).
* node.dimensions() sometimes continued past the 'stop' node.
* Images inside virtual fonts were broken.
* The processing of \language=-1 was wrong, resulting in
hyphenation attempts even though there was no proper language
set up.
* Fix for finding files in --output-directory.
* Fix for handling of --file-line-error.
* tex.box[] assingments are now checked to make sure the assigned
node has the right id (hlist or vlist).
* show_node_list (as in \showbox) produced spurious local_par
whatsit prints in the output after direction nodes.
* The handling of pdf literals has been sped up.
==============================================================
Luatex beta-0.44.0 was released 20091027
==============================================================
New features:
* libpng is now 1.2.40.
* hlist nodes now have a subtype to distinguish hlists generated
by the paragraph breaking, explicit \hbox commands, and other
(as-yet-undefined) sources.
* \pdfobj now has an extra optional keyword: 'uncompressed',
which forces the object to be written to the PDF in plain
text (see the manual for the exact details).
* The lua file from the luamd5 library (which provides the
md5.hexsuma() function) is now embedded in the executable.
Bug fixes:
* \latelua now works in DVI mode again.
* status.output_file_name could crash when used too soon.
* In 0.43, rules were not output at all in DVI mode.
* \leavevmode\penalty-10000\penalty-10000 crashed luatex.
* the API of margin kern nodes to lua was using the wrong
fields in the nodes.
* A few fixes to the manual.
* PDF Xref stream dicts were slightly non-conformant.
* There was too much space between two consecutive math displays
(this bug was inherited from Aleph)
* Synctex was broken (thanks, Akira)
* Font mark classes were handled incorrectly by the fontloader
code.
* There was a crash possible with certain types of named PDF
destinations.
* Math delimiters and large operators in new MATH fonts no
longer apply the italic correction (this fixes placements
of super- and subscripts on such items for those fonts).
* The converter from lua strings to token lists (for the node
interface) sometimes generated invalid tokens.
* CFF (OpenType) fonts now listen to 'embedding="full"'. TTF
is still todo.
* Font tables with 'embedding="no"' would cause luatex to crash.
* \pdfobj file {} failed to find the file if there was no lua
callback in place.
* An optimization in MS Mincho caused luatex to crash.
==============================================================
Luatex beta-0.43.0 was released 20090819
==============================================================
New features:
* There is a new allowed key in the table trhat is returned
by lua-loaded fonts: <f>.psname. This value should be set
to the original PostScript font name of the font. Fonts inside
dfont and ttc collections are fetched using this field
(if it is missing, <f>.fullname will be used instead).
* It is now possible to use Apple dfont font files
(those that contain at least one outline font).
* \latelua is now allowed inside leaders.
* There is a new callback: process_output_buffer, from Manuel
Pégourié-Gonnard. This callback is called just before
\write acts, so it can be used to alter the file encoding
of text output files.
* There is a new node.dimensions() function, which calculates
the natural size of (part of) a list of nodes.
* The new primitive \gleaders provides 'globally aligned'
leaders.
* The DVI and PDF backends now share much code internally.
* The embedded MPlib is now 1.207.
* libpng is now 1.2.39.
Bugfixes:
* We fixed lots of anonymous bugs introduced in 0.42.0 (as expected)
* fontloader.info() errors are no longer fatal, the function now
just returns a nil,"error string" pair.
* Automatically inserted kerns for \accents are now once again
valid word ends, as in \TEX.
* Fixed the placement of math displays in mixed direction
settings.
* The \pdfcompresslevel is now dynamic again.
==============================================================
Luatex beta-0.42.0 was released 20090717
==============================================================
* There is a new node.tail() function
* lua-loaded fonts now support a 'nomath' key to speed up
loading the lua table.
* A bugfix in the ttf reader for the inclusion backend, and
(also in the backend) support for treating ttc files by
pretending they are single ttf fonts (both patches from pdftex)
* Add Khaled Hosny's man page to the repository
* The \pdfcompresslevel is now effectively fixed as soon as
output to the pdf file has occurred.
* Patched status.filename so that it (nearly) always returns a
file name.
* fix '\the\delcode' and disable '\the\odelcode', '\the\Udelcode',
and '\the\Udelcodenum'
* Handle jfifs where either xres or yres is 0 and the other
res is != 0 (from pdftex)
* The single-argument version of lang.hyphenate() was broken.
* Get rid of the \directlua/\latelua number warning.
* The Lua coroutine patch (coco) is now disabled on linux
powerpc architectures (because it caused crashes)
* Removed obsolete pdftex primitives:
\pdfoptionalwaysusepdfpagebox
\pdfoptionpdfinclusionerrorlevel
\pdfforcepagebox
\pdfmovechars
* The loading speed of large fonts (especially ttf) via the
fontloader library, and the inclusion speed for subsetting
in the backend have both been improved.
* The 'pdf' lua library has been enhanced with various new
functions, see the manual for details.
* BLT and BRT glyph position fixed.
* Various fixes for synctex offsets.
* Support for exotic font string encodings has been removed
from the fontloader library.
* The embedded MPlib is now 1.205.
* libpng is now 1.2.38.
==============================================================
Luatex beta-0.40.6 was released 20090625
==============================================================
* Fix two string vs. toks bugs in the lua node interface:
whatsit,annot and whatsit,startlink data assignments were
made directly as strings instead of being converted to tokens.
* Sometimes pdf.print() could be used before the proper structures
were initialized.
* There was a bug in the type codes for the lua package filter
callback: wrong extra info was passed to lua for the alignment
and vsplit cases.
* The math parameters \Umathlimitdownvgap, \Umathlimitdownbgap,
and \Umathlimitdownkern have been renamed to \Umathlimitbelowbgap,
\Umathlimitbelowvgap, and \Umathlimitbelowkern to be more
consistent with the other parameter names.
* The embedded MPlib is now 1.204.
* Handling of UTF-8 hyphenation exceptions has been fixed.
* There were a number of typos in the manual.
==============================================================
Luatex beta-0.40.5 was released 20090610
==============================================================
* One of the internal print functions accidentally encoded its
argument string to UTF-8 even though it was already UTF-8.
* Some of the log and terminal UTF-8 output was gibberish.
==============================================================
Luatex beta-0.40.4 was released 20090609
==============================================================
* \the\textfont0 returned a number instead of doing a font
switch.
* The embedded MPlib is now 1.203.
==============================================================
Luatex beta-0.40.3 was released 20090608
==============================================================
* A set of portability fixes for the AIX compiler from Vladimir
Volovich.
* A set of fixes to the synctex support.
* A patch to the build script to prevent installed X11 headers
from being required.
* Some weave (web syntax) fixes from Manuel Pégourié-Gonnard.
* A simplification in luatex.ch (it is now less verbose
about the web2c-specific extensions) from Karl Berry.
* A fix in the handling of UTF-8 (input) file names.
* Hyphenation exceptions were case sensitive in 0.40.2.
* libpng is now 1.2.37.
==============================================================
Luatex beta-0.40.2 was released 20090603
==============================================================
* Fix for a compilation warning under Cygwin.
* A complicated bugfix by Hartmut for a rounding problem in the
VF loading that resulted in 'character width mismatch in font
XY.vf ignored' messages at large load sizes
* The embedded MPlib is now 1.202.
* The post_page_number callback was accidentally run when
shipping out xforms as well as during actual pages.
* When a math accent char doesn't have a bot_accent placer,
luatex now uses the top_accent placer, if present.
* A crash caused by \Uroot .. {<list>}{...} is fixed
* A portability fix for solaris 8 sparc using sun studio
compiler, and one for glibc > 2.9.90
* luatex -ini now sets the \catcode of the BOM character to
ignore
* Kpathsea is updated from TeXLive, giving four extra types of
searchable files: 'font feature files','cid maps','mlbib',
and 'mlbst'.
* libpng is now 1.2.36
==============================================================
Luatex beta-0.40.1 was released 20090508
==============================================================
* Vertical placement of root radicals and degrees is fixed.
* The use of \pageleftoffset could deviate from \hoffset
if \mag != 1000.
* LuaTeX now issues a warning if \pagedir !- \bodydir during
shipout.
* The previous crash in font.read_tfm() was still not quite
correct.
* The Web2C version is now also printed in the --version
and --credits output.
* There is a new MPlib 1.200 release candidate with a few minor
fixes included.
* The xpdf library is updated to patch level 3.
* New imports to the build system, from texlive. In particular,
there is now configure-level support for building with
libpoppler and support for building under cygwin 1.7 is added.
==============================================================
Luatex beta-0.40.0 was released 20090422
==============================================================
* The embedded MPlib is updated to version 1.200.
* Texlua would crash if run font.read_tfm() was used.
* Luatex would crash on empty \patterns.
* Lots of small C code cleanups.
* \textdir inside a \hbox dir *** was wrong earlier.
* 0.39.0 introduced a bug that would make luatex crash whenever
font expansion was used.
* Font tables returned by define_font can now have a key named
'cache' that controls the internal lua font table caching.
* There is no longer a need for an explicit --progname if there
is no input file given.
==============================================================
Luatex beta-0.39.0 was released 20090415
==============================================================
* iniluatex will from now on start up with only the TeX82 primitives
and \directlua, everything else has to be bootstrapped via
tex.enableprimitives(). This change was planned for 0.40.0,
but *now* is the time to test it.
* A bugfix for \primitive in various expandable contexts,
and \primitive now generates an error message when the
argument is not actually a primitive's name.
* There was a bug found in the math accent handling.
* Large math operators are now treated like extensible characters
in the sense that they can be composed of segments.
* The extra assign- and restore tracing information from eTeX
had a massive bug because of a dangling else in the pascal web.
As a side-effect of fixing this bugs, all such potential errors
in the pascal web have been fixed (for now).
* The math parameters can now be set and queried from lua code
via the new tex.setmath() and tex.getmath() functions.
* Reflection in a \hbox was broken.
* There was a leak of direction nodes in the paragraph builder.
* The font backend now does a small peek to differentiate
truetype and postscript style opentype fonts. This fixes
the "Can't find CFF table" bug for otf's with truetype outlines.
* Parameters and registers can now also be assinged to globally
from lua (see the manual for details).
* It is now possible to query the current math style while a
formula is still being constructed by using the new read-only
value \mathstyle. Associated is the new command \Ustack that
is to be used as a prefix for {.. \over ..} and friends.
See the manual for more information.
* The embedded MPLib is brought up to date with the current
metapost repository (version 1.110 and a few small patches).
* Luatex can now handle two breakpoints inside a single ligature
(like for the functional word of-f-ice). The solution is not
perfect yet, but the chance of missed hyphenation points in
actual documents should now be negligible.
* Some speedups in the font loading code, and in the handling of
pdf_literal nodes that are set from within Lua code.
* Some source code and manual cleanup, as usual.
==============================================================
Luatex beta-0.38.0 was released 20090410
==============================================================
* tex.enableprimitives() had a bug were previously defined (but
currently undefined) control sequences prevented the creation
of the new csname.
* The special calling format callback.register('name', false)
not only disables the callback, but also the builtin code it
is supposed to replace.
* Empty \localleftbox and \localrightbox -es are now suppressed.
* Support for <f>.MathConstants.SubscriptShiftDownWithSuperscript
was added, to solve the lack of "sub2" in OpenType math.
* Luatex now supports horizontal super- and subscript placement
corrections via the OpenType MATH mathkern table. See the
manual for details.
* node.write() no longer copies its argument node list before
appending it.
* There are six new primitives that are verbose forms
of one and two byte special tokens:
\Usuperscript \Usubscript
\Ustartmath \Ustopmath
\Ustartdisplaymath \Ustopdisplaymath
* The attribute node leaks in math mode and alignmetns have been
fixed.
* The 11 simple math noads are now combined into a single "noad"
node type.
* Static linking against libstdc++ is working once again.
* There is a small fix in the keyword scanner to solve the
problem of 'Runaway ... while scanning ???' that could happen
for some primitives.
* Lua now also has the "architecture independent bytecode"
patch applied.
* Lua is updated to version 5.1.4 with coco patches 1.1.5, and
lpeg is now 0.9.
* Some TRT/TLT backend bugs are fixed.
* Various manual updates.
==============================================================
Luatex beta-0.37.0 was released 20090331
==============================================================
* Luatex now implements shell_escape = 'p', a new feature
in web2c that intends to make \write18 more secure. As
a side-effect, if luatex is used for typesetting, it will
now also apply shell_escape = 'p' and shell_escape = 'f'
to the lua functions io.popen(), os.execute(), os.exec(),
and os.spawn().
Nothing has changed for the case where luatex is used as
a script interpreter.
* Attributes can now have negative values. The special value
for 'unset' is lowered to -0x7FFFFFFF (it used to be -1).
* The lua 'kpse' library now has an object-oriented interface
as companion to the procedural interface. This is useful for
e.g. controlling the discovery of mplib files.
* The new internal integer parameter \outputbox allows setting
of the output box number (default: 255, max: 65535)
* The new primitives \Udelimiterunder and \Udelimiterover
complete the set of 'StretchStacks' for OpenType Math.
* Fixed a bug in font string conversions on the Macintosh that
resulted in warnings about 'unaligned pointers being freed'.
* Khaled Hosny spotted a bunch of manual errors.
* There was bug in the width of math_accent objects when
there were super- or subscripts attached to the accentee.
* In PDF mode, TRT \leaders were bugged.
* The source tree now uses the new texlive build system that
Peter Breitenlohner created.
* There is now a single build.sh instead of four separate
ones. It has a few options:
--make : only make, no make distclean; configure
--parallel : make -j 2 -l 3.0
--nostrip : do not strip binary
--mingw : crosscompile for mingw32 from i386-linux
--ppc : crosscompile for ppc osx on intel osx
Note: --parallel still sometimes causes crashes due to
timing errors, so use that option with care.
* Many compiler warnings have been removed (but not all yet).
==============================================================
Luatex beta-0.36.0 was released 20090323
==============================================================
* The included fontforge code is stripped considerably, and
the lua table to access the code is renamed to 'fontloader'.
The old name ('fontforge') will remain present for a while,
but will eventually go away.
* New lua functions: tex.primitives(), tex.extraprimitives,
tex.enableprimitives(). This is a prelude to a big change
in the next beta: iniluatex will from now on start up with
only the TeX82 primitives and \directlua, everything else
has to be bootstrapped via tex.enableprimitives().
See the manual for more details.
* Support for multiple lua states has been removed, and at the
same time support for adding name ids to lua chunks has been
added. See the manual for more details.
* More changes to the PDF backend to make it support non-latin
directions (form and image placement, vertical typesetting,
synctex).
* The kpathsea library is updated. Highlights: cleaner build
process (thanks to Peter Breitenlohner), cleaner mingw32
(cross)compilation support, and a new reentrant API.
* Some possible endless loops within extended delimiters in
math mode are now trapped.
* Movements inside VF font characters were considerably off
due to a wrong conversion routine.
* Error handling for \outer has been reinstated, but can be
suppressed via the new primitive \suppressoutererror.
* The new primitives: \suppresslongerror and \suppressifcsnameerror
that can be used to suppress errors for \par in non-long macros
and for non-expandable objects inside \ifcsname ... \endcsname,
respectively.
* New lua function: node.vpack() via a patch from Khaled Hosny
that also improves error handling in node.hpack().
* Fix the typo that caused \charic (instead of \charit)
to be defined as a primitive.
* Suppression of hyphenation via \hyphenchar\font=-1 now works
again.
* The lua functions tex.print(), tex.sprint(), tex.write() now
accept an array of strings as well as vararg list of strings
to print.
* A change to be build process: luatex.p is no longer split
int smaller pieces before running the C compiler.
* Melissa O'Neill contributed a bugfix to the Type1 font
subsetting code.
* A bunch of smaller bugfixes and cleanups (as usual).
==============================================================
Luatex beta-0.35.0 was released 20090224
==============================================================
* The math handling portions of LuaTeX are converted to C code,
and extended to support Unicode math. There are a great many
related changes, see the new Math chapter in the manual for
details.
* A nasty bug in the paragraph breaking routine was fixed.
(All lines except the first one were believed to be wider then
they really were. This affected which nodes were considered
as active breakpoints)
* Various changes to the PDF backend to make it support non-latin
directions.
* Fixed the behaviour of the page offsets. Placement of the output
on the physical page should now work correctly in all directions,
both in DVI and PDF.
There now are \pageleftoffset and \pagetopoffset primitives,
as well as
* fontforge.apply_featurefile() was broken since 0.31.0
* The lua profiler library is added.
* The included lua filesystem library is now 1.4.1.
* Reading of pk files fixed.
* An optional space afer a <direction specifier> for \textdir c.s.
is ignored from now on.
* \bodydir and \pagedir can now be (re)set even after the first
page has been output.
* The new callback mlist_to_hlist can be used to intercept the
normal conversion of math lists to horizontal lists.
* The programs ttf2afm and pdftosrc are removed from the luatex
distribution (these belong to pdftex).
* fontforge.open() now uses much less memory when opening large
(CJK) fonts.
* The included libpng is now 1.2.35.
* Quite a lot of smaller bugfixes and cleanups (as usual).
==============================================================
Luatex beta-0.31.3 was released 20081229
==============================================================
This release has a bunch of updates from the development trunk
(#1657-1670,1677,1678,1680,1685,1687).
* Closing of files opened by \externalocp.
* Fix for a locale-related bug that make PDF generation fail
with a "Parsing CFF Dict failed" message when including
opentype fonts.
* The included metapost is now version 1.102.
* PDF rules in vertical modes in RL direction where output
in the wrong direction
* Fix for a crash on Apple fonts that contain a 'bsln' table.
* The handling of the second argument to fontforge.open() was
broken
* The included libpng is now 1.2.34
* Handling of ttc files on Windows was broken
==============================================================
Luatex beta-0.31.2 was released 20081209
==============================================================
Besides fixing building issues, this release has
* A small fix for a crash that could happen when using
external OCPs.
* A fix in the format of fontforge.to_table output.
(In 0.31.1 <font>.lookups was near-empty; the lookups
were accidentally output as part of the gpos table).
==============================================================
Luatex beta-0.31.1 was released 20081209
==============================================================
fixed a bunch of compilation errors on various platforms, but
with no other visible changes.
==============================================================
Luatex beta-0.31.0 was released 20081205
==============================================================
This is just an intermediate release so that some testing can be
done on the updated fontforge embedding.
* There are new fields being generated by fontforge.to_table(),
and one or two old ones have been removed. These fields are /
will be documented in the manual, but very briefly:
- MATH table and associated information are now exported
(the main reason for the new fontforge code)
- Baseline data is now exported
(perhaps usable in lua code)
- Multiple Master / Glyph variation data is now exported
(but useless, for now)
- Mac Feature (AAT) information is now exported
(perhaps usable in lua code)
- If (lookup) names were saved via the PfED table, these
will the exported instead of the default, generated names.
(as requested by Yannis)
* dfont is now treated as an archive format just like ttc
when it comes to fontforge.info(). NOTE: that does not mean you
can actually use them, because the backend doesn't know
yet how to embed dfont fonts in the PDF, that is on the
TODO list for the next big beta (0.40.0).
* The executables are a lot larger than before. That is because
much more of fontforge is included than before. Likely this
will stay this way, because this makes upgrading the ff code
much easier, and it means that luatex/FF potentially
understands more font formats (after upgrading the backend,
of course)
==============================================================
Luatex beta-0.30.3 was released 20081128
==============================================================
This release fixes a really big bug, a few smaller ones,
and has updates of png and mplib:
* All hyphenation patterns that were anchored at the start or
end of a word were ignored in luatex versions 0.25.X and 0.30.X
(and possibly even earlier).
* Repeated use of \language=-1 could result in "There is not room
for another language".
* The lua true coroutines patch (Coco) is now disabled on OpenBSD
running on non-intel platforms.
* The lua socket library is patched so that it will now compile on
OpenSolaris.
* Luatex now has libpng 1.2.33 and mplib 1.100
==============================================================
Luatex beta-0.30.2 was released 20081020
==============================================================
* The Lua coco change from 0.30.1 is reverted as it gave
trouble on MacOSX. Lua coco on non-intel OpenBSD platforms
is now explicitly turned off.
* The lua file reading speedup in 0.30.1 broke reading of
files larger than 100MB.
* Reading of font-related files was broken when there was a find
callback, but no read callback.
* The texmf.cnf array size setup values were ignored whenever
--lua was given on the commandline (instead of only when
texconfig.kpse_init is set to false).
* glyphs with negative widths resulted in incorrect horizontal
placement (overlapping) of the string in the output PDF.
* Using \latelua could sometimes result in an invalid output PDF,
and the argument token list was expanded too early
* There was a read buffer overrun in the mapfile parser
* There are two new variables in the status table:
status.callbacks and status.indirect_callbacks (execution counts).
==============================================================
Luatex beta-0.30.1 was released 20081009
==============================================================
* Invalid return values from the linebreak_filter callback
are now handled gracefully (was crashing)
* a preinstalled ctangle is no longer needed except when
cross-compiling
* In 0.30.0, the .notdef fix was incorrectly applied to
truetype / opentype fonts.
* A bunch of all memory leaks is fixed
* In lua, f:read('*a') now uses signicantly less memory
* The number of \catcodetables is now limited to 64KB
(for speed reasons)
* Luatex could crash if there were PDF images with and
without page /Group included on the same page
* Lua coco now always uses setjmp (for OpenBSD compatibility)
* The embedded mplib is updated to the latest svn version
* # marks (characters with catcode 6) are no longer doubled
inside \directlua
* Handling the nul character (U+0000) with catcode 13
(active) was broken
* Luatex could crash on win32 with an access violation
because there was one predefined language too few
(the one matching \language=-1)
==============================================================
Luatex beta-0.30.0 was released 20080930
==============================================================
New features:
* Readable \tex internal params that are counts, attrs, or dimens are
now returned as numbers instead of strings, and skips as node objects.
Read-write access to tex's skip registers added: tex.skip[0] etc.
* new callback: 'linebreak_callback' to replace the internal paragraph
breaking code
* the tex table now supports more readable 'convert' values:
tex.fontname, tex.pdffontname, tex.pdffontobjnum, tex.pdffontsize,
tex.uniformdeviate, tex.number, tex.romannumeral, tex.pdfpageref,
tex.pdfxformname (each takes a number as argument)
* new readable parameter: tex.fontidentifier(number) returns the
\csname associated with that font id
* luatex now outputs \FONT<nr> instead of \^^@ in Overfull/Underfull
messages if the font's id text is zero (like for expanded fonts) (#77)
* luatex --version is split into --version and --credits
* There is now (again) an svn revision number in luatex --version (#91)
* Add support for more read-only internal access from lua:
tex.lastpenalty, tex.lastkern, tex.lastskip, tex.lastnodetype,
tex.inputlineno, tex.badness, tex.pdftexversion, tex.pdflastobj,
tex.pdflastxform, tex.pdflastximage, tex.pdflastximagepages,
tex.pdflastannot, tex.pdflastxpos, tex.pdflastypos, tex.pdfrandomseed,
tex.pdflastlink, tex.luatexversion, tex.Alephversion,
tex.Omegaversion, tex.Alephminorversion, tex.Omegaminorversion,
tex.eTeXminorversion, tex.eTeXversion, tex.currentgrouplevel,
tex.currentgrouptype, tex.currentiflevel, tex.currentiftype,
tex.currentifbranch, tex.pdflastximagecolordepth (#81)
* the old --src-specials are replaced by --synctex (#63)
* the \expanded primitive is backported from pdftex 1.50 (#43)
* luatex now comes with libpng 1.2.32
* experimental: tex.definefont(string, number) associates a
csname string with a font id number
Bugs fixed compared to 0.29.0:
* dashes were exported wrongly by MPlib
* multi-item \discretionaries were broken in various ways (#78, mailinglist)
* read_font_info was sometimes called recursively from lua-loaded
virtual fonts
* do_vf was sometimes called on lua-loaded fonts that where
already known to be virtual
* trailing junk in tfm files is now ignored (needed for ecrm fonts)
* pdf_ignored_dimen was initialized too late, breaking \prevdepth
handling and causing output lines to overlap eachother (#72)
* pdf.immediateobj() had a printf-related bug
* the fontname terminal logging is fixed for strange font file names
* lua tex array assignments now listen to the globaldefs setting
(tex.count[0] etc) (#92,partial)
* \parshape was broken (#70)
* there is no longer a ".tex" extension forced on very input file (#74)
* eof() for mapfiles was true one byte too soon (#76)
* out of range \lefthyphenmin and \righthyphenmin settings now actually
disable hyphenation (#90)
* tex.unset_attribute() looked too far ahead when a to-be-unset
attribute id not only did not exist in the node, but was also
higher than the highest set attribute on the node. (#65)
* the parameters attr and page_name of read_image() were swapped
(this broke \pdfimage with attributes)
* tex filenames with spaces in them on the command line are now
allowed again (#30)
* sometimes pfb fonts were included multiple times without valid
reason (#29)
* some parts of the pdftex 1.40.9 PNG transparancy hack were still
present and caused transparant png handling to fail
* \localinterlinepenalty and \localbrokenpenalty were broken
* special case catcode tables are now handled better (#23)
* the handling of missing .notdef charstrings in old pfb fonts
is fixed (#27)
==============================================================
Luatex beta-0.29.0 was released 20080718
==============================================================
New features:
* The embedded pdftex is now 1.40.9 (forthcoming) except for the
following:
- the png transparancy fix is skipped because it is in conflict
with a macro-based solution offered by context mkiv.
- LFS (PDF files > 2GiB) is not working yet.
- Synctex is still missing
* libpng, xpdf, and zlib are updated to their pdftex 1.0.9 levels
* MPlib is updated to 1.090
* The syntax of buildpage_filter is changed to avoid confusion
(and crashes). See the manual for the new calling convention.
Bugs fixed compared to 0.28.0:
* The previous bugfix for \languages skipping numbers was wrong.
* Various compile-time warnings are suppressed
* \pdfsetmatrix was broken
* \pdfsave and \pdfrestore were broken
* Valid user_defined whatsits nevertheless were generating errors.
==============================================================
Luatex beta-0.28.0 was released 20080630
==============================================================
There is one new feature:
There is now experimental support for non-trivial discretionaries
following explicit hyphens. In analogy to \prehyphenchar and
\posthyphenchar, there are two new parameters \preexhyphenchar en
\postexhyphenchar. Both new parameters default to zero (nothing).
When set to a nonzero value, the parameter is added to either the
pre- or post- break text. Note that this is *in addition to* the
hyphen already in the input. Testing and comments are very welcome.
Here is a short example (no idea what is says):
\pdfoutput=1
\hsize=2in
\postexhyphenchar=`-
Seria bom se eu
pudesse t\^e-lo mantido como amigo, mas por
mais bem-intencionado que eu fosse, n\~ao
foi possivel
\bye
Bugs fixed compared to 0.27.0:
* Words that started off with a character with a zero \lccode
were never hyphenated at all.
* There was a bug in the new active characters code that prevented
the latex format from being built (with Invalid character error).
* There is a temporary fix for the sometimes appearing "Font has a
bad FontBB" message from Acrobat.
* \leaders did not actually stretch enough (the last bit of glue
that has to line up the line endings was never output to the PDF).
* Bad paragraph-related callbacks could result in luatex crashing.
* The pre_linebreak and post_linebreak filters were never called
when \output was active (this was a leftover of a superceded
optimization).
* 'skipping' language codes when setting up \patterns c.s. did not
work (it used the next empty slot instead of the actual value of
\language).
* Using multiple 'attr' keywords on box items could cause random
crashes.
* Calling lang.hyphenate() with one argument (without specifying a
tail node) could crash.
* The luatex pdf banner and version reporting is cleaned up a bit.
* Conflicting patterns inside \patterns now give an error:
! Conflicting pattern ignored.
(duplicate identical patterns are ignored without error).
==============================================================
Luatex beta-0.27.0 was released 20080624
==============================================================
Bugs fixed compared to 0.25.3:
* Unicode reencoding support for non-standard (i.e. older)
Type1 fonts is now somewhat less broken than it was (#25)
* .vf fonts using specials crashed luatex
* luatex would crash on --\par (#33)
* An attempt is made to get a sane default value for StemV in
the created pdf (#32)
* We can now guarantee that %PDF-1.* header is printed before
the first pdf.print() output
* lang.hyphenate() was broken
* insert_before(a,a,b) was broken (#37)
* argv[0] is now cleaned up before being used as a default for
mem_name and prog_name (#28).
* luatex would crash on loading extended fonts (fonts loaded
via lua callbacks) from a format file.
* The fix for pdftex bug #799 is backported from pdftex 1.40.4.
* slnunicode had a bug in the unicode.utf8.gmatch iterator.
* Queries of nonexisting fontdimens could cause a crash.
* luatex would crash on {\textdir TLT\pardir TLT x\break\par }
* Fixed wrong placement of lines in mixed-direction paragraphs
that could happen in some situations.
Other news:
* Luatex now includes luasocket (#35)
See http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/
for usage.
There is a new commandline option: --nosocket to disable this,
and that is also implied by --safer.
NOTE to the binary builders: there are some unfixed configure
problems when you need to add a specific library to get socket
support on your platform. You probably will have to edit the
generated Makefile by hand (search for 'socketlib').
* There is ongoing development to the 'img' and 'mplib' libraries.
See the reference manual for details.
* The 'character commands' in virtual fonts now support image
inclusion. See the reference manual for details.
* Lua error messages now include the call stack.
* \directlua and \latelua have been extended to accept a 'name'
keyword. The argument is a token list that is used as the lua
name of this chunk in lua error messages and call stack prints.
(#42)
* The lua chunk names can be interfaced via a new virtual
table called lua.instancename, the values in that function as
defaults in the absence of 'name' keywords.
* The 2-plane limit on active character range is removed (#12).
* Subsetted TTF fonts in the PDF now retain the cmap table.
* There is a new Lua variable os.selfdir. This contains the
full absolute pathname of the directory that the executable
resides in (with symlinks resolved)
* There is a new function os.uname() this returns a lua
table containing various platform information items.
* The node library now uses text strings for direction specifiers
instead of numbers. See the reference manual for details.
* The 'E' (edit) as error response functionality is now a noop.
* Adding luatex 0.25.3 to texlive resulted in a few minor backports,
in particular: Support for mktexfmt is added, and luatangle now
identifies itself as such (instead of calling itself otangle).
* We fixed a whole series of portability problems (but
we probably introduced new problems as well).
* Most (all?) files now have a corrected Copyright header,
and link in $Id: NEWS 5726 2016-01-18 11:26:27Z luigi $ and $URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/NEWS $ into the object file.
* Some unnecessary files were removed from the distribution.
==============================================================
Luatex beta-0.25.3 was released 20080418
==============================================================
Bugs fixed:
* Pdftex bug no. 936 (sarovar) regarding vertical
positioning of embedded PDF files if depth parameter is given.
* Luatex gave bogus lua return values for the tex.wd/hd/dp
values of void boxes
* A few bugfixes in mplib (square pens caused hangs, elliptical
pens caused confused output)
* Hyphenation of uppercase words (\uchyph) was broken
* Output image placements corrected for all 8 transform cases
also when artbox etc. is used
* There were missing maketexstring() calls in error messages
* Math display contents were sometimes prematurely freed during
the placement of the equation number
* Setting \language=-1 could cause crashes due to an array
index going out-of-bounds
Other news:
* build.sh.ppc is added to the source distribution. This is a
script that crosscompiles osx ppc binaries from osx intel
* tex.box[<chardef name>] is now supported (but still experimental)
* a bunch of compiler warnings are removed
* The fontforge library now dump AAT feature tags as and
"<id,flags>" string
* The new function font.nextid() predicts the next assigned font id
* Some source code changes are backported from texlive
==============================================================
Luatex beta-0.25.2 was released 20080410
==============================================================
* Updated to MPlib 0.40
* Bugfixes and cleanup in the lua img table code
* Fix \pdflastximagepages bug from pdftex
* Fix for very large tex.print strings
* Update to Lpeg 0.8.1
* &D Bugfix for Type1 fonts when out-of-range characters
are marked as 'used'
==============================================================
Luatex beta-0.25.1 was released 20080321
==============================================================
* Updated to MPlib 0.30 (that is now becoming usable)
* The build requirement for a pre-installed ctangle is gone
(thanks to Martin)
==============================================================
Luatex beta-0.25.0 was released 20080311
==============================================================
New:
* mplib library:
This version features an embedded MP interpreter whose output
can be directly accessed from lua code (mplib), without calls
to an external "mpost" command. Of course it has bugs and
limitations (makempx does not work, for example) but keep in
mind that it is only an initial attempt.
See the manual for more details.
* img library:
** img.immediatewrite() is added
** images now accept a 'transform' key
** widths etc. can now be given as width="100mm"
Fixed:
* \parshape handling was completely broken since 0.20.0+
* when \pdfprotrudechars was in effect, an assertion failure
could happen when embedded \hboxes in the paragraph appeared
at the end of a line.
* import of otf fonts with contextual lookups has been debugged,
thanks to a patch by GW himself.
* compiling with gcc 4.2.3 is now supported
* if you want to build from source, you need a pre-installed ctangle.
==============================================================
Luatex beta-0.22.1 was released 20080227
==============================================================
* The macnames.c source file for building ttf2afm is restored.
* "make depend" in luatexdir now works again
* luatex sometimes crashed because it attempted to expand an
already expanded font
* luatex aborted when --progname was given but no format name.
It now sets the format name to the given progname in that case
* sometimes paragraphs with near-empty lines could cause a crash
* img.supportedtypes() had a bug causing it to crash
* img.supportedtypes() has been renamed to img.types for consistency
* img.boxes() added, returns strings representing bounding boxes
* img.node() added, returns a whatsit node cf. \pdfrefximage
* node.write() now accepts multiple arguments
* the program_name_set switch was not set automatically from C,
causing errors unless lua code called kpse.set_program_name()
explicitly
* kpse.set_program_name() can now be called more than once
in a single run.
* os.spawn{...} and os.exec{...} could cause crashes because of
a memory allocation error
==============================================================
Luatex beta-0.22.0 was released 20080215
==============================================================
* We now have an official bug tracker: http://tracker.luatex.org
* A new lua library (img) is added that allows a direct
interface to the image handling of luatex. You can use this
to include images from lua code instead of via the more
traditional \pdfximage cs. See the manual.
* An optional equal sign after \{pre,post}hyphenchar is now
allowed.
* os.exec() has been extended, and os.spawn() added. These
functions have support for quoted strings, and they
also accept a table with preseparated command arguments.
* New string constants os.type and os.name are provided.
* node.last_node() is added. This pops and returns the last
node from luatex's 'current list'
* node.write() is added. This appends a node to the end of
luatex's 'current list' (experimental).
* The strict check on unicode compliance in pattern files
is dropped. Patterns files still have to be in proper UTF-8
encoding, but the error for non-Unicode character values
(like 0 - 31 and 127 - 159) is dropped.
* \pdfadjustinterwordglue, \prependkern, \appendkern
and associated \XXXXcode arrays are gone.
* The rest of the pdftex font arrays are now merged into
the new luatex font data structure. This means that you
can now set up font expansion from lua code, and that a few
font-related limits are gone.
* The 'top_skip' field in 'insert' nodes is renamed to 'spec',
for improved consistency.
* kpse.show_path() added. This behaves just like
$ kpsewhich --show-path
* The unicode.utf8 functions now also accept values in the range
1.114.112 - 1.114.367 that is used by LUATEX for raw byte output.
What's been fixed:
* Better node memory (de)allocation error tracking and messages
* Compilation on MacOSX 10.5 was broken
* There was a bug in node.insert_after
* Use of \{pre,post}hyphenchar was broken
* lfs.permissions was leaking memory
* Some warning and error messages are improved a bit
* A set of bugs in character protrusion, this seems to be working
ok now.
* Also, a set of bugs in font expansion. This now works in most
cases but is not quite bugfree yet (problematic files for testing
are welcomed).
* The functions in the kpse library would crash luatex if
kpse.set_program_name() was not yet called. gives an error now.
* Alignments with spanned columns could cause crashes
* A patch is added for problems with filename parsing on the
"first input line" (by Jonathan Kew)
* The hpack_filter and vpack_filter were only called for lists longer
than one node.
* Luatex is now more forgiving about font subsets being smaller
than their expected size (issues a warning instead of aborts now)
* A "double-free ignored" error for paragraphs with lines starting
with discarded items was fixed.
==============================================================
Luatex beta-0.20.2 was released 20071217
==============================================================
* some portability fixes to the build scripts
* a fix for multi-\span in alignments causing unbreakable
loops
* manual improvements from Jonathan Sauer
* fix for undefined csnames in \directlua if
web2c's hash_extra is nonzero
* fix for LR text inside of a RL document
* fix for open_read_file callback not being called
unless find_read_file was also registered
* removed the ocp status message when \ocps are not
actually used
* "unicodeenc" in the fontforge to_table renamed to
"unicode" for improved consistency
==============================================================
Luatex beta-0.20.1 was released 20071207
==============================================================
* texlua was broken on Solaris because the some C header
files were loaded in the wrong order.
* os.tmpdir() now accepts an argument, making it easier
to use. It now generates more unique filenames when
it is called repeatedly in one run.
* The --luaconly commandline switch is now documented
in the --help text.
* The new extended hyphenation exceptions were severely
broken.
* \pdfprotrudechars could cause luatex to abort with an
assertion failure.
* There was a bug in the \span code that could cause endless
loops.
* The simple forms of \leaders were messed up on windows
because a variable was not properly initialized.
* Non-grouped \textdir commands created invalid output.
* e-TeX's pseudo files were not closed properly in ini mode.
* The luatex.web now weaves properly again.
* I made some small improvements to the manual.
==============================================================
Luatex beta-0.20.0 was released 20071205
==============================================================
News compared to the last beta (0.11.2) is as follows:
* Completely overhauled hyphenation and ligkern application,
including the addition of a new "lang" table in lua to
interface to the language parameters, some extra functions
in the "node" table, and a few extra callbacks ("hyphenate",
"ligaturing", "kerning", "post_linebreak_filter").
There is a new chapter in the manual to document all the
changes to the hyphenation and line breaking algorithms,
it is simply too much to list here.
* the interface of the pre_linebreak_filter,hpack_filter,
vpack_filter, and pre_output_filter has changed slightly.
* boxes can now get explicit attributes different from the
currently active set, using a syntax like
\hbox attr2=12 attr3=-1 to 12pt {Hi!}
* lpeg is now at version 0.7
* a whole series of exotic bugs and compiler warnings are
fixed, mostly thanks to the watchful eye of Fabrice.
* texio.print now accepts multiple strings as arguments.
* the lua functions os.sleep(), os.times(), os.gettimeofday()
and os.tmpdir() have been added.
* lua now comes with the coroutine (coco) patches from the
luajit project applied.
* the banner line no longer claims to be TeX.
* a bunch of bugs reported on the mailing list have been
fixed (I hope all of them).
* (internal) we found lots of small ways to speed up lua
node processing.
* (internal) the node (de)allocation functions have been
rewritten, so that absolutely all nodes now have a type,
even the ones with variable sizes.
==============================================================
Luatex snapshot-20071029 was released 20071029
==============================================================
* Completely overhauled hyphenation and ligkern application.
There is a new chapter in the manual to document all the
changes to the hyphenation and line breaking algorithms,
it is simply too much to list here.
* the interface of the pre_linebreak_filter,hpack_filter,
vpack_filter, and pre_output_filter has changed slightly.
* lpeg is now at version 0.7
* a whole series of exotic bugs and compiler warnings are
fixed thanks to the watchful eye of Fabrice.
* texio.print now accepts multiple strings as arguments.
* The lua function os.sleep() is added
==============================================================
Luatex beta-0.11.2 was released 20070918
==============================================================
* Pdf inclusion and subsetting of CID-based opentype fonts
now works as it should.
==============================================================
Luatex beta-0.11.1 was released 20070918
==============================================================
A quick list of what is new and fixed since beta 0.10.2:
New:
* pfb+afm fonts can now be used in 'wide' (encodingbytes=2) mode
* searching in PDFS using 'wide' fonts now works reasonably well
(based on the tounicode feature)
* related to that, tounicode information can now be passed
on inside the font metrics table
* font subsetting is now supported for CID-based OpenType fonts
(however, there is a known bug with KpozMinProVI-Regular.otf)
* fontforge's warning and error messages are now intercepted
and passed on to the lua code as a second return value of
the fontforge.open() function
* the new primitive \suppressfontnotfounderror can suppress
the TeX error for "Font not found"
* The lua function font.current can now be used to set TeX's
current font
Fixes:
* set_attribute(-1) is now the same as unset_attribute()
* OpenType lookups with glyph classes would crash luatex
* luazlib would not compile on debian (fix from Norbert)
* CID-based fonts would crash luatex
* Bare CFF should be read in binary mode (fix from Akira)
* VF processing did not process packets containing zero bytes properly
* the truetype collection (.ttc) handling is fixed, so that all
of the fonts inside a collection can now be used reliably
* application segfaults and stack overflows are intercepted
so that luatex can quit a bit more gracefully
* an assertion failuer on systems with signed chars (linux-powerpc)
is fixed
* a crash on AMD64 linux was fixed
* the lua "pdf" table code was wrong
* \ifcsname did not work properly for UTF-8 characters
* Use of the math-related functions using make_fraction (like \atop)
caused a crash
* \handling of \if\noexpand was wrong
* applied a patch that cleans up XForm and page calculations
* "autoconf" support from zziplib is stripped
==============================================================
Luatex beta-0.10.2 was released 20070814
==============================================================
Bugs fixed:
* the primitive \span was completely broken
* \pdfexpandfont (font expansion) misbehaved if it was used more
than once
* virtual fonts: sometimes they used the wrong internal font id,
loading vf fonts via fonts.read_vf() was impossible, and sometimes
virtual fonts created segfaults
* while dumping formats, the last font parameter for each font was not
dumped at all
* zziplib was always compiled with pre-installed zlib headers, instead
of the ones in the build tree
* lua 5.1.2 has trouble quoting ^Z characters etc, the tentative patch
for lua 5.2 from Luiz fixes that, hopefully
* fontforge.font('font.pfb') now properly parses AFM boundingboxes
* non-existing files in the argument for fontforge.open() or
fontforge.info() could cause segfaults, now it generates an error
instead
* fontforge.open() did not return character widths for vertical fonts
as it should
* on Windows, fontforge believed that ttc files (TrueType Collections)
were actually directories. ttc processing is still not 100% correct,
but it is getting better
* the build system used explicit 'make' sometimes
* the auto-growing string pool was not used everywhere
* there were some typos in the documentation parts of the pascal web
* use of \parshape could easily exhaust all available memory
New features:
* support for applying Adobe Feature files (.fea) and Adobe Font
Metrics (.afm) is added to the fontforge library
* fontforge.info() will now return an array of tables for the contents
for ttc files
* support for a 'texluac' personality was added, to replace the 'luac'
command from the official Lua distribution
==============================================================
Luatex beta-0.10.1 was released 20070719
==============================================================
This was a hotfix because beta-0.10.0 was completely broken.
==============================================================
Luatex beta-0.10.0 was released 20070718
==============================================================
The latest version of the manual is included in the package, and I
am not going to repeat all of that. There were some minor changes
compared to the previous snapshot, but mostly just bugfixes and
documentation improvements.
==============================================================
Luatex snapshot-20070626 was released 20070626
==============================================================
* Integrated the lua library lzlib, this defines tables with
bindings for zlib (including eazy-to-use gzip support)
* Updated to slnunicode version 1.1
* Some small cleanups in the sparse array handling
* Moved the raw byte support out of the valid unicode range
* Fixed a bug in the OFM font reader
* Removed the pdftex snap nodes (and associated primitives)
==============================================================
Luatex snapshot-20070622 was released 20070622
==============================================================
Not a lot of news, but it fixes a few important bugs in the lua
node processing. Also a few utility functions are added:
* tex.round()
rounds and bounds checks a lua number to make sure it is
a valid tex integer.
* tex.scale()
multiplies a number (or the numeric values in a table)
with a fixed quantity, and calls tex.round() on the result.
* node.has_field()
Test if a node has a specified field name
* node.remove()
removes a node from a nodelist, while keeping the list intact
* node.insert_before()
inserts a new node into a nodelist, just before a specified
location node
* node.insert_before()
inserts a new node into a nodelist, just after a specified
location node
* node.hpack()
packages a nodelist into a hlist node
==============================================================
Luatex snapshot-20070619 was released 20070619
==============================================================
* The lua node processing interface is completely reworked.
It is now completely based on userdata, and uses a new lua table
called 'node' to hold the methods. More detailed information
is in the manual (of course).
* There is a fifth node processing callback:
pre_output_filter
this is executed just before the packaging of \box 255.
* The hpack_filter and pre_linebreak_filter callbacks now
receive an extra argument indicating the number of top-level
glyphs in the node list.
* Virtual fonts can now contain a 'node' key in the glyph
commands: the value should be a hlist node (i.e.: a horizontal
box), and that will then be output for each character access
in that font.
* A new set of registers is added, called \attribute. These are
values that will be automatically attached to nodes created in
their scope. More information in the manual.
* Direct read/write access to TeX's box registers is addded to
the lua 'tex' table.
* TeX's main memory now grows dynamically, and the (de)allocation
routines have been rewritten completely.
* The 'kpse' table is extended with extra interface functions, to
allow texlua to be used as a scripting engine.
* The \pdftexversion command now returns 200, not 140.
* The displayed banner and --version screens are cleaned up.
* The format file is now RLE compressed. Not as small as before,
but unpacking is much faster.
==============================================================
Luatex snapshot-20070426 was released 20070426
==============================================================
This past month I have been busy with nodes and lists of nodes,
so the big new feature in this release is that there are four
callbacks that operate on node lists:
buildpage_filter
pre_linebreak_filter
hpack_filter
vpack_filter
The preliminary documentation for these is in the manual, but the basic
idea is that you can filter a node list just before LuaTeX starts doing
something with it (like line breaking). This functionality is not stable
yet: the node presentation of the various node types is pretty much OK
now, but keep in mind the following:
* math noads and math typesetting are not handled at all (yet)
* not all hpacks and vpacks are intercepted (yet)
* the nested node list handling will probably change
* A conversion tool for nodes to/from dictionaries is planned,
but not done yet
The other changes in this snapshot are various bugfixes (for builds
on various platforms as well as font issues) and speedups (in the
execution of callbacks and the creation of lua font representations).
==============================================================
Luatex snapshot-20070322 was released 20070322
==============================================================
* I have changed the token_filter callback quite rigorously,
mostly because of speed issues. The raw speed of trivial
lua token handling is now only about 20 times slower than
the native handling. Not bad at all, considering it has to move
between interpreted and compiled code for each and every
token. If you do not run the token filter inside \output,
the effective run speed difference should not be much more
than a factor 1.5.
Two big differences: you have to call token.get_next()
yourself, and the token table is now a three-item array
instead of a five-key hash. The minimal example changes to
\directlua0{
callback.register('token_filter', function ()
return token.get_next()
end)
}
more details are in the manual.
* I've fixed a few bugs in the handling of Opentype TTF, and added
a new key in the font definition table:
f.encodingbytes = (1|2)
The default is 2 for opentype and truetype format, 1 otherwise.
Later on, it will become possible to have a type1 font in 2-byte
(CID) encoding or a truetype font in traditional encoding (1-byte),
but I have not covered all cases yet.
==============================================================
Luatex snapshot-20070309 was released 20070309
==============================================================
* The OCP debug information is removed again.
* There is a new callback that I am quite excited about myself:
'token_filter'.
A bit of text from the reference manual:
--------------------
This callback allows you to change the modify any lexical token that
enters the \type{main_control} function before \LUATEX\ executes the
associated command.
Note: not all tokens can be intercepted yet, only those that are `seen'
by \LUATEX's main control function. Supplemental tokens like the bodies
of macro definitions and the right-hand side of register assignments
are not seen. For now, this is intentional.
\startfunctioncall
function (table <token>)
return table <token>
end
\stopfunctioncall
Calling convention for this callback is bit more complicated then for
most other callbacks. Initially, lua function will be called with the
next token from \type{get_next()} as argument, represented as a small
lua table. The function should either return a lua table representing
a valid to-be-processed token, or something else like nil or an empty
table.
If your lua function does not return a table representing a valid
token, it will be immediately called again with yet another token
from \type{get_next()} as argument, until it eventually does return
a useful token.
But if the function does return a usable token, then that token will
be processed by \LUATEX. Afterwards, the function will be called
again, but now without an argument. This is repeated until it stops
returning tokens. Then processing reverts back to the other branch.
The point behind that roundabout calling convention is that it
allows the lua function to buffer tokens for various uses. That in
turn makes it possible to do some really advanced things like
replacing OTPs.
Now about that table. The table that the function will receive
contains four fields:
\starttabulate[|l|i|p|]
\NC Key \NC type \NC Explanation \NC\FR
\NC cmd \NC string \NC A representation of \LUATEX's internal
command code\NC\NR
\NC chr \NC number \NC The command code modifier\NC\NR
\NC cs \NC string \NC If the token came from a csname, this
is that csname\NC\NR
\NC mod \NC character \NC A single character string representing
the current processing mode. One of {\bf v}ertical, {\bf h}orizontal,
display {\bf m}ath, {\bf n}o, internal {\bf V}ertical,
restricted {\bf H}orizontal, or inline {\bf M}ath mode.\NC\LR
\stoptabulate
If you modify the table before returning it, then it is wise to return
either a (\type{cmd}, \type{chr}) pair, or a \type{cs} string. That is
because if both options are present, the pair has precedence and the
string is ignored. On the return table, {\bf mod} is ignored always.
--------------
I have no long example code yet and it is not as complete as one
would want it to be because it is not intercepting everything that
comes in, only the bits that are triggered by the main control
loop.
I decided to do a fast snapshot release for two reasons:
* It is one of the easier extensions to get started with if you want
to learn a bit about lua programming
* I would welcome feedback on the token interface, because it will
be needed in other places as well, soon. I am still not sure
whether converting the command to/from strings is worth it, for
example. And maybe it would be less confusing if you could return
a list of tokens instead of being called repeatedly?
Here is the trivial example to get you started:
\directlua0{
callback.register('token_filter', function (t) return t end)
}
==============================================================
Luatex snapshot-20070307 was released 20070307
==============================================================
* Non-CID PostScript-based Opentype fonts are now combined over
the entire document, and properly subsetted. The code is
borrowed from xdvipdfmx with some minor adjustments
Adding support for CID-keyed OpenType fonts would not be hard
but at the moment I lack example input (and incentive).
* A small extension to the virtual fonts structure: you can use
f.fonts[1] = { 'id' = 38}
to do a backreference to a previously defined font. This saves quite
a few computations
* There was a bug in the handling of \leaders in the output whereby
it's width was taken to be twice what it should be while writing
to the PDF, fixed now.
* The font inclusion code is cleaned up a bit by Hartmut.
* Some compilation problems were fixed.
* There is (quite a bit of) debugging information printed out when
OTPs are in use, because I am tracking down a bug reported by Idris.
The input of each and every OTP step is shown on the terminal in
a line line this:
[57902][1568][58423][1568][58408][1568][58921]
those are the decimal values of ocp i/o characters. If you don't
need them, don't worry about it.
==============================================================
Luatex snapshot-20070302 was released 20070302
==============================================================
* The 'snapshot version' banner is now calculated dynamically
at build time. This aids in figuring out what binary people
are actually running, but it can possibly break the build on
systems that do not have a `date` command.
* The do_vf() function that checks for virtual font existance
is now run immediately after the font definition instead of
being postponed until characters are output.
* The 'define_font' callback interface has changed a little.
It is now:
retval = function (name,size,fontid)
where fontid is the internal font number of the font that
is currently being defined, and retval can be either a table
(as before) or a different, previously defined fontid. This is
useful if a previous definition can be reused instead of
creating a whole new font structure.
* The internal font data structure has been redone. Glyph index
inside a font is now handled by a sparse array, so that use
of e.g. 0xFB01 (fi-ligature) no longer creates a 64000+ entries
character array.
* The internal cache-ing of font metric information is turned
off completely, because it was based on the assumption that
name + size were a unique identifier for a font. This can no
longer be guaranteed.
* word boundary processing now works OK again, thanks to the
introduction of two virtual characters in the font table
definition. Besides the normal numeric entries in the
f.characters table, there can now also be two string keys:
"left_boundary" and "right_boundary". The ligatures and kerns
of the 'left_boundary' character are used for the pre-word
boundary processing, ligatures and kerns between characters
and 'right_boundary' are used for the post-word processing.
* Lua font table references are no longer cached by the
executable ,in order to preserve memory. (the only downside
is that font.fonts[] access is now slower because of the need
to recreate the lua table).
* There are other some small changes to the font table formats.
Please see the manual for details.
* A 'real' font can now still have virtual characters if they
are loaded via lua. Just set the 'commands' section and/or
the 'fonts' array to your liking, and it should work out.
If you have created no 'fonts' array at all, then the default
font (indentifier '1') is the current font, so that you
can create virtual duplicates of already existing characters.
Note: this does not work the other way. There can not be
'real' characters in a virtual font!
* Truetype-based opentype fonts no longer require Acrobat 7
t(hey are now written out as if they are normal truetype).
* A lua init script can now set 'texconfig.formatname' and/or
'texconfig.jobname'. If ther is no file or format specified
on the commandline, then, if, one of those keys is present,
that key will be used instead of simply quitting with an
error.
* Placement of boxes and rules in right-to-left mode is debugged,
and now seems to work ok.
* Virtual font loading is debugged.
* Some memory leaks are resolved
* HZ font expansion should work ok again, but is not tested.
* a few of the warning during opentype loading have been removed
because the problems are rather harmless and turned out to be
triggered by almost every font.
==============================================================
Luatex snapshot-20070218 was released 20070218
==============================================================
* The pdftex stuff is now updated to 1.40.3
(and on top of that, it still has those extra patches announced in
snapshot 20070202)
* The virtual font parser is debugged and now appears rather stable.
* There is one extra virtual command:
"commands" = {
{"slot", 1, 97}, -- place character 97 'a' in local font 1.
}
This is just a shortcut for {"font",1}, {"char", 97}
* Some small memory leaks have been fixed. Luatex does not leak big
time, but I'd like to get back to valgrind reporting '0 out of 0',
instead of the current 800 bytes or so (that is a slow process).
* You can read a truetype or opentype font from within lua code
using font.read_ttf() or font.read_otf(), respectively.
This feature uses a fair bit of the fontforge code, making the
binary rather a bit larger than before. Just so you know.
Apple (AAT, as well as encoding) support is still largely missing,
and bitmap-only and old Multiple-Master truetype fonts are not
supported at all (and never will be).
The output format is (shadily) documented in the reference manual.
At the moment, it very closely resembles the internal font stucture
that is used by fontforge.
* LuaTeX can now write wide OpenType fonts to the PDF file.
There is no subsetting support yet, and a ToUnicode CMap is also
still missing, but nevertheless it is already somewhat useful. The
rule is very simple: if a font uses code points above 255, then it
is considered to be a `wide' font, and it will be written out as
a Type0 CID-keyed font to the PDF.
Caveat: Getting suitable metrics into LuaTeX can be a bit of problem
right now, because font.read_otf() does not produce anything that
can be fed back into define_font without extra processing. Hans has
some experimental Lua code for ConTeXt (of course :-)) and that is
how I know it works. You can expect a nicer interface soon,
hopefully next week, in the form of a simplistic table conversion
routine.
* I have started work on supporting Aleph's bidi typesetting in PDF
mode as well, simple text seems to be largely ok. More complicated
documents will no doubt still show some bugs, but fixing those will
be easy (once they are discovered). Exactly what happens with specials
is not yet investigated.
* Omega's (16-bit) wide virtual fonts now work OK in PDF mode. This
means that many Aleph files can now be run in PDF mode directly.
(the documents that use UTF-8 input encoding)
==============================================================
Luatex snapshot-20070202 was released 20070202
==============================================================
* The pdftex stuff is now updated to 1.40.2, and on top of that, it has
- an extra patch from Han The Thanh that adds a primitive to control
the merging of fonts from external pdf images (\pdfreplacefonts),
and a bugfix for virtual font handling.
- an extra patch by Hartmut Henkel that removes a number of malloc()s
and free()s from the calls to the compression library, thereby
making luatex run a bit faster.
* luatex now happily accepts the following low-level syntax:
\font\myfont = <general text> <at specifier>
It feeds the <general text> to either kpathsea or a lua script for
further processing after stripping the braces.
In itself, this is not all that useful, but the reason for this
syntax extension is that it paves the road for a macro package
to do something like this:
\font\myfont = {font="Times New Roman", color="\darkred",
encoding="ec", features="liga", size=10bp}
without having to resort to system-specific quoting mechanisms.
Macro (and other) expansion takes inside the braced argument.
(I am considering adding this extension to \input as well).
* It is now possible to define a font into the font.fonts[]
directly from lua, but becayse use is limited, I am only
mentioning it to be complete.
Syntax:
<number> id = font.define(<table> font)
* There is a (not very reliable yet) virtual font parser accessible
from lua.
Syntax:
<table> vfdata = font.read_vf(<string> name, <number> size)
The interpreter tries to give a reasonable representation of a
virtual font file (the .vf file). Besides a few simple top-level
items:
designsize -- in scaled points
size -- also in sp
name -- the file name
checksum -- the vf checksum
header -- the header comment (if any)
it also has a top-level array 'fonts' wherein each item is a mini-
array describing one of te mapped fonts. An example makes this
easy to understand
"fonts" = { {"ptmr8a",655360}, {"psyr", 600000} }
says that the first referenced font (index 1) in this virtual font
is ptrmr8a.tfm loaded at 10pt, and the second is psyr.tfm loaded
at a little over 9pt. These index numbers are used by the character
command definitions that follow.
At top level, there is a 'characters' array, just as for a normal
font, except that each item has only two keys:
"width" -- the tfm width (as stored in the .vf)
"commands" -- an array of virtual font commands for a character.
each of the items in the 'commands' array is itself a tiny hash.
Each of those mini-hashes represents a single character packet
command. Here is a 'commands' entry that contains every possible
one at least once:
"commands" = {
{"push"}, -- remember where we are
{"right", 5000}, -- move right 0.08pt
{"font", 1}, -- select the fonts[1] entry
{"setchar", 97}, -- place character 97 'a'
{"pop"}, -- go all the way back
{"down", -200000}, -- move *up* about 3pt
{"special", "pdf: 1 0 0 rg"} -- switch to red color
{"rule", 500000, 20000} -- draw a bar
{'special',"pdf: 0 g"} -- back to black
}
* But the big news is that you can now define your own virtual fonts
on the fly, by adding a few statements to the table returned to
the 'define_font' callback.
There are a few requirements:
- The table has to have a top-level key 'type', and it's value
must be 'virtual'.
The presence of this key with the specific value 'virtual'
will trigger handling of the rest of the special virtual font
fields in the table, but the mere existance of 'type' is
enough to prevent luatex from looking for a virtual font
on its own.
Therefore, this also works 'in reverse': if you are absolutely
certain that a font is not a virtual font, assigning the value
'base' or 'real' to 'type' will inhibit tex from looking for a
virtual font file, thereby saving you a disk search.
- There must be a top-level 'fonts' array, as explained above.
Any fonts that are not yet known to luatex at that moment,
will be loaded automatically (Warning: do not ever use a font
in 'fonts' with the same name you will return in the table you
are defining right now!).
- Each and every character in the fonts needs to have a 'commands'
key, as explained above.
The main point behind these restrictions is that a font is
*either* a base font *or* a virtual font. It cannot be both
at the same time.
==============================================================
Luatex snapshot-20070126 was released 20070126
==============================================================
* Underscores in pascal identifiers are now retained.
This took quite a bit of work. The web2c conversion tools
needed only small adjustments, but most of the existing C
code depended on the removal of the underscores. I had to
go through changing many lines. 99% of all identifiers are
now written the same on the pascal side as on the C side.
This makes writing interface code quite a bit less confusing.
Not everything is completely clean yet, because I did
not want to change the web2c-specific C files. I often
took the other approach and removed the underscores
from the web2c options (like 'parsefirstlinep') in the
change file instead. Ugly, but predictable.
There is about a dozen or so of #defines left, that map
memoryword -> memory_word
strpool -> str_pool
etc.
* The virtual font parsing and interpreting is now done in C.
(this is because it needs to be interfaced with the lua-based
font loader)
* I am in the process of merging: the VF stuff; the TFM stuff;
the lua font loading; and the pdftex font backend into one
interface, so there were some smallish changes relating to
that as well. Nothing worth mentioning just yet except that
luatex now will read "ovf" files as well as "vf" files.
* There are a few really small bugfixes for bug reports I received
on this list and by email.
==============================================================
Luatex snapshot-20070119 was released 20070119
==============================================================
The largest new bit is the existence of a font.fonts array, that you
can use to query/adjust the internal defined tex fonts. See the manual
for more details.
Two small new lua extensions are added as well:
* os.setenv() -- to change the environment
* os.exec() -- a non-returning os.execute()
And a bit of cleanup in the commandline processing.
==============================================================
Luatex snapshot-20070117 was released 20070117
==============================================================
* the pdftex core is updated to 1.40.1, and web2c to 7.5.6
* the pdftex-specific documentation is removed
* lua lpeg library updated to 0.4
( http://www.inf.puc-rio.br/~roberto/lpeg.html )
* the C part of the lua md5 library is added to the binary
( http://www.inf.puc-rio.br/~roberto/md5/md5-5/md5.html )
* --luaonly now puts the script itself at arg[0], and
preceding commandline items in the negative indices
(instead of starting the count at zero).
This new approach is compatible with the standalone lua
interpreter.
==============================================================
Luatex snapshot-20070107 was released 20070107
==============================================================
Hot on the heels of 20070105, a new snapshot. It turns out
that using the callback to define a font broke all ligatures.
This snapshot fixes that, and it has a few minor updates to
the manual. Next shapshot will be after the inclusion of
pdftex 1.40.1.
==============================================================
Luatex snapshot-20070105 was released 20070105
==============================================================
* the calculations that converted lua strings into tex units
were horrendously wrong, this was discovered by Pawel.
* io.lines() was still using the old, line ending sensitive,
code from the lua core distribution
* The main font memory is allocated as needed^(1) instead of
statically pre-allocated.
* ligatures and kerns are separated completely from each other,
so use of \noligatures no longer inhibits kerning as well
* Metrics can be loaded using a callback: 'define_font'.
The value returned should be a lua table representing a tfm
file.
* there is a new lua table: font. It has one function:
font.read_tfm() that returns a table reprentation of the tfm
contents, for use with the above mentioned callback
* I dropped suppport for "Level 1" OFM files. I would like
to have a try at those extended font files, but I lack
examples (fonts nor documents). I am not even sure such
fonts have ever existed in the 'real world'.
==============================================================
Luatex snapshot-20061208 was released 20061208
==============================================================
* There is a new switch: --safer. This disables a number of lua
functions that are more or less dangerous (a detailed list is
in the manual)
* Two longstanding bugs have been fixed: \latelua works once
again (patch by Hartmut) and a bug that caused mysterious crashes
turned out to be a problem inside the paragraph builder
(reconstitution of ligatures)
* Six new string iterators have been added to the string library:
string.characters (one 1-letter string)
string.bytes (one byte)
string.characterpairs (two 1-letter strings)
string.bytepairs (two bytes)
string.utfcharacters (a one-character utf-8 string)
string.utfvalues (a unicode code point number)
* The top 256 values of the unicode range (starting at hex
value "10FF00) are now reserved for byte output. Characters
in that range will be written by luatex after substracting
that offset. The net result is that \char"10FFA9 is written
as byte value hex A9 = decimal 169 = copyright sign in latin1
This trick allows byte-oriented output to \pdfliterals and
\specials, but should be considered very experimental.
* There is a new callback called 'process_input_buffer' that can
be used to mutate the line buffer just before LuaTeX actually
starts looking at it.
* The statistics table now has readable items
statistics.inputid
statistics.lasterrorstring
that represent TeX's current input id and the last error string
* The show_error_hook callback no longer receives any arguments
* There is a new switch: --safer. This disables a number of lua
functions that are more or less dangerous (a detailed list is
in the manual)
* Two longstanding bugs have been fixed: \latelua works once
again (patch by Hartmut) and a bug that caused mysterious crashes
turned out to be a problem inside the paragraph builder
(reconstitution of ligatures)
* Six new string iterators have been added to the string library:
string.characters (one 1-letter string)
string.bytes (one byte)
string.characterpairs (two 1-letter strings)
string.bytepairs (two bytes)
string.utfcharacters (a one-character utf-8 string)
string.utfvalues (a unicode code point number)
* The top 256 values of the unicode range (starting at hex
value "10FF00) are now reserved for byte output. Characters
in that range will be written by luatex after substracting
that offset. The net result is that \char"10FFA9 is written
as byte value hex A9 = decimal 169 = copyright sign in latin1
This trick allows byte-oriented output to \pdfliterals and
\specials, but should be considered very experimental.
* There is a new callback called 'process_input_buffer' that can
be used to mutate the line buffer just before LuaTeX actually
starts looking at it.
* The statistics table now has readable items
statistics.inputid
statistics.lasterrorstring
that represent TeX's current input id and the last error string
* The show_error_hook callback no longer receives any arguments
* The statistics table now has readable items
statistics.luabytecodes
statistics.luastates
statistics.luabytecode_bytes
statistics.luastate_bytes
for memory statistics reporting
* The statistics table now has readable items
statistics.luabytecodes
statistics.luastates
statistics.luabytecode_bytes
statistics.luastate_bytes
for memory statistics reporting
==============================================================
Luatex snapshot-20061204 was released 20061204
==============================================================
* The LuaTeX interpreter can now be run as a standalone lua script
processor, by using a commandline like this:
luatex --luaonly=luatools.lua
* Luafilesystem (http://www.keplerproject.org/luafilesystem/ ) is
included.
* There are a total of eight new file discovery callbacks:
find_vf_file
find_ocp_file
find_map_file
find_enc_file
find_sfd_file
find_pk_file
find_data_file
find_opentype_file
this enhances the orthogonality of the callback system, nothing
fundamental is changed.
* There is a new callback called 'process_input_buffer' that can
be used to mutate the line buffer just before LuaTeX actually
starts looking at it.
* The 'reader' and 'close' functions from 'open_read_file' now
receive the table they are defined in as a function argument,
that can be used as a per file localized data store.
* Updated the Lua to the latest 5.1.1, with all known bug patches
from the website applied as well
* Runtime autoloading of lua .so files is now off on all platforms.
* The statistics table now has readable items
statistics.filename
statistics.linenumber
that represent TeX's current file name and line number
* The support for user-defined type3 font .pgc files and the
associated 'read_miscfonts_file' callback has been removed.
(nobody used it anyway)
* General cleanups to the source tree and build process.
==============================================================
Luatex snapshot-20061023 was released 20061023
==============================================================
* there was a missing callback: find_font_file
* program_invocation_name was not set
* buf_size could not be more that 300k
==============================================================
Luatex snapshot-20061013 was released 20061013
==============================================================
Last friday I uploaded a new snapshot and today I finally
finished updating the manual to go with it. The changes all
relate to startup, file i/o, and callbacks. The main achievement
is: you can now run luatex without it *ever* initializing kpathsea.
Because I am lazy, I have checked in the pdf of the manual
as well, so that I can say: Please look at
https://foundry.supelec.fr/plugins/scmsvn/viewcvs.php/manual/
/luatexref-t.pdf?root=luatex&rev=148&view=log
for all the details. :-)
==============================================================
Luatex snapshot-20061002 was released 20061002
==============================================================
* Some infrastructure changes:
libs/slnunicode-0.9.1/ renamed to libs/slnunicode/
libs/zziplib added
libs/luazip added
(zziplib is using a different version of autofoo. I know I have
messed up something in the build process, but the bit we need
compiles ok so I've postponed attempting to fix it)
* The callback logic has changed quite a bit.
- all callbacks are now only possible in lua state 0.
- The callback 'input_line' has disappeared, and is replaced by
'open_read_file'. One of the return values of that callback
is a table that defines a 'reader' function for line reading.
See the manual for further information on this.
- There are some new callbacks for the reading of various binary
files. The current ones are:
"read_ocp_file", "read_vf_file", "read_data_file", "read_font_file",
"read_map_file".
The rest of the file types will follow soon (fonts, enc files, and
images).
- There are also some new callbacks that 'find' a file's pathname:
"find_truetype_file", "find_type1_file", "find_image_file"
here too, more will follow later.
- the functions from io. that were copied to texio have been removed
again. The new callbacks do not pass file pointers around, so
they ere not longer needed
- the 'open_write_file' is temporarily unavailable
* startup.lua is now always loaded into lua state 0
* The luazip library from kepler is linked in, so there the table 'zip'
is accessible from all lua states.
==============================================================
Luatex snapshot-20060922 was released 20060922
==============================================================
* The texio table has gained a new function:
tex_file = texio.open(filename)
returns a file handle of a type that luatex can use
internally (the return of io.open is unusable in callbacks
because it will be garbage-collected at a random time)
* In related news, there are two new callbacks you can define:
callback.register('open_read_file', f)
callback.register('open_write_file', f)
where your function should have the following conventions:
function f (number id_number, string asked_name)
return boolean success, string actual_name, tex_file filep
end
id_number: zero for the log or \input files or TeX's \read
number incremented by one (\read0 becomes 1).
asked_name: the user-supplied filename
success: return false for error, true otherwise.
The remaining two items are only looked at if you return true:
actual_name: the true filename used (with extension!)
filep: a file object opened though texio.open()
* The tex.print function has an extra optional parameter:
tex.print(ctt_id n, strings ...)
This prints the strings using the catcode regime defined by
\catcodetable n (assuming n is valid, see below)
* The new function tex.sprint has the same lua conventions as
tex.print, but behaces slightly different on the tex side:
** tex does not switch to the 'new_line' state (this implies
that leading spaces are not ignored)
** no \endlinechars are inserted
** trailing spaces are not removed from the argument
* Catcode tables are a completely new feature, that allows
you to switch the current catcode regime in one simple
statement:
\catcodetable <count>
Switches to the use of a different set of catcodes (table),
that is stored under the number <count>. Such a table has to
be previously created using one of the two command below, or
the number 0 (which is pre-inititialized)
This command obeys normal grouping rules.
\initcatcodetable <count>
creates a new, global, independent catcode table with catcodes
matching the code that are predefined by initex (tex -ini).
This allocation is global
\savecatcodetable <count>
copies the current set of catcodes to a new, global, table
with id number <count>. The definitions in this new table
are all treated as if they were made in the outermost level.
This allocation is global
At the end of each grouping level, items within all existing
catcodetables are restored, regardless of which one is the
currently active table.
Catcode table numbers cannot be larger than 0xFFFFFFF (228-1)
* There is a new lua table: lua. It contains three read-only
items:
lua.id -- the id number of the instance
lua.version -- a luatex version identifier string
lua.startupfile -- the full filename (+path) of startup.lua
and it also contains a read/write array:
lua.bytecode[] -- lua executable bytecode
This array can be used to save and restore lua functions
across lua states. The accepted values are for assignments
are functions and nil. Likewise, the retrieved value is
either a function or nil.
The contents of the lua.bytecode array is stored inside the
format file, so it can also be used to preload lua code.
* The format files are quire a bit smaller than before
==============================================================
Luatex snapshot-20060915 was released 20060915
==============================================================
* There is a new TEX primitive: \formatname. It is similar
to \jobname (read-only). In initex, the expansion is empty,
otherwise the expansion is the same as the \jobname from
the initex run.
* the lua "tex" table has been expanded with a few of the 'convert'
codes (read-only). The supported ones at this moment are:
tex.eTeXVersion
tex.OmegaVersion
tex.AlephVersion
tex.pdftexrevision
tex.pdftexbanner
tex.pdfnormaldeviate
tex.jobname
tex.formatname
tex.eTeXrevision
tex.Omegarevision
tex.Alephrevision
This list looks haphazard, but it really is not. These are
all the cases of the 'convert' internal command that do not
require an argument.
* The metatables of the subtables like tex.dimen[] etc. are now
adjustable from lua (not that I recommend doing that;-)).
* On the lua side, there is a new global value: "luaid"
It holds the internal id number of this \directlua instance.
* There is a new lua table, "callback", that has the single function
"callback.register", used to register callbacks. This replaces
the previous concoction (see my message about snapshot 20060901).
Syntax is :
callback.register(<callback name>,function (f) ... end)
where the <callback name> is for the moment, either "input_line"
or "show_error_hook".
This function internalizes the callback function in such a way
that you no longer have to worry about \luacallback (which has
been removed), nor does it matter if you redefine a function
accidentally.
The internal testing for callback presence is also quite a bit
faster, thanks to this change. Callback assignments are global
and the "input_line" always takes effect starting on the next
input line to be read from an actual file.
* \detokenizedlua has been removed. It is functionally replaced by
the new function call tex.write("").
Each argument to each call of tex.write () counts as an input
line, but:
** all catcodes on that line are either 'space' (for " ") or
'character' for all others.
** there is no \newlinechar appended.
* The implementation of tex.print() has changed as well:
** the very last tex.print() line from a \directlua
will no longer have a trailing \newlinechar
(this is very convenient when \directlua is used
within an \edef)
** tex.print() is quite a lot faster than before, and the total amount
of returnable text from a \directlua is now only limited by
available system RAM. However, each separate tex.print ()
argument has to fit in TeX's input buffer.
* The new primitive \luastartup can be set inside the format file
to specify the lua instance number in which a possible runtime
startup.lua script is executed (initex always uses 0)
* There is a new primitive \scantextokens. Differences with
eTeX's \scantokens are:
** the last line (usually only) from \scantextokens
does not have a \newlinechar
** \scantextokens never raises an eof error.
This means things like
\edef\testone
{\scantextokens{\ifnum1=1 true}\else false\fi}
are legal input (but potentially dangerous!).
* If you say
local d = tex.dimen["unknowndimen"]
'd' will now become "nil" instead of raising an error
However,
tex.dimen["unknowndimen"] = d
is still (and probably will remain) illegal
==============================================================
Luatex snapshot-20060908 was released 20060908
==============================================================
* BIG CHANGE: \directlua now runs \scantokens internally.
There is no longer a need to call scantokens yourself, the
tex.print() output is now fed straight into a pseudo file.
This is quite a bit faster as well as easier to use, but
just in case you want it, the old behaviour is still present,
under the new name
\detokenizedlua
* The texio library now has its own (partial) set of I/O commands,
so that the standard lua io library is back to the distributed
state (no more patched garbage collector)
Note: This is really a very small change (it should not have any
impact on wellbehaved input files), but I attempt to be complete
in these notes, since there is no official documentation yet.
* There is a new standard library available: kpse
The most important function in that library is find_file:
string = kpse.find_file(string filename
[,string type]
[,boolean mustexist])
both "type" and "mustexist" are optional, so the function
has from one upto three arguments.
"type" is like the '-format' argument of kpsewhich. You can
run 'kpsewich -h' for a list. The default type is "tex".
"mustexist" is like '-must-exist', and the default is false.
If you specify "true" (or a nonzero integer), then the kpse
library will search the disk as well as the ls-R databases
The new library also has three other functions that map
straight to kpsewhich commandline options:
string = kpse.expand_path(string)
string = kpse.expand_var(string)
string = kpse.expand_braces(string)
* There is a second callback possibility:
texio.show_error_hook(string message,
string|number indicator,
number lineno)
This command is run from inside the TeX error function, and the
idea is to allow you to do some extra reporting on top of what
TeX already does (none of the normal actions are removed).
"message" is the formal error message tex has given to the
user (the line after the "! ")
"indicator" is either a filename (when it is a string) or a
location indicator (a number) that can means lots of different
things like a token list id or a \read number.
"lineno" is the current line number
This is an investigative item only, comments are welcome but do
not take the syntax seriously.
The final goal IMO is the total replacement of TeX's error
handling routines, but that needs lots of adjustments
in the web source because TeX deals with errors in a somewhat
haphazard fashion (it needs unification first). The current
hook is only for 'testing the water'.
* It is now possible to use named items in the
tex.count[]
tex.dimen[]
tex.toks[]
subtables, so you can have
tex.count.scratchcounter = 0
local enormous = tex.dimen["maxdimen"]
Luatex looks up the value for you on the fly. You have to use a
valid \countdef (or \dimendef, or \toksdef), anything else will
generate an error.
In a normal TeX file, you don't do \dimen\maxdimen, but the
lua syntax seems to be a bit cleaner to me. The intention is
to evntually also allow \chardefs and macros that expand
into a number (todo)
* The tex table has also been extended with a large list of internal
parameters (partially read/write). It is possible to access
about every primitive that you can use after \the *and* is a
single token. So there is
integer = tex.tracingcommands (\the\tracingcommands)
integer = tex.prevgraf (\the\prevgraf)
string = tex.output (\the\output)
etc. for all of the internal parameters, but not the items
that need extra arguments (like \the\scriptfont )
The subset comprising simple integer and dimension registers
are writable as well as readable (stuff like \tracingcommands
and \parindent).
The fact that both lists are still quite limited is a result of
the very different types of things that can occur after \the and
also on the LHS of an assignment. The remaining primitives will
be filled in when there is a real need or implementation becomes
simple, whichever comes first.
==============================================================
Luatex snapshot-20060901 was released 20060901
==============================================================
All changes are related to lua this time, and most are quite unstable
/ experimental. But first the things that are stabel/fixed bugs:
* A VF loading bug that turned up in some of Hans' fonts
has been fixed
* A small series of bounds checking fixes to \ocplist has been
added to prevent the system from crashing due to array indexes
running out of bounds.
* The Lua file searching paths are now fixed. The search path for lua
script files now contains the following items (tried in order)
1. the local directory:
./?.lua
(for document-specific files)
2. the items from the expansion of kpathsea's $TEXMFSCRIPTS variable,
but only the parts containing 'lua' as a subpath:
$TEXMFSCRIPTS<lua>/?.lua
$TEXMFSCRIPTS<lua>/?/init.lua
(for format-specific files)
3. the $SELFAUTOPARENT sibling directory named 'lib'.
$SELFAUTOPARENT/lib/lua/5.1/?.lua
$SELFAUTOPARENT/lib/lua/5.1/?/init.lua
(for files that are not related to tex)
The search path for dynamic libraries has only
1. the local directory:
./?.so
(for document-specific files)
2. and the $SELFAUTOPARENT sibling directory named 'lib'.
$SELFAUTOPARENT/lib/lua/5.1/?.so
(of course the extension is .dll on windows, but .dlls do not
work at the moment so it will not do you much good)
* There are two functions available within a new table called
texio:
texio.write (luastring)
texio.write_nl (luastring)
both write the luastring to the same location(s) TeX writes
its stuff. So if \batchmode is on, it writes only to the
log, inside a \write, it prints to the current write file,
etc.
A read|write interface to TeX's "file selector" will
follow shortly.
* At startup, luatex searches for a script named
startup.lua
in the path list I explained above. If such a file exists, it is
loaded.
This happens right before the first input file needs to be opened
(that is after format loading, but before any \everyjob tokens).
From within the script, you can check the value of
tex.formatname
that is the 'format identification' as used by TEX. When the variable
is equal to nil, luatex in in 'initex' mode, otherwise it will be
something like: " (format=plain 2006.9.1)"
Now for the experimental portion: callbacks. Here is what I have done
so far:
* The main reason for wanting startup.lua is file (input) re-encoding.
For this purpose, it is now possible to set up a callback for
luatex to execute.
If you attach a Lua function to
texio.input_line
then from the next input line onwards, luatex will run that
function whenever it needs a new input line from a text file.
Your function will receive a file handle as argument, and
should return either a string or nil (with nil signalling that
the end of file has occurred).
The trivial case is simply this:
function reader (f)
return f:read()
end
texio.input_line = reader
Warning: The implementation is not totally finished yet. For the
moment the file handle ("f" in the example) is a normal lua file,
with a simple but important restriction: you cannot alter its value.
You cannot f:close() it, or assign it a different value. luatex
will eventually close the file itself.
The restriction is a side-effect of a synchronisation problem with
the lua garbage collector. Because of this, it also was necessary
to turn off the automatic file closing code for normal lua io
files (In other words: you have to close yourself all the files
you opened yourself, and you should not close any files you did
not open yourself).
In the near future, "f" will become a special 'texio' file object
and the needed functionality from the normal io library will be
reimplemented. Along with that change, there will also be a callback
to open (i.e. find) files, and a simple interface to the compiled-in
kpathsea to use within that callback.
==============================================================
Luatex snapshot-20060825 was released 20060825
==============================================================
The main change in this snapshot is that it uses far less memory.
luatex -ini on my linux machine went from 326Mb (last week) to
93Mb (now), and "texexec luatex" now ends at 184Mb instead of
over 1/2Gb.
This is achieved by two big changes:
* The \mathcode, \delcode, \catcode, \sfcode, \lccode and \uccode
tables are now sparse arrays that are implemented in C. They
are no longer part of the TeX "equivalence table" and because
each had 1.1 million entries with a few memory words each, this
makes a major difference.
See mathcodes.c and textcodes.c if you are interested in the
gory details, but be warned: the code is still extremely
rough and ugly. In particular, the dump and undump routines
are far from optimal, resulting in somewhat larger format files
than before (approx 1.3Mb larger with unicode-letters loaded,
10k without); and the assignments do not show up when using
the etex tracing routines \tracingassigns and \tracingrestores
(code simply not written yet)
* Single-character commands are no longer "special" internally,
they are stored in the hash just like the multiletter csnames.
==============================================================
Luatex snapshot-20060818 was released 20060818
==============================================================
The snapshot is up to par with Aleph-RC4 (from texlive devel)
and the latest pdftex beta (even newer than 20060811). However,
there are some differences, to summarize:
* There is no pool file (all strings are embedded)
* -8bit and -translate-file are silently ignored
* There is no mltex nor enctex (conflicts with aleph)
* The tex functionality is always present and enabled
(but see below about TeXXeT), so the asterisk or
-etex switch for initex is not needed
* "plus 1 filllllllll" does not generate any errors from TeX
* TeXXeT (from eTeX) is not present, so the primives
\TeXXeTstate
\beginR
\beginL
\endR
\endL
are missing
* The experimental pdftex regex match operations are removed,
because that feature does not make much sense when lua is
available so the primitives
\pdfmatch
\pdflastmatch
are missing
* The input translations from Aleph are not implemented, the
16 related primitives are all missing
\DefaultInputMode
\noDefaultInputMode
\noInputMode
\InputMode
\DefaultOutputMode
\noDefaultOutputMode
\noOutputMode
\OutputMode
\DefaultInputTranslation
\noDefaultInputTranslation
\noInputTranslation
\InputTranslation
\DefaultOutputTranslation
\noDefaultOutputTranslation
\noOutputTranslation
\OutputTranslation
All file IO assumes UTF-8, except that all the low-ascii
controls except TAB, CR en LF are written to the terminal
using ^^ notation (even these are binary in the log file).
* Input characters can use the full range of Unicode,
but it probably only makes sense to use values above
the base plane for \mathcode and \catcode assignments,
since the fonts as well as the hyphenation patterns
are strictly 16-bit still.
* The primitives
\pdfpagewidth and \pagewidth,
\pdfpageheight and \pageheight,
\fontcharwd and \charwd,
\fontcharht and \charht,
\fontchardp and \chardp,
\fontcharic and \charic,
are all aliases of eachother.
* The new primitive
\clearmarks<number>
clears a marks class completely.
* The experimental pdftex primitives
\pdfprimitive
\ifpdfprimitive
\ifpdfabsnum
\ifpdfabsdim
and provided without the extra 'pdf' prefix, so they are
simply called
\primitive
\ifprimitive
\ifabsnum
\ifabsdim
instead.
* I probably forgot to mention some things :-)
|