texlive[65930] Build/source/texk/web2c/xetexdir: compute \topskip,

commits+karl at tug.org commits+karl at tug.org
Sun Feb 19 19:19:41 CET 2023


Revision: 65930
          http://tug.org/svn/texlive?view=revision&revision=65930
Author:   karl
Date:     2023-02-19 19:19:41 +0100 (Sun, 19 Feb 2023)
Log Message:
-----------
compute \topskip, \splittopskip for \XeTeXupwards mode

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/xetexdir/ChangeLog
    trunk/Build/source/texk/web2c/xetexdir/xetex.web

Modified: trunk/Build/source/texk/web2c/xetexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/xetexdir/ChangeLog	2023-02-19 18:14:06 UTC (rev 65929)
+++ trunk/Build/source/texk/web2c/xetexdir/ChangeLog	2023-02-19 18:19:41 UTC (rev 65930)
@@ -1,3 +1,19 @@
+2023-02-19  Martin Hosken  <martin_hosken at 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 at yahoo.co.jp>
 
 	* wcfname.test:

Modified: trunk/Build/source/texk/web2c/xetexdir/xetex.web
===================================================================
--- trunk/Build/source/texk/web2c/xetexdir/xetex.web	2023-02-19 18:14:06 UTC (rev 65929)
+++ trunk/Build/source/texk/web2c/xetexdir/xetex.web	2023-02-19 18:19:41 UTC (rev 65930)
@@ -22995,8 +22995,16 @@
 @ @<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 @@
 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
 



More information about the tex-live-commits mailing list.