summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/node-bwc.lmt
blob: a2e9d566da79229f821034b09dd31c16a3d50be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
if not modules then modules = { } end modules ['node-bwc'] = {
    version   = 1.001,
    comment   = "companion to node-ini.mkiv",
    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
    copyright = "PRAGMA ADE / ConTeXt Development Team",
    license   = "see context related readme files"
}

-- This is a backward compatinility list. Eventually it will go away although a few
-- might stay around. We start with some real low level ones. But ... users are
-- supposed to use nodes and nuts.

local node   = node
local direct = node.direct

node  .copy_list               = node  .copylist
node  .current_attributes      = node  .currentattributes
node  .effective_glue          = node  .effectiveglue
node  .end_of_math             = node  .endofmath
node  .first_glyph             = node  .firstglyph
node  .flush_list              = node  .flushlist
node  .flush_node              = node  .flushnode
node  .get_attribute           = node  .getattribute
node  .get_attributes          = node  .getattributes
------.get_properties_table    = node  .getpropertiestable
node  .has_attribute           = node  .hasattribute
node  .has_field               = node  .hasfield
node  .has_glyph               = node  .hasglyph
node  .insert_after            = node  .insertafter
node  .insert_before           = node  .insertbefore
node  .is_node                 = node  .isnode             or node.is_node
node  .is_zero_glue            = node  .iszeroglue
node  .last_node               = node  .lastnode
node  .mlist_to_hlist          = node  .mlisttohlist
node  .protect_glyph           = node  .protectglyph
node  .protect_glyphs          = node  .protectglyphs
----  .protrusion_skippable    = node  .protrusionskippable
node  .set_attribute           = node  .setattribute
node  .set_attributes          = node  .setattributes
node  .traverse_id             = node  .traverseid         or node.traverse_id
node  .unprotect_glyph         = node  .unprotectglyph
node  .unprotect_glyphs        = node  .unprotectglyphs
node  .unset_attribute         = node  .unsetattribute
node  .unset_attributes        = node  .unsetattributes

direct.copy_list               = direct.copylist
direct.current_attributes      = direct.currentattributes
direct.effective_glue          = direct.effectiveglue
direct.end_of_math             = direct.endofmath
direct.find_node               = direct.findnode
direct.first_glyph             = direct.firstglyph
direct.flush_list              = direct.flushlist
direct.flush_node              = direct.flushnode
direct.get_attribute           = direct.getattribute
direct.get_attributes          = direct.getattributes
------.get_properties_table    = direct.getpropertiestable
direct.has_attribute           = direct.hasattribute
direct.hasdimensions           = direct.hasdimensions
direct.has_field               = direct.hasfield
direct.has_glyph               = direct.hasglyph
direct.insert_after            = direct.insertafter
direct.insert_before           = direct.insertbefore
direct.is_char                 = direct.ischar
direct.is_direct               = direct.isdirect
direct.is_glyph                = direct.isglyph
direct.is_node                 = direct.isnode
direct.is_valid                = direct.isvalid
direct.is_zero_glue            = direct.iszeroglue
direct.last_node               = direct.lastnode
direct.mlist_to_hlist          = direct.mlisttohlist
direct.protect_glyph           = direct.protectglyph
direct.protect_glyphs          = direct.protectglyphs
------.protrusion_skippable     = direct.protrusionskippable
direct.set_attribute           = direct.setattribute
direct.set_attributes          = direct.setattributes
direct.start_of_par            = direct.startofpar
direct.traverse_char           = direct.traversechar        or direct.traverse_char
direct.traverse_content        = direct.traversecontent     or direct.traverse_content
direct.traverse_glyph          = direct.traverseglyph       or direct.traverse_glyph
direct.traverse_id             = direct.traverseid          or direct.traverse_id
direct.traverse_list           = direct.traverselist        or direct.traverse_list
direct.unprotect_glyph         = direct.unprotectglyph
direct.unprotect_glyphs        = direct.unprotectglyphs
direct.unset_attribute         = direct.unsetattribute
direct.unset_attributes        = direct.unsetattributes
direct.uses_font               = direct.usesfont

