Debian Codegraph @

texmf-dist/doc/luametatex/base/luametatex-assumptions.tex

raw
1 % language=us runpath=texruns:manuals/luametatex
2
3 \environment luametatex-style
4
5 \startdocument[title=Assumptions]
6
7 \startsection[title={Introduction}]
8
9 Because the engine provides no backend there is also no need to document it.
10 However, in \CONTEXT\ we assume some features to be supported by its own backend.
11 These will be collected here. This chapter is rather \CONTEXT\ specific, for
12 instance we have extended what can be done with characters and that is pretty
13 much up to a macro package to decide.
14
15 \stopsection
16
17 \startsection[title=Virtual fonts]
18
19 Virtual fonts are a nice extension to traditional \TEX\ fonts that originally was
20 independent from the engine, which only needs dimensions from a \TFM\ file. In
21 \LUATEX, because it has a backend built in, virtual fonts are handled by the
22 engine but here we also can construct such fonts at runtime. The original set of
23 commands is:
24
25 \starttabulate[|w(4em)||||]
26 \NC char \NC \textplus \NC chr sx sy \NC \NC \NR
27 \NC right \NC \textplus \NC amount \NC \NC \NR
28 \NC down \NC \textplus \NC amount \NC \NC \NR
29 \NC push \NC \textplus \NC \NC \NC \NR
30 \NC pop \NC \textplus \NC \NC \NC \NR
31 \NC font \NC \textplus \NC index \NC \NC \NR
32 \NC nop \NC \textplus \NC \NC \NC \NR
33 \NC special \NC \textminus \NC str \NC \NC \NR
34 \NC rule \NC \textplus \NC v h \NC \NC \NR
35 \stoptabulate
36
37 The \PDFTEX\ engine added two more but these are not supported in \CONTEXT:
38
39 \starttabulate[|w(4em)||||]
40 \NC pdf \NC \textminus \NC str \NC \NC \NR
41 \NC pdfmode \NC \textminus \NC n \NC \NC \NR
42 \stoptabulate
43
44 The \LUATEX\ engine also added some but these are never found in loaded fonts,
45 only in those constructed at runtime. Two are not supported in \CONTEXT.
46
47 \starttabulate[|w(4em)||||]
48 \NC lua \NC \textplus \NC code \NC f(font,char,posh,posv,sx,sy) \NC \NR
49 \NC image \NC \textminus \NC n \NC \NC \NR
50 \NC node \NC \textplus \NC n \NC \NC \NR
51 \NC scale \NC \textminus \NC sx sy \NC \NC \NR
52 \stoptabulate
53
54 The \LUAMETATEX\ engine has nothing on board and doesn't even carry the virtual
55 commands around. The backend can just fetch them from the \LUA\ end. An advantage is
56 that we can easily extend the repertoire of commands:
57
58 \starttabulate[|w(4em)||||]
59 \NC slot \NC \textplus \NC index chr csx csy \NC \NC \NR
60 \NC use \NC \textplus \NC index chr ... chr \NC \NC \NR
61 \NC left \NC \textplus \NC amount \NC \NC \NR
62 \NC up \NC \textplus \NC amount \NC \NC \NR
63 \NC offset \NC \textplus \NC h v chr [csx [csy]] \NC \NC \NR
64 \NC stay \NC \textplus \NC chr (push/pop) \NC \NC \NR
65 \NC compose \NC \textplus \NC h v chr \NC \NC \NR
66 \NC frame \NC \textplus \NC wd jt dp line outline advance baseline color \NC \NC \NR
67 \NC line \NC \textplus \NC wd ht dp color \NC \NC \NR
68 \NC inspect \NC \textplus \NC \NC \NC \NR
69 \NC trace \NC \textplus \NC \NC \NC \NR
70 \NC <plugin> \NC \textplus \NC \NC f(posh,posv,packet) \NC \NR
71 \stoptabulate
72
73 There are some manipulations that don't need the virtual mechanism. In addition to the
74 character properties like \type {width}, \type {height} and \type {depth} we also have:
75
76 \starttabulate[||||]
77 \NC advance \NC \NC the width used in the backend \NC \NR
78 \NC scale \NC \NC an additional scale factor \NC \NR
79 \NC xoffset \NC \NC horizontal shift \NC \NR
80 \NC yoffset \NC \NC vertical shift \NC \NR
81 \NC effect \NC slant \NC factor used for tilting \NC \NR
82 \NC \NC extend \NC horizontal scale \NC \NR
83 \NC \NC squeeze \NC vertical scale \NC \NR
84 \NC \NC mode \NC special effects like outline \NC \NR
85 \NC \NC weight \NC pen stroke width \NC \NR
86 \stoptabulate
87
88 \stopsection
89
90 \stopdocument