diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-19 18:19:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-19 18:19:41 +0000 |
commit | c9056126e44b9ce8ec4583816045710009c83b3b (patch) | |
tree | ccf059253cafb04fce0986ad3aa0846eff25ff01 /Build/source/texk/web2c/xetexdir | |
parent | 745f9363c32f08d6e3b1e201bd2dc870630e9fec (diff) |
compute \topskip, \splittopskip for \XeTeXupwards mode
git-svn-id: svn://tug.org/texlive/trunk@65930 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 16 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/xetex.web | 24 |
2 files changed, 36 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index c20e2a216df..469fd9add49 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,19 @@ +2023-02-19 Martin Hosken <martin_hosken@sil.org> + + * xetex.web (Insert glue for |split_top_skip|...), + (Initialize the current page, insert the \.{\\topskip} glue...) + handle XeTeX_upwards case. + + When \XeTeXupwards mode is active (non-zero) line spacing + calculations are inverted, that is the lineskip is + calculated as \baselineskip - height(line-1) - depth(line), + instead of the normal \baselineskip - depth(line-1) - height(line). + This works fine. + But the lineskip calculation at the top of a page or vsplit needs + also to be inverted (\topskip, \splittopskip); that's what this + change does. + https://github.com/TeX-Live/texlive-source/pull/58 + 2023-02-14 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> * wcfname.test: diff --git a/Build/source/texk/web2c/xetexdir/xetex.web b/Build/source/texk/web2c/xetexdir/xetex.web index 4e2f8965dc8..966ecd7b666 100644 --- a/Build/source/texk/web2c/xetexdir/xetex.web +++ b/Build/source/texk/web2c/xetexdir/xetex.web @@ -22995,8 +22995,16 @@ end; @ @<Insert glue for |split_top_skip|...@>= begin q:=new_skip_param(split_top_skip_code); link(prev_p):=q; link(q):=p; {now |temp_ptr=glue_ptr(q)|} -if width(temp_ptr)>height(p) then width(temp_ptr):=width(temp_ptr)-height(p) -else width(temp_ptr):=0; +if XeTeX_upwards then + begin + if width(temp_ptr)>depth(p) then width(temp_ptr):=width(temp_ptr)-depth(p) + else width(temp_ptr):=0; + end +else + begin + if width(temp_ptr)>height(p) then width(temp_ptr):=width(temp_ptr)-height(p) + else width(temp_ptr):=0; + end; p:=null; end @@ -23632,8 +23640,16 @@ endcases begin if page_contents=empty then freeze_page_specs(box_there) else page_contents:=box_there; q:=new_skip_param(top_skip_code); {now |temp_ptr=glue_ptr(q)|} -if width(temp_ptr)>height(p) then width(temp_ptr):=width(temp_ptr)-height(p) -else width(temp_ptr):=0; +if XeTeX_upwards then + begin + if width(temp_ptr)>depth(p) then width(temp_ptr):=width(temp_ptr)-depth(p) + else width(temp_ptr):=0; + end +else + begin + if width(temp_ptr)>height(p) then width(temp_ptr):=width(temp_ptr)-height(p) + else width(temp_ptr):=0; + end; link(q):=p; link(contrib_head):=q; goto continue; end |