[latex3-commits] [git/LaTeX3-latex3-hyperref] master: test for newer Ghostscript versions (65ebb19)

David Carlisle d.p.carlisle at gmail.com
Tue Jan 14 21:04:31 CET 2020


Repository : https://github.com/latex3/hyperref
On branch  : master
Link       : https://github.com/latex3/hyperref/commit/65ebb192ea6533cc0676a671183bcf428313cae9

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

commit 65ebb192ea6533cc0676a671183bcf428313cae9
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Tue Jan 14 20:04:31 2020 +0000

    test for newer Ghostscript versions


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

65ebb192ea6533cc0676a671183bcf428313cae9
 ChangeLog.txt |  6 +++++-
 README.md     |  2 +-
 hyperref.dtx  | 33 +++++++++++++++++++++++----------
 3 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index b0c661d..42d9d66 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,4 +1,8 @@
-2019-11-10  David Carlisle
+2020-01-14 7.00d  David Carlisle
+    * Test for newer GhostScript releases in dvips output
+      https://tex.stackexchange.com/a/524163/1090
+
+2019-11-10  7,00c David Carlisle
    * adjust vtex guards for issue #108
 
 2019-11-06  David Carlisle
diff --git a/README.md b/README.md
index 2b58b34..50f1cd1 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 # README for hyperref bundle
-2019-11-06
+2020-01-14
 
 
 ## INTRODUCTION
diff --git a/hyperref.dtx b/hyperref.dtx
index 0a1965b..a924e4d 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -3,7 +3,7 @@
 %% with portions written by David Carlisle and Heiko Oberdiek,
 %% 2001-2012 Heiko Oberdiek.
 %% 2016-2019 Oberdiek Package Suport Group
-%% 2019 LaTeX3 Project
+%% 2019-2020 LaTeX3 Project
 %%      https://github.com/latex3/hyperref/issues
 %%
 %% This file is part of the `Hyperref Bundle'.
@@ -49,7 +49,7 @@
 %<puvnenc>\ProvidesFile{puvnenc.def}
 %<puarenc>\ProvidesFile{puarenc.def}
 %<psdextra>\ProvidesFile{psdextra.def}
-%<!none>  [2019/11/10 v7.00c %
+%<!none>  [2020/01/14 v7.00d %
 %<package>  Hypertext links for LaTeX]
 %<nohyperref>  Dummy hyperref (SR)]
 %<driver>  Hyperref documentation driver file]
@@ -17218,18 +17218,31 @@
 %    \begin{macrocode}
     /DvipsToPDF{72.27 mul Resolution div} def%
     /PDFToDvips{72.27 div Resolution mul} def%
-    /BPToDvips{72 div Resolution mul}def%
+    /BPToDvips{72 div Resolution mul}def
 %    \end{macrocode}
-% The values inside the /Boder array are not taken literally, but
+% The values inside the /Border array are not taken literally, but
 % interpreted by ghostscript using the resolution of the dvi driver.
 % I don't know how other distiller programs behaves in this manner.
+%
+% Note GhostScript changed its behaviour here and later versions do
+% not need this scaling, so test the PostScript interpreter is GhostScript
+% and if so check its version.
+%
+% If using gs and release $>$ 9.27 no-op, otherwise patch.
 %    \begin{macrocode}
-    /BorderArrayPatch{%
-      [exch{%
-        dup dup type/integertype eq exch type/realtype eq or%
-        {BPToDvips}if%
-      }forall]%
-    }def%
+    product (Ghostscript) search {pop pop pop revision 927 gt}%
+    {pop false} ifelse%
+    {%
+      /BorderArrayPatch{} def%
+    }%
+    {%
+      /BorderArrayPatch{%
+        [exch{%
+          dup dup type/integertype eq exch type/realtype eq or%
+          {BPToDvips}if%
+        }forall]%
+      }def%
+    } ifelse
 %    \end{macrocode}
 % The rectangle around the links starts off
 % \emph{exactly} the size of the box;





More information about the latex3-commits mailing list