diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/align.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/align.w | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/align.w b/Build/source/texk/web2c/luatexdir/tex/align.w index cd8086af301..dd0ed10338e 100644 --- a/Build/source/texk/web2c/luatexdir/tex/align.w +++ b/Build/source/texk/web2c/luatexdir/tex/align.w @@ -31,17 +31,6 @@ void init_col(void); #define noDEBUG -#define end_template_token (cs_token_flag+frozen_end_template) - -#define prev_depth cur_list.prev_depth_field -#define space_factor cur_list.space_factor_field -#define incompleat_noad cur_list.incompleat_noad_field - -#define every_cr equiv(every_cr_loc) -#define display_indent dimen_par(display_indent_code) -#define max_depth dimen_par(max_depth_code) -#define overfull_rule dimen_par(overfull_rule_code) - @ It's sort of a miracle whenever \.{\\halign} and \.{\\valign} work, because they cut across so many of the control structures of \TeX. @@ -177,10 +166,12 @@ is necessary to store information about what to do when a template ends. This information is called the |extra_info| field. @c -#define u_part(A) vlink((A)+depth_offset) /* pointer to \<u_j> token list */ -#define v_part(A) vinfo((A)+depth_offset) /* pointer to \<v_j> token list */ -#define span_ptr(A) vinfo((A)+1) /* column spanning list */ -#define extra_info(A) vinfo((A)+list_offset) /* info to remember during template */ +/* could be in texnodes.h, but documented here*/ + +#define u_part(A) vlink((A)+depth_offset) /* pointer to \<u_j> token list */ +#define v_part(A) vinfo((A)+depth_offset) /* pointer to \<v_j> token list */ +#define span_ptr(A) vinfo((A)+1) /* column spanning list */ +#define extra_info(A) vinfo((A)+list_offset) /* info to remember during template */ @ Alignments can occur within alignments, so a small stack is used to access the alignrecord information. At each level we have a |preamble| pointer, @@ -201,6 +192,8 @@ when they have to be pushed down, they are stored in 6-word nodes, and |align_ptr| points to the topmost such node. @c +/* could be in texnodes.h but documented here*/ + #define preamble vlink(align_head) /* the current preamble list */ pointer cur_align = null; /* current position in preamble list */ @@ -301,7 +294,7 @@ static void get_preamble_token(void) && (cur_chr == glue_base + tab_skip_code)) { scan_optional_equals(); scan_glue(glue_val_level); - if (int_par(global_defs_code) > 0) + if (global_defs_par > 0) geq_define(glue_base + tab_skip_code, glue_ref_cmd, cur_val); else eq_define(glue_base + tab_skip_code, glue_ref_cmd, cur_val); @@ -332,7 +325,7 @@ void init_align(void) if ((cur_list.mode_field == mmode) && ((cur_list.tail_field != cur_list.head_field) - || (incompleat_noad != null))) { + || (incompleat_noad_par != null))) { const char *hlp[] = { "Displays can use special alignments (like \\eqalignno)", "only if nothing but the alignment itself is between $$'s.", @@ -349,7 +342,7 @@ void init_align(void) correct baseline calculations. */ if (cur_list.mode_field == mmode) { cur_list.mode_field = -vmode; - prev_depth = nest[nest_ptr - 2].prev_depth_field; + prev_depth_par = nest[nest_ptr - 2].prev_depth_field; } else if (cur_list.mode_field > 0) { cur_list.mode_field = -(cur_list.mode_field); } @@ -445,8 +438,8 @@ void init_align(void) scanner_status = normal; new_save_level(align_group); - if (every_cr != null) - begin_token_list(every_cr, every_cr_text); + if (every_cr_par != null) + begin_token_list(every_cr_par, every_cr_text); align_peek(); /* look for \.{\\noalign} or \.{\\omit} */ } @@ -494,9 +487,9 @@ static void init_span(pointer p) { push_nest(); if (cur_list.mode_field == -hmode) { - space_factor = 1000; + space_factor_par = 1000; } else { - prev_depth = ignore_depth; + prev_depth_par = ignore_depth; normal_paragraph(); } cur_span = p; @@ -515,9 +508,9 @@ void init_row(void) push_nest(); cur_list.mode_field = (-hmode - vmode) - cur_list.mode_field; if (cur_list.mode_field == -hmode) - space_factor = 0; + space_factor_par = 0; else - prev_depth = 0; + prev_depth_par = 0; tail_append(new_glue(preamble)); subtype(cur_list.tail_field) = tab_skip_code + 1; cur_align = vlink(preamble); @@ -781,16 +774,16 @@ void fin_row(void) append_list(cur_head, cur_tail); } else { p = filtered_vpackage(vlink(cur_list.head_field), - 0, additional, max_depth, fin_row_group, -1, 0, 0); + 0, additional, max_depth_par, fin_row_group, -1, 0, 0); pop_nest(); vlink(cur_list.tail_field) = p; cur_list.tail_field = p; - space_factor = 1000; + space_factor_par = 1000; } type(p) = unset_node; glue_stretch(p) = 0; - if (every_cr != null) - begin_token_list(every_cr, every_cr_text); + if (every_cr_par != null) + begin_token_list(every_cr_par, every_cr_text); align_peek(); /* note that |glue_shrink(p)=0| since |glue_shrink==shift_amount| */ } @@ -817,7 +810,7 @@ void fin_align(void) confusion("align0"); unsave(); /* that |align_group| was for the whole alignment */ if (nest[nest_ptr - 1].mode_field == mmode) - o = display_indent; + o = display_indent_par; else o = 0; /* Go through the preamble list, determining the column widths and @@ -856,7 +849,7 @@ value is changed to zero and so is the next tabskip. /* Nullify |width(q)| and the tabskip glue following this column */ width(q) = 0; r = vlink(q); - reset_glue_to_zero(r); /* is a lready copy */ + reset_glue_to_zero(r); /* is a lready copy */ } if (span_ptr(q) != end_span) { /* Merge the widths in the span nodes of |q| with those of |p|, @@ -917,10 +910,10 @@ value is changed to zero and so is the next tabskip. decr(save_ptr); pack_begin_line = -cur_list.ml_field; if (cur_list.mode_field == -vmode) { - rule_save = overfull_rule; - overfull_rule = 0; /* prevent rule from being packaged */ + rule_save = overfull_rule_par; + overfull_rule_par = 0; /* prevent rule from being packaged */ p = hpack(preamble, saved_value(0), saved_level(0), -1); - overfull_rule = rule_save; + overfull_rule_par = rule_save; } else { q = vlink(preamble); do { @@ -929,7 +922,7 @@ value is changed to zero and so is the next tabskip. q = vlink(vlink(q)); } while (q != null); p = filtered_vpackage(preamble, - saved_value(0), saved_level(0), max_depth, preamble_group, -1, 0, 0); + saved_value(0), saved_level(0), max_depth_par, preamble_group, -1, 0, 0); q = vlink(preamble); do { width(q) = height(q); @@ -1120,14 +1113,14 @@ value is changed to zero and so is the next tabskip. we will need to insert glue before and after the display; that part of the program will be deferred until we're more familiar with such operations.) */ - pd = cur_list.prev_depth_field; + pd = prev_depth_par; p = vlink(cur_list.head_field); q = cur_list.tail_field; pop_nest(); if (cur_list.mode_field == mmode) { finish_display_alignment(p, q, pd); } else { - cur_list.prev_depth_field = pd; /* aux:=aux_save; */ + prev_depth_par = pd; /* aux:=aux_save; */ vlink(cur_list.tail_field) = p; if (p != null) cur_list.tail_field = q; |