texcommands.c /size: 200 Kb    last modification: 2025-02-21 11:03
1/*
2    See license.txt in the root of this project.
3*/
4
5# include "luametatex.h"
6
7/*tex
8
9    We start with a couple of \ETEX\ related comments:
10
11    The |\showtokens| command displays a token list. The |\showifs| command displays all currently
12    active conditionals.
13
14    The |\unexpanded| primitive prevents expansion of tokens much as the result from |\the| applied
15    to a token variable. The |\detokenize| primitive converts a token list into a list of character
16    tokens much as if the token list were written to a file. We use the fact that the command
17    modifiers for |\unexpanded| and |\detokenize| are odd whereas those for |\the| and |\showthe|
18    are even.
19
20    The |protected| feature of \ETEX\ defines the |\protected| prefix command for macro definitions.
21    Such macros are protected against expansions when lists of expanded tokens are built, e.g., for
22    |\edef| or during |\write|.
23
24    The |\pagediscards| and |\splitdiscards| commands share the command code |un_vbox| with |\unvbox|
25    and |\unvcopy|, they are distinguished by their |chr_code| values |last_box_code| and
26    |vsplit_code|. These |chr_code| values are larger than |box_code| and |copy_code|.
27
28    The |\interlinepenalties|, |\clubpenalties|, |\widowpenalties|, and |\displaywidowpenalties|
29    commands allow to define arrays of penalty values to be used instead of the corresponding single
30    values.
31
32*/
33
34/*tex
35
36    The symbolic names for glue parameters are put into \TEX's hash table by using the routine called
37    |primitive|, defined below. Let us enter them now, so that we don't have to list all those
38    parameter names anywhere else.
39
40    Many of \TEX's primitives need no |equiv|, since they are identifiable by their |eq_type| alone.
41    These primitives are loaded into the hash table.
42
43    The processing of |\input| involves the |start_input| subroutine, which will be declared later;
44    the processing of |\endinput| is trivial.
45
46    The hash table is initialized with |\count|, |\attribute|, |\dimen|, |\skip|, and |\muskip| all
47    having |register| as their command code; they are distinguished by the |chr_code|, which is
48    either |int_val|, |attr_val|, |dimen_val|, |glue_val|, or |mu_val|.
49
50    Because in \LUATEX\ and \LUAMETATEX\ we have more primitives, and use a lookup table, we combine
51    commands, for instance the |\aftergroup| and |\afterassignment| are just simple runners and
52    instead of the old two single cases, we now have one case that handles the four variants. This
53    keeps similar code close and also saves lookups. So, we have a few |cmd| less than normally in
54    a \TEX\ engine, but also a few more. Some have been renamed because they do more now (already
55    in \ETEX).
56
57*/
58
59const unsigned char some_item_classification[] = {
60    [lastpenalty_code]              = classification_no_arguments,
61    [lastkern_code]                 = classification_no_arguments,
62    [lastskip_code]                 = classification_no_arguments,
63    [lastboundary_code]             = classification_no_arguments,
64    [last_node_type_code]           = classification_no_arguments,
65    [last_node_subtype_code]        = classification_no_arguments,
66    [input_line_no_code]            = classification_no_arguments,
67    [badness_code]                  = classification_no_arguments,
68    [overshoot_code]                = classification_no_arguments,
69    [luatex_version_code]           = classification_no_arguments,
70    [luatex_revision_code]          = classification_no_arguments,
71    [current_group_level_code]      = classification_no_arguments,
72    [current_group_type_code]       = classification_no_arguments,
73    [current_stack_size_code]       = classification_no_arguments,
74    [current_if_level_code]         = classification_no_arguments,
75    [current_if_type_code]          = classification_no_arguments,
76    [current_if_branch_code]        = classification_no_arguments,
77    [glue_stretch_order_code]       = classification_unknown,
78    [glue_shrink_order_code]        = classification_unknown,
79    [font_id_code]                  = classification_unknown,
80    [glyph_x_scaled_code]           = classification_unknown,
81    [glyph_y_scaled_code]           = classification_unknown,
82    [font_char_wd_code]             = classification_unknown,
83    [font_char_ht_code]             = classification_unknown,
84    [font_char_dp_code]             = classification_unknown,
85    [font_char_ic_code]             = classification_unknown,
86    [font_char_ta_code]             = classification_unknown,
87    [font_char_ba_code]             = classification_unknown,
88    [scaled_font_char_wd_code]      = classification_unknown,
89    [scaled_font_char_ht_code]      = classification_unknown,
90    [scaled_font_char_dp_code]      = classification_unknown,
91    [scaled_font_char_ic_code]      = classification_unknown,
92    [scaled_font_char_ta_code]      = classification_unknown,
93    [scaled_font_char_ba_code]      = classification_unknown,
94    [font_spec_id_code]             = classification_unknown,
95    [font_spec_scale_code]          = classification_unknown,
96    [font_spec_xscale_code]         = classification_unknown,
97    [font_spec_yscale_code]         = classification_unknown,
98    [font_size_code]                = classification_unknown,
99    [font_math_control_code]        = classification_unknown,
100    [font_text_control_code]        = classification_unknown,
101    [math_scale_code]               = classification_unknown,
102    [math_style_code]               = classification_no_arguments,
103    [math_main_style_code]          = classification_no_arguments,
104    [math_parent_style_code]        = classification_no_arguments,
105    [math_style_font_id_code]       = classification_unknown,
106    [math_stack_style_code]         = classification_no_arguments,
107    [math_char_class_code]          = classification_unknown,
108    [math_char_fam_code]            = classification_unknown,
109    [math_char_slot_code]           = classification_unknown,
110    [scaled_slant_per_point_code]   = classification_no_arguments,
111    [scaled_interword_space_code]   = classification_no_arguments,
112    [scaled_interword_stretch_code] = classification_no_arguments,
113    [scaled_interword_shrink_code]  = classification_no_arguments,
114    [scaled_ex_height_code]         = classification_no_arguments,
115    [scaled_em_width_code]          = classification_no_arguments,
116    [scaled_extra_space_code]       = classification_no_arguments,
117    [last_arguments_code]           = classification_no_arguments,
118    [parameter_count_code]          = classification_no_arguments,
119    [parameter_index_code]          = classification_no_arguments,
120 /* [lua_value_function_code]       = classification_no_arguments, */
121    [insert_progress_code]          = classification_unknown,
122    [left_margin_kern_code]         = classification_unknown,
123    [right_margin_kern_code]        = classification_unknown,
124    [par_shape_length_code]         = classification_unknown,
125    [par_shape_indent_code]         = classification_unknown,
126    [par_shape_width_code]          = classification_unknown,
127    [glue_stretch_code]             = classification_unknown,
128    [glue_shrink_code]              = classification_unknown,
129    [mu_to_glue_code]               = classification_unknown,
130    [glue_to_mu_code]               = classification_unknown,
131    [numexpr_code]                  = classification_unknown,
132    [posexpr_code]                  = classification_unknown,
133 /* [attrexpr_code]                 = classification_unknown, */
134    [dimexpr_code]                  = classification_unknown,
135    [glueexpr_code]                 = classification_unknown,
136    [muexpr_code]                   = classification_unknown,
137    [numexpression_code]            = classification_unknown,
138    [dimexpression_code]            = classification_unknown,
139    [last_chk_integer_code]         = classification_unknown,
140    [last_chk_dimension_code]       = classification_unknown,
141 // [dimen_to_scale_code]           = classification_no_arguments,
142    [numeric_scale_code]            = classification_no_arguments,
143    [numeric_scaled_code]           = classification_no_arguments,
144    [index_of_register_code]        = classification_unknown,
145    [index_of_character_code]       = classification_unknown,
146    [math_atom_glue_code]           = classification_unknown,
147    [last_left_class_code]          = classification_no_arguments,
148    [last_right_class_code]         = classification_no_arguments,
149    [last_atom_class_code]          = classification_no_arguments,
150    [nested_loop_iterator_code]     = classification_no_arguments,
151    [previous_loop_iterator_code]   = classification_no_arguments,
152    [current_loop_iterator_code]    = classification_no_arguments,
153    [current_loop_nesting_code]     = classification_no_arguments,
154    [last_loop_iterator_code]       = classification_no_arguments,
155    [last_par_context_code]         = classification_no_arguments,
156    [last_page_extra_code]          = classification_no_arguments,
157};
158
159const unsigned char some_convert_classification[] = {
160    [number_code]              = classification_integer,
161    [to_integer_code]          = classification_integer,
162    [to_hexadecimal_code]      = classification_integer,
163    [to_scaled_code]           = classification_integer,
164    [to_sparse_scaled_code]    = classification_integer,
165    [to_dimension_code]        = classification_integer,
166    [to_sparse_dimension_code] = classification_integer,
167    [to_mathstyle_code]        = classification_unknown,
168    [lua_code]                 = classification_unknown,
169    [lua_function_code]        = classification_unknown,
170    [lua_bytecode_code]        = classification_unknown,
171    [expanded_code]            = classification_unknown,
172    [semi_expanded_code]       = classification_unknown,
173 /* [expanded_after_cs_code]   = classification_unknown, */
174    [string_code]              = classification_unknown,
175    [cs_string_code]           = classification_unknown,
176    [cs_active_code]           = classification_unknown,
177    [cs_lastname_code]         = classification_unknown,
178    [detokenized_code]         = classification_unknown,
179    [detokened_code]           = classification_unknown,
180    [roman_numeral_code]       = classification_integer,
181    [meaning_code]             = classification_unknown,
182    [meaning_full_code]        = classification_unknown,
183    [meaning_less_code]        = classification_unknown,
184    [meaning_asis_code]        = classification_unknown,
185    [meaning_ful_code]         = classification_unknown,
186    [meaning_les_code]         = classification_unknown,
187    [to_character_code]        = classification_integer,
188    [lua_escape_string_code]   = classification_unknown,
189 /* [lua_token_string_code]    = classification_unknown, */
190    [font_name_code]           = classification_integer,
191    [font_specification_code]  = classification_integer,
192    [job_name_code]            = classification_no_arguments,
193    [format_name_code]         = classification_no_arguments,
194    [luatex_banner_code]       = classification_no_arguments,
195    [font_identifier_code]     = classification_integer,
196};
197
198static void tex_aux_copy_deep_frozen_from_primitive(halfword code, const char *s)
199{
200    halfword p = tex_prim_lookup(tex_located_string(s));
201    cs_text(code) = cs_text(p);
202    copy_eqtb_entry(code, p);
203}
204
205/*
206    The commands are sorted alphabetically which makes it easier to check the syntax charts. The
207    order within the command classes is more chronological.
208*/
209
210void tex_initialize_commands(void)
211{
212
213    if (lmt_main_state.run_state == initializing_state) {
214
215        lmt_hash_state.no_new_cs = 0;
216        lmt_fileio_state.io_first = 0;
217
218        /*tex glue */
219
220        tex_primitive(tex_command,    "abovedisplayshortskip",          internal_glue_cmd,      above_display_short_skip_code,            internal_glue_base);
221        tex_primitive(tex_command,    "abovedisplayskip",               internal_glue_cmd,      above_display_skip_code,                  internal_glue_base);
222        tex_primitive(luatex_command, "additionalpageskip",             internal_glue_cmd,      additional_page_skip_code,                internal_glue_base);
223        tex_primitive(luatex_command, "balancetopskip",                 internal_glue_cmd,      balance_top_skip_code,                    internal_glue_base);
224        tex_primitive(luatex_command, "balancebottomskip",              internal_glue_cmd,      balance_bottom_skip_code,                 internal_glue_base);
225        tex_primitive(tex_command,    "baselineskip",                   internal_glue_cmd,      baseline_skip_code,                       internal_glue_base);
226        tex_primitive(tex_command,    "belowdisplayshortskip",          internal_glue_cmd,      below_display_short_skip_code,            internal_glue_base);
227        tex_primitive(tex_command,    "belowdisplayskip",               internal_glue_cmd,      below_display_skip_code,                  internal_glue_base);
228        tex_primitive(luatex_command, "bottomskip",                     internal_glue_cmd,      bottom_skip_code,                         internal_glue_base);
229        tex_primitive(luatex_command, "emergencyleftskip",              internal_glue_cmd,      emergency_left_skip_code,                 internal_glue_base);
230        tex_primitive(luatex_command, "emergencyrightskip",             internal_glue_cmd,      emergency_right_skip_code,                internal_glue_base);
231        tex_primitive(luatex_command, "initialpageskip",                internal_glue_cmd,      initial_page_skip_code,                   internal_glue_base);
232        tex_primitive(luatex_command, "initialtopskip",                 internal_glue_cmd,      initial_top_skip_code,                    internal_glue_base);
233        tex_primitive(tex_command,    "leftskip",                       internal_glue_cmd,      left_skip_code,                           internal_glue_base);
234        tex_primitive(tex_command,    "lineskip",                       internal_glue_cmd,      line_skip_code,                           internal_glue_base);
235        tex_primitive(luatex_command, "mathsurroundskip",               internal_glue_cmd,      math_skip_code,                           internal_glue_base);
236        tex_primitive(luatex_command, "maththreshold",                  internal_glue_cmd,      math_threshold_code,                      internal_glue_base);
237        tex_primitive(luatex_command, "parfillleftskip",                internal_glue_cmd,      par_fill_left_skip_code,                  internal_glue_base);
238        tex_primitive(luatex_command, "parfillrightskip",               internal_glue_cmd,      par_fill_right_skip_code,                 internal_glue_base);
239        tex_primitive(tex_command,    "parfillskip",                    internal_glue_cmd,      par_fill_right_skip_code,                 internal_glue_base); /*tex This is more like an alias now. */
240        tex_primitive(luatex_command, "parinitleftskip",                internal_glue_cmd,      par_init_left_skip_code,                  internal_glue_base);
241        tex_primitive(luatex_command, "parinitrightskip",               internal_glue_cmd,      par_init_right_skip_code,                 internal_glue_base);
242        tex_primitive(tex_command,    "parskip",                        internal_glue_cmd,      par_skip_code,                            internal_glue_base);
243        tex_primitive(tex_command,    "rightskip",                      internal_glue_cmd,      right_skip_code,                          internal_glue_base);
244        tex_primitive(tex_command,    "spaceskip",                      internal_glue_cmd,      space_skip_code,                          internal_glue_base);
245        tex_primitive(tex_command,    "splittopskip",                   internal_glue_cmd,      split_top_skip_code,                      internal_glue_base);
246        tex_primitive(tex_command,    "tabskip",                        internal_glue_cmd,      tab_skip_code,                            internal_glue_base);
247        tex_primitive(tex_command,    "topskip",                        internal_glue_cmd,      top_skip_code,                            internal_glue_base);
248        tex_primitive(tex_command,    "xspaceskip",                     internal_glue_cmd,      xspace_skip_code,                         internal_glue_base);
249
250        /*tex math glue */
251
252        tex_primitive(tex_command,    "medmuskip",                      internal_muglue_cmd,    med_muskip_code,                          internal_muglue_base);
253        tex_primitive(luatex_command, "pettymuskip",                    internal_muglue_cmd,    petty_muskip_code,                        internal_muglue_base);
254        tex_primitive(tex_command,    "thickmuskip",                    internal_muglue_cmd,    thick_muskip_code,                        internal_muglue_base);
255        tex_primitive(tex_command,    "thinmuskip",                     internal_muglue_cmd,    thin_muskip_code,                         internal_muglue_base);
256        tex_primitive(luatex_command, "tinymuskip",                     internal_muglue_cmd,    tiny_muskip_code,                         internal_muglue_base);
257
258        /*tex tokens */
259
260        tex_primitive(no_command,     "endofgroup",                     internal_toks_cmd,      end_of_group_code,                        internal_toks_base);
261     /* tex_primitive(luatex_command, "endofpar",                       internal_toks_cmd,      end_of_par_code,                          internal_toks_base); */
262        tex_primitive(tex_command,    "errhelp",                        internal_toks_cmd,      error_help_code,                          internal_toks_base);
263        tex_primitive(luatex_command, "everybeforepar",                 internal_toks_cmd,      every_before_par_code,                    internal_toks_base);
264        tex_primitive(tex_command,    "everycr",                        internal_toks_cmd,      every_cr_code,                            internal_toks_base);
265        tex_primitive(tex_command,    "everydisplay",                   internal_toks_cmd,      every_display_code,                       internal_toks_base);
266        tex_primitive(etex_command,   "everyeof",                       internal_toks_cmd,      every_eof_code,                           internal_toks_base);
267        tex_primitive(tex_command,    "everyhbox",                      internal_toks_cmd,      every_hbox_code,                          internal_toks_base);
268        tex_primitive(tex_command,    "everyjob",                       internal_toks_cmd,      every_job_code,                           internal_toks_base);
269        tex_primitive(tex_command,    "everymath",                      internal_toks_cmd,      every_math_code,                          internal_toks_base);
270        tex_primitive(luatex_command, "everymathatom",                  internal_toks_cmd,      every_math_atom_code,                     internal_toks_base);
271        tex_primitive(tex_command,    "everypar",                       internal_toks_cmd,      every_par_code,                           internal_toks_base);
272        tex_primitive(luatex_command, "everytab",                       internal_toks_cmd,      every_tab_code,                           internal_toks_base);
273        tex_primitive(tex_command,    "everyvbox",                      internal_toks_cmd,      every_vbox_code,                          internal_toks_base);
274        tex_primitive(tex_command,    "output",                         internal_toks_cmd,      output_routine_code,                      internal_toks_base);
275
276        /*tex counters (we could omit the int_base here as effectively it is subtracted) */
277
278        tex_primitive(tex_command,    "adjdemerits",                    internal_integer_cmd,   adj_demerits_code,                        internal_integer_base);
279        tex_primitive(luatex_command, "adjustspacing",                  internal_integer_cmd,   adjust_spacing_code,                      internal_integer_base);
280        tex_primitive(luatex_command, "adjustspacingshrink",            internal_integer_cmd,   adjust_spacing_shrink_code,               internal_integer_base);
281        tex_primitive(luatex_command, "adjustspacingstep",              internal_integer_cmd,   adjust_spacing_step_code,                 internal_integer_base);
282        tex_primitive(luatex_command, "adjustspacingstretch",           internal_integer_cmd,   adjust_spacing_stretch_code,              internal_integer_base);
283     /* tex_primitive(luatex_command, "alignmentcellattr",              internal_integer_cmd,   alignment_cell_attribute_code,            internal_integer_base); */ /* todo */
284        tex_primitive(luatex_command, "alignmentcellsource",            internal_integer_cmd,   alignment_cell_source_code,               internal_integer_base);
285        tex_primitive(luatex_command, "alignmentwrapsource",            internal_integer_cmd,   alignment_wrap_source_code,               internal_integer_base);
286        tex_primitive(luatex_command, "automatichyphenpenalty",         internal_integer_cmd,   automatic_hyphen_penalty_code,            internal_integer_base);
287        tex_primitive(luatex_command, "automigrationmode",              internal_integer_cmd,   auto_migration_mode_code,                 internal_integer_base);
288        tex_primitive(luatex_command, "autoparagraphmode",              internal_integer_cmd,   auto_paragraph_mode_code,                 internal_integer_base);
289        tex_primitive(luatex_command, "balancechecks",                  internal_integer_cmd,   balance_checks_code,                      internal_integer_base);
290        tex_primitive(luatex_command, "balancebreakpasses",             internal_integer_cmd,   balance_break_passes_code,                internal_integer_base);
291        tex_primitive(luatex_command, "balancetolerance",               internal_integer_cmd,   balance_tolerance_code,                   internal_integer_base);
292        tex_primitive(luatex_command, "balanceadjdemerits",             internal_integer_cmd,   balance_adj_demerits_code,                internal_integer_base);
293        tex_primitive(luatex_command, "balancelooseness",               internal_integer_cmd,   balance_looseness_code,                   internal_integer_base);
294        tex_primitive(luatex_command, "balancepenalty",                 internal_integer_cmd,   balance_penalty_code,                     internal_integer_base);
295        tex_primitive(tex_command,    "binoppenalty",                   internal_integer_cmd,   post_binary_penalty_code,                 internal_integer_base); /*tex For old times sake. */
296        tex_primitive(tex_command,    "brokenpenalty",                  internal_integer_cmd,   broken_penalty_code,                      internal_integer_base);
297        tex_primitive(luatex_command, "catcodetable",                   internal_integer_cmd,   cat_code_table_code,                      internal_integer_base);
298        tex_primitive(tex_command,    "clubpenalty",                    internal_integer_cmd,   club_penalty_code,                        internal_integer_base);
299        tex_primitive(tex_command,    "day",                            internal_integer_cmd,   day_code,                                 internal_integer_base);
300        tex_primitive(tex_command,    "defaulthyphenchar",              internal_integer_cmd,   default_hyphen_char_code,                 internal_integer_base);
301        tex_primitive(tex_command,    "defaultskewchar",                internal_integer_cmd,   default_skew_char_code,                   internal_integer_base);
302        tex_primitive(tex_command,    "delimiterfactor",                internal_integer_cmd,   delimiter_factor_code,                    internal_integer_base);
303        tex_primitive(luatex_command, "discretionaryoptions",           internal_integer_cmd,   discretionary_options_code,               internal_integer_base);
304        tex_primitive(tex_command,    "displaywidowpenalty",            internal_integer_cmd,   display_widow_penalty_code,               internal_integer_base);
305        tex_primitive(tex_command,    "doublehyphendemerits",           internal_integer_cmd,   double_hyphen_demerits_code,              internal_integer_base);
306        tex_primitive(luatex_command, "doublepenaltymode",              internal_integer_cmd,   double_penalty_mode_code,                 internal_integer_base);
307        tex_primitive(tex_command,    "endlinechar",                    internal_integer_cmd,   end_line_char_code,                       internal_integer_base);
308        tex_primitive(tex_command,    "errorcontextlines",              internal_integer_cmd,   error_context_lines_code,                 internal_integer_base);
309        tex_primitive(tex_command,    "escapechar",                     internal_integer_cmd,   escape_char_code,                         internal_integer_base);
310        tex_primitive(luatex_command, "spacechar",                      internal_integer_cmd,   space_char_code,                          internal_integer_base);
311        tex_primitive(luatex_command, "etexexprmode",                   internal_integer_cmd,   etex_expr_mode_code,                      internal_integer_base); /* Some want this. */
312        tex_primitive(luatex_command, "eufactor",                       internal_integer_cmd,   eu_factor_code,                           internal_integer_base);
313        tex_primitive(luatex_command, "exceptionpenalty",               internal_integer_cmd,   exception_penalty_code,                   internal_integer_base);
314        tex_primitive(tex_command,    "exhyphenchar",                   internal_integer_cmd,   ex_hyphen_char_code,                      internal_integer_base);
315        tex_primitive(tex_command,    "exhyphenpenalty",                internal_integer_cmd,   ex_hyphen_penalty_code,                   internal_integer_base);
316        tex_primitive(luatex_command, "exapostrophechar",               internal_integer_cmd,   ex_apostrophe_char_code,                  internal_integer_base);
317        tex_primitive(luatex_command, "explicithyphenpenalty",          internal_integer_cmd,   explicit_hyphen_penalty_code,             internal_integer_base);
318        tex_primitive(tex_command,    "fam",                            internal_integer_cmd,   family_code,                              internal_integer_base);
319        tex_primitive(tex_command,    "finalhyphendemerits",            internal_integer_cmd,   final_hyphen_demerits_code,               internal_integer_base);
320        tex_primitive(luatex_command, "firstvalidlanguage",             internal_integer_cmd,   first_valid_language_code,                internal_integer_base);
321        tex_primitive(tex_command,    "floatingpenalty",                internal_integer_cmd,   floating_penalty_code,                    internal_integer_base);
322        tex_primitive(tex_command,    "globaldefs",                     internal_integer_cmd,   global_defs_code,                         internal_integer_base);
323     /* tex_primitive(luatex_command, "gluedatafield",                  internal_integer_cmd,   glue_data_code,                           internal_integer_base); */
324        tex_primitive(luatex_command, "glyphdatafield",                 internal_integer_cmd,   glyph_data_code,                          internal_integer_base);
325        tex_primitive(luatex_command, "glyphoptions",                   internal_integer_cmd,   glyph_options_code,                       internal_integer_base);
326        tex_primitive(luatex_command, "glyphscale",                     internal_integer_cmd,   glyph_scale_code,                         internal_integer_base);
327        tex_primitive(luatex_command, "glyphscriptfield",               internal_integer_cmd,   glyph_script_code,                        internal_integer_base);
328        tex_primitive(luatex_command, "glyphscriptscale",               internal_integer_cmd,   glyph_script_scale_code,                  internal_integer_base);
329        tex_primitive(luatex_command, "glyphscriptscriptscale",         internal_integer_cmd,   glyph_scriptscript_scale_code,            internal_integer_base);
330        tex_primitive(luatex_command, "glyphstatefield",                internal_integer_cmd,   glyph_state_code,                         internal_integer_base);
331        tex_primitive(luatex_command, "glyphtextscale",                 internal_integer_cmd,   glyph_text_scale_code,                    internal_integer_base);
332        tex_primitive(luatex_command, "glyphxscale",                    internal_integer_cmd,   glyph_x_scale_code,                       internal_integer_base);
333        tex_primitive(luatex_command, "glyphyscale",                    internal_integer_cmd,   glyph_y_scale_code,                       internal_integer_base);
334        tex_primitive(luatex_command, "glyphslant",                     internal_integer_cmd,   glyph_slant_code,                         internal_integer_base);
335        tex_primitive(luatex_command, "glyphweight",                    internal_integer_cmd,   glyph_weight_code,                        internal_integer_base);
336        tex_primitive(tex_command,    "hangafter",                      internal_integer_cmd,   hang_after_code,                          internal_integer_base);
337        tex_primitive(tex_command,    "hbadness",                       internal_integer_cmd,   hbadness_code,                            internal_integer_base);
338        tex_primitive(luatex_command, "hbadnessmode",                   internal_integer_cmd,   hbadness_mode_code,                       internal_integer_base);
339        tex_primitive(tex_command,    "holdinginserts",                 internal_integer_cmd,   holding_inserts_code,                     internal_integer_base);
340        tex_primitive(luatex_command, "holdingmigrations",              internal_integer_cmd,   holding_migrations_code,                  internal_integer_base);
341        tex_primitive(luatex_command, "hyphenationmode",                internal_integer_cmd,   hyphenation_mode_code,                    internal_integer_base);
342        tex_primitive(tex_command,    "hyphenpenalty",                  internal_integer_cmd,   hyphen_penalty_code,                      internal_integer_base);
343        tex_primitive(tex_command,    "interlinepenalty",               internal_integer_cmd,   inter_line_penalty_code,                  internal_integer_base);
344        tex_primitive(no_command,     "internaldirstate",               internal_integer_cmd,   internal_dir_state_code,                  internal_integer_base);
345        tex_primitive(no_command,     "internalmathscale",              internal_integer_cmd,   internal_math_scale_code,                 internal_integer_base);
346        tex_primitive(no_command,     "internalmathstyle",              internal_integer_cmd,   internal_math_style_code,                 internal_integer_base);
347        tex_primitive(no_command,     "internalparstate",               internal_integer_cmd,   internal_par_state_code,                  internal_integer_base);
348        tex_primitive(tex_command,    "language",                       internal_integer_cmd,   language_code,                            internal_integer_base);
349        tex_primitive(etex_command,   "lastlinefit",                    internal_integer_cmd,   last_line_fit_code,                       internal_integer_base);
350        tex_primitive(tex_command,    "lefthyphenmin",                  internal_integer_cmd,   left_hyphen_min_code,                     internal_integer_base);
351        tex_primitive(luatex_command, "linebreakoptional",              internal_integer_cmd,   line_break_optional_code,                 internal_integer_base);
352        tex_primitive(luatex_command, "linebreakpasses",                internal_integer_cmd,   line_break_passes_code,                   internal_integer_base);
353        tex_primitive(luatex_command, "linebreakchecks",                internal_integer_cmd,   line_break_checks_code,                   internal_integer_base);
354        tex_primitive(luatex_command, "linedirection",                  internal_integer_cmd,   line_direction_code,                      internal_integer_base);
355        tex_primitive(tex_command,    "linepenalty",                    internal_integer_cmd,   line_penalty_code,                        internal_integer_base);
356        tex_primitive(luatex_command, "localbrokenpenalty",             internal_integer_cmd,   local_broken_penalty_code,                internal_integer_base);
357        tex_primitive(luatex_command, "localinterlinepenalty",          internal_integer_cmd,   local_interline_penalty_code,             internal_integer_base);
358        tex_primitive(luatex_command, "localpretolerance",              internal_integer_cmd,   local_pre_tolerance_code,                 internal_integer_base); /* not that useful */
359        tex_primitive(luatex_command, "localtolerance",                 internal_integer_cmd,   local_tolerance_code,                     internal_integer_base); /* not that useful */
360        tex_primitive(tex_command,    "looseness",                      internal_integer_cmd,   looseness_code,                           internal_integer_base);
361        tex_primitive(luatex_command, "luacopyinputnodes",              internal_integer_cmd,   copy_lua_input_nodes_code,                internal_integer_base);
362     /* tex_primitive(tex_command,    "mag",                            internal_integer_cmd,   mag_code,                                 internal_integer_base); */ /* backend */
363        tex_primitive(luatex_command, "mathbeginclass",                 internal_integer_cmd,   math_begin_class_code,                    internal_integer_base);
364        tex_primitive(luatex_command, "mathcheckfencesmode",            internal_integer_cmd,   math_check_fences_mode_code,              internal_integer_base);
365        tex_primitive(luatex_command, "mathdictgroup",                  internal_integer_cmd,   math_dict_group_code,                     internal_integer_base);
366        tex_primitive(luatex_command, "mathdictproperties",             internal_integer_cmd,   math_dict_properties_code,                internal_integer_base);
367        tex_primitive(luatex_command, "mathdirection",                  internal_integer_cmd,   math_direction_code,                      internal_integer_base);
368        tex_primitive(luatex_command, "mathdisplaymode",                internal_integer_cmd,   math_display_mode_code,                   internal_integer_base);
369        tex_primitive(luatex_command, "mathdisplaypenaltyfactor",       internal_integer_cmd,   math_display_penalty_factor_code,         internal_integer_base);
370        tex_primitive(luatex_command, "mathdisplayskipmode",            internal_integer_cmd,   math_display_skip_mode_code,              internal_integer_base);
371        tex_primitive(luatex_command, "mathdoublescriptmode",           internal_integer_cmd,   math_double_script_mode_code,             internal_integer_base);
372        tex_primitive(luatex_command, "mathendclass",                   internal_integer_cmd,   math_end_class_code,                      internal_integer_base);
373        tex_primitive(luatex_command, "matheqnogapstep",                internal_integer_cmd,   math_eqno_gap_step_code,                  internal_integer_base);
374        tex_primitive(luatex_command, "mathfontcontrol",                internal_integer_cmd,   math_font_control_code,                   internal_integer_base);
375        tex_primitive(luatex_command, "mathgluemode",                   internal_integer_cmd,   math_glue_mode_code,                      internal_integer_base);
376        tex_primitive(luatex_command, "mathgroupingmode",               internal_integer_cmd,   math_grouping_mode_code,                  internal_integer_base);
377        tex_primitive(luatex_command, "mathinlinepenaltyfactor",        internal_integer_cmd,   math_inline_penalty_factor_code,          internal_integer_base);
378        tex_primitive(luatex_command, "mathleftclass",                  internal_integer_cmd,   math_left_class_code,                     internal_integer_base);
379        tex_primitive(luatex_command, "mathlimitsmode",                 internal_integer_cmd,   math_limits_mode_code,                    internal_integer_base);
380        tex_primitive(luatex_command, "mathnolimitsmode",               internal_integer_cmd,   math_nolimits_mode_code,                  internal_integer_base);
381        tex_primitive(luatex_command, "mathpenaltiesmode",              internal_integer_cmd,   math_penalties_mode_code,                 internal_integer_base);
382        tex_primitive(luatex_command, "mathpretolerance",               internal_integer_cmd,   math_pre_tolerance_code,                  internal_integer_base);
383        tex_primitive(luatex_command, "mathrightclass",                 internal_integer_cmd,   math_right_class_code,                    internal_integer_base);
384        tex_primitive(luatex_command, "mathrulesfam",                   internal_integer_cmd,   math_rules_fam_code,                      internal_integer_base);
385        tex_primitive(luatex_command, "mathrulesmode",                  internal_integer_cmd,   math_rules_mode_code,                     internal_integer_base);
386        tex_primitive(luatex_command, "mathscriptsmode",                internal_integer_cmd,   math_scripts_mode_code,                   internal_integer_base);
387        tex_primitive(luatex_command, "mathslackmode",                  internal_integer_cmd,   math_slack_mode_code,                     internal_integer_base);
388        tex_primitive(luatex_command, "mathspacingmode",                internal_integer_cmd,   math_spacing_mode_code,                   internal_integer_base); /*tex Inject zero spaces, for tracing */
389        tex_primitive(luatex_command, "mathsurroundmode",               internal_integer_cmd,   math_skip_mode_code,                      internal_integer_base);
390        tex_primitive(luatex_command, "mathtolerance",                  internal_integer_cmd,   math_tolerance_code,                      internal_integer_base);
391        tex_primitive(luatex_command, "emptyparagraphmode",             internal_integer_cmd,   empty_paragraph_mode_code,                internal_integer_base);
392        tex_primitive(tex_command,    "maxdeadcycles",                  internal_integer_cmd,   max_dead_cycles_code,                     internal_integer_base);
393        tex_primitive(tex_command,    "month",                          internal_integer_cmd,   month_code,                               internal_integer_base);
394        tex_primitive(tex_command,    "newlinechar",                    internal_integer_cmd,   new_line_char_code,                       internal_integer_base);
395        tex_primitive(luatex_command, "normalizelinemode",              internal_integer_cmd,   normalize_line_mode_code,                 internal_integer_base);
396        tex_primitive(luatex_command, "normalizeparmode",               internal_integer_cmd,   normalize_par_mode_code,                  internal_integer_base);
397        tex_primitive(luatex_command, "nospaces",                       internal_integer_cmd,   no_spaces_code,                           internal_integer_base);
398        tex_primitive(luatex_command, "outputbox",                      internal_integer_cmd,   output_box_code,                          internal_integer_base);
399        tex_primitive(luatex_command, "nooutputboxerror",               internal_integer_cmd,   no_output_box_error_code,                 internal_integer_base);
400        tex_primitive(tex_command,    "outputpenalty",                  internal_integer_cmd,   output_penalty_code,                      internal_integer_base);
401        tex_primitive(luatex_command, "overloadmode",                   internal_integer_cmd,   overload_mode_code,                       internal_integer_base);
402     /* tex_primitive(luatex_command, "pageboundarypenalty",            internal_integer_cmd,   page_boundary_penalty_code,               internal_integer_base); */
403        tex_primitive(luatex_command, "parametermode",                  internal_integer_cmd,   parameter_mode_code,                      internal_integer_base);
404        tex_primitive(luatex_command, "pardirection",                   internal_integer_cmd,   par_direction_code,                       internal_integer_base);
405        tex_primitive(tex_command,    "pausing",                        internal_integer_cmd,   pausing_code,                             internal_integer_base);
406        tex_primitive(tex_command,    "postdisplaypenalty",             internal_integer_cmd,   post_display_penalty_code,                internal_integer_base);
407        tex_primitive(luatex_command, "postinlinepenalty",              internal_integer_cmd,   post_inline_penalty_code,                 internal_integer_base);
408        tex_primitive(luatex_command, "postshortinlinepenalty",         internal_integer_cmd,   post_short_inline_penalty_code,           internal_integer_base);
409        tex_primitive(luatex_command, "prebinoppenalty",                internal_integer_cmd,   pre_binary_penalty_code,                  internal_integer_base); /*tex For old times sake. */
410        tex_primitive(etex_command,   "predisplaydirection",            internal_integer_cmd,   pre_display_direction_code,               internal_integer_base);
411        tex_primitive(luatex_command, "predisplaygapfactor",            internal_integer_cmd,   math_pre_display_gap_factor_code,         internal_integer_base);
412        tex_primitive(tex_command,    "predisplaypenalty",              internal_integer_cmd,   pre_display_penalty_code,                 internal_integer_base);
413        tex_primitive(luatex_command, "preinlinepenalty",               internal_integer_cmd,   pre_inline_penalty_code,                  internal_integer_base);
414        tex_primitive(luatex_command, "prerelpenalty",                  internal_integer_cmd,   pre_relation_penalty_code,                internal_integer_base); /*tex For old times sake. */
415        tex_primitive(luatex_command, "preshortinlinepenalty",          internal_integer_cmd,   pre_short_inline_penalty_code,            internal_integer_base);
416        tex_primitive(tex_command,    "pretolerance",                   internal_integer_cmd,   pre_tolerance_code,                       internal_integer_base);
417        tex_primitive(luatex_command, "protrudechars",                  internal_integer_cmd,   protrude_chars_code,                      internal_integer_base);
418        tex_primitive(tex_command,    "relpenalty",                     internal_integer_cmd,   post_relation_penalty_code,               internal_integer_base); /*tex For old times sake. */
419        tex_primitive(tex_command,    "righthyphenmin",                 internal_integer_cmd,   right_hyphen_min_code,                    internal_integer_base);
420        tex_primitive(etex_command,   "savinghyphcodes",                internal_integer_cmd,   saving_hyph_codes_code,                   internal_integer_base);
421        tex_primitive(etex_command,   "savingvdiscards",                internal_integer_cmd,   saving_vdiscards_code,                    internal_integer_base);
422        tex_primitive(luatex_command, "scriptspacebeforefactor",        internal_integer_cmd,   script_space_before_factor_code,          internal_integer_base);
423        tex_primitive(luatex_command, "scriptspacebetweenfactor",       internal_integer_cmd,   script_space_between_factor_code,         internal_integer_base);
424        tex_primitive(luatex_command, "scriptspaceafterfactor",         internal_integer_cmd,   script_space_after_factor_code,           internal_integer_base);
425        tex_primitive(luatex_command, "setfontid",                      internal_integer_cmd,   font_code,                                internal_integer_base);
426        tex_primitive(tex_command,    "setlanguage",                    internal_integer_cmd,   language_code,                            internal_integer_base); /* compatibility */
427        tex_primitive(luatex_command, "shapingpenaltiesmode",           internal_integer_cmd,   shaping_penalties_mode_code,              internal_integer_base);
428        tex_primitive(luatex_command, "shapingpenalty",                 internal_integer_cmd,   shaping_penalty_code,                     internal_integer_base);
429        tex_primitive(luatex_command, "shortinlineorphanpenalty",       internal_integer_cmd,   short_inline_orphan_penalty_code,         internal_integer_base);
430        tex_primitive(tex_command,    "showboxbreadth",                 internal_integer_cmd,   show_box_breadth_code,                    internal_integer_base);
431        tex_primitive(tex_command,    "showboxdepth",                   internal_integer_cmd,   show_box_depth_code,                      internal_integer_base);
432        tex_primitive(tex_command,    "shownodedetails",                internal_integer_cmd,   show_node_details_code,                   internal_integer_base);
433        tex_primitive(luatex_command, "singlelinepenalty",              internal_integer_cmd,   single_line_penalty_code,                 internal_integer_base);
434        tex_primitive(luatex_command, "lefttwindemerits",               internal_integer_cmd,   left_twin_demerits_code,                  internal_integer_base);
435        tex_primitive(luatex_command, "righttwindemerits",              internal_integer_cmd,   right_twin_demerits_code,                 internal_integer_base);
436        tex_primitive(luatex_command, "spacefactormode",                internal_integer_cmd,   space_factor_mode,                        internal_integer_base);
437        tex_primitive(luatex_command, "spacefactorshrinklimit",         internal_integer_cmd,   space_factor_shrink_limit_code,           internal_integer_base);
438        tex_primitive(luatex_command, "spacefactorstretchlimit",        internal_integer_cmd,   space_factor_stretch_limit_code,          internal_integer_base);
439        tex_primitive(luatex_command, "spacefactoroverload",            internal_integer_cmd,   space_factor_overload_code,               internal_integer_base);
440        tex_primitive(luatex_command, "boxlimitmode",                   internal_integer_cmd,   box_limit_mode_code,                      internal_integer_base);
441        tex_primitive(luatex_command, "supmarkmode",                    internal_integer_cmd,   sup_mark_mode_code,                       internal_integer_base);
442        tex_primitive(luatex_command, "textdirection",                  internal_integer_cmd,   text_direction_code,                      internal_integer_base);
443        tex_primitive(tex_command,    "time",                           internal_integer_cmd,   time_code,                                internal_integer_base);
444        tex_primitive(tex_command,    "tolerance",                      internal_integer_cmd,   tolerance_code,                           internal_integer_base);
445        tex_primitive(luatex_command, "tracingadjusts",                 internal_integer_cmd,   tracing_adjusts_code,                     internal_integer_base);
446        tex_primitive(luatex_command, "tracingalignments",              internal_integer_cmd,   tracing_alignments_code,                  internal_integer_base);
447        tex_primitive(etex_command,   "tracingassigns",                 internal_integer_cmd,   tracing_assigns_code,                     internal_integer_base);
448        tex_primitive(luatex_command, "tracingbalancing",               internal_integer_cmd,   tracing_balancing_code,                   internal_integer_base);
449        tex_primitive(tex_command,    "tracingcommands",                internal_integer_cmd,   tracing_commands_code,                    internal_integer_base);
450        tex_primitive(luatex_command, "tracingexpressions",             internal_integer_cmd,   tracing_expressions_code,                 internal_integer_base);
451        tex_primitive(luatex_command, "tracingfitness",                 internal_integer_cmd,   tracing_fitness_code,                     internal_integer_base);
452     /* tex_primitive(luatex_command, "tracingfonts",                   internal_integer_cmd,   tracing_fonts_code,                       internal_integer_base); */
453        tex_primitive(luatex_command, "tracingfullboxes",               internal_integer_cmd,   tracing_full_boxes_code,                  internal_integer_base);
454        tex_primitive(etex_command,   "tracinggroups",                  internal_integer_cmd,   tracing_groups_code,                      internal_integer_base);
455        tex_primitive(luatex_command, "tracinghyphenation",             internal_integer_cmd,   tracing_hyphenation_code,                 internal_integer_base);
456        tex_primitive(etex_command,   "tracingifs",                     internal_integer_cmd,   tracing_ifs_code,                         internal_integer_base);
457        tex_primitive(luatex_command, "tracinginserts",                 internal_integer_cmd,   tracing_inserts_code,                     internal_integer_base);
458        tex_primitive(luatex_command, "tracinglevels",                  internal_integer_cmd,   tracing_levels_code,                      internal_integer_base);
459        tex_primitive(luatex_command, "tracinglists",                   internal_integer_cmd,   tracing_lists_code,                       internal_integer_base);
460        tex_primitive(tex_command,    "tracingloners",                  internal_integer_cmd,   tracing_loners_code,                      internal_integer_base);
461        tex_primitive(tex_command,    "tracinglostchars",               internal_integer_cmd,   tracing_lost_chars_code,                  internal_integer_base);
462        tex_primitive(tex_command,    "tracingmacros",                  internal_integer_cmd,   tracing_macros_code,                      internal_integer_base);
463        tex_primitive(luatex_command, "tracingmarks",                   internal_integer_cmd,   tracing_marks_code,                       internal_integer_base);
464        tex_primitive(luatex_command, "tracingmath",                    internal_integer_cmd,   tracing_math_code,                        internal_integer_base);
465        tex_primitive(luatex_command, "tracingmvl",                     internal_integer_cmd,   tracing_mvl_code,                         internal_integer_base);
466        tex_primitive(etex_command,   "tracingnesting",                 internal_integer_cmd,   tracing_nesting_code,                     internal_integer_base);
467        tex_primitive(luatex_command, "tracingnodes",                   internal_integer_cmd,   tracing_nodes_code,                       internal_integer_base);
468        tex_primitive(tex_command,    "tracingonline",                  internal_integer_cmd,   tracing_online_code,                      internal_integer_base);
469        tex_primitive(luatex_command, "tracingorphans",                 internal_integer_cmd,   tracing_orphans_code,                     internal_integer_base);
470        tex_primitive(tex_command,    "tracingoutput",                  internal_integer_cmd,   tracing_output_code,                      internal_integer_base);
471        tex_primitive(tex_command,    "tracingpages",                   internal_integer_cmd,   tracing_pages_code,                       internal_integer_base);
472        tex_primitive(tex_command,    "tracingparagraphs",              internal_integer_cmd,   tracing_paragraphs_code,                  internal_integer_base);
473        tex_primitive(luatex_command, "tracingpasses",                  internal_integer_cmd,   tracing_passes_code,                      internal_integer_base);
474        tex_primitive(luatex_command, "tracingpenalties",               internal_integer_cmd,   tracing_penalties_code,                   internal_integer_base);
475        tex_primitive(luatex_command, "tracinglooseness",               internal_integer_cmd,   tracing_looseness_code,                   internal_integer_base);
476        tex_primitive(tex_command,    "tracingrestores",                internal_integer_cmd,   tracing_restores_code,                    internal_integer_base);
477        tex_primitive(tex_command,    "tracingstats",                   internal_integer_cmd,   tracing_stats_code,                       internal_integer_base); /* obsolete */
478        tex_primitive(luatex_command, "tracingtoddlers",                internal_integer_cmd,   tracing_toddlers_code,                    internal_integer_base);
479        tex_primitive(tex_command,    "uchyph",                         internal_integer_cmd,   uc_hyph_code,                             internal_integer_base); /* obsolete, not needed */
480        tex_primitive(luatex_command, "variablefam",                    internal_integer_cmd,   variable_family_code,                     internal_integer_base); /* obsolete, not used */
481        tex_primitive(tex_command,    "vbadness",                       internal_integer_cmd,   vbadness_code,                            internal_integer_base);
482        tex_primitive(luatex_command, "vbadnessmode",                   internal_integer_cmd,   vbadness_mode_code,                       internal_integer_base);
483        tex_primitive(luatex_command, "vsplitchecks",                   internal_integer_cmd,   vsplit_checks_code,                       internal_integer_base);
484        tex_primitive(tex_command,    "widowpenalty",                   internal_integer_cmd,   widow_penalty_code,                       internal_integer_base);
485        tex_primitive(tex_command,    "year",                           internal_integer_cmd,   year_code,                                internal_integer_base);
486
487        /*tex dimensions */
488
489        tex_primitive(luatex_command, "balanceemergencystretch",        internal_dimension_cmd, balance_emergency_stretch_code,           internal_dimension_base);
490        tex_primitive(luatex_command, "balanceemergencyshrink",         internal_dimension_cmd, balance_emergency_shrink_code,            internal_dimension_base);
491        tex_primitive(luatex_command, "balancevsize",                   internal_dimension_cmd, balance_vsize_code,                       internal_dimension_base);
492        tex_primitive(luatex_command, "balancelineheight",              internal_dimension_cmd, balance_line_height_code,                 internal_dimension_base);
493        tex_primitive(tex_command,    "boxmaxdepth",                    internal_dimension_cmd, box_max_depth_code,                       internal_dimension_base);
494        tex_primitive(tex_command,    "delimitershortfall",             internal_dimension_cmd, delimiter_shortfall_code,                 internal_dimension_base);
495        tex_primitive(tex_command,    "displayindent",                  internal_dimension_cmd, display_indent_code,                      internal_dimension_base);
496        tex_primitive(tex_command,    "displaywidth",                   internal_dimension_cmd, display_width_code,                       internal_dimension_base);
497        tex_primitive(tex_command,    "emergencyextrastretch",          internal_dimension_cmd, emergency_extra_stretch_code,             internal_dimension_base);
498        tex_primitive(tex_command,    "emergencystretch",               internal_dimension_cmd, emergency_stretch_code,                   internal_dimension_base);
499        tex_primitive(luatex_command, "glyphxoffset",                   internal_dimension_cmd, glyph_x_offset_code,                      internal_dimension_base);
500        tex_primitive(luatex_command, "glyphyoffset",                   internal_dimension_cmd, glyph_y_offset_code,                      internal_dimension_base);
501        tex_primitive(tex_command,    "hangindent",                     internal_dimension_cmd, hang_indent_code,                         internal_dimension_base);
502        tex_primitive(tex_command,    "hfuzz",                          internal_dimension_cmd, hfuzz_code,                               internal_dimension_base);
503     /* tex_primitive(tex_command,    "hoffset",                        internal_dimension_cmd, h_offset_code,                            internal_dimension_base); */ /* backend */
504        tex_primitive(tex_command,    "hsize",                          internal_dimension_cmd, hsize_code,                               internal_dimension_base);
505        tex_primitive(luatex_command, "ignoredepthcriterion",           internal_dimension_cmd, ignore_depth_criterion_code,              internal_dimension_base); /* mostly for myself, tutorials etc */
506        tex_primitive(tex_command,    "lineskiplimit",                  internal_dimension_cmd, line_skip_limit_code,                     internal_dimension_base);
507        tex_primitive(tex_command,    "mathsurround",                   internal_dimension_cmd, math_surround_code,                       internal_dimension_base);
508        tex_primitive(tex_command,    "maxdepth",                       internal_dimension_cmd, max_depth_code,                           internal_dimension_base);
509        tex_primitive(tex_command,    "nulldelimiterspace",             internal_dimension_cmd, null_delimiter_space_code,                internal_dimension_base);
510        tex_primitive(tex_command,    "overfullrule",                   internal_dimension_cmd, overfull_rule_code,                       internal_dimension_base);
511        tex_primitive(luatex_command, "pageextragoal",                  internal_dimension_cmd, page_extra_goal_code,                     internal_dimension_base);
512        tex_primitive(tex_command,    "parindent",                      internal_dimension_cmd, par_indent_code,                          internal_dimension_base);
513        tex_primitive(tex_command,    "predisplaysize",                 internal_dimension_cmd, pre_display_size_code,                    internal_dimension_base);
514        tex_primitive(luatex_command, "pxdimen",                        internal_dimension_cmd, px_dimension_code,                        internal_dimension_base);
515        tex_primitive(tex_command,    "scriptspace",                    internal_dimension_cmd, script_space_code,                        internal_dimension_base);
516        tex_primitive(luatex_command, "shortinlinemaththreshold",       internal_dimension_cmd, short_inline_math_threshold_code,         internal_dimension_base);
517        tex_primitive(tex_command,    "splitmaxdepth",                  internal_dimension_cmd, split_max_depth_code,                     internal_dimension_base);
518        tex_primitive(luatex_command, "splitextraheight",               internal_dimension_cmd, split_extra_height_code,                  internal_dimension_base);
519        tex_primitive(luatex_command, "tabsize",                        internal_dimension_cmd, tab_size_code,                            internal_dimension_base);
520        tex_primitive(tex_command,    "vfuzz",                          internal_dimension_cmd, vfuzz_code,                               internal_dimension_base);
521     /* tex_primitive(tex_command,    "voffset",                        internal_dimension_cmd, v_offset_code,                            internal_dimension_base); */ /* backend */
522        tex_primitive(tex_command,    "vsize",                          internal_dimension_cmd, vsize_code,                               internal_dimension_base);
523
524        /*tex Probably never used with \UNICODE\ omnipresent now: */
525
526        tex_primitive(tex_command,    "accent",                         accent_cmd,             normal_code,                              0);
527
528        /*tex These three times two can go in one cmd: */
529
530        tex_primitive(tex_command,    "advance",                        arithmic_cmd,           advance_code,                             0);
531        tex_primitive(luatex_command, "advanceby",                      arithmic_cmd,           advance_by_code,                          0);
532     /* tex_primitive(luatex_command, "advancebyminusone",              arithmic_cmd,           advance_by_minus_one_code,                0); */
533     /* tex_primitive(luatex_command, "advancebyplusone",               arithmic_cmd,           advance_by_plus_one_code,                 0); */
534        tex_primitive(tex_command,    "divide",                         arithmic_cmd,           divide_code,                              0);
535        tex_primitive(luatex_command, "divideby",                       arithmic_cmd,           divide_by_code,                           0);
536        tex_primitive(luatex_command, "rdivide",                        arithmic_cmd,           r_divide_code,                            0);
537        tex_primitive(luatex_command, "rdivideby",                      arithmic_cmd,           r_divide_by_code,                         0);
538        tex_primitive(luatex_command, "edivide",                        arithmic_cmd,           e_divide_code,                            0);
539        tex_primitive(luatex_command, "edivideby",                      arithmic_cmd,           e_divide_by_code,                         0);
540        tex_primitive(tex_command,    "multiply",                       arithmic_cmd,           multiply_code,                            0);
541        tex_primitive(luatex_command, "multiplyby",                     arithmic_cmd,           multiply_by_code,                         0);
542
543        /*tex We combined the after thingies into one category:*/
544
545        tex_primitive(luatex_command, "afterassigned",                  after_something_cmd,    after_assigned_code,                      0);
546        tex_primitive(tex_command,    "afterassignment",                after_something_cmd,    after_assignment_code,                    0);
547        tex_primitive(tex_command,    "aftergroup",                     after_something_cmd,    after_group_code,                         0);
548        tex_primitive(luatex_command, "aftergrouped",                   after_something_cmd,    after_grouped_code,                       0);
549        tex_primitive(luatex_command, "atendofgroup",                   after_something_cmd,    at_end_of_group_code,                     0);
550        tex_primitive(luatex_command, "atendofgrouped",                 after_something_cmd,    at_end_of_grouped_code,                   0);
551        tex_primitive(luatex_command, "atendoffile",                    after_something_cmd,    at_end_of_file_code,                      0);
552        tex_primitive(luatex_command, "atendoffiled",                   after_something_cmd,    at_end_of_filed_code,                     0);
553
554        tex_primitive(tex_command,    "begingroup",                     begin_group_cmd,        semi_simple_group_code,                   0);
555        tex_primitive(luatex_command, "beginmathgroup",                 begin_group_cmd,        math_simple_group_code,                   0);
556        tex_primitive(luatex_command, "beginsimplegroup",               begin_group_cmd,        also_simple_group_code,                   0);
557
558        tex_primitive(luatex_command, "boundary",                       boundary_cmd,           user_boundary,                            0);
559        tex_primitive(luatex_command, "luaboundary",                    boundary_cmd,           lua_boundary,                             0);
560        tex_primitive(luatex_command, "mathboundary",                   boundary_cmd,           math_boundary,                            0);
561        tex_primitive(luatex_command, "noboundary",                     boundary_cmd,           cancel_boundary,                          0);
562        tex_primitive(luatex_command, "optionalboundary",               boundary_cmd,           optional_boundary,                        0);
563        tex_primitive(luatex_command, "pageboundary",                   boundary_cmd,           page_boundary,                            0);
564     /* tex_primitive(luatex_command, "parboundary",                    boundary_cmd,           par_boundary,                             0); */
565        tex_primitive(luatex_command, "protrusionboundary",             boundary_cmd,           protrusion_boundary,                      0);
566        tex_primitive(luatex_command, "wordboundary",                   boundary_cmd,           word_boundary,                            0);
567        tex_primitive(luatex_command, "balanceboundary",                boundary_cmd,           balance_boundary,                         0);
568
569        tex_primitive(luatex_command, "hpenalty",                       penalty_cmd,            h_penalty_code,                           0);
570        tex_primitive(tex_command,    "penalty",                        penalty_cmd,            normal_penalty_code,                      0);
571        tex_primitive(luatex_command, "vpenalty",                       penalty_cmd,            v_penalty_code,                           0);
572
573        tex_primitive(tex_command,    "char",                           char_number_cmd,        char_number_code,                         0);
574        tex_primitive(luatex_command, "glyph",                          char_number_cmd,        glyph_number_code,                        0);
575
576        tex_primitive(luatex_command, "etoks",                          combine_toks_cmd,       expanded_toks_code,                       0);
577        tex_primitive(luatex_command, "etoksapp",                       combine_toks_cmd,       append_expanded_toks_code,                0);
578        tex_primitive(luatex_command, "etokspre",                       combine_toks_cmd,       prepend_expanded_toks_code,               0);
579        tex_primitive(luatex_command, "gtoksapp",                       combine_toks_cmd,       global_append_toks_code,                  0);
580        tex_primitive(luatex_command, "gtokspre",                       combine_toks_cmd,       global_prepend_toks_code,                 0);
581        tex_primitive(luatex_command, "toksapp",                        combine_toks_cmd,       append_toks_code,                         0);
582        tex_primitive(luatex_command, "tokspre",                        combine_toks_cmd,       prepend_toks_code,                        0);
583        tex_primitive(luatex_command, "xtoks",                          combine_toks_cmd,       global_expanded_toks_code,                0);
584        tex_primitive(luatex_command, "xtoksapp",                       combine_toks_cmd,       global_append_expanded_toks_code,         0);
585        tex_primitive(luatex_command, "xtokspre",                       combine_toks_cmd,       global_prepend_expanded_toks_code,        0);
586
587        tex_primitive(luatex_command, "begincsname",                    cs_name_cmd,            begin_cs_name_code,                       0);
588        tex_primitive(tex_command,    "csname",                         cs_name_cmd,            cs_name_code,                             0);
589        tex_primitive(luatex_command, "futurecsname",                   cs_name_cmd,            future_cs_name_code,                      0); /* Okay but rare applications (less tracing). */
590        tex_primitive(luatex_command, "lastnamedcs",                    cs_name_cmd,            last_named_cs_code,                       0);
591
592        tex_primitive(tex_command,    "endcsname",                      end_cs_name_cmd,        normal_code,                              0);
593
594        /* set_font_id could use def_font_cmd */
595
596        tex_primitive(tex_command,    "font",                           define_font_cmd,        normal_code,                              0);
597
598        tex_primitive(tex_command,    "delimiter",                      delimiter_number_cmd,   math_delimiter_code,                      0);
599        tex_primitive(luatex_command, "Udelimiter",                     delimiter_number_cmd,   math_udelimiter_code,                     0);
600
601        /*tex We don't combine these because they have different runners and mode handling. */
602
603        tex_primitive(tex_command,    " ",                              explicit_space_cmd,     normal_code,                              0);
604        tex_primitive(luatex_command, "explicitspace",                  explicit_space_cmd,     normal_code,                              0); /* unexpandable */
605
606        tex_primitive(tex_command,    "/",                              italic_correction_cmd,  italic_correction_code,                   0);
607        tex_primitive(luatex_command, "explicititaliccorrection",       italic_correction_cmd,  italic_correction_code,                   0);
608        tex_primitive(luatex_command, "forcedleftcorrection",           italic_correction_cmd,  left_correction_code,                     0);
609        tex_primitive(luatex_command, "forcedrightcorrection",          italic_correction_cmd,  right_correction_code,                    0);
610
611        tex_primitive(luatex_command, "expand",                         expand_after_cmd,       expand_code,                              0);
612        tex_primitive(luatex_command, "expandactive",                   expand_after_cmd,       expand_active_code,                       0);
613        tex_primitive(tex_command,    "expandafter",                    expand_after_cmd,       expand_after_code,                        0);
614     /* tex_primitive(luatex_command, "expandafterfi",                  expand_after_cmd,       expand_after_fi_code,                     0); */ /* keep as reference */
615        tex_primitive(luatex_command, "expandafterpars",                expand_after_cmd,       expand_after_pars_code,                   0);
616        tex_primitive(luatex_command, "expandafterspaces",              expand_after_cmd,       expand_after_spaces_code,                 0);
617     /* tex_primitive(luatex_command, "expandafterthree",               expand_after_cmd,       expand_after_3_code,                      0); */ /* Yes or no. */
618     /* tex_primitive(luatex_command, "expandaftertwo",                 expand_after_cmd,       expand_after_2_code,                      0); */ /* Yes or no. */
619        tex_primitive(luatex_command, "expandcstoken",                  expand_after_cmd,       expand_cs_token_code,                     0);
620        tex_primitive(luatex_command, "expandedafter",                  expand_after_cmd,       expand_after_toks_code,                   0);
621        tex_primitive(luatex_command, "expandparameter",                expand_after_cmd,       expand_parameter_code,                    0);
622        tex_primitive(luatex_command, "expandtoken",                    expand_after_cmd,       expand_token_code,                        0);
623        tex_primitive(luatex_command, "expandtoks",                     expand_after_cmd,       expand_toks_code,                         0);
624        tex_primitive(luatex_command, "futureexpand",                   expand_after_cmd,       future_expand_code,                       0);
625        tex_primitive(luatex_command, "futureexpandis",                 expand_after_cmd,       future_expand_is_code,                    0);
626        tex_primitive(luatex_command, "futureexpandisap",               expand_after_cmd,       future_expand_is_ap_code,                 0);
627        tex_primitive(luatex_command, "semiexpand",                     expand_after_cmd,       expand_semi_code,                         0);
628        tex_primitive(etex_command,   "unless",                         expand_after_cmd,       expand_unless_code,                       0);
629
630        tex_primitive(luatex_command, "ignorearguments",                ignore_something_cmd,   ignore_argument_code,                     0);
631        tex_primitive(luatex_command, "ignorenestedupto",               ignore_something_cmd,   ignore_nested_upto_code,                  0);
632        tex_primitive(luatex_command, "ignorepars",                     ignore_something_cmd,   ignore_par_code,                          0);
633        tex_primitive(tex_command,    "ignorespaces",                   ignore_something_cmd,   ignore_space_code,                        0);
634        tex_primitive(luatex_command, "ignoreupto",                     ignore_something_cmd,   ignore_upto_code,                         0);
635        tex_primitive(luatex_command, "ignorerest",                     ignore_something_cmd,   ignore_rest_code,                         0);
636
637        tex_primitive(tex_command,    "endinput",                       input_cmd,              end_of_input_code,                        0);
638        tex_primitive(tex_command,    "input",                          input_cmd,              normal_input_code,                        0);
639        tex_primitive(tex_command,    "eofinput",                       input_cmd,              eof_input_code,                           0);
640        tex_primitive(luatex_command, "quitloop",                       input_cmd,              quit_loop_code,                           0);
641        tex_primitive(luatex_command, "quitloopnow",                    input_cmd,              quit_loop_now_code,                       0);
642     /* tex_primitive(luatex_command, "quitfinow",                      input_cmd,              quit_fi_now_code,                         0); */ /*tex only for performance testing */
643        tex_primitive(luatex_command, "retokenized",                    input_cmd,              retokenized_code,                         0);
644        tex_primitive(luatex_command, "scantextokens",                  input_cmd,              tex_token_input_code,                     0);
645        tex_primitive(etex_command,   "scantokens",                     input_cmd,              token_input_code,                         0);
646        tex_primitive(luatex_command, "tokenized",                      input_cmd,              tokenized_code,                           0);
647
648        tex_primitive(luatex_command, "beginmvl",                       mvl_cmd,                begin_mvl_code,                           0);
649        tex_primitive(luatex_command, "endmvl",                         mvl_cmd,                end_mvl_code,                             0);
650
651        tex_primitive(tex_command,    "insert",                         insert_cmd,             normal_code,                              0);
652
653        tex_primitive(luatex_command, "luabytecodecall",                lua_function_call_cmd,  lua_bytecode_call_code,                   0);
654        tex_primitive(luatex_command, "luafunctioncall",                lua_function_call_cmd,  lua_function_call_code,                   0);
655
656        tex_primitive(luatex_command, "clearmarks",                     mark_cmd,               clear_marks_code,                         0);
657        tex_primitive(luatex_command, "flushmarks",                     mark_cmd,               flush_marks_code,                         0);
658        tex_primitive(tex_command,    "mark",                           mark_cmd,               set_mark_code,                            0);
659        tex_primitive(etex_command,   "marks",                          mark_cmd,               set_marks_code,                           0);
660
661        tex_primitive(tex_command,    "mathaccent",                     math_accent_cmd,        math_accent_code,                         0);
662        tex_primitive(luatex_command, "Umathaccent",                    math_accent_cmd,        math_uaccent_code,                        0);
663
664        tex_primitive(tex_command,    "mathchar",                       math_char_number_cmd,   math_char_number_code,                    0);
665        tex_primitive(luatex_command, "Umathchar",                      math_char_number_cmd,   math_xchar_number_code,                   0);
666        tex_primitive(luatex_command, "mathclass",                      math_char_number_cmd,   math_class_number_code,                   0);
667        tex_primitive(luatex_command, "mathdictionary",                 math_char_number_cmd,   math_dictionary_number_code,              0);
668        tex_primitive(luatex_command, "nomathchar",                     math_char_number_cmd,   math_char_ignore_code,                    0);
669
670        tex_primitive(tex_command,    "mathchoice",                     math_choice_cmd,        math_choice_code,                         0);
671        tex_primitive(luatex_command, "mathdiscretionary",              math_choice_cmd,        math_discretionary_code,                  0);
672        tex_primitive(luatex_command, "mathstack",                      math_choice_cmd,        math_stack_code,                          0);
673
674        tex_primitive(tex_command,    "noexpand",                       no_expand_cmd,          normal_code,                              0);
675
676        tex_primitive(tex_command,    "radical",                        math_radical_cmd,       normal_radical_subtype,                   0);
677        tex_primitive(luatex_command, "Udelimited",                     math_radical_cmd,       delimited_radical_subtype,                0);
678        tex_primitive(luatex_command, "Udelimiterover",                 math_radical_cmd,       delimiter_over_radical_subtype,           0);
679        tex_primitive(luatex_command, "Udelimiterunder",                math_radical_cmd,       delimiter_under_radical_subtype,          0);
680        tex_primitive(luatex_command, "Uhextensible",                   math_radical_cmd,       h_extensible_radical_subtype,             0);
681        tex_primitive(luatex_command, "Uoverdelimiter",                 math_radical_cmd,       over_delimiter_radical_subtype,           0);
682        tex_primitive(luatex_command, "Uradical",                       math_radical_cmd,       radical_radical_subtype,                  0);
683        tex_primitive(luatex_command, "Uroot",                          math_radical_cmd,       root_radical_subtype,                     0);
684        tex_primitive(luatex_command, "Urooted",                        math_radical_cmd,       rooted_radical_subtype,                   0);
685        tex_primitive(luatex_command, "Uunderdelimiter",                math_radical_cmd,       under_delimiter_radical_subtype,          0);
686
687        tex_primitive(tex_command,    "setbox",                         set_box_cmd,            normal_code,                              0);
688
689        /*tex
690            Instead of |set_(e)tex_shape_cmd| we use |set_specification_cmd| because since \ETEX\
691            it no longer relates to par shapes only. ALso, because there are nodes involved, that
692            themselves have a different implementation, it is less confusing.
693        */
694
695        tex_primitive(etex_command,   "clubpenalties",                  specification_cmd,      club_penalties_code,                      internal_specification_base);
696        tex_primitive(etex_command,   "displaywidowpenalties",          specification_cmd,      display_widow_penalties_code,             internal_specification_base);
697        tex_primitive(etex_command,   "interlinepenalties",             specification_cmd,      inter_line_penalties_code,                internal_specification_base);
698        tex_primitive(luatex_command, "mathbackwardpenalties",          specification_cmd,      math_backward_penalties_code,             internal_specification_base);
699        tex_primitive(luatex_command, "mathforwardpenalties",           specification_cmd,      math_forward_penalties_code,              internal_specification_base);
700        tex_primitive(luatex_command, "orphanpenalties",                specification_cmd,      orphan_penalties_code,                    internal_specification_base);
701        tex_primitive(luatex_command, "toddlerpenalties",               specification_cmd,      toddler_penalties_code,                   internal_specification_base);
702        tex_primitive(luatex_command, "parpasses",                      specification_cmd,      par_passes_code,                          internal_specification_base);
703        tex_primitive(luatex_command, "parpassesexception",             specification_cmd,      par_passes_exception_code,                internal_specification_base);
704        tex_primitive(tex_command,    "parshape",                       specification_cmd,      par_shape_code,                           internal_specification_base);
705        tex_primitive(luatex_command, "balanceshape",                   specification_cmd,      balance_shape_code,                       internal_specification_base);
706        tex_primitive(luatex_command, "balancepasses",                  specification_cmd,      balance_passes_code,                      internal_specification_base);
707        tex_primitive(luatex_command, "balancefinalpenalties",          specification_cmd,      balance_final_penalties_code,             internal_specification_base);
708        tex_primitive(etex_command,   "widowpenalties",                 specification_cmd,      widow_penalties_code,                     internal_specification_base);
709        tex_primitive(luatex_command, "brokenpenalties",                specification_cmd,      broken_penalties_code,                    internal_specification_base);
710        tex_primitive(luatex_command, "fitnessclasses",                 specification_cmd,      fitness_classes_code,                     internal_specification_base);
711        tex_primitive(luatex_command, "adjacentdemerits",               specification_cmd,      adjacent_demerits_code,                   internal_specification_base);
712        tex_primitive(luatex_command, "orphanlinefactors",              specification_cmd,      orphan_line_factors_code,                 internal_specification_base);
713
714        tex_primitive(etex_command,   "detokenize",                     the_cmd,                detokenize_code,                          0); /* maybe convert_cmd */
715        tex_primitive(luatex_command, "expandeddetokenize",             the_cmd,                expanded_detokenize_code,                 0); /* maybe convert_cmd */
716        tex_primitive(luatex_command, "protecteddetokenize",            the_cmd,                protected_detokenize_code,                0); /* maybe convert_cmd */
717        tex_primitive(luatex_command, "protectedexpandeddetokenize",    the_cmd,                protected_expanded_detokenize_code,       0); /* maybe convert_cmd */
718        tex_primitive(tex_command,    "the",                            the_cmd,                the_code,                                 0);
719        tex_primitive(luatex_command, "thewithoutunit",                 the_cmd,                the_without_unit_code,                    0);
720     /* tex_primitive(luatex_command, "thewithproperty",                the_cmd,                the_with_property_code,                   0); */ /* replaced by value functions */
721        tex_primitive(etex_command,   "unexpanded",                     the_cmd,                unexpanded_code,                          0); /* maybe convert_cmd */
722
723        tex_primitive(tex_command,    "botmark",                        get_mark_cmd,           bot_mark_code,                            0); /* \botmarks        0 */
724        tex_primitive(etex_command,   "botmarks",                       get_mark_cmd,           bot_marks_code,                           0);
725        tex_primitive(luatex_command, "currentmarks",                   get_mark_cmd,           current_marks_code,                       0);
726        tex_primitive(tex_command,    "firstmark",                      get_mark_cmd,           first_mark_code,                          0); /* \firstmarks      0 */
727        tex_primitive(etex_command,   "firstmarks",                     get_mark_cmd,           first_marks_code,                         0);
728        tex_primitive(tex_command,    "splitbotmark",                   get_mark_cmd,           split_bot_mark_code,                      0); /* \splitbotmarks   0 */
729        tex_primitive(etex_command,   "splitbotmarks",                  get_mark_cmd,           split_bot_marks_code,                     0);
730        tex_primitive(tex_command,    "splitfirstmark",                 get_mark_cmd,           split_first_mark_code,                    0); /* \splitfirstmarks 0 */
731        tex_primitive(etex_command,   "splitfirstmarks",                get_mark_cmd,           split_first_marks_code,                   0);
732        tex_primitive(tex_command,    "topmark",                        get_mark_cmd,           top_mark_code,                            0); /* \topmarks        0 */
733        tex_primitive(etex_command,   "topmarks",                       get_mark_cmd,           top_marks_code,                           0);
734
735        tex_primitive(tex_command,    "vadjust",                        vadjust_cmd,            normal_code,                              0);
736
737        tex_primitive(tex_command,    "halign",                         halign_cmd,             normal_code,                              0);
738        tex_primitive(tex_command,    "valign",                         valign_cmd,             normal_code,                              0);
739
740        tex_primitive(tex_command,    "vcenter",                        vcenter_cmd,            normal_code,                              0);
741
742        /* todo rule codes of nodes, so empty will move */
743
744        tex_primitive(luatex_command, "novrule",                        vrule_cmd,              empty_rule_code,                          0);
745        tex_primitive(luatex_command, "srule",                          vrule_cmd,              strut_rule_code,                          0);
746        tex_primitive(luatex_command, "virtualvrule",                   vrule_cmd,              virtual_rule_code,                        0);
747        tex_primitive(tex_command,    "vrule",                          vrule_cmd,              normal_rule_code,                         0);
748
749        tex_primitive(tex_command,    "hrule",                          hrule_cmd,              normal_rule_code,                         0);
750        tex_primitive(luatex_command, "nohrule",                        hrule_cmd,              empty_rule_code,                          0);
751        tex_primitive(luatex_command, "virtualhrule",                   hrule_cmd,              virtual_rule_code,                        0);
752
753        tex_primitive(luatex_command, "attribute",                      register_cmd,           attribute_val_level,                      0);
754        tex_primitive(tex_command,    "count",                          register_cmd,           integer_val_level,                        0);
755        tex_primitive(tex_command,    "dimen",                          register_cmd,           dimension_val_level,                      0);
756        tex_primitive(luatex_command, "float",                          register_cmd,           posit_val_level,                          0);
757        tex_primitive(tex_command,    "muskip",                         register_cmd,           muglue_val_level,                         0);
758        tex_primitive(tex_command,    "skip",                           register_cmd,           glue_val_level,                           0);
759        tex_primitive(tex_command,    "toks",                           register_cmd,           token_val_level,                          0);
760
761        tex_primitive(luatex_command, "insertmode",                     auxiliary_cmd,          insert_mode_code,                         0);
762        tex_primitive(etex_command,   "interactionmode",                auxiliary_cmd,          interaction_mode_code,                    0);
763        tex_primitive(tex_command,    "prevdepth",                      auxiliary_cmd,          prev_depth_code,                          0);
764        tex_primitive(tex_command,    "prevgraf",                       auxiliary_cmd,          prev_graf_code,                           0);
765        tex_primitive(tex_command,    "spacefactor",                    auxiliary_cmd,          space_factor_code,                        0);
766
767        tex_primitive(tex_command,    "deadcycles",                     page_property_cmd,      dead_cycles_code,                         0);
768        tex_primitive(luatex_command, "insertdepth",                    page_property_cmd,      insert_depth_code,                        0);
769        tex_primitive(luatex_command, "insertdistance",                 page_property_cmd,      insert_distance_code,                     0);
770        tex_primitive(luatex_command, "insertheight",                   page_property_cmd,      insert_height_code,                       0);
771        tex_primitive(luatex_command, "insertheights",                  page_property_cmd,      insert_heights_code,                      0);
772        tex_primitive(luatex_command, "insertlimit",                    page_property_cmd,      insert_limit_code,                        0);
773        tex_primitive(luatex_command, "insertmaxdepth",                 page_property_cmd,      insert_maxdepth_code,                     0);
774        tex_primitive(luatex_command, "insertmultiplier",               page_property_cmd,      insert_multiplier_code,                   0);
775        tex_primitive(tex_command,    "insertpenalties",                page_property_cmd,      insert_penalties_code,                    0);
776        tex_primitive(luatex_command, "insertpenalty",                  page_property_cmd,      insert_penalty_code,                      0);
777        tex_primitive(luatex_command, "insertshrink",                   page_property_cmd,      insert_shrink_code,                       0);
778        tex_primitive(luatex_command, "insertstorage",                  page_property_cmd,      insert_storage_code,                      0);
779        tex_primitive(luatex_command, "insertstoring",                  page_property_cmd,      insert_storing_code,                      0);
780        tex_primitive(luatex_command, "insertstretch",                  page_property_cmd,      insert_stretch_code,                      0);
781        tex_primitive(luatex_command, "insertwidth",                    page_property_cmd,      insert_width_code,                        0);
782        tex_primitive(luatex_command, "insertlineheight",               page_property_cmd,      insert_line_height_code,                  0);
783        tex_primitive(luatex_command, "insertlinedepth",                page_property_cmd,      insert_line_depth_code,                   0);
784        tex_primitive(tex_command,    "pagedepth",                      page_property_cmd,      page_depth_code,                          0);
785        tex_primitive(luatex_command, "pageexcess",                     page_property_cmd,      page_excess_code,                         0);
786        tex_primitive(tex_command,    "pagefilllstretch",               page_property_cmd,      page_filllstretch_code,                   0);
787        tex_primitive(tex_command,    "pagefillstretch",                page_property_cmd,      page_fillstretch_code,                    0);
788        tex_primitive(tex_command,    "pagefilstretch",                 page_property_cmd,      page_filstretch_code,                     0);
789        tex_primitive(luatex_command, "pagefistretch",                  page_property_cmd,      page_fistretch_code,                      0);
790        tex_primitive(tex_command,    "pagegoal",                       page_property_cmd,      page_goal_code,                           0);
791        tex_primitive(luatex_command, "pagelastdepth",                  page_property_cmd,      page_last_depth_code,                     0);
792        tex_primitive(luatex_command, "pagelastfilllstretch",           page_property_cmd,      page_last_filllstretch_code,              0);
793        tex_primitive(luatex_command, "pagelastfillstretch",            page_property_cmd,      page_last_fillstretch_code,               0);
794        tex_primitive(luatex_command, "pagelastfilstretch",             page_property_cmd,      page_last_filstretch_code,                0);
795        tex_primitive(luatex_command, "pagelastfistretch",              page_property_cmd,      page_last_fistretch_code,                 0);
796        tex_primitive(luatex_command, "pagelastheight",                 page_property_cmd,      page_last_height_code,                    0);
797        tex_primitive(luatex_command, "pagelastshrink",                 page_property_cmd,      page_last_shrink_code,                    0);
798        tex_primitive(luatex_command, "pagelaststretch",                page_property_cmd,      page_last_stretch_code,                   0);
799        tex_primitive(tex_command,    "pageshrink",                     page_property_cmd,      page_shrink_code,                         0);
800        tex_primitive(tex_command,    "pagestretch",                    page_property_cmd,      page_stretch_code,                        0);
801        tex_primitive(tex_command,    "pagetotal",                      page_property_cmd,      page_total_code,                          0);
802        tex_primitive(luatex_command, "pagevsize",                      page_property_cmd,      page_vsize_code,                          0);
803
804        tex_primitive(luatex_command, "splitlastdepth",                 page_property_cmd,      split_last_depth_code,                    0);
805        tex_primitive(luatex_command, "splitlastheight",                page_property_cmd,      split_last_height_code,                   0);
806        tex_primitive(luatex_command, "splitlastshrink",                page_property_cmd,      split_last_shrink_code,                   0);
807        tex_primitive(luatex_command, "splitlaststretch",               page_property_cmd,      split_last_stretch_code,                  0);
808
809        tex_primitive(luatex_command, "mvlcurrentlyactive",             page_property_cmd,      mvl_currently_active_code,                0);
810
811        tex_primitive(luatex_command, "boxadapt",                       box_property_cmd,       box_adapt_code,                           0);
812        tex_primitive(luatex_command, "boxanchor",                      box_property_cmd,       box_anchor_code,                          0);
813        tex_primitive(luatex_command, "boxanchors",                     box_property_cmd,       box_anchors_code,                         0);
814        tex_primitive(luatex_command, "boxattribute",                   box_property_cmd,       box_attribute_code,                       0);
815        tex_primitive(luatex_command, "boxdirection",                   box_property_cmd,       box_direction_code,                       0);
816        tex_primitive(luatex_command, "boxfinalize",                    box_property_cmd,       box_finalize_code,                        0);
817        tex_primitive(luatex_command, "boxfreeze",                      box_property_cmd,       box_freeze_code,                          0);
818        tex_primitive(luatex_command, "boxinserts",                     box_property_cmd,       box_inserts_code,                         0);
819        tex_primitive(luatex_command, "boxmigrate",                     box_property_cmd,       box_migrate_code,                         0);
820        tex_primitive(luatex_command, "boxgeometry",                    box_property_cmd,       box_geometry_code,                        0);
821        tex_primitive(luatex_command, "boxlimitate",                    box_property_cmd,       box_limitate_code,                        0);
822        tex_primitive(luatex_command, "boxlimit",                       box_property_cmd,       box_limit_code,                           0);
823        tex_primitive(luatex_command, "boxorientation",                 box_property_cmd,       box_orientation_code,                     0);
824        tex_primitive(luatex_command, "boxrepack",                      box_property_cmd,       box_repack_code,                          0);
825        tex_primitive(luatex_command, "boxshift",                       box_property_cmd,       box_shift_code,                           0);
826        tex_primitive(luatex_command, "boxshrink",                      box_property_cmd,       box_shrink_code,                          0);
827        tex_primitive(luatex_command, "boxsubtype",                     box_property_cmd,       box_subtype_code,                         0);
828        tex_primitive(luatex_command, "boxsource",                      box_property_cmd,       box_source_code,                          0);
829        tex_primitive(luatex_command, "boxstretch",                     box_property_cmd,       box_stretch_code,                         0);
830        tex_primitive(luatex_command, "boxtarget",                      box_property_cmd,       box_target_code,                          0);
831        tex_primitive(luatex_command, "boxtotal",                       box_property_cmd,       box_total_code,                           0);
832        tex_primitive(luatex_command, "boxvadjust",                     box_property_cmd,       box_vadjust_code,                         0);
833        tex_primitive(luatex_command, "boxxmove",                       box_property_cmd,       box_xmove_code,                           0);
834        tex_primitive(luatex_command, "boxxoffset",                     box_property_cmd,       box_xoffset_code,                         0);
835        tex_primitive(luatex_command, "boxymove",                       box_property_cmd,       box_ymove_code,                           0);
836        tex_primitive(luatex_command, "boxyoffset",                     box_property_cmd,       box_yoffset_code,                         0);
837        tex_primitive(tex_command,    "dp",                             box_property_cmd,       box_depth_code,                           0);
838        tex_primitive(tex_command,    "ht",                             box_property_cmd,       box_height_code,                          0);
839        tex_primitive(tex_command,    "wd",                             box_property_cmd,       box_width_code,                           0);
840     // tex_primitive(luatex_command, "boxdepth",                       box_property_cmd,       box_depth_code,                           0);
841     // tex_primitive(luatex_command, "boxheight",                      box_property_cmd,       box_height_code,                          0);
842     // tex_primitive(luatex_command, "boxwidth",                       box_property_cmd,       box_width_code,                           0);
843
844        tex_primitive(tex_command,    "badness",                        some_item_cmd,          badness_code,                             0);
845        tex_primitive(etex_command,   "currentgrouplevel",              some_item_cmd,          current_group_level_code,                 0);
846        tex_primitive(etex_command,   "currentgrouptype",               some_item_cmd,          current_group_type_code,                  0);
847        tex_primitive(etex_command,   "currentifbranch",                some_item_cmd,          current_if_branch_code,                   0);
848        tex_primitive(etex_command,   "currentiflevel",                 some_item_cmd,          current_if_level_code,                    0);
849        tex_primitive(etex_command,   "currentiftype",                  some_item_cmd,          current_if_type_code,                     0);
850        tex_primitive(luatex_command, "currentloopiterator",            some_item_cmd,          current_loop_iterator_code,               0);
851        tex_primitive(luatex_command, "currentloopnesting",             some_item_cmd,          current_loop_nesting_code,                0);
852        tex_primitive(etex_command,   "currentstacksize",               some_item_cmd,          current_stack_size_code,                  0);
853     // tex_primitive(luatex_command, "dimentoscale",                   some_item_cmd,          dimen_to_scale_code,                      0);
854        tex_primitive(etex_command,   "dimexpr",                        some_item_cmd,          dimexpr_code,                             0);
855        tex_primitive(luatex_command, "dimexpression",                  some_item_cmd,          dimexpression_code,                       0); /* experiment */
856        tex_primitive(luatex_command, "dimexperimental",                some_item_cmd,          dimexperimental_code,                     0); /* experiment */
857        tex_primitive(luatex_command, "floatexpr",                      some_item_cmd,          posexpr_code,                             0);
858        tex_primitive(luatex_command, "fontcharba",                     some_item_cmd,          font_char_ba_code,                        0);
859        tex_primitive(etex_command,   "fontchardp",                     some_item_cmd,          font_char_dp_code,                        0);
860        tex_primitive(etex_command,   "fontcharht",                     some_item_cmd,          font_char_ht_code,                        0);
861        tex_primitive(etex_command,   "fontcharic",                     some_item_cmd,          font_char_ic_code,                        0);
862        tex_primitive(luatex_command, "fontcharta",                     some_item_cmd,          font_char_ta_code,                        0);
863        tex_primitive(etex_command,   "fontcharwd",                     some_item_cmd,          font_char_wd_code,                        0);
864        tex_primitive(luatex_command, "scaledfontcharba",               some_item_cmd,          scaled_font_char_ba_code,                 0);
865        tex_primitive(luatex_command, "scaledfontchardp",               some_item_cmd,          scaled_font_char_dp_code,                 0);
866        tex_primitive(luatex_command, "scaledfontcharht",               some_item_cmd,          scaled_font_char_ht_code,                 0);
867        tex_primitive(luatex_command, "scaledfontcharic",               some_item_cmd,          scaled_font_char_ic_code,                 0);
868        tex_primitive(luatex_command, "scaledfontcharta",               some_item_cmd,          scaled_font_char_ta_code,                 0);
869        tex_primitive(luatex_command, "scaledfontcharwd",               some_item_cmd,          scaled_font_char_wd_code,                 0);
870        tex_primitive(luatex_command, "fontid",                         some_item_cmd,          font_id_code,                             0);
871        tex_primitive(luatex_command, "fontmathcontrol",                some_item_cmd,          font_math_control_code,                   0);
872        tex_primitive(luatex_command, "fontspecid",                     some_item_cmd,          font_spec_id_code,                        0);
873        tex_primitive(luatex_command, "fontspecifiedsize",              some_item_cmd,          font_size_code,                           0);
874        tex_primitive(luatex_command, "fontspecscale",                  some_item_cmd,          font_spec_scale_code,                     0);
875        tex_primitive(luatex_command, "fontspecxscale",                 some_item_cmd,          font_spec_xscale_code,                    0);
876        tex_primitive(luatex_command, "fontspecyscale",                 some_item_cmd,          font_spec_yscale_code,                    0);
877        tex_primitive(luatex_command, "fontspecslant",                  some_item_cmd,          font_spec_slant_code,                     0);
878        tex_primitive(luatex_command, "fontspecweight",                 some_item_cmd,          font_spec_weight_code,                    0);
879        tex_primitive(luatex_command, "fonttextcontrol",                some_item_cmd,          font_text_control_code,                   0);
880        tex_primitive(etex_command,   "glueexpr",                       some_item_cmd,          glueexpr_code,                            0);
881        tex_primitive(etex_command,   "glueshrink",                     some_item_cmd,          glue_shrink_code,                         0);
882        tex_primitive(etex_command,   "glueshrinkorder",                some_item_cmd,          glue_shrink_order_code,                   0);
883        tex_primitive(etex_command,   "gluestretch",                    some_item_cmd,          glue_stretch_code,                        0);
884        tex_primitive(etex_command,   "gluestretchorder",               some_item_cmd,          glue_stretch_order_code,                  0);
885        tex_primitive(etex_command,   "gluetomu",                       some_item_cmd,          glue_to_mu_code,                          0);
886        tex_primitive(luatex_command, "glyphxscaled",                   some_item_cmd,          glyph_x_scaled_code,                      0);
887        tex_primitive(luatex_command, "glyphyscaled",                   some_item_cmd,          glyph_y_scaled_code,                      0);
888        tex_primitive(luatex_command, "indexofcharacter",               some_item_cmd,          index_of_character_code,                  0);
889        tex_primitive(luatex_command, "indexofregister",                some_item_cmd,          index_of_register_code,                   0);
890        tex_primitive(tex_command,    "inputlineno",                    some_item_cmd,          input_line_no_code,                       0);
891        tex_primitive(luatex_command, "insertprogress",                 some_item_cmd,          insert_progress_code,                     0);
892        tex_primitive(luatex_command, "lastarguments",                  some_item_cmd,          last_arguments_code,                      0);
893        tex_primitive(luatex_command, "lastatomclass",                  some_item_cmd,          last_atom_class_code,                     0);
894        tex_primitive(luatex_command, "lastboundary",                   some_item_cmd,          lastboundary_code,                        0);
895        tex_primitive(luatex_command, "lastchkdimension",               some_item_cmd,          last_chk_dimension_code,                  0);
896        tex_primitive(luatex_command, "lastchknumber",                  some_item_cmd,          last_chk_integer_code,                    0);
897        tex_primitive(tex_command,    "lastkern",                       some_item_cmd,          lastkern_code,                            0);
898        tex_primitive(luatex_command, "lastleftclass",                  some_item_cmd,          last_left_class_code,                     0);
899        tex_primitive(luatex_command, "lastloopiterator",               some_item_cmd,          last_loop_iterator_code,                  0);
900        tex_primitive(luatex_command, "lastnodesubtype",                some_item_cmd,          last_node_subtype_code,                   0);
901        tex_primitive(etex_command,   "lastnodetype",                   some_item_cmd,          last_node_type_code,                      0);
902        tex_primitive(luatex_command, "lastpageextra",                  some_item_cmd,          last_page_extra_code,                     0);
903        tex_primitive(luatex_command, "lastpartrigger",                 some_item_cmd,          last_par_trigger_code,                    0);
904        tex_primitive(luatex_command, "lastparcontext",                 some_item_cmd,          last_par_context_code,                    0);
905        tex_primitive(tex_command,    "lastpenalty",                    some_item_cmd,          lastpenalty_code,                         0);
906        tex_primitive(luatex_command, "lastrightclass",                 some_item_cmd,          last_right_class_code,                    0);
907        tex_primitive(tex_command,    "lastskip",                       some_item_cmd,          lastskip_code,                            0);
908        tex_primitive(luatex_command, "leftmarginkern",                 some_item_cmd,          left_margin_kern_code,                    0);
909        tex_primitive(luatex_command, "luametatexmajorversion",         some_item_cmd,          luametatex_major_version_code,            0);
910        tex_primitive(luatex_command, "luametatexminorversion",         some_item_cmd,          luametatex_minor_version_code,            0);
911        tex_primitive(luatex_command, "luametatexrelease",              some_item_cmd,          luametatex_release_code,                  0);
912        tex_primitive(luatex_command, "luatexrevision",                 some_item_cmd,          luatex_revision_code,                     0);
913        tex_primitive(luatex_command, "luatexversion",                  some_item_cmd,          luatex_version_code,                      0);
914     /* tex_primitive(luatex_command, "luavaluefunction",               some_item_cmd,          lua_value_function_code,                  0); */
915        tex_primitive(luatex_command, "mathatomglue",                   some_item_cmd,          math_atom_glue_code,                      0);
916        tex_primitive(luatex_command, "mathmainstyle",                  some_item_cmd,          math_main_style_code,                     0);
917        tex_primitive(luatex_command, "mathparentstyle",                some_item_cmd,          math_parent_style_code,                   0);
918        tex_primitive(luatex_command, "mathscale",                      some_item_cmd,          math_scale_code,                          0);
919        tex_primitive(luatex_command, "mathstackstyle",                 some_item_cmd,          math_stack_style_code,                    0);
920        tex_primitive(luatex_command, "mathstyle",                      some_item_cmd,          math_style_code,                          0);
921        tex_primitive(luatex_command, "mathstylefontid",                some_item_cmd,          math_style_font_id_code,                  0);
922        tex_primitive(etex_command,   "muexpr",                         some_item_cmd,          muexpr_code,                              0);
923        tex_primitive(etex_command,   "mutoglue",                       some_item_cmd,          mu_to_glue_code,                          0);
924        tex_primitive(luatex_command, "nestedloopiterator",             some_item_cmd,          nested_loop_iterator_code,                0);
925        tex_primitive(luatex_command, "numericscale",                   some_item_cmd,          numeric_scale_code,                       0);
926        tex_primitive(luatex_command, "numericscaled",                  some_item_cmd,          numeric_scaled_code,                      0);
927        tex_primitive(etex_command,   "numexpr",                        some_item_cmd,          numexpr_code,                             0);
928        tex_primitive(luatex_command, "numexpression",                  some_item_cmd,          numexpression_code,                       0); /* experiment */
929        tex_primitive(luatex_command, "numexperimental",                some_item_cmd,          numexperimental_code,                     0); /* experiment */
930        tex_primitive(luatex_command, "overshoot",                      some_item_cmd,          overshoot_code,                           0);
931        tex_primitive(luatex_command, "parametercount",                 some_item_cmd,          parameter_count_code,                     0);
932        tex_primitive(luatex_command, "parameterindex",                 some_item_cmd,          parameter_index_code,                     0);
933        tex_primitive(etex_command,   "parshapedimen",                  some_item_cmd,          par_shape_width_code,                     0); /* bad name */
934        tex_primitive(etex_command,   "parshapeindent",                 some_item_cmd,          par_shape_indent_code,                    0);
935        tex_primitive(etex_command,   "parshapelength",                 some_item_cmd,          par_shape_length_code,                    0);
936        tex_primitive(luatex_command, "parshapewidth",                  some_item_cmd,          par_shape_width_code,                     0);
937        tex_primitive(luatex_command, "balanceshapevsize",              some_item_cmd,          balance_shape_vsize_code,                 0);
938        tex_primitive(luatex_command, "balanceshapetopspace",           some_item_cmd,          balance_shape_top_space_code,             0);
939        tex_primitive(luatex_command, "balanceshapebottomspace",        some_item_cmd,          balance_shape_bottom_space_code,          0);
940        tex_primitive(luatex_command, "previousloopiterator",           some_item_cmd,          previous_loop_iterator_code,              0);
941        tex_primitive(luatex_command, "rightmarginkern",                some_item_cmd,          right_margin_kern_code,                   0);
942        tex_primitive(luatex_command, "scaledemwidth",                  some_item_cmd,          scaled_em_width_code,                     0);
943        tex_primitive(luatex_command, "scaledexheight",                 some_item_cmd,          scaled_ex_height_code,                    0);
944        tex_primitive(luatex_command, "scaledextraspace",               some_item_cmd,          scaled_extra_space_code,                  0);
945        tex_primitive(luatex_command, "scaledinterwordshrink",          some_item_cmd,          scaled_interword_shrink_code,             0);
946        tex_primitive(luatex_command, "scaledinterwordspace",           some_item_cmd,          scaled_interword_space_code,              0);
947        tex_primitive(luatex_command, "scaledinterwordstretch",         some_item_cmd,          scaled_interword_stretch_code,            0);
948        tex_primitive(luatex_command, "scaledslantperpoint",            some_item_cmd,          scaled_slant_per_point_code,              0);
949        tex_primitive(luatex_command, "scaledmathaxis",                 some_item_cmd,          scaled_math_axis_code,                    0);
950        tex_primitive(luatex_command, "scaledmathexheight",             some_item_cmd,          scaled_math_ex_height_code,               0);
951        tex_primitive(luatex_command, "scaledmathemwidth",              some_item_cmd,          scaled_math_em_width_code,                0);
952        tex_primitive(luatex_command, "mathcharclass",                  some_item_cmd,          math_char_class_code,                     0);
953        tex_primitive(luatex_command, "mathcharfam",                    some_item_cmd,          math_char_fam_code,                       0);
954        tex_primitive(luatex_command, "mathcharslot",                   some_item_cmd,          math_char_slot_code,                      0);
955
956        tex_primitive(luatex_command, "csactive",                       convert_cmd,            cs_active_code,                           0);
957        tex_primitive(luatex_command, "csnamestring",                   convert_cmd,            cs_lastname_code,                         0);
958        tex_primitive(luatex_command, "csstring",                       convert_cmd,            cs_string_code,                           0);
959        tex_primitive(luatex_command, "detokened",                      convert_cmd,            detokened_code,                           0);
960        tex_primitive(luatex_command, "detokenized",                    convert_cmd,            detokenized_code,                         0);
961        tex_primitive(luatex_command, "directlua",                      convert_cmd,            lua_code,                                 0);
962        tex_primitive(luatex_command, "expanded",                       convert_cmd,            expanded_code,                            0);
963     /* tex_primitive(luatex_command, "expandedaftercs",                convert_cmd,            expanded_after_cs_code,                   0); */ /* no gain as we need {{#1}} then */
964        tex_primitive(tex_command,    "fontname",                       convert_cmd,            font_name_code,                           0);
965        tex_primitive(luatex_command, "fontidentifier",                 convert_cmd,            font_identifier_code,                     0);
966        tex_primitive(luatex_command, "fontspecifiedname",              convert_cmd,            font_specification_code,                  0);
967        tex_primitive(luatex_command, "formatname",                     convert_cmd,            format_name_code,                         0);
968        tex_primitive(tex_command,    "jobname",                        convert_cmd,            job_name_code,                            0);
969        tex_primitive(luatex_command, "luabytecode",                    convert_cmd,            lua_bytecode_code,                        0);
970        tex_primitive(luatex_command, "luaescapestring",                convert_cmd,            lua_escape_string_code,                   0);
971        tex_primitive(luatex_command, "luafunction",                    convert_cmd,            lua_function_code,                        0);
972        tex_primitive(luatex_command, "luatexbanner",                   convert_cmd,            luatex_banner_code,                       0);
973     /* tex_primitive(luatex_command, "luatokenstring",                 convert_cmd,            lua_token_string_code,                    0); */
974        tex_primitive(tex_command,    "meaning",                        convert_cmd,            meaning_code,                             0);
975        tex_primitive(luatex_command, "meaningasis",                    convert_cmd,            meaning_asis_code,                        0); /* for manuals and articles */
976        tex_primitive(luatex_command, "meaningful",                     convert_cmd,            meaning_ful_code,                         0); /* full as in fil */
977        tex_primitive(luatex_command, "meaningfull",                    convert_cmd,            meaning_full_code,                        0); /* full as in fill, maybe some day meaninfulll  */
978        tex_primitive(luatex_command, "meaningles",                     convert_cmd,            meaning_les_code,                         0); /* less as in fil, can't be less than this */
979        tex_primitive(luatex_command, "meaningless",                    convert_cmd,            meaning_less_code,                        0); /* less as in fill */
980        tex_primitive(tex_command,    "number",                         convert_cmd,            number_code,                              0);
981        tex_primitive(tex_command,    "romannumeral",                   convert_cmd,            roman_numeral_code,                       0);
982        tex_primitive(luatex_command, "semiexpanded",                   convert_cmd,            semi_expanded_code,                       0);
983        tex_primitive(tex_command,    "string",                         convert_cmd,            string_code,                              0);
984        tex_primitive(luatex_command, "todimension",                    convert_cmd,            to_dimension_code,                        0);
985        tex_primitive(luatex_command, "tohexadecimal",                  convert_cmd,            to_hexadecimal_code,                      0);
986        tex_primitive(luatex_command, "tointeger",                      convert_cmd,            to_integer_code,                          0);
987        tex_primitive(luatex_command, "tomathstyle",                    convert_cmd,            to_mathstyle_code,                        0);
988        tex_primitive(luatex_command, "toscaled",                       convert_cmd,            to_scaled_code,                           0);
989        tex_primitive(luatex_command, "tosparsedimension",              convert_cmd,            to_sparse_dimension_code,                 0);
990        tex_primitive(luatex_command, "tosparsescaled",                 convert_cmd,            to_sparse_scaled_code,                    0);
991        tex_primitive(luatex_command, "tocharacter",                    convert_cmd,            to_character_code,                        0);
992
993        tex_primitive(tex_command,    "else",                           if_test_cmd,            else_code,                                0);
994        tex_primitive(tex_command,    "fi",                             if_test_cmd,            fi_code,                                  0);
995        tex_primitive(no_command,     "inif",                           if_test_cmd,            if_code,                                  0);
996        tex_primitive(no_command,     "noif",                           if_test_cmd,            no_if_code,                               0);
997        tex_primitive(tex_command,    "or",                             if_test_cmd,            or_code,                                  0);
998        tex_primitive(luatex_command, "orelse",                         if_test_cmd,            or_else_code,                             0);
999        tex_primitive(luatex_command, "orunless",                       if_test_cmd,            or_unless_code,                           0);
1000
1001        tex_primitive(tex_command,    "if",                             if_test_cmd,            if_char_code,                             0);
1002        tex_primitive(luatex_command, "ifabsdim",                       if_test_cmd,            if_abs_dim_code,                          0);
1003        tex_primitive(luatex_command, "ifabsfloat",                     if_test_cmd,            if_abs_posit_code,                        0);
1004        tex_primitive(luatex_command, "ifabsnum",                       if_test_cmd,            if_abs_int_code,                          0);
1005        tex_primitive(luatex_command, "ifarguments",                    if_test_cmd,            if_arguments_code,                        0);
1006     /* tex_primitive(luatex_command, "ifbitwiseand",                   if_test_cmd,            if_bitwise_and_code,                      0); */
1007        tex_primitive(luatex_command, "ifboolean",                      if_test_cmd,            if_boolean_code,                          0);
1008        tex_primitive(tex_command,    "ifcase",                         if_test_cmd,            if_case_code,                             0);
1009        tex_primitive(tex_command,    "ifcat",                          if_test_cmd,            if_cat_code,                              0);
1010        tex_primitive(luatex_command, "ifchkdim",                       if_test_cmd,            if_chk_dim_code,                          0);
1011        tex_primitive(luatex_command, "ifchkdimension",                 if_test_cmd,            if_chk_dimension_code,                    0);
1012        tex_primitive(luatex_command, "ifchkdimexpr",                   if_test_cmd,            if_chk_dimexpr_code,                      0);
1013        tex_primitive(luatex_command, "ifchknum",                       if_test_cmd,            if_chk_int_code,                          0);
1014        tex_primitive(luatex_command, "ifchknumber",                    if_test_cmd,            if_chk_integer_code,                      0);
1015        tex_primitive(luatex_command, "ifchknumexpr",                   if_test_cmd,            if_chk_intexpr_code,                          0);
1016        tex_primitive(luatex_command, "ifcmpdim",                       if_test_cmd,            if_cmp_dim_code,                          0);
1017        tex_primitive(luatex_command, "ifcmpnum",                       if_test_cmd,            if_cmp_int_code,                          0);
1018        tex_primitive(luatex_command, "ifcondition",                    if_test_cmd,            if_condition_code,                        0);
1019        tex_primitive(luatex_command, "ifcramped",                      if_test_cmd,            if_cramped_code,                          0);
1020        tex_primitive(etex_command,   "ifcsname",                       if_test_cmd,            if_csname_code,                           0);
1021        tex_primitive(luatex_command, "ifcstok",                        if_test_cmd,            if_cstok_code,                            0);
1022        tex_primitive(etex_command,   "ifdefined",                      if_test_cmd,            if_defined_code,                          0);
1023        tex_primitive(tex_command,    "ifdim",                          if_test_cmd,            if_dim_code,                              0);
1024        tex_primitive(luatex_command, "ifdimexpression",                if_test_cmd,            if_dimexpression_code,                    0);
1025        tex_primitive(luatex_command, "ifdimval",                       if_test_cmd,            if_val_dim_code,                          0);
1026        tex_primitive(luatex_command, "ifempty",                        if_test_cmd,            if_empty_code,                            0);
1027        tex_primitive(tex_command,    "iffalse",                        if_test_cmd,            if_false_code,                            0);
1028        tex_primitive(luatex_command, "ifflags",                        if_test_cmd,            if_flags_code,                            0);
1029        tex_primitive(luatex_command, "iffloat",                        if_test_cmd,            if_posit_code,                            0);
1030        tex_primitive(etex_command,   "iffontchar",                     if_test_cmd,            if_font_char_code,                        0);
1031        tex_primitive(luatex_command, "ifhaschar",                      if_test_cmd,            if_has_char_code,                         0);
1032        tex_primitive(luatex_command, "ifhastok",                       if_test_cmd,            if_has_tok_code,                          0);
1033        tex_primitive(luatex_command, "ifhastoks",                      if_test_cmd,            if_has_toks_code,                         0);
1034        tex_primitive(luatex_command, "ifhasxtoks",                     if_test_cmd,            if_has_xtoks_code,                        0);
1035        tex_primitive(tex_command,    "ifhbox",                         if_test_cmd,            if_hbox_code,                             0);
1036        tex_primitive(tex_command,    "ifhmode",                        if_test_cmd,            if_hmode_code,                            0);
1037        tex_primitive(luatex_command, "ifinalignment",                  if_test_cmd,            if_in_alignment_code,                     0);
1038        tex_primitive(luatex_command, "ifincsname",                     if_test_cmd,            if_in_csname_code,                        0); /* This is obsolete and might be dropped. */
1039        tex_primitive(tex_command,    "ifinner",                        if_test_cmd,            if_inner_code,                            0);
1040        tex_primitive(luatex_command, "ifinsert",                       if_test_cmd,            if_insert_code,                           0);
1041        tex_primitive(luatex_command, "ifintervaldim",                  if_test_cmd,            if_interval_dim_code,                     0); /* playground */
1042        tex_primitive(luatex_command, "ifintervalfloat",                if_test_cmd,            if_interval_posit_code,                   0); /* playground */
1043        tex_primitive(luatex_command, "ifintervalnum",                  if_test_cmd,            if_interval_int_code,                     0); /* playground */
1044        tex_primitive(luatex_command, "iflastnamedcs",                  if_test_cmd,            if_last_named_cs_code,                    0);
1045        tex_primitive(luatex_command, "iflist",                         if_test_cmd,            if_list_code,                             0);
1046        tex_primitive(luatex_command, "ifmathparameter",                if_test_cmd,            if_math_parameter_code,                   0);
1047        tex_primitive(luatex_command, "ifmathstyle",                    if_test_cmd,            if_math_style_code,                       0);
1048        tex_primitive(tex_command,    "ifmmode",                        if_test_cmd,            if_mmode_code,                            0);
1049        tex_primitive(tex_command,    "ifnum",                          if_test_cmd,            if_int_code,                              0);
1050        tex_primitive(luatex_command, "ifnumexpression",                if_test_cmd,            if_numexpression_code,                    0);
1051        tex_primitive(luatex_command, "ifnumval",                       if_test_cmd,            if_val_int_code,                          0);
1052        tex_primitive(tex_command,    "ifodd",                          if_test_cmd,            if_odd_code,                              0);
1053        tex_primitive(luatex_command, "ifparameter",                    if_test_cmd,            if_parameter_code,                        0);
1054        tex_primitive(luatex_command, "ifparameters",                   if_test_cmd,            if_parameters_code,                       0);
1055        tex_primitive(luatex_command, "ifrelax",                        if_test_cmd,            if_relax_code,                            0);
1056        tex_primitive(luatex_command, "iftok",                          if_test_cmd,            if_tok_code,                              0);
1057        tex_primitive(tex_command,    "iftrue",                         if_test_cmd,            if_true_code,                             0);
1058        tex_primitive(tex_command,    "ifvbox",                         if_test_cmd,            if_vbox_code,                             0);
1059        tex_primitive(tex_command,    "ifvmode",                        if_test_cmd,            if_vmode_code,                            0);
1060        tex_primitive(tex_command,    "ifvoid",                         if_test_cmd,            if_void_code,                             0);
1061        tex_primitive(tex_command,    "ifx",                            if_test_cmd,            if_x_code,                                0);
1062        tex_primitive(luatex_command, "ifzerodim",                      if_test_cmd,            if_zero_dim_code,                         0);
1063        tex_primitive(luatex_command, "ifzerofloat",                    if_test_cmd,            if_zero_posit_code,                       0);
1064        tex_primitive(luatex_command, "ifzeronum",                      if_test_cmd,            if_zero_int_code,                         0);
1065
1066        tex_primitive(tex_command,    "above",                          math_fraction_cmd,      math_above_code,                          0);
1067        tex_primitive(tex_command,    "abovewithdelims",                math_fraction_cmd,      math_above_delimited_code,                0);
1068        tex_primitive(tex_command,    "atop",                           math_fraction_cmd,      math_atop_code,                           0);
1069        tex_primitive(tex_command,    "atopwithdelims",                 math_fraction_cmd,      math_atop_delimited_code,                 0);
1070        tex_primitive(tex_command,    "over",                           math_fraction_cmd,      math_over_code,                           0);
1071        tex_primitive(tex_command,    "overwithdelims",                 math_fraction_cmd,      math_over_delimited_code,                 0);
1072
1073        tex_primitive(luatex_command, "Uabove",                         math_fraction_cmd,      math_u_above_code,                        0);
1074        tex_primitive(luatex_command, "Uabovewithdelims",               math_fraction_cmd,      math_u_above_delimited_code,              0);
1075        tex_primitive(luatex_command, "Uatop",                          math_fraction_cmd,      math_u_atop_code,                         0);
1076        tex_primitive(luatex_command, "Uatopwithdelims",                math_fraction_cmd,      math_u_atop_delimited_code,               0);
1077        tex_primitive(luatex_command, "Uover",                          math_fraction_cmd,      math_u_over_code,                         0);
1078        tex_primitive(luatex_command, "Uoverwithdelims",                math_fraction_cmd,      math_u_over_delimited_code,               0);
1079        tex_primitive(luatex_command, "Uskewed",                        math_fraction_cmd,      math_u_skewed_code,                       0);
1080        tex_primitive(luatex_command, "Uskewedwithdelims",              math_fraction_cmd,      math_u_skewed_delimited_code,             0);
1081        tex_primitive(luatex_command, "Ustretched",                     math_fraction_cmd,      math_u_stretched_code,                    0);
1082        tex_primitive(luatex_command, "Ustretchedwithdelims",           math_fraction_cmd,      math_u_stretched_delimited_code,          0);
1083
1084        tex_primitive(luatex_command, "cfcode",                         font_property_cmd,      font_cf_code,                             0); /* obsolete */
1085        tex_primitive(luatex_command, "efcode",                         font_property_cmd,      font_ef_code,                             0); /* obsolete */
1086        tex_primitive(tex_command,    "fontdimen",                      font_property_cmd,      font_dimension_code,                      0);
1087        tex_primitive(tex_command,    "hyphenchar",                     font_property_cmd,      font_hyphen_code,                         0);
1088        tex_primitive(luatex_command, "lpcode",                         font_property_cmd,      font_lp_code,                             0); /* obsolete */
1089        tex_primitive(luatex_command, "rpcode",                         font_property_cmd,      font_rp_code,                             0); /* obsolete */
1090        tex_primitive(luatex_command, "scaledfontdimen",                font_property_cmd,      scaled_font_dimension_code,               0);
1091        tex_primitive(tex_command,    "skewchar",                       font_property_cmd,      font_skew_code,                           0);
1092
1093        tex_primitive(tex_command,    "lowercase",                      case_shift_cmd,         lower_case_code,                          0);
1094        tex_primitive(tex_command,    "uppercase",                      case_shift_cmd,         upper_case_code,                          0);
1095
1096        tex_primitive(luatex_command, "amcode",                         define_char_code_cmd,   amcode_charcode,                          0);
1097        tex_primitive(tex_command,    "catcode",                        define_char_code_cmd,   catcode_charcode,                         0);
1098        tex_primitive(luatex_command, "cccode",                         define_char_code_cmd,   cccode_charcode,                          0);
1099        tex_primitive(tex_command,    "delcode",                        define_char_code_cmd,   delcode_charcode,                         0);
1100        tex_primitive(luatex_command, "hccode",                         define_char_code_cmd,   hccode_charcode,                          0);
1101        tex_primitive(luatex_command, "hmcode",                         define_char_code_cmd,   hmcode_charcode,                          0);
1102        tex_primitive(tex_command,    "lccode",                         define_char_code_cmd,   lccode_charcode,                          0);
1103        tex_primitive(tex_command,    "mathcode",                       define_char_code_cmd,   mathcode_charcode,                        0);
1104        tex_primitive(tex_command,    "sfcode",                         define_char_code_cmd,   sfcode_charcode,                          0);
1105        tex_primitive(tex_command,    "uccode",                         define_char_code_cmd,   uccode_charcode,                          0);
1106
1107        tex_primitive(luatex_command, "Udelcode",                       define_char_code_cmd,   extdelcode_charcode,                      0);
1108        tex_primitive(luatex_command, "Umathcode",                      define_char_code_cmd,   extmathcode_charcode,                     0);
1109
1110        tex_primitive(luatex_command, "cdef",                           def_cmd,                constant_def_code,                        0);
1111        tex_primitive(luatex_command, "cdefcsname",                     def_cmd,                constant_def_csname_code,                 0);
1112        tex_primitive(tex_command,    "def",                            def_cmd,                def_code,                                 0);
1113        tex_primitive(luatex_command, "defcsname",                      def_cmd,                def_csname_code,                          0);
1114        tex_primitive(tex_command,    "edef",                           def_cmd,                expanded_def_code,                        0);
1115        tex_primitive(luatex_command, "edefcsname",                     def_cmd,                expanded_def_csname_code,                 0);
1116        tex_primitive(tex_command,    "gdef",                           def_cmd,                global_def_code,                          0);
1117        tex_primitive(luatex_command, "gdefcsname",                     def_cmd,                global_def_csname_code,                   0);
1118        tex_primitive(tex_command,    "xdef",                           def_cmd,                global_expanded_def_code,                 0);
1119        tex_primitive(luatex_command, "xdefcsname",                     def_cmd,                global_expanded_def_csname_code,          0);
1120
1121        tex_primitive(tex_command,    "scriptfont",                     define_family_cmd,      script_size,                              0);
1122        tex_primitive(tex_command,    "scriptscriptfont",               define_family_cmd,      script_script_size,                       0);
1123        tex_primitive(tex_command,    "textfont",                       define_family_cmd,      text_size,                                0);
1124
1125        tex_primitive(tex_command,    "-",                              discretionary_cmd,      explicit_discretionary_code,              0);
1126        tex_primitive(luatex_command, "automaticdiscretionary",         discretionary_cmd,      automatic_discretionary_code,             0);
1127        tex_primitive(tex_command,    "discretionary",                  discretionary_cmd,      normal_discretionary_code,                0);
1128        tex_primitive(luatex_command, "explicitdiscretionary",          discretionary_cmd,      explicit_discretionary_code,              0);
1129
1130        tex_primitive(tex_command,    "eqno",                           equation_number_cmd,    right_location_code,                      0);
1131        tex_primitive(tex_command,    "leqno",                          equation_number_cmd,    left_location_code,                       0);
1132
1133        tex_primitive(tex_command,    "moveleft",                       hmove_cmd,              move_backward_code,                       0);
1134        tex_primitive(tex_command,    "moveright",                      hmove_cmd,              move_forward_code,                        0);
1135
1136        tex_primitive(tex_command,    "hfil",                           hskip_cmd,              fi_l_code,                                0);
1137        tex_primitive(tex_command,    "hfill",                          hskip_cmd,              fi_ll_code,                               0);
1138        tex_primitive(tex_command,    "hfilneg",                        hskip_cmd,              fi_l_neg_code,                            0);
1139        tex_primitive(tex_command,    "hskip",                          hskip_cmd,              skip_code,                                0);
1140        tex_primitive(tex_command,    "hss",                            hskip_cmd,              fi_ss_code,                               0);
1141
1142        tex_primitive(luatex_command, "hjcode",                         hyphenation_cmd,        hjcode_code,                              0);
1143        tex_primitive(tex_command,    "hyphenation",                    hyphenation_cmd,        hyphenation_code,                         0);
1144        tex_primitive(luatex_command, "hyphenationmin",                 hyphenation_cmd,        hyphenationmin_code,                      0);
1145        tex_primitive(tex_command,    "patterns",                       hyphenation_cmd,        patterns_code,                            0);
1146        tex_primitive(luatex_command, "postexhyphenchar",               hyphenation_cmd,        postexhyphenchar_code,                    0);
1147        tex_primitive(luatex_command, "posthyphenchar",                 hyphenation_cmd,        posthyphenchar_code,                      0);
1148        tex_primitive(luatex_command, "preexhyphenchar",                hyphenation_cmd,        preexhyphenchar_code,                     0);
1149        tex_primitive(luatex_command, "prehyphenchar",                  hyphenation_cmd,        prehyphenchar_code,                       0);
1150
1151        tex_primitive(tex_command,    "hkern",                          kern_cmd,               h_kern_code,                              0);
1152        tex_primitive(tex_command,    "kern",                           kern_cmd,               normal_kern_code,                         0);
1153     /* tex_primitive(tex_command,    "nonzerowidthkern",               kern_cmd,               non_zero_width_kern_code,                 0); */ /* maybe */
1154        tex_primitive(tex_command,    "vkern",                          kern_cmd,               v_kern_code,                              0);
1155
1156        tex_primitive(luatex_command, "localleftbox",                   local_box_cmd,          local_left_box_code,                      0);
1157        tex_primitive(luatex_command, "localmiddlebox",                 local_box_cmd,          local_middle_box_code,                    0);
1158        tex_primitive(luatex_command, "localrightbox",                  local_box_cmd,          local_right_box_code,                     0);
1159        tex_primitive(luatex_command, "resetlocalboxes",                local_box_cmd,          local_reset_boxes_code,                   0);
1160
1161        tex_primitive(tex_command,    "shipout",                        legacy_cmd,             shipout_code,                             0);
1162
1163        tex_primitive(tex_command,    "cleaders",                       leader_cmd,             c_leaders_code,                           0);
1164        tex_primitive(luatex_command, "gleaders",                       leader_cmd,             g_leaders_code,                           0);
1165        tex_primitive(tex_command,    "leaders",                        leader_cmd,             a_leaders_code,                           0);
1166        tex_primitive(luatex_command, "uleaders",                       leader_cmd,             u_leaders_code,                           0);
1167        tex_primitive(tex_command,    "xleaders",                       leader_cmd,             x_leaders_code,                           0);
1168
1169        tex_primitive(tex_command,    "left",                           math_fence_cmd,         left_fence_side,                          0);
1170        tex_primitive(tex_command,    "middle",                         math_fence_cmd,         middle_fence_side,                        0);
1171        tex_primitive(tex_command,    "right",                          math_fence_cmd,         right_fence_side,                         0);
1172        tex_primitive(luatex_command, "Uleft",                          math_fence_cmd,         extended_left_fence_side,                 0);
1173        tex_primitive(luatex_command, "Umiddle",                        math_fence_cmd,         extended_middle_fence_side,               0);
1174        tex_primitive(luatex_command, "Uoperator",                      math_fence_cmd,         left_operator_side,                       0);
1175        tex_primitive(luatex_command, "Uright",                         math_fence_cmd,         extended_right_fence_side,                0);
1176        tex_primitive(luatex_command, "Uvextensible",                   math_fence_cmd,         no_fence_side,                            0);
1177
1178        tex_primitive(luatex_command, "futuredef",                      let_cmd,                future_def_code,                          0);
1179        tex_primitive(tex_command,    "futurelet",                      let_cmd,                future_let_code,                          0);
1180        tex_primitive(luatex_command, "glet",                           let_cmd,                global_let_code,                          0);
1181        tex_primitive(luatex_command, "gletcsname",                     let_cmd,                global_let_csname_code,                   0);
1182        tex_primitive(luatex_command, "glettonothing",                  let_cmd,                global_let_to_nothing_code,               0); /* more a def but a let is nicer */
1183        tex_primitive(tex_command,    "let",                            let_cmd,                let_code,                                 0);
1184        tex_primitive(luatex_command, "letcharcode",                    let_cmd,                let_charcode_code,                        0);
1185        tex_primitive(luatex_command, "letcsname",                      let_cmd,                let_csname_code,                          0);
1186        tex_primitive(luatex_command, "letfrozen",                      let_cmd,                let_frozen_code,                          0);
1187        tex_primitive(luatex_command, "letprotected",                   let_cmd,                let_protected_code,                       0);
1188        tex_primitive(luatex_command, "lettolastnamedcs",               let_cmd,                let_to_last_named_cs_code,                0); /* more intuitive than using an edef */
1189        tex_primitive(luatex_command, "lettonothing",                   let_cmd,                let_to_nothing_code,                      0); /* more a def but a let is nicer */
1190        tex_primitive(luatex_command, "swapcsvalues",                   let_cmd,                swap_cs_values_code,                      0);
1191        tex_primitive(luatex_command, "unletfrozen",                    let_cmd,                unlet_frozen_code,                        0);
1192        tex_primitive(luatex_command, "unletprotected",                 let_cmd,                unlet_protected_code,                     0);
1193
1194        tex_primitive(tex_command,    "displaylimits",                  math_modifier_cmd,      display_limits_modifier_code,             0);
1195        tex_primitive(tex_command,    "limits",                         math_modifier_cmd,      limits_modifier_code,                     0);
1196        tex_primitive(tex_command,    "nolimits",                       math_modifier_cmd,      no_limits_modifier_code,                  0);
1197
1198        /* beware, Umathaxis is overloaded ... maybe only a generic modifier with keywords */
1199
1200        tex_primitive(luatex_command, "Umathadapttoleft",               math_modifier_cmd,      adapt_to_left_modifier_code,              0);
1201        tex_primitive(luatex_command, "Umathadapttoright",              math_modifier_cmd,      adapt_to_right_modifier_code,             0);
1202        tex_primitive(luatex_command, "Umathlimits",                    math_modifier_cmd,      limits_modifier_code,                     0);
1203        tex_primitive(luatex_command, "Umathnoaxis",                    math_modifier_cmd,      no_axis_modifier_code,                    0);
1204        tex_primitive(luatex_command, "Umathnolimits",                  math_modifier_cmd,      no_limits_modifier_code,                  0);
1205        tex_primitive(luatex_command, "Umathopenupdepth",               math_modifier_cmd,      openup_depth_modifier_code,               0);
1206        tex_primitive(luatex_command, "Umathopenupheight",              math_modifier_cmd,      openup_height_modifier_code,              0);
1207        tex_primitive(luatex_command, "Umathphantom",                   math_modifier_cmd,      phantom_modifier_code,                    0);
1208        tex_primitive(luatex_command, "Umathsource",                    math_modifier_cmd,      source_modifier_code,                     0);
1209        tex_primitive(luatex_command, "Umathuseaxis",                   math_modifier_cmd,      axis_modifier_code,                       0);
1210        tex_primitive(luatex_command, "Umathvoid",                      math_modifier_cmd,      void_modifier_code,                       0);
1211
1212        tex_primitive(tex_command,    "box",                            make_box_cmd,           box_code,                                 0);
1213        tex_primitive(tex_command,    "copy",                           make_box_cmd,           copy_code,                                0);
1214        tex_primitive(luatex_command, "dbox",                           make_box_cmd,           dbox_code,                                0);
1215        tex_primitive(luatex_command, "dpack",                          make_box_cmd,           dpack_code,                               0);
1216        tex_primitive(luatex_command, "dsplit",                         make_box_cmd,           dsplit_code,                              0);
1217        tex_primitive(tex_command,    "hbox",                           make_box_cmd,           hbox_code,                                0);
1218        tex_primitive(luatex_command, "hpack",                          make_box_cmd,           hpack_code,                               0);
1219        tex_primitive(luatex_command, "insertbox",                      make_box_cmd,           insert_box_code,                          0);
1220        tex_primitive(luatex_command, "insertcopy",                     make_box_cmd,           insert_copy_code,                         0);
1221        tex_primitive(tex_command,    "lastbox",                        make_box_cmd,           last_box_code,                            0);
1222        tex_primitive(luatex_command, "localleftboxbox",                make_box_cmd,           local_left_box_box_code,                  0);
1223        tex_primitive(luatex_command, "localmiddleboxbox",              make_box_cmd,           local_middle_box_box_code,                0);
1224        tex_primitive(luatex_command, "localrightboxbox",               make_box_cmd,           local_right_box_box_code,                 0);
1225        tex_primitive(luatex_command, "tpack",                          make_box_cmd,           tpack_code,                               0);
1226        tex_primitive(luatex_command, "tsplit",                         make_box_cmd,           tsplit_code,                              0);
1227        tex_primitive(tex_command,    "vbox",                           make_box_cmd,           vbox_code,                                0);
1228        tex_primitive(luatex_command, "vpack",                          make_box_cmd,           vpack_code,                               0);
1229        tex_primitive(tex_command,    "vsplit",                         make_box_cmd,           vsplit_code,                              0);
1230        tex_primitive(tex_command,    "vtop",                           make_box_cmd,           vtop_code,                                0);
1231        tex_primitive(luatex_command, "vbalance",                       make_box_cmd,           vbalance_code,                            0);
1232        tex_primitive(luatex_command, "vbalancedbox",                   make_box_cmd,           vbalanced_box_code,                       0);
1233        tex_primitive(luatex_command, "vbalancedtop",                   make_box_cmd,           vbalanced_top_code,                       0);
1234        tex_primitive(luatex_command, "vbalancedinsert",                make_box_cmd,           vbalanced_insert_code,                    0);
1235        tex_primitive(luatex_command, "vbalanceddiscard",               make_box_cmd,           vbalanced_discard_code,                   0);
1236        tex_primitive(luatex_command, "vbalanceddeinsert",              make_box_cmd,           vbalanced_deinsert_code,                  0);
1237        tex_primitive(luatex_command, "vbalancedreinsert",              make_box_cmd,           vbalanced_reinsert_code,                  0);
1238        tex_primitive(luatex_command, "flushmvl",                       make_box_cmd,           flush_mvl_box_code,                       0);
1239
1240        /*tex Begin compatibility. */
1241
1242        tex_primitive(tex_command,    "mathbin",                        math_component_cmd,     math_component_binary_code,               0);
1243        tex_primitive(tex_command,    "mathclose",                      math_component_cmd,     math_component_close_code,                0);
1244        tex_primitive(tex_command,    "mathinner",                      math_component_cmd,     math_component_inner_code,                0);
1245        tex_primitive(tex_command,    "mathop",                         math_component_cmd,     math_component_operator_code,             0);
1246        tex_primitive(tex_command,    "mathopen",                       math_component_cmd,     math_component_open_code,                 0);
1247        tex_primitive(tex_command,    "mathord",                        math_component_cmd,     math_component_ordinary_code,             0);
1248        tex_primitive(tex_command,    "mathpunct",                      math_component_cmd,     math_component_punctuation_code,          0);
1249        tex_primitive(tex_command,    "mathrel",                        math_component_cmd,     math_component_relation_code,             0);
1250        tex_primitive(tex_command,    "overline",                       math_component_cmd,     math_component_over_code,                 0);
1251        tex_primitive(tex_command,    "underline",                      math_component_cmd,     math_component_under_code,                0);
1252
1253        /*tex End compatibility. */
1254
1255        /*
1256            We had these for a while but they are now dropped because (1) we should not overload |\mathaccent|
1257            (at least not now) and we have many user classes in \CONTEXT\ anyway.
1258        */
1259
1260        /* begin of gone */ /*
1261
1262        tex_primitive(luatex_command, "mathaccent",                     math_component_cmd,     math_component_accent_code,               0);
1263        tex_primitive(luatex_command, "mathbinary",                     math_component_cmd,     math_component_binary_code,               0);
1264        tex_primitive(luatex_command, "mathclose",                      math_component_cmd,     math_component_close_code,                0);
1265        tex_primitive(luatex_command, "mathfenced",                     math_component_cmd,     math_component_fenced_code,               0);
1266        tex_primitive(luatex_command, "mathfraction",                   math_component_cmd,     math_component_fraction_code,             0);
1267        tex_primitive(luatex_command, "mathghost",                      math_component_cmd,     math_component_ghost_code,                0);
1268        tex_primitive(luatex_command, "mathinner",                      math_component_cmd,     math_component_inner_code,                0);
1269        tex_primitive(luatex_command, "mathmiddle",                     math_component_cmd,     math_component_middle_code,               0);
1270        tex_primitive(luatex_command, "mathopen",                       math_component_cmd,     math_component_open_code,                 0);
1271        tex_primitive(luatex_command, "mathoperator",                   math_component_cmd,     math_component_operator_code,             0);
1272        tex_primitive(luatex_command, "mathordinary",                   math_component_cmd,     math_component_ordinary_code,             0);
1273        tex_primitive(luatex_command, "mathoverline",                   math_component_cmd,     math_component_over_code,                 0);
1274        tex_primitive(luatex_command, "mathpunctuation",                math_component_cmd,     math_component_punctuation_code,          0);
1275        tex_primitive(luatex_command, "mathradical",                    math_component_cmd,     math_component_radical_code,              0);
1276        tex_primitive(luatex_command, "mathrelation",                   math_component_cmd,     math_component_relation_code,             0);
1277        tex_primitive(luatex_command, "mathunderline",                  math_component_cmd,     math_component_under_code,                0);
1278
1279        */ /* end of gone */
1280
1281        tex_primitive(luatex_command, "mathatom",                       math_component_cmd,     math_component_atom_code,                 0);
1282
1283        tex_primitive(luatex_command, "Ustartdisplaymath",              math_shift_cs_cmd,      begin_display_math_code,                  0);
1284        tex_primitive(luatex_command, "Ustartmath",                     math_shift_cs_cmd,      begin_inline_math_code,                   0);
1285        tex_primitive(luatex_command, "Ustartmathmode",                 math_shift_cs_cmd,      begin_math_mode_code,                     0);
1286        tex_primitive(luatex_command, "Ustopdisplaymath",               math_shift_cs_cmd,      end_display_math_code,                    0);
1287        tex_primitive(luatex_command, "Ustopmath",                      math_shift_cs_cmd,      end_inline_math_code,                     0);
1288        tex_primitive(luatex_command, "Ustopmathmode",                  math_shift_cs_cmd,      end_math_mode_code,                       0);
1289
1290        tex_primitive(luatex_command, "allcrampedstyles",               math_style_cmd,         all_cramped_styles,                       0);
1291        tex_primitive(luatex_command, "alldisplaystyles",               math_style_cmd,         all_display_styles,                       0);
1292        tex_primitive(luatex_command, "allmainstyles",                  math_style_cmd,         all_main_styles,                          0);
1293        tex_primitive(luatex_command, "allmathstyles",                  math_style_cmd,         all_math_styles,                          0);
1294        tex_primitive(luatex_command, "allscriptscriptstyles",          math_style_cmd,         all_script_script_styles,                 0);
1295        tex_primitive(luatex_command, "allscriptstyles",                math_style_cmd,         all_script_styles,                        0);
1296        tex_primitive(luatex_command, "allsplitstyles",                 math_style_cmd,         all_split_styles,                         0);
1297        tex_primitive(luatex_command, "alltextstyles",                  math_style_cmd,         all_text_styles,                          0);
1298        tex_primitive(luatex_command, "alluncrampedstyles",             math_style_cmd,         all_uncramped_styles,                     0);
1299        tex_primitive(luatex_command, "allunsplitstyles",               math_style_cmd,         all_unsplit_styles,                       0);
1300        tex_primitive(luatex_command, "crampeddisplaystyle",            math_style_cmd,         cramped_display_style,                    0);
1301        tex_primitive(luatex_command, "crampedscriptscriptstyle",       math_style_cmd,         cramped_script_script_style,              0);
1302        tex_primitive(luatex_command, "crampedscriptstyle",             math_style_cmd,         cramped_script_style,                     0);
1303        tex_primitive(luatex_command, "crampedtextstyle",               math_style_cmd,         cramped_text_style,                       0);
1304        tex_primitive(tex_command,    "displaystyle",                   math_style_cmd,         display_style,                            0);
1305        tex_primitive(luatex_command, "scaledmathstyle",                math_style_cmd,         scaled_math_style,                        0);
1306        tex_primitive(tex_command,    "scriptscriptstyle",              math_style_cmd,         script_script_style,                      0);
1307        tex_primitive(tex_command,    "scriptstyle",                    math_style_cmd,         script_style,                             0);
1308        tex_primitive(tex_command,    "textstyle",                      math_style_cmd,         text_style,                               0);
1309        tex_primitive(luatex_command, "currentlysetmathstyle",          math_style_cmd,         currently_set_math_style,                 0);
1310        tex_primitive(luatex_command, "givenmathstyle",                 math_style_cmd,         yet_unset_math_style,                     0);
1311
1312        tex_primitive(tex_command,    "errmessage",                     message_cmd,            error_message_code,                       0);
1313        tex_primitive(tex_command,    "message",                        message_cmd,            message_code,                             0);
1314
1315        tex_primitive(tex_command,    "mkern",                          mkern_cmd,              normal_code,                              0);
1316
1317        tex_primitive(luatex_command, "mathatomskip",                   mskip_cmd,              atom_mskip_code,                          0);
1318        tex_primitive(tex_command,    "mskip",                          mskip_cmd,              normal_mskip_code,                        0);
1319
1320        /*tex
1321            We keep |\long| and |\outer| as dummies, while |\protected| is promoted to a real cmd
1322            and |\frozen| can provide a mild form of protection against overloads. We still intercept
1323            the commands.
1324        */
1325
1326        tex_primitive(luatex_command, "aliased",                        prefix_cmd,             aliased_code,                                    0);
1327        tex_primitive(no_command,     "always",                         prefix_cmd,             always_code,                                     0);
1328        tex_primitive(luatex_command, "constant",                       prefix_cmd,             constant_code,                                   0);
1329        tex_primitive(luatex_command, "constrained",                    prefix_cmd,             constrained_code,                                0);
1330        tex_primitive(luatex_command, "deferred",                       prefix_cmd,             deferred_code,                                   0);
1331        tex_primitive(luatex_command, "enforced",                       prefix_cmd,             enforced_code,                                   0);
1332        tex_primitive(luatex_command, "frozen",                         prefix_cmd,             frozen_code,                                     0);
1333        tex_primitive(tex_command,    "global",                         prefix_cmd,             global_code,                                     0);
1334        tex_primitive(luatex_command, "immediate",                      prefix_cmd,             immediate_code,                                  0);
1335        tex_primitive(luatex_command, "immutable",                      prefix_cmd,             immutable_code,                                  0);
1336        tex_primitive(luatex_command, "inherited",                      prefix_cmd,             inherited_code,                                  0);
1337        tex_primitive(luatex_command, "instance",                       prefix_cmd,             instance_code,                                   0);
1338        tex_primitive(tex_command,    "long",                           prefix_cmd,             long_code,                                       0); /* nop */
1339        tex_primitive(luatex_command, "mutable",                        prefix_cmd,             mutable_code,                                    0);
1340        tex_primitive(luatex_command, "noaligned",                      prefix_cmd,             noaligned_code,                                  0);
1341        tex_primitive(tex_command,    "outer",                          prefix_cmd,             outer_code,                                      0); /* nop */
1342        tex_primitive(luatex_command, "overloaded",                     prefix_cmd,             overloaded_code,                                 0);
1343        tex_primitive(luatex_command, "permanent",                      prefix_cmd,             permanent_code,                                  0);
1344     /* tex_primitive(luatex_command, "primitive",                      prefix_cmd,             primitive_code,                                  0); */
1345        tex_primitive(etex_command,   "protected",                      prefix_cmd,             protected_code,                                  0);
1346        tex_primitive(luatex_command, "retained",                       prefix_cmd,             retained_code,                                   0);
1347        tex_primitive(luatex_command, "semiprotected",                  prefix_cmd,             semiprotected_code,                              0);
1348        tex_primitive(luatex_command, "tolerant",                       prefix_cmd,             tolerant_code,                                   0);
1349        tex_primitive(luatex_command, "untraced",                       prefix_cmd,             untraced_code,                                   0);
1350
1351        tex_primitive(tex_command,    "unboundary",                     remove_item_cmd,        boundary_item_code,                              0);
1352        tex_primitive(tex_command,    "unkern",                         remove_item_cmd,        kern_item_code,                                  0);
1353        tex_primitive(tex_command,    "unpenalty",                      remove_item_cmd,        penalty_item_code,                               0);
1354        tex_primitive(tex_command,    "unskip",                         remove_item_cmd,        skip_item_code,                                  0);
1355
1356        tex_primitive(tex_command,    "batchmode",                      interaction_cmd,        batch_mode,                                      0);
1357        tex_primitive(tex_command,    "errorstopmode",                  interaction_cmd,        error_stop_mode,                                 0);
1358        tex_primitive(tex_command,    "nonstopmode",                    interaction_cmd,        nonstop_mode,                                    0);
1359        tex_primitive(tex_command,    "scrollmode",                     interaction_cmd,        scroll_mode,                                     0);
1360
1361        tex_primitive(luatex_command, "attributedef",                   shorthand_def_cmd,      attribute_def_code,                              0);
1362        tex_primitive(tex_command,    "chardef",                        shorthand_def_cmd,      char_def_code,                                   0);
1363        tex_primitive(tex_command,    "countdef",                       shorthand_def_cmd,      count_def_code,                                  0);
1364        tex_primitive(tex_command,    "dimendef",                       shorthand_def_cmd,      dimen_def_code,                                  0);
1365        tex_primitive(luatex_command, "dimensiondef",                   shorthand_def_cmd,      dimension_def_code,                              0);
1366     /* tex_primitive(luatex_command, "dimensiondefcsname",             shorthand_def_cmd,      dimension_def_csname_code,                       0); */
1367        tex_primitive(luatex_command, "floatdef",                       shorthand_def_cmd,      float_def_code,                                  0);
1368        tex_primitive(luatex_command, "fontspecdef",                    shorthand_def_cmd,      fontspec_def_code,                               0);
1369        tex_primitive(luatex_command, "specificationdef",               shorthand_def_cmd,      specification_def_code,                          0);
1370        tex_primitive(luatex_command, "gluespecdef",                    shorthand_def_cmd,      gluespec_def_code,                               0);
1371        tex_primitive(luatex_command, "integerdef",                     shorthand_def_cmd,      integer_def_code,                                0);
1372     /* tex_primitive(luatex_command, "integerdefcsname",               shorthand_def_cmd,      integer_def_csname_code,                         0); */
1373        tex_primitive(luatex_command, "luadef",                         shorthand_def_cmd,      lua_def_code,                                    0);
1374        tex_primitive(tex_command,    "mathchardef",                    shorthand_def_cmd,      math_char_def_code,                              0);
1375     /* tex_primitive(luatex_command, "mathspecdef",                    shorthand_def_cmd,      mathspec_def_code,                               0); */
1376        tex_primitive(luatex_command, "mugluespecdef",                  shorthand_def_cmd,      mugluespec_def_code,                             0);
1377        tex_primitive(tex_command,    "muskipdef",                      shorthand_def_cmd,      muskip_def_code,                                 0);
1378        tex_primitive(luatex_command, "parameterdef",                   shorthand_def_cmd,      parameter_def_code,                              0);
1379        tex_primitive(luatex_command, "positdef",                       shorthand_def_cmd,      posit_def_code,                                  0);
1380        tex_primitive(tex_command,    "skipdef",                        shorthand_def_cmd,      skip_def_code,                                   0);
1381        tex_primitive(tex_command,    "toksdef",                        shorthand_def_cmd,      toks_def_code,                                   0);
1382        tex_primitive(luatex_command, "Umathchardef",                   shorthand_def_cmd,      math_uchar_def_code,                             0);
1383        tex_primitive(luatex_command, "Umathdictdef",                   shorthand_def_cmd,      math_dchar_def_code,                             0);
1384
1385        tex_primitive(luatex_command, "associateunit",                  association_cmd,        unit_association_code,                           0);
1386
1387        tex_primitive(tex_command,    "indent",                         begin_paragraph_cmd,    indent_par_code,                                 0);
1388        tex_primitive(tex_command,    "noindent",                       begin_paragraph_cmd,    noindent_par_code,                               0);
1389        tex_primitive(luatex_command, "parattribute",                   begin_paragraph_cmd,    attribute_par_code,                              0);
1390        tex_primitive(luatex_command, "paroptions",                     begin_paragraph_cmd,    options_par_code,                                0); /* currently only used for experiments */
1391        tex_primitive(luatex_command, "quitvmode",                      begin_paragraph_cmd,    quitvmode_par_code,                              0);
1392        tex_primitive(luatex_command, "snapshotpar",                    begin_paragraph_cmd,    snapshot_par_code,                               0);
1393        tex_primitive(luatex_command, "undent",                         begin_paragraph_cmd,    undent_par_code,                                 0);
1394        tex_primitive(luatex_command, "wrapuppar",                      begin_paragraph_cmd,    wrapup_par_code,                                 0);
1395
1396        tex_primitive(tex_command,    "dump",                           end_job_cmd,            dump_code,                                       0);
1397        tex_primitive(tex_command,    "end",                            end_job_cmd,            end_code,                                        0);
1398
1399        tex_primitive(luatex_command, "beginlocalcontrol",              begin_local_cmd,        local_control_begin_code,                        0);
1400        tex_primitive(luatex_command, "expandedendless",                begin_local_cmd,        expanded_endless_code,                           0);
1401        tex_primitive(luatex_command, "expandedloop",                   begin_local_cmd,        expanded_loop_code,                              0);
1402        tex_primitive(luatex_command, "expandedrepeat",                 begin_local_cmd,        expanded_repeat_code,                            0);
1403        tex_primitive(luatex_command, "localcontrol",                   begin_local_cmd,        local_control_token_code,                        0);
1404        tex_primitive(luatex_command, "localcontrolled",                begin_local_cmd,        local_control_list_code,                         0);
1405        tex_primitive(luatex_command, "localcontrolledendless",         begin_local_cmd,        local_control_endless_code,                      0);
1406        tex_primitive(luatex_command, "localcontrolledloop",            begin_local_cmd,        local_control_loop_code,                         0);
1407        tex_primitive(luatex_command, "localcontrolledrepeat",          begin_local_cmd,        local_control_repeat_code,                       0);
1408        tex_primitive(luatex_command, "unexpandedendless",              begin_local_cmd,        unexpanded_endless_code,                         0);
1409        tex_primitive(luatex_command, "unexpandedloop",                 begin_local_cmd,        unexpanded_loop_code,                            0);
1410        tex_primitive(luatex_command, "unexpandedrepeat",               begin_local_cmd,        unexpanded_repeat_code,                          0);
1411
1412        tex_primitive(luatex_command, "endlocalcontrol",                end_local_cmd,          normal_code,                                     0);
1413
1414        tex_primitive(tex_command,    "unhbox",                         un_hbox_cmd,            box_code,                                        0);
1415        tex_primitive(tex_command,    "unhcopy",                        un_hbox_cmd,            copy_code,                                       0);
1416        tex_primitive(luatex_command, "unhpack",                        un_hbox_cmd,            unpack_code,                                     0);
1417        tex_primitive(tex_command,    "unvbox",                         un_vbox_cmd,            box_code,                                        0);
1418        tex_primitive(tex_command,    "unvcopy",                        un_vbox_cmd,            copy_code,                                       0);
1419        tex_primitive(luatex_command, "unvpack",                        un_vbox_cmd,            unpack_code,                                     0);
1420
1421        tex_primitive(etex_command,   "pagediscards",                   un_vbox_cmd,            page_discards_code,                              0);
1422        tex_primitive(etex_command,   "splitdiscards",                  un_vbox_cmd,            split_discards_code,                             0);
1423        tex_primitive(luatex_command, "copysplitdiscards",              un_vbox_cmd,            copy_split_discards_code,                        0);
1424
1425        tex_primitive(luatex_command, "insertunbox",                    un_vbox_cmd,            insert_box_code,                                 0);
1426        tex_primitive(luatex_command, "insertuncopy",                   un_vbox_cmd,            insert_copy_code,                                0);
1427
1428        tex_primitive(tex_command,    "lower",                          vmove_cmd,              move_forward_code,                               0);
1429        tex_primitive(tex_command,    "raise",                          vmove_cmd,              move_backward_code,                              0);
1430
1431        tex_primitive(tex_command,    "vfil",                           vskip_cmd,              fi_l_code,                                       0);
1432        tex_primitive(tex_command,    "vfill",                          vskip_cmd,              fi_ll_code,                                      0);
1433        tex_primitive(tex_command,    "vfilneg",                        vskip_cmd,              fi_l_neg_code,                                   0);
1434        tex_primitive(tex_command,    "vskip",                          vskip_cmd,              skip_code,                                       0);
1435        tex_primitive(tex_command,    "vss",                            vskip_cmd,              fi_ss_code,                                      0);
1436
1437        tex_primitive(tex_command,    "show",                           xray_cmd,               show_code,                                       0);
1438        tex_primitive(tex_command,    "showbox",                        xray_cmd,               show_box_code,                                   0);
1439        tex_primitive(luatex_command, "showcodestack",                  xray_cmd,               show_code_stack_code,                            0);
1440        tex_primitive(etex_command,   "showgroups",                     xray_cmd,               show_groups_code,                                0);
1441        tex_primitive(luatex_command, "showstack",                      xray_cmd,               show_stack_code,                                 0);
1442        tex_primitive(etex_command,   "showifs",                        xray_cmd,               show_ifs_code,                                   0);
1443        tex_primitive(tex_command,    "showlists",                      xray_cmd,               show_lists_code,                                 0);
1444        tex_primitive(tex_command,    "showthe",                        xray_cmd,               show_the_code,                                   0);
1445        tex_primitive(etex_command,   "showtokens",                     xray_cmd,               show_tokens_code,                                0);
1446
1447        tex_primitive(luatex_command, "initcatcodetable",               catcode_table_cmd,      init_cat_code_table_code,                        0);
1448        tex_primitive(luatex_command, "savecatcodetable",               catcode_table_cmd,      save_cat_code_table_code,                        0);
1449        tex_primitive(luatex_command, "restorecatcodetable",            catcode_table_cmd,      restore_cat_code_table_code,                     0);
1450     /* tex_primitive(luatex_command, "setcatcodetabledefault",         catcode_table_cmd,      dflt_cat_code_table_code,                        0); */ /* This was an experiment. */
1451
1452        tex_primitive(luatex_command, "alignmark",                      parameter_cmd,          normal_code,                                     0);
1453        tex_primitive(luatex_command, "parametermark",                  parameter_cmd,          normal_code,                                     0); /* proper primitive for syntax highlighting */
1454
1455        tex_primitive(luatex_command, "aligntab",                       alignment_tab_cmd,      tab_mark_code,                                   0);
1456
1457        tex_primitive(luatex_command, "aligncontent",                   alignment_cmd,          align_content_code,                              0);
1458        tex_primitive(tex_command,    "cr",                             alignment_cmd,          cr_code,                                         0);
1459        tex_primitive(tex_command,    "crcr",                           alignment_cmd,          cr_cr_code,                                      0);
1460        tex_primitive(tex_command,    "noalign",                        alignment_cmd,          no_align_code,                                   0);
1461        tex_primitive(tex_command,    "omit",                           alignment_cmd,          omit_code,                                       0);
1462        tex_primitive(luatex_command, "realign",                        alignment_cmd,          re_align_code,                                   0);
1463        tex_primitive(tex_command,    "span",                           alignment_cmd,          span_code,                                       0);
1464
1465        tex_primitive(luatex_command, "noatomruling",                   math_script_cmd,        math_no_ruling_space_code,                       0);
1466        tex_primitive(tex_command,    "nonscript",                      math_script_cmd,        math_no_script_space_code,                       0);
1467        tex_primitive(luatex_command, "nosubprescript",                 math_script_cmd,        math_no_sub_pre_script_code,                     0);
1468        tex_primitive(luatex_command, "nosubscript",                    math_script_cmd,        math_no_sub_script_code,                         0);
1469        tex_primitive(luatex_command, "nosuperprescript",               math_script_cmd,        math_no_super_pre_script_code,                   0);
1470        tex_primitive(luatex_command, "nosuperscript",                  math_script_cmd,        math_no_super_script_code,                       0);
1471        tex_primitive(luatex_command, "primescript",                    math_script_cmd,        math_prime_script_code,                          0);
1472        tex_primitive(luatex_command, "indexedsubprescript",            math_script_cmd,        math_indexed_sub_pre_script_code,                0);
1473        tex_primitive(luatex_command, "indexedsubscript",               math_script_cmd,        math_indexed_sub_script_code,                    0);
1474        tex_primitive(luatex_command, "indexedsuperprescript",          math_script_cmd,        math_indexed_super_pre_script_code,              0);
1475        tex_primitive(luatex_command, "indexedsuperscript",             math_script_cmd,        math_indexed_super_script_code,                  0);
1476        tex_primitive(luatex_command, "subprescript",                   math_script_cmd,        math_sub_pre_script_code,                        0);
1477        tex_primitive(luatex_command, "subscript",                      math_script_cmd,        math_sub_script_code,                            0);
1478        tex_primitive(luatex_command, "superprescript",                 math_script_cmd,        math_super_pre_script_code,                      0);
1479        tex_primitive(luatex_command, "superscript",                    math_script_cmd,        math_super_script_code,                          0);
1480        tex_primitive(luatex_command, "noscript",                       math_script_cmd,        math_no_script_code,                             0);
1481
1482        tex_primitive(luatex_command, "copymathatomrule",               math_parameter_cmd,     math_parameter_copy_atom_rule,                   0);
1483        tex_primitive(luatex_command, "copymathparent",                 math_parameter_cmd,     math_parameter_copy_parent,                      0);
1484        tex_primitive(luatex_command, "copymathspacing",                math_parameter_cmd,     math_parameter_copy_spacing,                     0);
1485        tex_primitive(luatex_command, "letmathatomrule",                math_parameter_cmd,     math_parameter_let_atom_rule,                    0);
1486        tex_primitive(luatex_command, "letmathparent",                  math_parameter_cmd,     math_parameter_let_parent,                       0);
1487        tex_primitive(luatex_command, "letmathspacing",                 math_parameter_cmd,     math_parameter_let_spacing,                      0);
1488        tex_primitive(luatex_command, "resetmathspacing",               math_parameter_cmd,     math_parameter_reset_spacing,                    0);
1489        tex_primitive(luatex_command, "setdefaultmathcodes",            math_parameter_cmd,     math_parameter_set_defaults,                     0);
1490        tex_primitive(luatex_command, "setmathatomrule",                math_parameter_cmd,     math_parameter_set_atom_rule,                    0);
1491        tex_primitive(luatex_command, "setmathdisplaypostpenalty",      math_parameter_cmd,     math_parameter_set_display_post_penalty,         0);
1492        tex_primitive(luatex_command, "setmathdisplayprepenalty",       math_parameter_cmd,     math_parameter_set_display_pre_penalty,          0);
1493        tex_primitive(luatex_command, "setmathignore",                  math_parameter_cmd,     math_parameter_ignore,                           0);
1494        tex_primitive(luatex_command, "setmathoptions",                 math_parameter_cmd,     math_parameter_options,                          0);
1495        tex_primitive(luatex_command, "setmathpostpenalty",             math_parameter_cmd,     math_parameter_set_post_penalty,                 0);
1496        tex_primitive(luatex_command, "setmathprepenalty",              math_parameter_cmd,     math_parameter_set_pre_penalty,                  0);
1497        tex_primitive(luatex_command, "setmathspacing",                 math_parameter_cmd,     math_parameter_set_spacing,                      0);
1498
1499        tex_primitive(luatex_command, "Umathaccentbasedepth",           math_parameter_cmd,     math_parameter_accent_base_depth,                0);
1500        tex_primitive(luatex_command, "Umathaccentbaseheight",          math_parameter_cmd,     math_parameter_accent_base_height,               0);
1501        tex_primitive(luatex_command, "Umathaccentbottomovershoot",     math_parameter_cmd,     math_parameter_accent_bottom_overshoot,          0);
1502        tex_primitive(luatex_command, "Umathaccentbottomshiftdown",     math_parameter_cmd,     math_parameter_accent_bottom_shift_down,         0);
1503        tex_primitive(luatex_command, "Umathaccentextendmargin",        math_parameter_cmd,     math_parameter_accent_extend_margin,             0);
1504        tex_primitive(luatex_command, "Umathaccentsuperscriptdrop",     math_parameter_cmd,     math_parameter_accent_superscript_drop,          0);
1505        tex_primitive(luatex_command, "Umathaccentsuperscriptpercent",  math_parameter_cmd,     math_parameter_accent_superscript_percent,       0);
1506        tex_primitive(luatex_command, "Umathaccenttopovershoot",        math_parameter_cmd,     math_parameter_accent_top_overshoot,             0);
1507        tex_primitive(luatex_command, "Umathaccenttopshiftup",          math_parameter_cmd,     math_parameter_accent_top_shift_up,              0);
1508        tex_primitive(luatex_command, "Umathaccentvariant",             math_parameter_cmd,     math_parameter_degree_variant,                   0);
1509        tex_primitive(luatex_command, "Umathaxis",                      math_parameter_cmd,     math_parameter_axis,                             0);
1510     /* tex_primitive(luatex_command, "Umathbinbinspacing",             math_parameter_cmd,     math_parameter_binary_binary_spacing, 0); */ /* Gone, as are more of these! */
1511        tex_primitive(luatex_command, "Umathbottomaccentvariant",       math_parameter_cmd,     math_parameter_bottom_accent_variant,            0);
1512        tex_primitive(luatex_command, "Umathconnectoroverlapmin",       math_parameter_cmd,     math_parameter_connector_overlap_min,            0);
1513        tex_primitive(luatex_command, "Umathdegreevariant",             math_parameter_cmd,     math_parameter_accent_variant,                   0);
1514        tex_primitive(luatex_command, "Umathdelimiterextendmargin",     math_parameter_cmd,     math_parameter_delimiter_extend_margin,          0);
1515        tex_primitive(luatex_command, "Umathdelimiterovervariant",      math_parameter_cmd,     math_parameter_delimiter_over_variant,           0);
1516        tex_primitive(luatex_command, "Umathdelimiterpercent",          math_parameter_cmd,     math_parameter_delimiter_percent,                0);
1517        tex_primitive(luatex_command, "Umathdelimitershortfall",        math_parameter_cmd,     math_parameter_delimiter_shortfall,              0);
1518        tex_primitive(luatex_command, "Umathdelimiterundervariant",     math_parameter_cmd,     math_parameter_delimiter_under_variant,          0);
1519        tex_primitive(luatex_command, "Umathdenominatorvariant",        math_parameter_cmd,     math_parameter_denominator_variant,              0);
1520        tex_primitive(luatex_command, "Umathextrasubpreshift",          math_parameter_cmd,     math_parameter_extra_subprescript_shift,         0);
1521        tex_primitive(luatex_command, "Umathextrasubprespace",          math_parameter_cmd,     math_parameter_extra_subprescript_space,         0);
1522        tex_primitive(luatex_command, "Umathextrasubshift",             math_parameter_cmd,     math_parameter_extra_subscript_shift,            0);
1523        tex_primitive(luatex_command, "Umathextrasubspace",             math_parameter_cmd,     math_parameter_extra_subscript_space,            0);
1524        tex_primitive(luatex_command, "Umathextrasuppreshift",          math_parameter_cmd,     math_parameter_extra_superprescript_shift,       0);
1525        tex_primitive(luatex_command, "Umathextrasupprespace",          math_parameter_cmd,     math_parameter_extra_superprescript_space,       0);
1526        tex_primitive(luatex_command, "Umathextrasupshift",             math_parameter_cmd,     math_parameter_extra_superscript_shift,          0);
1527        tex_primitive(luatex_command, "Umathextrasupspace",             math_parameter_cmd,     math_parameter_extra_superscript_space,          0);
1528        tex_primitive(luatex_command, "Umathsubscriptsnap",             math_parameter_cmd,     math_parameter_subscript_snap,                   0);
1529        tex_primitive(luatex_command, "Umathsuperscriptsnap",           math_parameter_cmd,     math_parameter_superscript_snap,                 0);
1530        tex_primitive(luatex_command, "Umathflattenedaccentbasedepth",  math_parameter_cmd,     math_parameter_flattened_accent_base_depth,      0);
1531        tex_primitive(luatex_command, "Umathflattenedaccentbaseheight", math_parameter_cmd,     math_parameter_flattened_accent_base_height,     0);
1532        tex_primitive(luatex_command, "Umathflattenedaccentbottomshiftdown", math_parameter_cmd, math_parameter_flattened_accent_bottom_shift_down, 0);
1533        tex_primitive(luatex_command, "Umathflattenedaccenttopshiftup",      math_parameter_cmd, math_parameter_flattened_accent_top_shift_up,      0);
1534        tex_primitive(luatex_command, "Umathfractiondelsize",           math_parameter_cmd,     math_parameter_fraction_del_size,                0);
1535        tex_primitive(luatex_command, "Umathfractiondenomdown",         math_parameter_cmd,     math_parameter_fraction_denom_down,              0);
1536        tex_primitive(luatex_command, "Umathfractiondenomvgap",         math_parameter_cmd,     math_parameter_fraction_denom_vgap,              0);
1537        tex_primitive(luatex_command, "Umathfractionnumup",             math_parameter_cmd,     math_parameter_fraction_num_up,                  0);
1538        tex_primitive(luatex_command, "Umathfractionnumvgap",           math_parameter_cmd,     math_parameter_fraction_num_vgap,                0);
1539        tex_primitive(luatex_command, "Umathfractionrule",              math_parameter_cmd,     math_parameter_fraction_rule,                    0);
1540        tex_primitive(luatex_command, "Umathfractionvariant",           math_parameter_cmd,     math_parameter_fraction_variant,                 0);
1541        tex_primitive(luatex_command, "Umathhextensiblevariant",        math_parameter_cmd,     math_parameter_h_extensible_variant,             0);
1542        tex_primitive(luatex_command, "Umathlimitabovebgap",            math_parameter_cmd,     math_parameter_limit_above_bgap,                 0);
1543        tex_primitive(luatex_command, "Umathlimitabovekern",            math_parameter_cmd,     math_parameter_limit_above_kern,                 0);
1544        tex_primitive(luatex_command, "Umathlimitabovevgap",            math_parameter_cmd,     math_parameter_limit_above_vgap,                 0);
1545        tex_primitive(luatex_command, "Umathlimitbelowbgap",            math_parameter_cmd,     math_parameter_limit_below_bgap,                 0);
1546        tex_primitive(luatex_command, "Umathlimitbelowkern",            math_parameter_cmd,     math_parameter_limit_below_kern,                 0);
1547        tex_primitive(luatex_command, "Umathlimitbelowvgap",            math_parameter_cmd,     math_parameter_limit_below_vgap,                 0);
1548        tex_primitive(luatex_command, "Umathnolimitsubfactor",          math_parameter_cmd,     math_parameter_nolimit_sub_factor,               0); /* These are bonus parameters. */
1549        tex_primitive(luatex_command, "Umathnolimitsupfactor",          math_parameter_cmd,     math_parameter_nolimit_sup_factor,               0); /* These are bonus parameters. */
1550        tex_primitive(luatex_command, "Umathnumeratorvariant",          math_parameter_cmd,     math_parameter_numerator_variant,                0);
1551        tex_primitive(luatex_command, "Umathoperatorsize",              math_parameter_cmd,     math_parameter_operator_size,                    0);
1552        tex_primitive(luatex_command, "Umathoverbarkern",               math_parameter_cmd,     math_parameter_overbar_kern,                     0);
1553        tex_primitive(luatex_command, "Umathoverbarrule",               math_parameter_cmd,     math_parameter_overbar_rule,                     0);
1554        tex_primitive(luatex_command, "Umathoverbarvgap",               math_parameter_cmd,     math_parameter_overbar_vgap,                     0);
1555        tex_primitive(luatex_command, "Umathoverdelimiterbgap",         math_parameter_cmd,     math_parameter_over_delimiter_bgap,              0);
1556        tex_primitive(luatex_command, "Umathoverdelimitervariant",      math_parameter_cmd,     math_parameter_over_delimiter_variant,           0);
1557        tex_primitive(luatex_command, "Umathoverdelimitervgap",         math_parameter_cmd,     math_parameter_over_delimiter_vgap,              0);
1558        tex_primitive(luatex_command, "Umathoverlayaccentvariant",      math_parameter_cmd,     math_parameter_overlay_accent_variant,           0);
1559        tex_primitive(luatex_command, "Umathoverlinevariant",           math_parameter_cmd,     math_parameter_over_line_variant,                0);
1560        tex_primitive(luatex_command, "Umathprimeraise",                math_parameter_cmd,     math_parameter_prime_raise,                      0);
1561        tex_primitive(luatex_command, "Umathprimeraisecomposed",        math_parameter_cmd,     math_parameter_prime_raise_composed,             0);
1562        tex_primitive(luatex_command, "Umathprimeshiftdrop",            math_parameter_cmd,     math_parameter_prime_shift_drop,                 0);
1563        tex_primitive(luatex_command, "Umathprimeshiftup",              math_parameter_cmd,     math_parameter_prime_shift_up,                   0);
1564        tex_primitive(luatex_command, "Umathprimespaceafter",           math_parameter_cmd,     math_parameter_prime_space_after,                0);
1565        tex_primitive(luatex_command, "Umathprimevariant",              math_parameter_cmd,     math_parameter_prime_variant,                    0);
1566        tex_primitive(luatex_command, "Umathquad",                      math_parameter_cmd,     math_parameter_quad,                             0);
1567        tex_primitive(luatex_command, "Umathexheight",                  math_parameter_cmd,     math_parameter_exheight,                         0);
1568        tex_primitive(luatex_command, "Umathradicaldegreeafter",        math_parameter_cmd,     math_parameter_radical_degree_after,             0);
1569        tex_primitive(luatex_command, "Umathradicaldegreebefore",       math_parameter_cmd,     math_parameter_radical_degree_before,            0);
1570        tex_primitive(luatex_command, "Umathradicaldegreeraise",        math_parameter_cmd,     math_parameter_radical_degree_raise,             0);
1571        tex_primitive(luatex_command, "Umathradicalextensibleafter",    math_parameter_cmd,     math_parameter_radical_extensible_after,         0);
1572        tex_primitive(luatex_command, "Umathradicalextensiblebefore",   math_parameter_cmd,     math_parameter_radical_extensible_before,        0);
1573        tex_primitive(luatex_command, "Umathradicalkern",               math_parameter_cmd,     math_parameter_radical_kern,                     0);
1574        tex_primitive(luatex_command, "Umathradicalrule",               math_parameter_cmd,     math_parameter_radical_rule,                     0);
1575        tex_primitive(luatex_command, "Umathradicalvariant",            math_parameter_cmd,     math_parameter_radical_variant,                  0);
1576        tex_primitive(luatex_command, "Umathradicalvgap",               math_parameter_cmd,     math_parameter_radical_vgap,                     0);
1577        tex_primitive(luatex_command, "Umathruledepth",                 math_parameter_cmd,     math_parameter_rule_depth,                       0);
1578        tex_primitive(luatex_command, "Umathruleheight",                math_parameter_cmd,     math_parameter_rule_height,                      0);
1579        tex_primitive(luatex_command, "Umathskeweddelimitertolerance",  math_parameter_cmd,     math_parameter_skewed_delimiter_tolerance,       0);
1580        tex_primitive(luatex_command, "Umathskewedfractionhgap",        math_parameter_cmd,     math_parameter_skewed_fraction_hgap,             0);
1581        tex_primitive(luatex_command, "Umathskewedfractionvgap",        math_parameter_cmd,     math_parameter_skewed_fraction_vgap,             0);
1582        tex_primitive(luatex_command, "Umathspaceafterscript",          math_parameter_cmd,     math_parameter_space_after_script,               0);
1583        tex_primitive(luatex_command, "Umathspacebetweenscript",        math_parameter_cmd,     math_parameter_space_between_script,             0);
1584        tex_primitive(luatex_command, "Umathspacebeforescript",         math_parameter_cmd,     math_parameter_space_before_script,              0);
1585        tex_primitive(luatex_command, "Umathstackdenomdown",            math_parameter_cmd,     math_parameter_stack_denom_down,                 0);
1586        tex_primitive(luatex_command, "Umathstacknumup",                math_parameter_cmd,     math_parameter_stack_num_up,                     0);
1587        tex_primitive(luatex_command, "Umathstackvariant",              math_parameter_cmd,     math_parameter_stack_variant,                    0);
1588        tex_primitive(luatex_command, "Umathstackvgap",                 math_parameter_cmd,     math_parameter_stack_vgap,                       0);
1589        tex_primitive(luatex_command, "Umathsubscriptvariant",          math_parameter_cmd,     math_parameter_subscript_variant,                0);
1590        tex_primitive(luatex_command, "Umathsubshiftdown",              math_parameter_cmd,     math_parameter_subscript_shift_down,             0);
1591        tex_primitive(luatex_command, "Umathsubshiftdrop",              math_parameter_cmd,     math_parameter_subscript_shift_drop,             0);
1592        tex_primitive(luatex_command, "Umathsubsupshiftdown",           math_parameter_cmd,     math_parameter_subscript_superscript_shift_down, 0);
1593        tex_primitive(luatex_command, "Umathsubsupvgap",                math_parameter_cmd,     math_parameter_subscript_superscript_vgap,       0);
1594        tex_primitive(luatex_command, "Umathsubtopmax",                 math_parameter_cmd,     math_parameter_subscript_top_max,                0);
1595        tex_primitive(luatex_command, "Umathsupbottommin",              math_parameter_cmd,     math_parameter_superscript_bottom_min,           0);
1596        tex_primitive(luatex_command, "Umathsuperscriptvariant",        math_parameter_cmd,     math_parameter_superscript_variant,              0);
1597        tex_primitive(luatex_command, "Umathsupshiftdrop",              math_parameter_cmd,     math_parameter_superscript_shift_drop,           0);
1598        tex_primitive(luatex_command, "Umathsupshiftup",                math_parameter_cmd,     math_parameter_superscript_shift_up,             0);
1599        tex_primitive(luatex_command, "Umathsupsubbottommax",           math_parameter_cmd,     math_parameter_superscript_subscript_bottom_max, 0);
1600        tex_primitive(luatex_command, "Umathtopaccentvariant",          math_parameter_cmd,     math_parameter_top_accent_variant,               0);
1601        tex_primitive(luatex_command, "Umathunderbarkern",              math_parameter_cmd,     math_parameter_underbar_kern,                    0);
1602        tex_primitive(luatex_command, "Umathunderbarrule",              math_parameter_cmd,     math_parameter_underbar_rule,                    0);
1603        tex_primitive(luatex_command, "Umathunderbarvgap",              math_parameter_cmd,     math_parameter_underbar_vgap,                    0);
1604        tex_primitive(luatex_command, "Umathunderdelimiterbgap",        math_parameter_cmd,     math_parameter_under_delimiter_bgap,             0);
1605        tex_primitive(luatex_command, "Umathunderdelimitervariant",     math_parameter_cmd,     math_parameter_under_delimiter_variant,          0);
1606        tex_primitive(luatex_command, "Umathunderdelimitervgap",        math_parameter_cmd,     math_parameter_under_delimiter_vgap,             0);
1607        tex_primitive(luatex_command, "Umathunderlinevariant",          math_parameter_cmd,     math_parameter_under_line_variant,               0);
1608        tex_primitive(luatex_command, "Umathvextensiblevariant",        math_parameter_cmd,     math_parameter_v_extensible_variant,             0);
1609
1610        tex_primitive(luatex_command, "Umathxscale",                    math_parameter_cmd,     math_parameter_x_scale,                          0);
1611        tex_primitive(luatex_command, "Umathyscale",                    math_parameter_cmd,     math_parameter_y_scale,                          0);
1612
1613        tex_primitive(no_command,     "insertedpar",                    end_paragraph_cmd,      inserted_end_paragraph_code,                     0);
1614        tex_primitive(no_command,     "newlinepar",                     end_paragraph_cmd,      new_line_end_paragraph_code,                     0);
1615        tex_primitive(tex_command,    "par",                            end_paragraph_cmd,      normal_end_paragraph_code,                       0); /* |too_big_char| */
1616        tex_primitive(luatex_command, "localbreakpar",                  end_paragraph_cmd,      local_break_end_paragraph_code,                  0);
1617
1618     /* tex_primitive(luatex_command, "linepar",                        undefined_cs_cmd,       0,                                               0); */ /*tex A user can define this one.*/
1619
1620        tex_primitive(tex_command,    "endgroup",                       end_group_cmd,          semi_simple_group_code,                          0);
1621        tex_primitive(luatex_command, "endmathgroup",                   end_group_cmd,          math_simple_group_code,                          0);
1622        tex_primitive(luatex_command, "endsimplegroup",                 end_group_cmd,          also_simple_group_code,                          0);
1623
1624        tex_primitive(no_command,     "noexpandrelax",                  relax_cmd,              no_expand_relax_code,                            0);
1625        tex_primitive(luatex_command, "norelax",                        relax_cmd,              no_relax_code,                                   0);
1626        tex_primitive(tex_command,    "relax",                          relax_cmd,              relax_code,                                      0);
1627
1628        tex_primitive(tex_command,    "nullfont",                       set_font_cmd,           null_font,                                       0);
1629
1630        /*tex
1631
1632            A bunch of commands that need a special treatment, so we delayed their initialization.
1633            They are in the above list but commented. We start with those that alias to (already
1634            defined) primitives. Actually we can say something like:
1635
1636            \starttyping
1637            primitive(tex_command, "fi", if_test_cmd, fi_code, 0);
1638            cs_text(deep_frozen_cs_fi_code) = maketexstring("fi");
1639            copy_eqtb_entry(deep_frozen_cs_fi_code, cur_val);
1640            \stoptyping
1641
1642            but we use a helper that does a primitive lookup and shares the already allocated
1643            string. The effect is the same but it adds a little abstraction and saves a few
1644            redundant strings.
1645
1646        */
1647
1648        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_end_group_code, "endgroup");
1649        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_relax_code,     "relax");
1650        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_fi_code,        "fi");
1651        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_no_if_code,     "noif");
1652        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_always_code,    "always");
1653        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_right_code,     "right");
1654        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_null_font_code, "nullfont");
1655        tex_aux_copy_deep_frozen_from_primitive(deep_frozen_cs_cr_code,        "cr");
1656
1657        lmt_token_state.par_loc   = tex_prim_lookup(tex_located_string("par"));
1658        lmt_token_state.par_token = cs_token_flag + lmt_token_state.par_loc;
1659
1660     /* lmt_token_state.line_par_loc   = tex_prim_lookup(tex_located_string("linepar")); */
1661     /* lmt_token_state.line_par_token = cs_token_flag + lmt_token_state.line_par_loc;   */
1662
1663        /*tex
1664            These don't alias to existing commands. They are all inaccessible but might show up in
1665            error messages and tracing. We could set the flags to resticted values. We need to
1666            intercept them in the function that prints the |chr| because they can be out of range.
1667        */
1668
1669        cs_text(deep_frozen_cs_end_template_code) = tex_maketexstring("endtemplate");
1670        set_eq_type(deep_frozen_cs_end_template_code, deep_frozen_end_template_cmd);
1671        set_eq_flag(deep_frozen_cs_end_template_code, 0);
1672        set_eq_value(deep_frozen_cs_end_template_code, lmt_token_state.null_list);
1673        set_eq_level(deep_frozen_cs_end_template_code, level_one);
1674
1675        cs_text(deep_frozen_cs_dont_expand_code) = tex_maketexstring("notexpanded");
1676        set_eq_type(deep_frozen_cs_dont_expand_code, deep_frozen_dont_expand_cmd);
1677        set_eq_flag(deep_frozen_cs_dont_expand_code, 0);
1678
1679        cs_text(deep_frozen_cs_keep_constant_code) = tex_maketexstring("keepconstant");
1680        set_eq_type(deep_frozen_cs_keep_constant_code, deep_frozen_keep_constant_cmd);
1681        set_eq_flag(deep_frozen_cs_keep_constant_code, 0);
1682        set_eq_value(deep_frozen_cs_keep_constant_code, lmt_token_state.null_list); /* not needed */
1683        set_eq_level(deep_frozen_cs_keep_constant_code, level_one);                 /* not needed */
1684
1685        cs_text(deep_frozen_cs_protection_code) = tex_maketexstring("inaccessible");
1686
1687        cs_text(deep_frozen_cs_end_write_code) = tex_maketexstring("endwrite");
1688        set_eq_type(deep_frozen_cs_end_write_code, call_cmd);
1689        set_eq_flag(deep_frozen_cs_end_write_code, 0);
1690        set_eq_value(deep_frozen_cs_end_write_code, null);
1691        set_eq_level(deep_frozen_cs_end_write_code, level_one);
1692
1693        /*tex The empty list reference should be reassigned after compacting! */
1694
1695        lmt_token_state.empty = get_reference_token();
1696     // tex_add_token_reference(lmt_token_state.empty);
1697        set_token_reference(lmt_token_state.empty, max_token_reference);
1698
1699        lmt_string_pool_state.reserved = lmt_string_pool_state.string_pool_data.ptr;
1700        lmt_hash_state.no_new_cs = 1;
1701
1702    }
1703}
1704