[latex3-commits] [git/LaTeX3-latex3-graphics-def] fixpagecolor: change pagecolor to use hook with luatex (0ad446a)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Aug 26 09:51:34 CEST 2020


Repository : https://github.com/latex3/graphics-def
On branch  : fixpagecolor
Link       : https://github.com/latex3/graphics-def/commit/0ad446a4b97a969eb5de77d0019d2806c549130c

>---------------------------------------------------------------

commit 0ad446a4b97a969eb5de77d0019d2806c549130c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Aug 26 09:51:34 2020 +0200

    change pagecolor to use hook with luatex


>---------------------------------------------------------------

0ad446a4b97a969eb5de77d0019d2806c549130c
 luatex.def | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/luatex.def b/luatex.def
index ae4c3ae..31ded88 100644
--- a/luatex.def
+++ b/luatex.def
@@ -126,6 +126,32 @@
 \def\no at page@color{%
   \global\GPT at pagecolorfalse
 }
+\def\@tempa{LaTeX2e}%
+\ifx\fmtname\@tempa
+  \expandafter\@firstofone
+\else
+  \expandafter\@gobble
+\fi
+ {%
+ \@ifl at t@r\fmtversion{2020/10/01}
+  {%
+    \def\set at page@color{%
+     \global\GPT at pagecolortrue
+     \global\let\current at page@color\current at color
+    }%
+    \g at addto@macro\@kernel at before@shipout at background
+     {%
+      \ifGPT at pagecolor
+        \put(-\hoffset,-\pageheight+\voffset)%
+          {%
+            \pdfextension colorstack\@pdfcolorstack push{\current at page@color}%
+            \aftergroup\reset at color
+            \rule{\pagewidth}{\pageheight}%
+          }%
+      \fi
+     }%
+  }%
+ }
 \AtBeginDocument{%
   \def\KV at Gin@bbllx{%
     \PackageError{luatex.def}{%





More information about the latex3-commits mailing list.