summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/etexdir/etex.ch
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-03-29 16:04:29 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-03-29 16:04:29 +0000
commit2c5a772c871ee51297bea7fc6dcea9c80abe387e (patch)
tree13029490fb1460f7649c336cf9e640ac8a3a087d /Build/source/texk/web2c/etexdir/etex.ch
parent4f0e2599e6819a91ce36143e1f4b272025400949 (diff)
e-TeX, pTeX, and e-pTeX: redefine box_lr and box_dir
to also work for min_quarterword<0 git-svn-id: svn://tug.org/texlive/trunk@21877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/etexdir/etex.ch')
-rw-r--r--Build/source/texk/web2c/etexdir/etex.ch33
1 files changed, 20 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/etexdir/etex.ch b/Build/source/texk/web2c/etexdir/etex.ch
index 42e331cd1a0..6cb158f5031 100644
--- a/Build/source/texk/web2c/etexdir/etex.ch
+++ b/Build/source/texk/web2c/etexdir/etex.ch
@@ -217,6 +217,13 @@ scalar types; there are no `\&{var}' parameters, except in the case of files
@d not_found4=49 {like |not_found|, when there's more than four}
@z
%---------------------------------------
+@x [10] m.135 l.2895 - e-TeX TeXXeT
+|fil|, |fill|, or |filll|). The |subtype| field is not used.
+@y
+|fil|, |fill|, or |filll|). The |subtype| field is not used in \TeX.
+In \eTeX\ the |subtype| field records the box direction mode |box_lr|.
+@z
+%---------------------------------------
@x [10] m.141 l.2980 - e-TeX marks
This field occupies a full word instead of a halfword, because
there's nothing to put in the other halfword; it is easier in \PASCAL\ to
@@ -1519,9 +1526,9 @@ changes; the subtype of an an |hlist_node| inside R-text is changed to
@y
@d reversed=1 {subtype for an |hlist_node| whose hlist has been reversed}
@d dlist=2 {subtype for an |hlist_node| from display math mode}
-@d box_lrstat(#) == subtype(#) {direction mode of a box}
-@d set_box_lrstat(#) == subtype(#):=set_box_lrstat_end
-@d set_box_lrstat_end(#) == #
+@d box_lr(#) == (qo(subtype(#))) {direction mode of a box}
+@d set_box_lr(#) == subtype(#):=set_box_lr_end
+@d set_box_lr_end(#) == (qi(#))
@#
@d left_to_right=0
@d right_to_left=1
@@ -1771,14 +1778,14 @@ until cur_cmd<>spacer;
begin type(q):=hlist_node; width(q):=width(p);
@y
begin type(q):=hlist_node; width(q):=width(p);
- if nest[nest_ptr-1].mode_field=mmode then set_box_lrstat(q)(dlist); {for |ship_out|}
+ if nest[nest_ptr-1].mode_field=mmode then set_box_lr(q)(dlist); {for |ship_out|}
@z
%---------------------------------------
@x [37] m.808 l.15886 - e-TeX TeXXeT
n:=span_count(r); t:=width(s); w:=t; u:=hold_head;
@y
n:=span_count(r); t:=width(s); w:=t; u:=hold_head;
-set_box_lrstat(r)(0); {for |ship_out|}
+set_box_lr(r)(0); {for |ship_out|}
@z
%---------------------------------------
@x [38] m.814 l.16009 - e-TeX penalties
@@ -2610,7 +2617,7 @@ begin danger:=false;
mlist_to_hlist; a:=hpack(link(temp_head),natural);
@y
mlist_to_hlist; a:=hpack(link(temp_head),natural);
- set_box_lrstat(a)(dlist);
+ set_box_lr(a)(dlist);
@z
%---------------------------------------
@x [48] m.1194 l.22397 after_math - e-TeX TeXXeT
@@ -2637,7 +2644,7 @@ resume_after_display
@x [48] m.1202 l.22541 - e-TeX TeXXeT
d:=half(z-w);
@y
-set_box_lrstat(b)(dlist);
+set_box_lr(b)(dlist);
d:=half(z-w);
@z
%---------------------------------------
@@ -3826,7 +3833,7 @@ else
in right-to-left text.
@<Display if this box is never to be reversed@>=
-if (type(p)=hlist_node)and(box_lrstat(p)=dlist) then print(", display")
+if (type(p)=hlist_node)and(box_lr(p)=dlist) then print(", display")
@ A number of routines are based on a stack of one-word nodes whose
|info| fields contain |end_M_code|, |end_L_code|, or |end_R_code|. The
@@ -3959,19 +3966,19 @@ end
@ @<Initialize |hlist_out| for mixed...@>=
if eTeX_ex then
begin @<Initialize the LR stack@>;
- if box_lrstat(this_box)=dlist then
+ if box_lr(this_box)=dlist then
if cur_dir=right_to_left then
begin cur_dir:=left_to_right; cur_h:=cur_h-width(this_box);
end
else subtype(this_box):=min_quarterword;
- if (cur_dir=right_to_left)and(box_lrstat(this_box)<>reversed) then
+ if (cur_dir=right_to_left)and(box_lr(this_box)<>reversed) then
@<Reverse the complete hlist and set the subtype to |reversed|@>;
end
@ @<Finish |hlist_out| for mixed...@>=
if eTeX_ex then
begin @<Check for LR anomalies at the end of |hlist_out|@>;
- if box_lrstat(this_box)=dlist then cur_dir:=right_to_left;
+ if box_lr(this_box)=dlist then cur_dir:=right_to_left;
end
@ @<Handle a math node in |hlist_out|@>=
@@ -4032,7 +4039,7 @@ append the reversed list, and set the width of the kern node.
@<Reverse the complete hlist...@>=
begin save_h:=cur_h; temp_ptr:=p; p:=new_kern(0); link(prev_p):=p;
cur_h:=0; link(p):=reverse(this_box,null,cur_g,cur_glue); width(p):=-cur_h;
-cur_h:=save_h; set_box_lrstat(this_box)(reversed);
+cur_h:=save_h; set_box_lr(this_box)(reversed);
end
@ We detach the remainder of the hlist, replace the math node by
@@ -4383,7 +4390,7 @@ if j<>null then
begin b:=copy_node_list(j); height(b):=height(p); depth(b):=depth(p);
s:=s-shift_amount(b); d:=d+s; e:=e+width(b)-z-s;
end;
-if box_lrstat(p)=dlist then q:=p {display or equation number}
+if box_lr(p)=dlist then q:=p {display or equation number}
else begin {display and equation number}
r:=list_ptr(p); free_node(p,box_node_size);
if r=null then confusion("LR4");