summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
blob: d0899147da2a56d28e5c9fa9d27e186ed6375711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
% language=uk

\environment luatex-style
\environment luatex-logos

\startcomponent luatex-introduction

\startchapter[title=Introduction]

This is the reference manual of \LUATEX. We don't claim it is complete and we
assume that the reader knows about \TEX\ as described in \quotation {The \TEX\
Book}, the \quotation {\ETEX\ manual}, the \quotation {\PDFTEX\ manual}, etc.
Additional reference material is published in journals of user groups and
\CONTEXT\ related documentation.

It took about a decade to reach stable version 1.0, but for good reason.
Successive versions brought new functionality, more control, some cleanup of
internals and experimental features evolved into stable ones or were dropped.
Already quite early \LUATEX\ could be used for production and it was used on a
daily basis by the authors. Successive versions sometimes demanded a adaption to
the \LUA\ interfacing, but the concepts were unchanged. The current version can
be considered stable in functionality and there will be no fundamental changes.
Of course we then can decide to move towards version 2.00 with different
properties.

Don't expect \LUATEX\ to behave the same as \PDFTEX ! Although the core
functionality of that 8 bit engine was starting point, it has been combined with
the directional support of \OMEGA\ (\ALEPH). But, \LUATEX\ can behave different
due to its wide (32 bit) characters, many registers and large memory support.
There is native \UTF\ input, support for large (more that 8 bit) fonts, and the
math machinery is tuned for \OPENTYPE\ math. There is support for directional
typesetting too. The log output can differ from other engines and will likely
differ more as we move forward. When you run plain \TEX\ for sure \LUATEX\ runs
slower than \PDFTEX\ but when you run for instance \CONTEXT\ \MKIV\ in many cases
it runs faster, especially when you have a bit more complex documents or input.
Anyway, 32 bit all||over combined with more features has a price, but on a modern
machine this is no real problem.

Testing is done with \CONTEXT, but \LUATEX\ should work fine with other macro
packages too. For that purpose we provide generic font handlers that are mostly
the same as used in \CONTEXT. Discussing specific implementations is beyond this
manual. Even when we keep \LUATEX\ lean and mean, we already have enough to
discuss here.

\LUATEX\ consists of a number of interrelated but (still) distinguishable parts.
The organization of the source code is adapted so that it can glue all these
components together. We continue cleaning up side effects of the accumulated
code in \TEX\ engines (especially code that is not needed any longer).

\startitemize[packed]
    \startitem
        Most of \PDFTEX\ version 1.40.9, converted to \CCODE. Some experimental
        features have been removed and some utility macros are not inherited as
        their functionality can be done in \LUA. The number of backend interface
        commands has been reduced to a few. The extensions are separated from the
        core (which we keep close to the original \TEX\ core). Some mechanisms
        like expansion and protrusion can behave different from the original due
        to some cleanup and optimization. Some whatsit based functionality (image
        support and reusable content) is now core functionality.
    \stopitem
    \startitem
        The direction model and some other bits from \ALEPH\ RC4 (derived from
        \OMEGA) is included. The related primitives are part of core \LUATEX\ but
        at the node level directional support is no longer based on so called
        whatsits but on real nodes. In fact, whatsits are now only used for
        backend specific extensions.
    \stopitem
    \startitem
        Neither \ALEPH's I/O translation processes, nor tcx files, nor \ENCTEX\
        can be used, these encoding|-|related functions are superseded by a
        \LUA|-|based solution (reader callbacks). In a similar fashion all file
        \IO\ can be intercepted.
    \stopitem
    \startitem
        We currently use \LUA\ 5.3.*. There are few \LUA\ libraries that we
        consider part of the core \LUA\ machinery, for instance \type {lpeg}.
        There are additional \LUA\ libraries that interface to the internals of
        \TEX. We also keep the \LUA\ 5.2 \type {bit32} library around.
    \stopitem
    \startitem
        There are various \TEX\ extensions but only those that cannot be done
        using the \LUA\ interfaces. The math machinery often has two code paths:
        one traditional and the other more suitable for wide \OPENTYPE\ fonts.
    \stopitem
    \startitem
        The fontloader uses parts of \FONTFORGE\ 2008.11.17 combined with
        additional code specific for usage in a \TEX\ engine. We try to minimize
        specific font support to what \TEX\ needs: character references and
        dimensions and delegate everything else to \LUA. That way we keep \TEX\
        open for extensions without touching the core.
    \stopitem
    \startitem
        The \METAPOST\ library is integral part of \LUATEX. This gives \TEX\ some
        graphical capabilities using a relative high speed graphical subsystem.
        Again \LUA\ is used as glue between the frontend and backend. Further
        development of \METAPOST\ is closely related to \LUATEX.
    \stopitem
\stopitemize

We try to keep upcoming versions compatible but intermediate releases can contain
experimental features. A general rule is that versions that end up on \TEX live
and|/|or are released around \CONTEXT\ meetings are stable. Future versions will
probably become a bit leaner and meaner. Some libraries might become external as
we don't want to bloat the binary and also don't want to add more hard coded
solutions. After all, with \LUA\ you can extend the core functionality. The less
dependencies, the better.

The \TEXLIVE\ version is to be considered the current stable version. Any version
between the yearly \TEXLIVE\ releases are to be considered beta. The beta
releases are normally available via the \CONTEXT\ distribution channels (the
garden and so called minimals).

\blank[1*big]

Hans Hagen, Harmut Henkel, \crlf
Taco Hoekwater \& Luigi Scarso

\blank[3*big]

\starttabulate
\NC Version  \EQ \currentdate \NC \NR
\NC \LUATEX  \EQ version  \cldcontext{status.luatex_version/100},
                 revision \cldcontext{status.luatex_revision},
                 number   \cldcontext{environment.luatexversion} \NC \NR
\NC \CONTEXT \EQ MkIV \contextversion \NC \NR
\stoptabulate

\stopchapter

\stopcomponent