[latex3-commits] [git/LaTeX3-latex3-latex3] master: Hold back PostScript headers to start of DVI (3cfb33d)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu May 2 23:58:22 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/3cfb33d85577c87e83a6d1e1cf4fc2748b8f2cc1

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

commit 3cfb33d85577c87e83a6d1e1cf4fc2748b8f2cc1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu May 2 22:58:22 2019 +0100

    Hold back PostScript headers to start of DVI


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

3cfb33d85577c87e83a6d1e1cf4fc2748b8f2cc1
 l3kernel/l3drivers-basics.dtx |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/l3kernel/l3drivers-basics.dtx b/l3kernel/l3drivers-basics.dtx
index 382e2d7..636daf2 100644
--- a/l3kernel/l3drivers-basics.dtx
+++ b/l3kernel/l3drivers-basics.dtx
@@ -148,9 +148,21 @@
 %
 % \begin{macro}{\@@_postscript_header:n}
 %   PostScript for the header: a small saving but makes the code clearer.
+%   This is held until the start of shipout such that a document with no
+%   actual output does not write anything.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_postscript_header:n #1
+\cs_new_protected:Npx \@@_postscript_header:n #1
+%<*initex>
   { \@@_literal:n { ! #1 } }
+%</initex>
+%<*package>
+  {
+    \cs_if_exist:NTF \AtBeginDvi
+      { \exp_not:N \AtBeginDvi }
+      { \use:n }
+        { \@@_literal:n { ! #1 } }
+  }
+%</package>
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list