texlive[41762] Build/source/texk/web2c/eptexdir: eptexdir: H.

commits+kakuto at tug.org commits+kakuto at tug.org
Fri Jul 29 12:32:57 CEST 2016


Revision: 41762
          http://tug.org/svn/texlive?view=revision&revision=41762
Author:   kakuto
Date:     2016-07-29 12:32:56 +0200 (Fri, 29 Jul 2016)
Log Message:
-----------
eptexdir: H. Kitagawa ipmroves \pdfsavepos in e-(u)pTeX

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/eptexdir/ChangeLog
    trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch

Modified: trunk/Build/source/texk/web2c/eptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2016-07-29 01:10:25 UTC (rev 41761)
+++ trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2016-07-29 10:32:56 UTC (rev 41762)
@@ -1,3 +1,7 @@
+2016-07-29  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* pdfutils.ch: Improve \pdfsavepos as pointed out by N. Abe.
+
 2016-03-04  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* etex.ch1: Adapt to changes in ptexdir/ptex-base.ch.

Modified: trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch	2016-07-29 01:10:25 UTC (rev 41761)
+++ trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch	2016-07-29 10:32:56 UTC (rev 41762)
@@ -945,7 +945,7 @@
   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;
+    pdf_last_y_pos := cur_page_height - pdf_last_y_pos - 4736286;
   dir_yoko:
     pdf_last_y_pos := cur_page_height - pdf_last_y_pos - 4736286;
   endcases;
@@ -955,16 +955,24 @@
 @ @<Calculate DVI page dimensions and margins@>=
   if pdf_page_height <> 0 then
     cur_page_height := pdf_page_height
+  else if (type(p)=dir_node) then begin
+    if (box_dir(list_ptr(p))=dir_tate)or(box_dir(list_ptr(p))=dir_dtou) then
+        cur_page_height := width(p) + 2*v_offset + 2*4736286
+    else
+      cur_page_height := height(p) + depth(p) + 2*v_offset + 2*4736286;
+    end
   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 if (type(p)=dir_node) then begin
+    if (box_dir(list_ptr(p))=dir_tate)or(box_dir(list_ptr(p))=dir_dtou) then
+      cur_page_width := height(p) + depth(p) + 2*h_offset + 2*4736286
+    else
+      cur_page_width := width(p) + 2*h_offset + 2*4736286;
+    end
   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.



More information about the tex-live-commits mailing list