[latex3-commits] [git/LaTeX3-latex3-latex3] master: Move some PostScript to header (2a4182d)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Apr 12 16:22:25 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/2a4182d63858609e47617699fe89a2a28c2f3f48
>---------------------------------------------------------------
commit 2a4182d63858609e47617699fe89a2a28c2f3f48
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Apr 12 15:22:25 2019 +0100
Move some PostScript to header
This will impact on .ps file size ... and makes the
trace output a bit clearer.
>---------------------------------------------------------------
2a4182d63858609e47617699fe89a2a28c2f3f48
l3kernel/l3drivers-pdf.dtx | 79 +++++++++++++++++++++++++++-----------------
1 file changed, 48 insertions(+), 31 deletions(-)
diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index ea1aa8e..bc4966d 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -167,7 +167,16 @@
% In \texttt{dvips}, annotations have to be constructed manually. As such,
% we need the object code above for some definitions.
%
-% \begin{macro}{driver.pt.dvi, driver.linkmargin}
+% \begin{macro}
+% {
+% driver.annotation.border ,
+% driver.annotation.ll ,
+% drive.annotation.ur ,
+% driver.link.ll ,
+% drive.link.ur ,
+% driver.linkmargin ,
+% driver.pt.dvi
+% }
% The link margin size has to be defined at the off: default as for
% \pdfTeX{}. The size conversions have to be done in PostScript as
% there can be a magnification active.
@@ -175,8 +184,40 @@
\@@_literal:n
{
!
- /driver.pt.dvi ~ { 72.27 ~ div ~ Resolution ~ mul } ~ def ~
- /driver.linkmargin ~ { 1 ~ driver.pt.dvi } ~ def
+ /driver.annotation.border ~
+ { /Rect ~ [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] } ~ def ~
+ /driver.annotation.ll ~
+ {
+ currentpoint ~
+ /driver.lly ~ exch ~ def ~
+ /driver.llx ~ exch ~ def
+ } ~ def ~
+ /driver.annotation.ur ~
+ {
+ currentpoint ~
+ /driver.ury ~ exch ~ def ~
+ /driver.urx ~ exch ~ def
+ } ~ def ~
+ /driver.link.ll ~
+ {
+ currentpoint ~
+ driver.linkmargin ~ add ~
+ driver.linkdp.min ~ add ~
+ /driver.lly ~ exch ~ def ~
+ driver.linkmargin ~ sub ~
+ /driver.llx ~ exch ~ def
+ } ~ def ~
+ /driver.link.ur ~
+ {
+ currentpoint ~
+ driver.linkmargin ~ sub ~
+ driver.linkht.min ~ sub ~
+ /driver.ury ~ exch ~ def ~
+ driver.linkmargin ~ add ~
+ /driver.urx ~ exch ~ def
+ } ~ def ~
+ /driver.linkmargin ~ { 1 ~ driver.pt.dvi } ~ def ~
+ /driver.pt.dvi ~ { 72.27 ~ div ~ Resolution ~ mul } ~ def
}
% \end{macrocode}
% \end{macro}
@@ -212,20 +253,11 @@
\int_gset_eq:NN \g_@@_pdf_annotation_int \g_@@_pdf_object_int
\@@_pdf_annotation_corners:nnnnn
{#1} {#2} {#3}
- {
- currentpoint ~
- /driver.lly ~ exch ~ def ~
- /driver.llx ~ exch ~ def
- }
- {
- currentpoint ~
- /driver.ury ~ exch ~ def ~
- /driver.urx ~ exch ~ def
- }
+ { driver.annotation.ll } { driver.annotation.ur }
\@@_postscript:x
{
mark ~ /_objdef ~ { driver.obj \int_use:N \g_@@_pdf_object_int } ~
- /Rect ~ [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] ~
+ driver.annotation.border ~
#4 ~
/ANN ~ pdfmark
}
@@ -335,26 +367,11 @@
\int_gset_eq:NN \g_@@_pdf_annotation_int \g_@@_pdf_object_int
\@@_pdf_annotation_corners:nnnnn
{#1} {#2} {#3}
- {
- currentpoint ~
- driver.linkmargin ~ add ~
- driver.linkdp.min ~ add ~
- /driver.lly ~ exch ~ def ~
- driver.linkmargin ~ sub ~
- /driver.llx ~ exch ~ def
- }
- {
- currentpoint ~
- driver.linkmargin ~ sub ~
- driver.linkht.min ~ sub ~
- /driver.ury ~ exch ~ def ~
- driver.linkmargin ~ add ~
- /driver.urx ~ exch ~ def
- }
+ { driver.link.ll } { driver.link.ur }
\@@_postscript:x
{
mark ~ /_objdef ~ { driver.obj \int_use:N \g_@@_pdf_object_int } ~
- /Rect ~ [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] ~
+ driver.annotation.border ~
#4 ~
/ANN ~ pdfmark
}
More information about the latex3-commits
mailing list