-- Now come the nodes and nuts.

local nodes = nodes
local nuts  = nodes.nuts

-----.check_discretionaries   = nuts .checkdiscretionaries
nuts .copy_list               = nuts .copylist
nuts .copy_node               = nuts .copynode
nuts .copy_only               = nuts .copyonly
nuts .current_attr            = nuts .currentattributes
nuts .effective_glue          = nuts .effectiveglue
nuts .end_of_math             = nuts .endofmath
nuts .find_attribute          = nuts .findattribute
nuts .first_glyph             = nuts .firstglyph
-----.flatten_discretionaries = nuts .flattendiscretionaries
nuts .flush_list              = nuts .flushlist
nuts .flush_node              = nuts .flushnode
nuts .get_attribute           = nuts .getattribute
nuts .get_synctex_fields      = nuts .getsynctexfields
nuts .has_attribute           = nuts .hasattribute
nuts .has_dimensions          = nuts .hasdimensions
nuts .has_field               = nuts .hasfield
nuts .has_glyph               = nuts .hasglyph
nuts .insert_after            = nuts .insertafter
nuts .insert_before           = nuts .insertbefore
nuts .is_direct               = nuts .isdirect
nuts .is_node                 = nuts .isnode
nuts .is_nut                  = nuts .isnut
nuts .is_zero_glue            = nuts .iszeroglue
nuts .mlist_to_hlist          = nuts .mlisttohlist
nuts .protect_glyph           = nuts .protectglyph
nuts .protect_glyphs          = nuts .protectglyphs
-----.protrusion_skippable    = nuts .protrusionskippable
nuts .set_attribute           = nuts .setattribute
-----.set_synctex_fields      = nuts .setsynctexfields
nuts .start_of_par            = nuts .startofpar
nuts .traverse_id             = nuts .traverseid
nuts .traverse_char           = nuts .traversechar
nuts .traverse_glyph          = nuts .traverseglyph
nuts .traverse_id             = nuts .traverseid
nuts .traverse_list           = nuts .traverselist
nuts .unprotect_glyph         = nuts .unprotectglyph
nuts .unprotect_glyphs        = nuts .unprotectglyphs
nuts .unset_attribute         = nuts .unsetattribute
nuts .uses_font               = nuts .usesfont

-----.check_discretionaries   = nodes.check_discretionaries
nodes.copy_list               = nodes.copylist
nodes.copy_node               = nodes.copynode
nodes.current_attributes      = nodes.currentattributes
nodes.effective_glue          = nodes.effectiveglue
nodes.end_of_math             = nodes.endofmath
nodes.find_attribute          = nodes.findattribute
nodes.first_glyph             = nodes.firstglyph
-----.flatten_discretionaries = nodes.flattendiscretionaries
nodes.flush_list              = nodes.flushlist
nodes.flush_node              = nodes.flushnode
nodes.has_attribute           = nodes.hasattribute
nodes.has_field               = nodes.hasfield
nodes.has_glyph               = nodes.hasglyph
nodes.insert_after            = nodes.insertafter
nodes.insert_before           = nodes.insertbefore
nodes.is_direct               = nodes.isdirect
nodes.is_node                 = nodes.isnode
nodes.is_nut                  = nodes.isnut
nodes.is_zero_glue            = nodes.iszeroglue
nodes.last_node               = nodes.lastnode
nodes.mlist_to_hlist          = nodes.mlisttohlist
nodes.protect_glyph           = nodes.protectglyph
nodes.protect_glyphs          = nodes.protectglyphs
-----.protrusion_skippable    = nodes.protrusionskippable
nodes.set_attribute           = nodes.setattribute
nodes.traverse_id             = nodes.traverseid
nodes.traverse_char           = nodes.traversechar
nodes.traverse_glyph          = nodes.traverseglyph
nodes.traverse_id             = nodes.traverseid
nodes.traverse_list           = nodes.traverselist
nodes.unprotect_glyph         = nodes.unprotectglyph
nodes.unprotect_glyphs        = nodes.unprotectglyphs
nodes.unset_attribute         = nodes.unsetattribute
nodes.uses_font               = nodes.usesfont