diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/Makefile.in | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/ChangeLog.TL | 15 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/am/eptex.am | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/eptex-base.ch | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/eptex.ech | 22 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/etex.ch1 | 25 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/pdfsavepos.ch | 283 | ||||
-rw-r--r-- | Build/source/texk/web2c/etexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/etexdir/etex.ch | 32 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ChangeLog | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ptex-base.ch | 62 | ||||
-rw-r--r-- | Build/source/utils/biber/TeXLive/TLUtils.pm | 4 |
12 files changed, 414 insertions, 48 deletions
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index b64748cb903..972f66dd76f 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -1793,6 +1793,7 @@ eptex_ch_srcs = \ eptexdir/etex.ch1 \ eptexdir/fam256.ch \ eptexdir/pdfstrcmp.ch \ + eptexdir/pdfsavepos.ch \ tex-binpool.ch pdftex_cppflags = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) \ diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog.TL b/Build/source/texk/web2c/eptexdir/ChangeLog.TL index 3c645b56958..6486175f987 100644 --- a/Build/source/texk/web2c/eptexdir/ChangeLog.TL +++ b/Build/source/texk/web2c/eptexdir/ChangeLog.TL @@ -1,6 +1,21 @@ ChangeLog.TL: TeX Live (TL) changes for e-pTeX ============================================== +2011-03-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + e-pTeX update eptex-110315_tlsvn110318.diff [ptex:00248] + from Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>. + + * eptex.ech: Update pTeX_version_string. + Redefine box_dir and set_box_dir from pTeX as well as box_lrstat + and set_box_lrstat from e-TeX to avoid interference. + + * pdfsavepos.ch (new): Implement \pdfsavepos primitive. + * am/eptex.am (eptex_ch_srcs): Add pdfsavepos.ch. + + * etex.ch1: Adapt to use of set_box_dir in ../ptexdir/ptex-base.ch. + Adapt to "setting/reading a box register dimension" bug fix. + 2011-01-19 Peter Breitenlohner <peb@mppmu.mpg.de> * eptex.ech, etex.ch0: Adapt to modified ../ptexdir/ptex-base.ch. diff --git a/Build/source/texk/web2c/eptexdir/am/eptex.am b/Build/source/texk/web2c/eptexdir/am/eptex.am index 5b399622111..015cd56f466 100644 --- a/Build/source/texk/web2c/eptexdir/am/eptex.am +++ b/Build/source/texk/web2c/eptexdir/am/eptex.am @@ -78,6 +78,7 @@ eptex_ch_srcs = \ eptexdir/etex.ch1 \ eptexdir/fam256.ch \ eptexdir/pdfstrcmp.ch \ + eptexdir/pdfsavepos.ch \ tex-binpool.ch EXTRA_DIST += $(eptex_web_srcs) $(eptex_ch_srcs) eptexdir/eptex.defines diff --git a/Build/source/texk/web2c/eptexdir/eptex-base.ch b/Build/source/texk/web2c/eptexdir/eptex-base.ch index 5555620f9b1..04aea3426e3 100644 --- a/Build/source/texk/web2c/eptexdir/eptex-base.ch +++ b/Build/source/texk/web2c/eptexdir/eptex-base.ch @@ -23,6 +23,7 @@ % + eptexdir/etex.ch1 glue % + eptexdir/fam256.ch borrowed from Omega % + eptexdir/pdfstrcmp.ch borrowed from pdfTeX +% + eptexdir/pdfsavepos.ch borrowed from pdfTeX % + tex-binpool.ch compiled pool file % % where the three small files denoted as glue resolve incompatibilities diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech index 868e1b2641e..3c16e9b26bb 100644 --- a/Build/source/texk/web2c/eptexdir/eptex.ech +++ b/Build/source/texk/web2c/eptexdir/eptex.ech @@ -11,7 +11,7 @@ @x [1.2] l.200 - pTeX: @d pTeX_version_string=='-p3.1.11' {current p\TeX\ version} @y -@d pTeX_version_string=='-p3.1.11-110102' {current \epTeX\ version} +@d pTeX_version_string=='-p3.1.11-110315' {current \epTeX\ version} @z @x e-pTeX: banner @@ -20,7 +20,7 @@ {printed when p\TeX\ starts} @# @d epTeX_version==pTeX_version_string,eTeX_version_string -@d epTeX_banner=='This is epTeX, Version 3.1415926',epTeX_version +@d epTeX_banner=='This is e-pTeX, Version 3.1415926',epTeX_version @d epTeX_banner_k==epTeX_banner {printed when \epTeX\ starts} @z @@ -31,6 +31,14 @@ @d max_quarterword=@"FFFF {largest allowable value in a |quarterword|} @z +@x +@d box_dir(#) == subtype(#) {direction mode of a box} +@d set_box_dir(#) == subtype(#):=set_box_dir_end +@y +@d box_dir(#) == (subtype(#)mod 8) {direction mode of a box} +@d set_box_dir(#) == subtype(#):=(subtype(#)div 8)*8+set_box_dir_end +@z + @x [26.424] e-pTeX: node types last_node_type_code: if (type(tail)<>math_node)or(subtype(tail)<>end_M_code) then @@ -58,6 +66,16 @@ @d if_tdir_code=if_case_code+4 { `\.{\\iftdir}' } @z +@x +@d box_lrstat(#) == subtype(#) {direction mode of a box} +@d set_box_lrstat(#) == subtype(#):=set_box_lrstat_end +@d set_box_lrstat_end(#) == # +@y +@d box_lrstat(#) == (subtype(#)div 8) {direction mode of a box} +@d set_box_lrstat(#) == subtype(#):=(subtype(#)mod 8)+8*set_box_lrstat_end +@d set_box_lrstat_end(#) == (#) +@z + @x e-pTeX: font_char_{wd,ht,dp,ic}_code l.27306 begin i:=char_info(q)(qi(cur_val)); @y diff --git a/Build/source/texk/web2c/eptexdir/etex.ch1 b/Build/source/texk/web2c/eptexdir/etex.ch1 index a722016c77e..37c0c36c1d3 100644 --- a/Build/source/texk/web2c/eptexdir/etex.ch1 +++ b/Build/source/texk/web2c/eptexdir/etex.ch1 @@ -36,14 +36,16 @@ else begin q:=box(cur_val); while (q<>null)and(box_dir(q)<>abs(direction)) do q:=link(q); if q=null then - begin q:=new_dir_node(box(cur_val),abs(direction)); + begin r:=link(box(cur_val)); link(box(cur_val)):=null; + q:=new_dir_node(box(cur_val),abs(direction)); link(box(cur_val)):=r; @y if q=null then cur_val:=0 else begin qx:=q; while (q<>null)and(box_dir(q)<>abs(direction)) do q:=link(q); if q=null then - begin q:=new_dir_node(qx,abs(direction)); + begin r:=link(qx); link(qx):=null; + q:=new_dir_node(qx,abs(direction)); link(qx):=r; @z @x [27.468] @@ -113,12 +115,12 @@ hpack:=r; q:=prune_page_top(q); p:=list_ptr(v); if q=null then box(n):=null {the |eq_level| of the box stays the same} else begin - box(n):=vpack(q,natural); box_dir(box(n)):=box_dir(v); + box(n):=vpack(q,natural); set_box_dir(box(n))(box_dir(v)); end; @y q:=prune_page_top(q,saving_vdiscards>0); p:=list_ptr(v); if q<>null then begin - q:=vpack(q,natural); box_dir(q):=box_dir(v); + q:=vpack(q,natural); set_box_dir(q)(box_dir(v)); end; change_box(q); @z @@ -152,10 +154,10 @@ change_box(q); if type(tail)=cur_chr then @z @x [47.1105] - begin prev_node:=tail; prev_disp:=disp; tail_append(d) - end + begin prev_node:=tail; prev_disp:=disp; tail_append(d); + end; @y - begin prev_node:=tail; prev_disp:=disp; tail_append(d) + begin prev_node:=tail; prev_disp:=disp; tail_append(d); end; if LR_temp<>null then insert_end_M; end; @@ -192,9 +194,14 @@ if b<>null then begin q:=b; p:=link(q); @z @x [49.1247] - link(q):=link(box(b)); link(box(b)):=q; + begin p:=link(box(b)); link(box(b)):=null; +@y + begin p:=link(b); link(b):=null; +@z +@x [49.1247] + link(q):=p; link(box(b)):=q; @y - link(q):=link(b); link(b):=q; + link(q):=p; link(b):=q; @z @x [49.1291] diff --git a/Build/source/texk/web2c/eptexdir/pdfsavepos.ch b/Build/source/texk/web2c/eptexdir/pdfsavepos.ch new file mode 100644 index 00000000000..fefe3151bae --- /dev/null +++ b/Build/source/texk/web2c/eptexdir/pdfsavepos.ch @@ -0,0 +1,283 @@ +% last update: 2011/3/15 + +@x +@d dimen_pars=23 {total number of dimension parameters} +@y +@d pdf_page_width_code=23 {page width} +@d pdf_page_height_code=24 {page height} +@d dimen_pars=25 {total number of dimension parameters} +@z + +@x +@d emergency_stretch==dimen_par(emergency_stretch_code) +@y +@d emergency_stretch==dimen_par(emergency_stretch_code) +@d pdf_page_width==dimen_par(pdf_page_width_code) +@d pdf_page_height==dimen_par(pdf_page_height_code) +@z + +@x +emergency_stretch_code:print_esc("emergencystretch"); +@y +emergency_stretch_code:print_esc("emergencystretch"); +pdf_page_width_code: print_esc("pdfpagewidth"); +pdf_page_height_code: print_esc("pdfpageheight"); +@z + +@x +@d badness_code=input_line_no_code+1 {code for \.{\\badness}} +@y +@d badness_code=input_line_no_code+1 {code for \.{\\badness}} +@d pdf_last_x_pos_code=badness_code+1 {code for \.{\\pdflastxpos}} +@d pdf_last_y_pos_code=pdf_last_x_pos_code+1 {code for \.{\\pdflastypos}} +@z + +@x +@d eTeX_int=badness_code+1 {first of \eTeX\ codes for integers} +@y +@d eTeX_int=pdf_last_y_pos_code+1 {first of \eTeX\ codes for integers} +@z + +@x +@d etex_convert_codes=etex_convert_base+2 {end of \eTeX's command codes} +@y +@d etex_convert_codes=etex_convert_base+3 {end of \eTeX's command codes} +@z + +@x +@ @<Initialize variables as |ship_out| begins@>= +@y +@ @<Initialize variables as |ship_out| begins@>= +@<Calculate DVI page dimensions and margins@>; +@z + +@x +@!old_setting:0..max_selector; {saved |selector| setting} +begin if tracing_output>0 then +@y +@!old_setting:0..max_selector; {saved |selector| setting} +@!t: scaled; +begin if tracing_output>0 then +@z + +@x +@d set_language_code=5 {command modifier for \.{\\setlanguage}} +@y +@d set_language_code=5 {command modifier for \.{\\setlanguage}} +@d TeX_extension_end=5 +@d pdf_save_pos_node=TeX_extension_end+1 +@z + +@x + set_language_code:print_esc("setlanguage"); +@y + set_language_code:print_esc("setlanguage"); + pdf_save_pos_node: print_esc("pdfsavepos"); +@z + +@x +set_language_code:@<Implement \.{\\setlanguage}@>; +@y +set_language_code:@<Implement \.{\\setlanguage}@>; +pdf_save_pos_node: @<Implement \.{\\pdfsavepos}@>; +@z + +@x + print_int(what_lhm(p)); print_char(","); + print_int(what_rhm(p)); print_char(")"); + end; +@y + print_int(what_lhm(p)); print_char(","); + print_int(what_rhm(p)); print_char(")"); + end; +pdf_save_pos_node: print_esc("pdfsavepos"); +@z + +@x +close_node,language_node: begin r:=get_node(small_node_size); + words:=small_node_size; + end; +@y +close_node,language_node: begin r:=get_node(small_node_size); + words:=small_node_size; + end; +pdf_save_pos_node: + r := get_node(small_node_size); +@z + +@x +close_node,language_node: free_node(p,small_node_size); +@y +close_node,language_node: free_node(p,small_node_size); +pdf_save_pos_node: free_node(p, small_node_size); +@z + +@x +procedure special_out(@!p:pointer); +var old_setting:0..max_selector; {holds print |selector|} +@!k:pool_pointer; {index into |str_pool|} +@y +procedure special_out(@!p:pointer); +label done; +var old_setting:0..max_selector; {holds print |selector|} +@!k:pool_pointer; {index into |str_pool|} +@!s,@!t,@!cw: scaled; +@!bl: boolean; +@!i: small_number; +@z + +@x +pool_ptr:=str_start[str_ptr]; {erase the string} +@y +@<Determine whether this \.{\\special} is a papersize special@>; +done: pool_ptr:=str_start[str_ptr]; {erase the string} +@z + +@x +language_node:do_nothing; +@y +language_node:do_nothing; +pdf_save_pos_node: + @<Save current position in DVI mode@>; +@z + +@x +primitive("pdfstrcmp",convert,pdf_strcmp_code);@/ +@!@:pdf_strcmp_}{\.{\\pdfstrcmp} primitive@> +@y +primitive("pdfstrcmp",convert,pdf_strcmp_code);@/ +@!@:pdf_strcmp_}{\.{\\pdfstrcmp} primitive@> +primitive("pdfsavepos",extension,pdf_save_pos_node);@/ +@!@:pdf_save_pos_}{\.{\\pdfsavepos} primitive@> +primitive("pdfpagewidth",assign_dimen,dimen_base+pdf_page_width_code);@/ +@!@:pdf_page_width_}{\.{\\pdfpagewidth} primitive@> +primitive("pdfpageheight",assign_dimen,dimen_base+pdf_page_height_code);@/ +@!@:pdf_page_height_}{\.{\\pdfpageheight} primitive@> +primitive("pdflastxpos",last_item,pdf_last_x_pos_code);@/ +@!@:pdf_last_x_pos_}{\.{\\pdflastxpos} primitive@> +primitive("pdflastypos",last_item,pdf_last_y_pos_code);@/ +@!@:pdf_last_y_pos_}{\.{\\pdflastypos} primitive@> +@z + +@x +eTeX_version_code: print_esc("eTeXversion"); +@y +eTeX_version_code: print_esc("eTeXversion"); +pdf_last_x_pos_code: print_esc("pdflastxpos"); +pdf_last_y_pos_code: print_esc("pdflastypos"); +@z + +@x +eTeX_version_code: cur_val:=eTeX_version; +@y +eTeX_version_code: cur_val:=eTeX_version; +pdf_last_x_pos_code: cur_val := pdf_last_x_pos; +pdf_last_y_pos_code: cur_val := pdf_last_y_pos; +@z + + +@x +@* \[54] System-dependent changes. +@y +@ Next, we implement \.{\\pdfsavepos} and its related primitives. + +@<Glob...@>= +@!cur_page_width: scaled; {width of page being shipped} +@!cur_page_height: scaled; {height of page being shipped} +@!pdf_last_x_pos: integer; +@!pdf_last_y_pos: integer; + +@ @<Implement \.{\\pdfsavepos}@>= +begin + new_whatsit(pdf_save_pos_node, small_node_size); +end + +@ @<Save current position in DVI mode@>= +begin + case dvi_dir of + dir_yoko: begin pdf_last_x_pos := cur_h; pdf_last_y_pos := cur_v; end; + dir_tate: begin pdf_last_x_pos := -cur_v; pdf_last_y_pos := cur_h; end; + dir_dtou: begin pdf_last_x_pos := cur_v; pdf_last_y_pos := -cur_h; end; + endcases; + pdf_last_x_pos := pdf_last_x_pos + 4736286; + case dvi_dir of + dir_tate,dir_dtou: + pdf_last_y_pos := cur_page_width - pdf_last_y_pos - 4736286; + dir_yoko: + pdf_last_y_pos := cur_page_height - pdf_last_y_pos - 4736286; + endcases; + {4736286 = 1in, the funny DVI origin offset} +end + +@ @<Calculate DVI page dimensions and margins@>= + if pdf_page_height <> 0 then + cur_page_height := pdf_page_height + else + cur_page_height := height(p) + depth(p) + 2*v_offset + 2*4736286; + if pdf_page_width <> 0 then + cur_page_width := pdf_page_width + else + cur_page_width := width(p) + 2*h_offset + 2*4736286; + if (type(p)=dir_node) then + if (box_dir(list_ptr(p))=dir_tate)or(box_dir(list_ptr(p))=dir_dtou) then begin + t:=cur_page_height; cur_page_height:=cur_page_width; + cur_page_width:=t; end; + + +@ Of course \epTeX\ can produce a \.{DVI} file only, not a PDF file. +A \.{DVI} file does not have the information of the page height, +which is needed to implement \.{\\pdflastypos} correctly. +To keep the information of the page height, I (H.~Kitagawa) +adopted \.{\\pdfpageheight} primitive from pdf\TeX. However, in \pTeX (and \epTeX), +the papersize special \.{\\special\{papersize=|width|,|height|\}} is commonly used +for specifying page width/height. Hence, I decided that the papersize special also +changes the value of \.{\\pdfpagewidth} and \.{\\pdfpageheight}. +The following routine does this. + +In present implementation, the ``valid'' papersize special, which can be interpreted by +this routine, is in the following form: +$$\hbox{.{\\special\{papersize=$x$pt,$y$pt\}}}$$ +where $x$\,pt and $y$\, pt are positive dimensions which \TeX\ can comprehend. +No spaces are allowed in the above form, and only ``pt'' is allowed for unit, for simplicity. + +@d ifps==if k=pool_ptr then goto done else if +@d sop(#)==so(str_pool[(#)]) + +@<Determine whether this \.{\\special} is a papersize special@>= +if pool_ptr-str_start[str_ptr]<=10 then goto done; +k:=str_start[str_ptr]; +if (sop(k+0)<>'p')or(sop(k+1)<>'a')or(sop(k+2)<>'p')or + (sop(k+3)<>'e')or(sop(k+4)<>'r')or(sop(k+5)<>'s')or + (sop(k+6)<>'i')or(sop(k+7)<>'z')or(sop(k+8)<>'e') then goto done; +k:=k+9; ifps sop(k)='=' then incr(k); +@<Read dimensions in the argument in the papersize special@>; +incr(k); ifps sop(k)<>',' then goto done else incr(k); cw:=t; +@<Read dimensions in the argument in the papersize special@>; +geq_word_define(dimen_base+pdf_page_width_code,cw); +geq_word_define(dimen_base+pdf_page_height_code,t); +cur_page_height := t; cur_page_width := cw; +if (dvi_dir=dir_tate)or(dvi_dir=dir_dtou) then begin + t:=cur_page_height; cur_page_height:=cur_page_width; + cur_page_width:=t; end; + +@ @<Read dimensions in the argument in the papersize special@>= +s:=1; t:=0; bl:=true; +while (k<pool_ptr)and(bl) do begin + if (sop(k)>='0')and (sop(k)<='9') then begin t:=10*t+sop(k)-'0'; incr(k); end + else begin bl:=false; end; +end; +t:=t*unity; +ifps sop(k)='.' then begin incr(k); bl:=true; i:=0; + while (k<pool_ptr)and(bl)and(i<=17) do begin + if (sop(k)>='0')and (sop(k)<='9') then begin + dig[i]:=sop(k)-'0'; incr(k); incr(i); end + else begin bl:=false; incr(k); incr(i); end; + end; + t:=s*(t+round_decimals(i-1)); +end +else if (sop(k)>='0')and(sop(k)<='9') then goto done +else begin t:=s*t; incr(k); end; +ifps sop(k-1)<>'p' then goto done; ifps sop(k)<>'t' then goto done; + +@* \[54] System-dependent changes. +@z diff --git a/Build/source/texk/web2c/etexdir/ChangeLog b/Build/source/texk/web2c/etexdir/ChangeLog index c7c022fe36f..e8a7bd6d899 100644 --- a/Build/source/texk/web2c/etexdir/ChangeLog +++ b/Build/source/texk/web2c/etexdir/ChangeLog @@ -1,3 +1,8 @@ +2011-03-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + * etex.ch: Define and use the Web macros box_lrstat and + set_box_lrstat to reduce interferences between e-TeX and pTeX. + 2011-01-17 Peter Breitenlohner <peb@mppmu.mpg.de> * am/etex.am (etrip.diffs): Use $(triptrap_diffs). diff --git a/Build/source/texk/web2c/etexdir/etex.ch b/Build/source/texk/web2c/etexdir/etex.ch index 72d409b5c78..8bc763d5063 100644 --- a/Build/source/texk/web2c/etexdir/etex.ch +++ b/Build/source/texk/web2c/etexdir/etex.ch @@ -121,6 +121,9 @@ % fixed the error messages for improper use of \protected, % reported by Heiko Oberdiek % <heiko.oberdiek@@googlemail.com>, May 2010. +% some trivial rearrangements to reduce interferences between +% e-TeX and pTeX, suggested by Hironori Kitagawa +% <h_kitagawa2001@yahoo.co.jp>, Mar 2011. % Although considerable effort has been expended to make the e-TeX program % correct and reliable, no warranty is implied; the author disclaims any @@ -1524,9 +1527,12 @@ changes; the subtype of an an |hlist_node| inside R-text is changed to @x [32] m.616 l.12259 - e-TeX TeXXeT @d synch_h==if cur_h<>dvi_h then @y -@d reversed=min_quarterword+1 {subtype for an |hlist_node| whose hlist - has been reversed} -@d dlist=min_quarterword+2 {subtype for an |hlist_node| from display math mode} +@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 left_to_right=0 @d right_to_left=1 @d reflected==1-cur_dir {the opposite of |cur_dir|} @@ -1775,14 +1781,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 subtype(q):=dlist; {for |ship_out|} + if nest[nest_ptr-1].mode_field=mmode then set_box_lrstat(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; -subtype(r):=min_quarterword; {for |ship_out|} +set_box_lrstat(r)(0); {for |ship_out|} @z %--------------------------------------- @x [38] m.814 l.16009 - e-TeX penalties @@ -2569,7 +2575,7 @@ begin danger:=false; mlist_to_hlist; a:=hpack(link(temp_head),natural); @y mlist_to_hlist; a:=hpack(link(temp_head),natural); - subtype(a):=dlist; + set_box_lrstat(a)(dlist); @z %--------------------------------------- @x [48] m.1194 l.22397 after_math - e-TeX TeXXeT @@ -2596,7 +2602,7 @@ resume_after_display @x [48] m.1202 l.22541 - e-TeX TeXXeT d:=half(z-w); @y -subtype(b):=dlist; +set_box_lrstat(b)(dlist); d:=half(z-w); @z %--------------------------------------- @@ -3785,7 +3791,7 @@ else in right-to-left text. @<Display if this box is never to be reversed@>= -if (type(p)=hlist_node)and(subtype(p)=dlist) then print(", display") +if (type(p)=hlist_node)and(box_lrstat(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 @@ -3918,19 +3924,19 @@ end @ @<Initialize |hlist_out| for mixed...@>= if eTeX_ex then begin @<Initialize the LR stack@>; - if subtype(this_box)=dlist then + if box_lrstat(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(subtype(this_box)<>reversed) then + if (cur_dir=right_to_left)and(box_lrstat(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 subtype(this_box)=dlist then cur_dir:=right_to_left; + if box_lrstat(this_box)=dlist then cur_dir:=right_to_left; end @ @<Handle a math node in |hlist_out|@>= @@ -3991,7 +3997,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; subtype(this_box):=reversed; +cur_h:=save_h; set_box_lrstat(this_box)(reversed); end @ We detach the remainder of the hlist, replace the math node by @@ -4342,7 +4348,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 subtype(p)=dlist then q:=p {display or equation number} +if box_lrstat(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"); diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index 94a3d1174a7..08d46be7319 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,14 @@ +2011-03-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + e-pTeX update eptex-110315_tlsvn110318.diff [ptex:00248] + from Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * ptex-base.ch: Define and use the Web macro set_box_dir + to reduce interferences between e-TeX and pTeX. + Fixed a bug around \radical with Japanese character. + Fixed a bug in setting/reading a dimension of a box register in + "different" directions. + 2011-01-19 Peter Breitenlohner <peb@mppmu.mpg.de> * ptex-base.ch: Let \lastkern etc act through disp node. diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index 7fe65d7d6df..179643abe83 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -338,6 +338,9 @@ if last<>first then for k:=first to last-1 do print(buffer[k]); @d box_node_size=8 {number of words to allocate for a box node} @# @d box_dir(#) == subtype(#) {direction mode of a box} +@d set_box_dir(#) == subtype(#):=set_box_dir_end +@d set_box_dir_end(#) == # +@# @d dir_default = 0 {direction of the box, default Left to Right} @d dir_dtou = 1 {direction of the box, Bottom to Top} @d dir_tate = 3 {direction of the box, Top to Bottom} @@ -388,7 +391,7 @@ add_glue_ref(zero_glue); add_glue_ref(zero_glue); @p function new_dir_node(b:pointer; dir:eight_bits):pointer; var p:pointer; {the new node} begin if type(b)>vlist_node then confusion("new_dir_node:not box"); -p:=new_null_box; type(p):=dir_node; box_dir(p):=dir; +p:=new_null_box; type(p):=dir_node; set_box_dir(p)(dir); case box_dir(b) of dir_yoko: @<Yoko to other direction@>; dir_tate: @<Tate to other direction@>; @@ -1924,7 +1927,7 @@ def_code: @<Fetch a character code from some table@>; toks_register,assign_toks,def_family,set_font,def_font: @<Fetch a token list or font identifier, provided that |level=tok_val|@>; @y -@!q:pointer; +@!q,@!r:pointer; begin m:=cur_chr; case cur_cmd of assign_kinsoku: @<Fetch breaking penalty from some table@>; @@ -1957,7 +1960,8 @@ else begin q:=box(cur_val); while (q<>null)and(box_dir(q)<>abs(direction)) do q:=link(q); if q=null then - begin q:=new_dir_node(box(cur_val),abs(direction)); + begin r:=link(box(cur_val)); link(box(cur_val)):=null; + q:=new_dir_node(box(cur_val),abs(direction)); link(box(cur_val)):=r; cur_val:=mem[q+m].sc; delete_glue_ref(space_ptr(q)); delete_glue_ref(xspace_ptr(q)); free_node(q,box_node_size); @@ -3236,6 +3240,18 @@ internal kanji code number. @d math_text_jchar=6 @z +@x [34.683] radical with japanese char +@d left_delimiter(#)==#+4 {first delimiter field of a noad} +@d right_delimiter(#)==#+5 {second delimiter field of a fraction noad} +@d radical_noad=inner_noad+1 {|type| of a noad for square roots} +@d radical_noad_size=5 {number of |mem| words in a radical noad} +@y +@d left_delimiter(#)==#+5 {first delimiter field of a noad} +@d right_delimiter(#)==#+4 {second delimiter field of a fraction noad} +@d radical_noad=inner_noad+1 {|type| of a noad for square roots} +@d radical_noad_size=6 {number of |mem| words in a radical noad} +@z + @x [34.686] l.14129 - pTeX: new_noad mem[supscr(p)].hh:=empty_field; new_noad:=p; @@ -3705,7 +3721,7 @@ glue_order(q):=glue_order(p); glue_sign(q):=glue_sign(p); glue_set(q):=glue_set(p); shift_amount(q):=o; r:=link(list_ptr(q)); s:=link(list_ptr(p)); @y -box_dir(q):=abs(direction); +set_box_dir(q)(abs(direction)); glue_order(q):=glue_order(p); glue_sign(q):=glue_sign(p); glue_set(q):=glue_set(p); shift_amount(q):=o; r:=link(list_ptr(q)); s:=link(list_ptr(p)); @@ -3721,7 +3737,7 @@ s:=link(s); link(u):=new_null_box; u:=link(u); t:=t+width(s); if mode=-vmode then width(u):=width(s)@+else begin type(u):=vlist_node; height(u):=width(s); end; -box_dir(u):=abs(direction) +set_box_dir(u)(abs(direction)) @z @x [37.810] l.16564 - pTeX: unset box -> BOX @@ -3729,7 +3745,7 @@ width(r):=w; type(r):=hlist_node; end @y width(r):=w; type(r):=hlist_node; -box_dir(r):=abs(direction); +set_box_dir(r)(abs(direction)); end @z @@ -3737,7 +3753,7 @@ end height(r):=w; type(r):=vlist_node; @y height(r):=w; type(r):=vlist_node; -box_dir(r):=abs(direction); +set_box_dir(r)(abs(direction)); @z @x [38.816] l.16687 - pTeX: init chain, delete disp_node @@ -4141,10 +4157,10 @@ vsplit:=vpackage(p,h,exactly,split_max_depth); q:=prune_page_top(q); p:=list_ptr(v); if q=null then box(n):=null {the |eq_level| of the box stays the same} else begin - box(n):=vpack(q,natural); box_dir(box(n)):=box_dir(v); + box(n):=vpack(q,natural); set_box_dir(box(n))(box_dir(v)); end; q:=vpackage(p,h,exactly,split_max_depth); -box_dir(q):=box_dir(v); +set_box_dir(q)(box_dir(v)); delete_glue_ref(space_ptr(v)); delete_glue_ref(xspace_ptr(v)); free_node(v,box_node_size); vsplit:=q; @@ -4227,7 +4243,7 @@ else box(255):=vpackage(link(page_head),best_size,exactly,page_max_depth); @y box(255):=vpackage(link(page_head),best_size,exactly,page_max_depth); -box_dir(box(255)):=page_dir; +set_box_dir(box(255))(page_dir); @z @x [45.1020] l.20513 - pTeX: check ins_dir @@ -4249,7 +4265,7 @@ else begin wait:=false; box(n):=new_null_box; last_ins_ptr(r):=box(n)+list_offset; end; othercases - box_dir(box(n)):=ins_dir(p); + set_box_dir(box(n))(ins_dir(p)); endcases; s:=last_ins_ptr(r); link(s):=ins_ptr(p); @z @@ -4270,7 +4286,7 @@ delete_glue_ref(space_ptr(box(n))); delete_glue_ref(xspace_ptr(box(n))); flush_node_list(link(box(n))); free_node(box(n),box_node_size); -box(n):=vpack(temp_ptr,natural); box_dir(box(n)):=ins_dir(p); +box(n):=vpack(temp_ptr,natural); set_box_dir(box(n))(ins_dir(p)); @z @x [46.1030] l.20687 - pTeX:main_control @@ -4677,7 +4693,7 @@ if type(cur_box)=dir_node then list_ptr(link(cur_box)):=null; end else - if box_dir(cur_box)=dir_default then box_dir(cur_box):=abs(direction); + if box_dir(cur_box)=dir_default then set_box_dir(cur_box)(abs(direction)); done:end @z @@ -4739,10 +4755,10 @@ begin d:=box_max_depth; unsave; save_ptr:=save_ptr-3; if mode=-hmode then begin cur_box:=hpack(link(head),saved(2),saved(1)); - box_dir(cur_box):=abs(direction); pop_nest; + set_box_dir(cur_box)(abs(direction)); pop_nest; end else begin cur_box:=vpackage(link(head),saved(2),saved(1),d); - box_dir(cur_box):=abs(direction); pop_nest; + set_box_dir(cur_box)(abs(direction)); pop_nest; if c=vtop_code then @<Readjust the height and depth of |cur_box|, for \.{\\vtop}@>; end; @@ -4814,7 +4830,7 @@ insert_group: begin end_graf; q:=split_top_skip; add_glue_ref(q); insert_group: begin end_graf; q:=split_top_skip; add_glue_ref(q); d:=split_max_depth; f:=floating_penalty; unsave; decr(save_ptr); {now |saved(0)| is the insertion number, or 255 for |vadjust|} - p:=vpack(link(head),natural); box_dir(p):=abs(direction); pop_nest; + p:=vpack(link(head),natural); set_box_dir(p)(abs(direction)); pop_nest; if saved(0)<255 then begin r:=get_node(ins_node_size); type(r):=ins_node; subtype(r):=qi(saved(0)); @@ -4930,11 +4946,12 @@ else begin {|free_node(tail,small_node_size)|} else disp_dimen(tail):=disp_dimen(d); if f then free_node(d,small_node_size) - else begin prev_node:=tail; prev_disp:=disp; tail_append(d) end + else begin prev_node:=tail; prev_disp:=disp; tail_append(d); + end; end else - begin prev_node:=tail; prev_disp:=disp; tail_append(d) - end + begin prev_node:=tail; prev_disp:=disp; tail_append(d); + end; end; exit:end; @z @@ -5383,7 +5400,7 @@ vcenter_group: begin end_graf; unsave; save_ptr:=save_ptr-2; @y vcenter_group: begin end_graf; unsave; save_ptr:=save_ptr-2; p:=vpack(link(head),saved(1),saved(0)); - box_dir(p):=abs(direction); pop_nest; + set_box_dir(p)(abs(direction)); pop_nest; if box_dir(p)<>abs(direction) then p:=new_dir_node(p,abs(direction)); tail_append(new_noad); type(tail):=vcenter_noad; math_type(nucleus(tail)):=sub_box; info(nucleus(tail)):=p; @@ -5646,8 +5663,9 @@ if box(b)<>null then p:=link(p); end; if box_dir(q)<>abs(direction) then - begin q:=new_dir_node(q,abs(direction)); list_ptr(q):=null; - link(q):=link(box(b)); link(box(b)):=q; + begin p:=link(box(b)); link(box(b)):=null; + q:=new_dir_node(q,abs(direction)); list_ptr(q):=null; + link(q):=p; link(box(b)):=q; end; mem[q+c].sc:=cur_val; end; diff --git a/Build/source/utils/biber/TeXLive/TLUtils.pm b/Build/source/utils/biber/TeXLive/TLUtils.pm index f8d921dea14..dda38e50936 100644 --- a/Build/source/utils/biber/TeXLive/TLUtils.pm +++ b/Build/source/utils/biber/TeXLive/TLUtils.pm @@ -1,4 +1,4 @@ -# $Id: TLUtils.pm 21714 2011-03-14 21:27:26Z karl $ +# $Id: TLUtils.pm 21755 2011-03-18 08:36:58Z peter $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. # Copyright 2007, 2008, 2009, 2010 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 @@ -6,7 +6,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 21714 $'; +my $svnrev = '$Revision: 21755 $'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; |