beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / tex / equivalents.h
blob09a63150cca712318226a97e3deed0d4d1956f7d
1 /* equivalents.h
3 Copyright 2009 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
7 LuaTeX is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
12 LuaTeX is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License along
18 with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef EQUIVALENTS_H
22 # define EQUIVALENTS_H
26 Like the preceding parameters, the following quantities can be changed at compile
27 time to extend or reduce \TeX's capacity. But if they are changed, it is
28 necessary to rerun the initialization program \.{INITEX} @.INITEX@> to generate
29 new tables for the production \TeX\ program. One can't simply make helter-skelter
30 changes to the following constants, since certain rather complex initialization
31 numbers are computed from them. They are defined here using \.{WEB} macros,
32 instead of being put into \PASCAL's |const| list, in order to emphasize this
33 distinction.
37 # define font_base 0 /* smallest internal font number; must not be less than |min_quarterword| */
38 # define biggest_reg 65535 /* the largest allowed register number; must be |< max_quarterword| */
39 # define number_regs 65536 /* |biggest_reg+1| */
40 # define number_attrs 65536 /* total numbeer of attributes */
41 # define biggest_char 1114111 /* the largest allowed character number; must be |< max_halfword| */
42 # define too_big_char 1114112 /* |biggest_char+1| */
43 # define special_char 1114113 /* |biggest_char+2| */
44 # define number_chars 1114112 /* |biggest_char+1| */
45 # define number_fonts (5535-font_base+1)
46 # define biggest_lang 32767
47 # define too_big_lang 32768
48 # define text_size 0 /* size code for the largest size in a family */
49 # define script_size 1 /* size code for the medium size in a family */
50 # define script_script_size 2 /* size code for the smallest size in a family */
54 Each entry in |eqtb| is a |memory_word|. Most of these words are of type
55 |two_halves|, and subdivided into three fields:
57 \yskip\hangg 1) The |eq_level| (a quarterword) is the level of grouping at which
58 this equivalent was defined. If the level is |level_zero|, the equivalent has
59 never been defined; |level_one| refers to the outer level (outside of all
60 groups), and this level is also used for global definitions that never go away.
61 Higher levels are for equivalents that will disappear at the end of their group.
62 @^global definitions@>
64 \yskip\hangg 2) The |eq_type| (another quarterword) specifies what kind of entry
65 this is. There are many types, since each \TeX\ primitive like \.{\\hbox},
66 \.{\\def}, etc., has its own special code. The list of command codes above
67 includes all possible settings of the |eq_type| field.
69 \yskip\hangg 3) The |equiv| (a halfword) is the current equivalent value. This
70 may be a font number, a pointer into |mem|, or a variety of other things.
72 Many locations in |eqtb| have symbolic names. The purpose of the next paragraphs
73 is to define these names, and to set up the initial values of the equivalents.
75 In the first region we have a single entry for the `null csname' of length zero.
76 In luatex, the active characters and and single-letter control sequence names are
77 part of the next region.
79 Then comes region~2, which corresponds to the hash table that we will define
80 later. The maximum address in this region is used for a dummy control sequence
81 that is perpetually undefined. There also are several locations for control
82 sequences that are perpetually defined (since they are used in error recovery).
84 @ Region 3 of |eqtb| contains the |number_regs| \.{\\skip} registers, as well as
85 the glue parameters defined here. It is important that the ``muskip'' parameters
86 have larger numbers than the others.
88 @ Region 4 of |eqtb| contains the local quantities defined here. The bulk of this
89 region is taken up by five tables that are indexed by eight-bit characters; these
90 tables are important to both the syntactic and semantic portions of \TeX. There
91 are also a bunch of special things like font and token parameters, as well as the
92 tables of \.{\\toks} and \.{\\box} registers.
94 @ Region 5 of |eqtb| contains the integer parameters and registers defined here,
95 as well as the |del_code| table. The latter table differs from the
96 |cat_code..math_code| tables that precede it, since delimiter codes are fullword
97 integers while the other kinds of codes occupy at most a halfword. This is what
98 makes region~5 different from region~4. We will store the |eq_level| information
99 in an auxiliary array of quarterwords that will be defined later.
101 @ The integer parameters should really be initialized by a macro package; the
102 following initialization does the minimum to keep \TeX\ from complete failure.
104 @^null delimiter@>
106 @ The final region of |eqtb| contains the dimension parameters defined here, and
107 the |number_regs| \.{\\dimen} registers.
111 # define null_cs 1 /* equivalent of \.{\\csname\\endcsname} */
112 # define hash_base (null_cs+1) /* beginning of region 2, for the hash table */
113 # define frozen_control_sequence (hash_base+hash_size) /* for error recovery */
114 # define frozen_protection (frozen_control_sequence) /* inaccessible but definable */
115 # define frozen_cr (frozen_control_sequence+1) /* permanent `\.{\\cr}' */
116 # define frozen_end_group (frozen_control_sequence+2) /* permanent `\.{\\endgroup}' */
117 # define frozen_right (frozen_control_sequence+3) /* permanent `\.{\\right}' */
118 # define frozen_fi (frozen_control_sequence+4) /* permanent `\.{\\fi}' */
119 # define frozen_end_template (frozen_control_sequence+5) /* permanent `\.{\\endtemplate}' */
120 # define frozen_endv (frozen_control_sequence+6) /* second permanent `\.{\\endtemplate}' */
121 # define frozen_relax (frozen_control_sequence+7) /* permanent `\.{\\relax}' */
122 # define end_write (frozen_control_sequence+8) /* permanent `\.{\\endwrite}' */
123 # define frozen_dont_expand (frozen_control_sequence+9 ) /* permanent `\.{\\notexpanded:}' */
124 # define frozen_primitive (frozen_control_sequence+11 ) /* permanent `\.{\\primitive}' */
125 # define frozen_special (frozen_control_sequence+12 ) /* permanent `\.{\\special}' */
126 # define frozen_null_font (frozen_control_sequence+13 ) /* permanent `\.{\\nullfont}' */
127 # define font_id_base (frozen_null_font-font_base ) /* begins table of |number_fonts| permanent font identifiers */
128 # define undefined_control_sequence (frozen_null_font+number_fonts)
129 # define glue_base (undefined_control_sequence+1) /* beginning of region 3 */
131 # define line_skip_code 0 /* interline glue if |baseline_skip| is infeasible */
132 # define baseline_skip_code 1 /* desired glue between baselines */
133 # define par_skip_code 2 /* extra glue just above a paragraph */
134 # define above_display_skip_code 3 /* extra glue just above displayed math */
135 # define below_display_skip_code 4 /* extra glue just below displayed math */
136 # define above_display_short_skip_code 5 /* glue above displayed math following short lines */
137 # define below_display_short_skip_code 6 /* glue below displayed math following short lines */
138 # define left_skip_code 7 /* glue at left of justified lines */
139 # define right_skip_code 8 /* glue at right of justified lines */
140 # define top_skip_code 9 /* glue at top of main pages */
141 # define split_top_skip_code 10 /* glue at top of split pages */
142 # define tab_skip_code 11 /* glue between aligned entries */
143 # define space_skip_code 12 /* glue between words (if not |zero_glue|) */
144 # define xspace_skip_code 13 /* glue after sentences (if not |zero_glue|) */
145 # define par_fill_skip_code 14 /* glue on last line of paragraph */
146 # define thin_mu_skip_code 15 /* thin space in math formula */
147 # define med_mu_skip_code 16 /* medium space in math formula */
148 # define thick_mu_skip_code 17 /* thick space in math formula */
149 # define math_skip_code 18
150 # define glue_pars 19 /* total number of glue parameters */
152 # define skip_base (glue_base+glue_pars) /* table of |number_regs| ``skip'' registers */
153 # define mu_skip_base (skip_base+number_regs) /* table of |number_regs| ``muskip'' registers */
154 # define local_base (mu_skip_base+number_regs) /* beginning of region 4 */
156 # define par_shape_loc (local_base) /* specifies paragraph shape */
157 # define output_routine_loc (local_base+1) /* points to token list for \.{\\output} */
158 # define every_par_loc (local_base+2) /* points to token list for \.{\\everypar} */
159 # define every_math_loc (local_base+3) /* points to token list for \.{\\everymath} */
160 # define every_display_loc (local_base+4) /* points to token list for \.{\\everydisplay} */
161 # define every_hbox_loc (local_base+5) /* points to token list for \.{\\everyhbox} */
162 # define every_vbox_loc (local_base+6) /* points to token list for \.{\\everyvbox} */
163 # define every_job_loc (local_base+7) /* points to token list for \.{\\everyjob} */
164 # define every_cr_loc (local_base+8) /* points to token list for \.{\\everycr} */
165 # define err_help_loc (local_base+9) /* points to token list for \.{\\errhelp} */
166 # define every_eof_loc (local_base+10) /* points to token list for \.{\\everyeof} */
168 # define backend_toks_base (local_base+11)
169 # define backend_toks_last (local_base+20)
171 # define toks_base (local_base+21) /* table of |number_regs| token list registers */
173 # define etex_pen_base (toks_base+number_regs) /* start of table of \eTeX's penalties */
174 # define inter_line_penalties_loc (etex_pen_base) /* additional penalties between lines */
175 # define club_penalties_loc (etex_pen_base+1) /* penalties for creating club lines */
176 # define widow_penalties_loc (etex_pen_base+2) /* penalties for creating widow lines */
177 # define display_widow_penalties_loc (etex_pen_base+3) /* ditto, just before a display */
178 # define etex_pens (etex_pen_base+4) /* end of table of \eTeX's penalties */
179 # define local_left_box_base (etex_pens)
180 # define local_right_box_base (local_left_box_base+1)
181 # define box_base (local_right_box_base+1) /* table of |number_regs| box registers */
182 # define cur_font_loc (box_base+number_regs) /* internal font number outside math mode */
183 # define internal_math_param_base (cur_font_loc+1 ) /* current math parameter data index */
184 # define cat_code_base (internal_math_param_base+1) /* current category code data index */
185 # define lc_code_base (cat_code_base+1) /* table of |number_chars| lowercase mappings */
186 # define uc_code_base (lc_code_base+1) /* table of |number_chars| uppercase mappings */
187 # define sf_code_base (uc_code_base+1) /* table of |number_chars| spacefactor mappings */
188 # define math_code_base (sf_code_base+1) /* table of |number_chars| math mode mappings */
189 # define int_base (math_code_base+1) /* beginning of region 5 */
191 # define pretolerance_code 0 /* badness tolerance before hyphenation */
192 # define tolerance_code 1 /* badness tolerance after hyphenation */
193 # define line_penalty_code 2 /* added to the badness of every line */
194 # define hyphen_penalty_code 3 /* penalty for break after discretionary hyphen */
195 # define ex_hyphen_penalty_code 4 /* penalty for break after explicit hyphen */
196 # define club_penalty_code 5 /* penalty for creating a club line */
197 # define widow_penalty_code 6 /* penalty for creating a widow line */
198 # define display_widow_penalty_code 7 /* ditto, just before a display */
199 # define broken_penalty_code 8 /* penalty for breaking a page at a broken line */
200 # define bin_op_penalty_code 9 /* penalty for breaking after a binary operation */
201 # define rel_penalty_code 10 /* penalty for breaking after a relation */
202 # define pre_display_penalty_code 11 /* penalty for breaking just before a displayed formula */
203 # define post_display_penalty_code 12 /* penalty for breaking just after a displayed formula */
204 # define inter_line_penalty_code 13 /* additional penalty between lines */
205 # define double_hyphen_demerits_code 14 /* demerits for double hyphen break */
206 # define final_hyphen_demerits_code 15 /* demerits for final hyphen break */
207 # define adj_demerits_code 16 /* demerits for adjacent incompatible lines */
208 # define mag_code 17 /* magnification ratio */
209 # define delimiter_factor_code 18 /* ratio for variable-size delimiters */
210 # define looseness_code 19 /* change in number of lines for a paragraph */
211 # define time_code 20 /* current time of day */
212 # define day_code 21 /* current day of the month */
213 # define month_code 22 /* current month of the year */
214 # define year_code 23 /* current year of our Lord */
215 # define show_box_breadth_code 24 /* nodes per level in |show_box| */
216 # define show_box_depth_code 25 /* maximum level in |show_box| */
217 # define hbadness_code 26 /* hboxes exceeding this badness will be shown by |hpack| */
218 # define vbadness_code 27 /* vboxes exceeding this badness will be shown by |vpack| */
219 # define pausing_code 28 /* pause after each line is read from a file */
220 # define tracing_online_code 29 /* show diagnostic output on terminal */
221 # define tracing_macros_code 30 /* show macros as they are being expanded */
222 # define tracing_stats_code 31 /* show memory usage if \TeX\ knows it */
223 # define tracing_paragraphs_code 32 /* show line-break calculations */
224 # define tracing_pages_code 33 /* show page-break calculations */
225 # define tracing_output_code 34 /* show boxes when they are shipped out */
226 # define tracing_lost_chars_code 35 /* show characters that aren't in the font */
227 # define tracing_commands_code 36 /* show command codes at |big_switch| */
228 # define tracing_restores_code 37 /* show equivalents when they are restored */
229 # define uc_hyph_code 38 /* hyphenate words beginning with a capital letter */
230 # define output_penalty_code 39 /* penalty found at current page break */
231 # define max_dead_cycles_code 40 /* bound on consecutive dead cycles of output */
232 # define hang_after_code 41 /* hanging indentation changes after this many lines */
233 # define floating_penalty_code 42 /* penalty for insertions heldover after a split */
234 # define global_defs_code 43 /* override \.{\\global} specifications */
235 # define cur_fam_code 44 /* current family */
236 # define escape_char_code 45 /* escape character for token output */
237 # define default_hyphen_char_code 46 /* value of \.{\\hyphenchar} when a font is loaded */
238 # define default_skew_char_code 47 /* value of \.{\\skewchar} when a font is loaded */
239 # define end_line_char_code 48 /* character placed at the right end of the buffer */
240 # define new_line_char_code 49 /* character that prints as |print_ln| */
241 # define language_code 50 /* current hyphenation table */
242 # define left_hyphen_min_code 51 /* minimum left hyphenation fragment size */
243 # define right_hyphen_min_code 52 /* minimum right hyphenation fragment size */
244 # define holding_inserts_code 53 /* do not remove insertion nodes from \.{\\box255} */
245 # define error_context_lines_code 54 /* maximum intermediate line pairs shown */
246 # define local_inter_line_penalty_code 55 /* local \.{\\interlinepenalty} */
247 # define local_broken_penalty_code 56 /* local \.{\\brokenpenalty} */
248 # define no_local_whatsits_code 57 /* counts local whatsits */
249 # define no_local_dirs_code 58
251 # define disable_lig_code 60
252 # define disable_kern_code 61
253 # define disable_space_code 62
254 # define cat_code_table_code 63
255 # define output_box_code 64
256 # define cur_lang_code 65 /* current language id */
257 # define ex_hyphen_char_code 66
258 # define hyphenation_min_code 67 /* minimum word length */
259 # define adjust_spacing_code 68 /* level of spacing adjusting */
260 # define protrude_chars_code 69 /* protrude chars at left/right edge of paragraphs */
261 # define output_mode_code 70 /* switch on PDF output if positive */
262 # define draft_mode_code 71
263 # define tracing_fonts_code 72
264 # define tracing_assigns_code 73 /* show assignments */
265 # define tracing_groups_code 74 /* show save/restore groups */
266 # define tracing_ifs_code 75 /* show conditionals */
267 # define tracing_scan_tokens_code 76 /* show pseudo file open and close */
268 # define tracing_nesting_code 77 /* show incomplete groups and ifs within files */
269 # define pre_display_direction_code 78 /* text direction preceding a display */
270 # define last_line_fit_code 79 /* adjustment for last line of paragraph */
271 # define saving_vdiscards_code 80 /* save items discarded from vlists */
272 # define saving_hyph_codes_code 81 /* save hyphenation codes for languages */
273 # define suppress_fontnotfound_error_code 82 /* suppress errors for missing fonts */
274 # define suppress_long_error_code 83 /* suppress errors for missing fonts */
275 # define suppress_ifcsname_error_code 84 /* suppress errors for failed \.{\\ifcsname} */
276 # define suppress_outer_error_code 85 /* suppress errors for \.{\\outer} */
277 # define suppress_mathpar_error_code 86 /* suppress errors for \.{\\par}} in math */
278 # define math_eqno_gap_step_code 87 /* factor/1000 used for distance between eq and eqno */
279 # define math_display_skip_mode_code 88
280 # define math_scripts_mode_code 89
281 # define synctex_code 90 /* is synctex file generation enabled ? */
283 # define math_no_italic_compensation_code 92 /* just for tracing, can change */
284 # define math_no_char_italic_code 93 /* just for tracing, can change */
285 # define math_use_old_fraction_scaling_code 94 /* just for tracing, can change */
286 # define math_old_code 95 /* this one is stable */
287 # define math_option_code 96
289 # define first_valid_language_code 97
291 # define backend_int_base (int_base+98)
292 # define backend_int_last (int_base+117)
294 # define tex_int_pars (118) /* total number of integer parameters */
296 # define page_direction_code (tex_int_pars)
297 # define body_direction_code (tex_int_pars+1)
298 # define par_direction_code (tex_int_pars+2)
299 # define text_direction_code (tex_int_pars+3)
300 # define math_direction_code (tex_int_pars+4)
302 # define int_pars (tex_int_pars+5) /* total number of integer parameters */
304 # define dir_base (int_base+tex_int_pars)
305 # define count_base (int_base+int_pars) /* |number_regs| user \.{\\count} registers */
306 # define attribute_base (count_base+number_regs) /* |number_attrs| user \.{\\attribute} registers */
307 # define del_code_base (attribute_base+number_attrs) /* |number_chars| delimiter code mappings */
308 # define dimen_base (del_code_base+1) /* beginning of region 6 */
310 # define par_indent_code 0 /* indentation of paragraphs */
311 # define math_surround_code 1 /* space around math in text */
312 # define line_skip_limit_code 2 /* threshold for |line_skip| instead of |baseline_skip| */
313 # define hsize_code 3 /* line width in horizontal mode */
314 # define vsize_code 4 /* page height in vertical mode */
315 # define max_depth_code 5 /* maximum depth of boxes on main pages */
316 # define split_max_depth_code 6 /* maximum depth of boxes on split pages */
317 # define box_max_depth_code 7 /* maximum depth of explicit vboxes */
318 # define hfuzz_code 8 /* tolerance for overfull hbox messages */
319 # define vfuzz_code 9 /* tolerance for overfull vbox messages */
320 # define delimiter_shortfall_code 10 /* maximum amount uncovered by variable delimiters */
321 # define null_delimiter_space_code 11 /* blank space in null delimiters */
322 # define script_space_code 12 /* extra space after subscript or superscript */
323 # define pre_display_size_code 13 /* length of text preceding a display */
324 # define display_width_code 14 /* length of line for displayed equation */
325 # define display_indent_code 15 /* indentation of line for displayed equation */
326 # define overfull_rule_code 16 /* width of rule that identifies overfull hboxes */
327 # define hang_indent_code 17 /* amount of hanging indentation */
328 # define h_offset_code 18 /* amount of horizontal offset when shipping pages out */
329 # define v_offset_code 19 /* amount of vertical offset when shipping pages out */
330 # define emergency_stretch_code 20 /* reduces badnesses on final pass of line-breaking */
331 # define page_left_offset_code 21
332 # define page_top_offset_code 22
333 # define page_right_offset_code 23
334 # define page_bottom_offset_code 24
335 # define px_dimen_code 25
336 # define page_width_code 26 /* page width of the output */
337 # define page_height_code 27 /* page height of the output */
339 # define backend_dimen_base (dimen_base+28)
340 # define backend_dimen_last (dimen_base+37)
342 # define dimen_pars (38) /* total number of dimension parameters */
344 # define scaled_base (dimen_base+dimen_pars) /* table of |number_regs| user-defined \.{\\dimen} registers */
345 # define eqtb_size (scaled_base+biggest_reg) /* largest subscript of |eqtb| */
347 extern memory_word *eqtb;
349 extern halfword eqtb_top; /* maximum of the |eqtb| */
351 extern quarterword xeq_level[(eqtb_size + 1)];
352 extern void initialize_equivalents(void);
354 # define eq_level_field(A) (A).hh.b1
355 # define eq_type_field(A) (A).hh.b0
356 # define equiv_field(A) (A).hh.rh
358 # define eq_level(A) eq_level_field(eqtb[(A)]) /* level of definition */
359 # define eq_type(A) eq_type_field(eqtb[(A)]) /* command code for equivalent */
360 # define equiv(A) equiv_field(eqtb[(A)]) /* equivalent value */
362 # define set_eq_level(A,B) eq_level((A)) = (B)
363 # define set_eq_type(A,B) eq_type((A)) = (B)
364 # define set_equiv(A,B) equiv((A)) = (B)
366 typedef struct save_record_ {
367 quarterword type_;
368 quarterword level_;
369 memory_word word_;
370 } save_record;
372 extern save_record *save_stack;
373 extern int save_ptr; /* first unused entry on |save_stack| */
374 extern int max_save_stack; /* maximum usage of save stack */
375 extern quarterword cur_level; /* current nesting level for groups */
376 extern group_code cur_group; /* current group type */
377 extern int cur_boundary; /* where the current level begins */
379 # define save_type(A) save_stack[(A)].type_ /* classifies a |save_stack| entry */
380 # define save_level(A) save_stack[(A)].level_ /* saved level for regions 5 and 6, or group code */
381 # define save_value(A) save_stack[(A)].word_.cint /* |eqtb| location or token or |save_stack| location */
382 # define save_word(A) save_stack[(A)].word_ /* |eqtb| entry */
386 We use the notation |saved(k)| to stand for an item that appears in location
387 |save_ptr+k| of the save stack.
391 # define saved_type(A) save_stack[save_ptr+(A)].type_
392 # define saved_level(A) save_stack[save_ptr+(A)].level_
393 # define saved_value(A) save_stack[save_ptr+(A)].word_.cint
395 # define set_saved_record(A,B,C,D) do { \
396 saved_type(A) = (quarterword)(B); \
397 saved_level(A) = (quarterword)(C); \
398 saved_value(A) = (D); \
399 } while (0)
401 # define restore_old_value 0 /* |save_type| when a value should be restored later */
402 # define restore_zero 1 /* |save_type| when an undefined entry should be restored */
403 # define insert_token 2 /* |save_type| when a token is being saved for later use */
404 # define level_boundary 3 /* |save_type| corresponding to beginning of group */
405 # define saved_line 4
406 # define saved_adjust 5
407 # define saved_insert 6
408 # define saved_disc 7
409 # define saved_boxtype 8
410 # define saved_textdir 9
411 # define saved_eqno 10
412 # define saved_choices 11
413 # define saved_math 12
414 # define saved_boxcontext 13
415 # define saved_boxspec 14
416 # define saved_boxdir 15
417 # define saved_boxattr 16
418 # define saved_boxpack 18
419 # define saved_eqtb 19
421 extern void print_save_stack(void);
423 # define int_par(A) eqtb[int_base+(A)].cint
424 # define dimen_par(A) eqtb[dimen_base+(A)].cint
425 # define loc_par(A) equiv(local_base+(A))
426 # define glue_par(A) equiv(glue_base+(A))
428 /* if nonzero, this magnification should be used henceforth */
430 extern int mag_set;
431 extern void prepare_mag(void);
435 @ Here are the group codes that are used to discriminate between different kinds
436 of groups. They allow \TeX\ to decide what special actions, if any, should be
437 performed when a group ends. \def\grp{\.{\char'173...\char'175}}
439 Some groups are not supposed to be ended by right braces. For example, the `\.\$'
440 that begins a math formula causes a |math_shift_group| to be started, and this
441 should be terminated by a matching `\.\$'. Similarly, a group that starts with
442 \.{\\left} should end with \.{\\right}, and one that starts with \.{\\begingroup}
443 should end with \.{\\endgroup}.
447 typedef enum {
448 bottom_level = 0, /* group code for the outside world */
449 simple_group, /* group code for local structure only */
450 hbox_group, /* code for `\.{\\hbox}\grp' */
451 adjusted_hbox_group, /* code for `\.{\\hbox}\grp' in vertical mode */
452 vbox_group, /* code for `\.{\\vbox}\grp' */
453 vtop_group, /* code for `\.{\\vtop}\grp' */
454 align_group, /* code for `\.{\\halign}\grp', `\.{\\valign}\grp' */
455 no_align_group, /* code for `\.{\\noalign}\grp' */
456 output_group, /* code for output routine */
457 math_group, /* code for, e.g., `\.{\char'136}\grp' */
458 disc_group, /* code for `\.{\\discretionary}\grp\grp\grp' */
459 insert_group, /* code for `\.{\\insert}\grp', `\.{\\vadjust}\grp' */
460 vcenter_group, /* code for `\.{\\vcenter}\grp' */
461 math_choice_group, /* code for `\.{\\mathchoice}\grp\grp\grp\grp' */
462 semi_simple_group, /* code for `\.{\\begingroup...\\endgroup}' */
463 math_shift_group, /* code for `\.{\$...\$}' */
464 math_left_group, /* code for `\.{\\left...\\right}' */
465 local_box_group, /* code for `\.{\\localleftbox...\\localrightbox}' */
466 split_off_group, /* box code for the top part of a \.{\\vsplit} */
467 split_keep_group, /* box code for the bottom part of a \.{\\vsplit} */
468 preamble_group, /* box code for the preamble processing in an alignment */
469 align_set_group, /* box code for the final item pass in an alignment */
470 fin_row_group /* box code for a provisory line in an alignment */
471 } tex_group_codes;
473 # define max_group_code local_box_group /* which is wrong, but is what the web says */
475 extern int cur_cmd; /* current command set by |get_next| */
476 extern halfword cur_chr; /* operand of current command */
477 extern halfword cur_cs; /* control sequence found here, zero if none found */
478 extern halfword cur_tok; /* packed representative of |cur_cmd| and |cur_chr| */
480 extern void show_cur_cmd_chr(void);
482 extern void new_save_level(group_code c); /* begin a new level of grouping */
483 extern void eq_destroy(memory_word w); /* gets ready to forget |w| */
484 extern void eq_save(halfword p, quarterword l); /* saves |eqtb[p]| */
485 extern void eq_define(halfword p, quarterword t, halfword e); /* new data for |eqtb| */
486 extern void eq_word_define(halfword p, int w);
487 extern void geq_define(halfword p, quarterword t, halfword e); /* global |eq_define| */
488 extern void geq_word_define(halfword p, int w); /* global |eq_word_define| */
489 extern void save_for_after(halfword t);
490 extern void unsave(void); /* pops the top level off the save stack */
491 extern void show_save_groups(void);
493 # define level_zero 0 /* level for undefined quantities */
494 # define level_one 1 /* outermost level for defined quantities */
496 extern void show_eqtb(halfword n);
498 /* \csname \ifcsname */
500 extern halfword last_cs_name;
502 /* more will move here */
504 #define space_skip glue_par(space_skip_code)
505 #define xspace_skip glue_par(xspace_skip_code)
506 #define math_skip glue_par(math_skip_code)
508 #define body_direction int_par(body_direction_code)
509 #define page_direction int_par(page_direction_code)
510 #define par_direction int_par(par_direction_code)
511 #define text_direction int_par(text_direction_code)
512 #define math_direction int_par(math_direction_code)
514 #endif