[latex3-commits] [git/LaTeX3-latex3-latex3] master: Minmise spaces in PostScript code (66b6ba4)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Apr 13 20:55:50 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/66b6ba47b1354be50739c378a624522b8cbd96ff
>---------------------------------------------------------------
commit 66b6ba47b1354be50739c378a624522b8cbd96ff
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Apr 13 09:35:02 2019 +0100
Minmise spaces in PostScript code
These will get more tricky as we add the breaking code.
>---------------------------------------------------------------
66b6ba47b1354be50739c378a624522b8cbd96ff
l3kernel/l3drivers-pdf.dtx | 76 +++++++++++++++++++++++---------------------
1 file changed, 40 insertions(+), 36 deletions(-)
diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index 6ba3454..b219029 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -109,7 +109,7 @@
{
\@@_postscript:x
{
- mark ~ /_objdef ~ \driver_pdf_object_ref:n {#1} ~
+ mark /_objdef ~ \driver_pdf_object_ref:n {#1}
/type
\str_case_e:nn
{ \prop_item:Nn \g_@@_pdf_object_prop {#1} }
@@ -129,7 +129,7 @@
{
\@@_postscript:x
{
- mark ~ \driver_pdf_object_ref:n {#1} ~
+ mark ~ \driver_pdf_object_ref:n {#1}
[ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL ~ pdfmark
}
}
@@ -137,8 +137,8 @@
{
\@@_postscript:x
{
- mark ~ \driver_pdf_object_ref:n {#1} ~
- << ~ \exp_not:n {#2} ~ >> ~ /PUT ~ pdfmark
+ mark ~ \driver_pdf_object_ref:n {#1}
+ << \exp_not:n {#2} >> /PUT ~ pdfmark
}
}
\cs_new_protected:Npn \@@_pdf_object_write_stream:nn #1#2
@@ -152,9 +152,9 @@
{
\@@_postscript:n
{
- [nobreak] ~
- mark ~ #1 ~ ( #3 ) ~ /PUT ~ pdfmark ~
- mark ~ #1 ~ << #2 >> ~ /PUT ~ pdfmark
+ [nobreak]
+ mark ~ #1 ~ ( #3 ) /PUT ~ pdfmark ~
+ mark ~ #1 ~ << #2 >> /PUT ~ pdfmark
}
}
% \end{macrocode}
@@ -184,40 +184,44 @@
\@@_literal:n
{
!
- /driver.annotation.border ~
- { /Rect ~ [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] } ~ def ~
- /driver.annotation.ll ~
+ /driver.annotation.border
+ { /Rect [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] } def
+ /driver.annotation.ll
{
- currentpoint ~
- /driver.lly ~ exch ~ def ~
+ currentpoint
+ /driver.lly ~ exch ~ def
/driver.llx ~ exch ~ def
- } ~ def ~
- /driver.annotation.ur ~
+ }
+ def
+ /driver.annotation.ur
{
- currentpoint ~
- /driver.ury ~ exch ~ def ~
+ currentpoint
+ /driver.ury ~ exch ~ def
/driver.urx ~ exch ~ def
- } ~ def ~
- /driver.link.ll ~
+ }
+ def
+ /driver.link.ll
{
currentpoint ~
driver.linkmargin ~ add ~
- driver.linkdp.min ~ add ~
+ driver.linkdp.min ~ add
/driver.lly ~ exch ~ def ~
- driver.linkmargin ~ sub ~
+ driver.linkmargin ~ sub
/driver.llx ~ exch ~ def
- } ~ def ~
- /driver.link.ur ~
+ }
+ def
+ /driver.link.ur
{
currentpoint ~
driver.linkmargin ~ sub ~
- driver.linkht.min ~ sub ~
+ driver.linkht.min ~ sub
/driver.ury ~ exch ~ def ~
- driver.linkmargin ~ add ~
+ driver.linkmargin ~ add
/driver.urx ~ exch ~ def
- } ~ def ~
- /driver.linkmargin ~ { 1 ~ driver.pt.dvi } ~ def ~
- /driver.pt.dvi ~ { 72.27 ~ div ~ Resolution ~ mul } ~ def
+ }
+ def
+ /driver.linkmargin { 1 ~ driver.pt.dvi } def
+ /driver.pt.dvi { 72.27 ~ div ~ Resolution ~ mul } def
}
% \end{macrocode}
% \end{macro}
@@ -266,7 +270,7 @@
\int_gset_eq:NN \g_@@_pdf_annotation_int \g_@@_pdf_object_int
\@@_postscript:x
{
- mark ~ /_objdef ~ { driver.obj \int_use:N \g_@@_pdf_object_int } ~
+ mark /_objdef { driver.obj \int_use:N \g_@@_pdf_object_int }
driver.annotation.border ~
#4 ~
/ANN ~ pdfmark
@@ -329,7 +333,7 @@
\cs_new_protected:Npn \@@_pdf_link:nnnn #1#2#3#4
{
\@@_postscript:n
- { /driver.linkdict ~ ( #4 ) ~ def }
+ { /driver.linkdict ( #4 ) def }
\hbox_set:Nn \l_@@_pdf_content_box {#4}
\@@_pdf_link_minima:
\box_move_down:nn { \box_dp:N \l_@@_pdf_content_box }
@@ -355,9 +359,9 @@
\int_gset_eq:NN \g_@@_pdf_link_int \g_@@_pdf_object_int
\@@_postscript:x
{
- mark ~ /_objdef ~ { driver.obj \int_use:N \g_@@_pdf_link_int } ~
- driver.annotation.border ~
- /Subtype /Link #1 #2 #3 ~
+ mark /_objdef ~ { driver.obj \int_use:N \g_@@_pdf_link_int }
+ driver.annotation.border
+ /Subtype /Link #1 #2 #3
/ANN ~ pdfmark
}
}
@@ -394,7 +398,7 @@
{
\@@_postscript:x
{
- /driver.outerbox ~
+ /driver.outerbox
[
\dim_to_decimal:n {#1} ~
\dim_to_decimal:n { -\box_dp:N \l_@@_pdf_model_box } ~
@@ -405,8 +409,8 @@
\dim_to_decimal:n { #1 + \linewidth } ~
%</package>
\dim_to_decimal:n { -\box_dp:N \l_@@_pdf_model_box }
- ] ~
- [ exch ~ { driver.pt.dvi } ~ forall ] ~ def ~
+ ]
+ [ exch { driver.pt.dvi } forall ] def
/driver.baselineskip ~
\dim_to_decimal:n
{ \dim_max:nn { 0pt } { \tex_baselineskip:D } } ~
@@ -435,7 +439,7 @@
{
\@@_postscript:x
{
- /driver.linkmargin ~ { \dim_to_decimal:n {#1} ~ driver.pt.dvi } ~ def
+ /driver.linkmargin { \dim_to_decimal:n {#1} ~ driver.pt.dvi } def
}
}
% \end{macrocode}
More information about the latex3-commits
mailing list