[latex3-commits] [git/LaTeX3-latex3-pdfresources] renamedict77: public if_exist test (504f32a)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Apr 8 18:58:27 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : renamedict77
Link       : https://github.com/latex3/pdfresources/commit/504f32a65496c5132982b0dbf0b286f267e408d2

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

commit 504f32a65496c5132982b0dbf0b286f267e408d2
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Apr 8 18:58:27 2020 +0200

    public if_exist test


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

504f32a65496c5132982b0dbf0b286f267e408d2
 pdfresources.dtx          | 12 +++++++
 testfiles/show.luatex.tlg | 89 ++++++++++++++++++++++++++++++++++++++++++++++
 testfiles/show.lvt        | 15 ++++++++
 testfiles/show.tlg        | 81 ++++++++++++++++++++++++++++++++++++++++++
 testfiles/show.xetex.tlg  | 90 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 287 insertions(+)

diff --git a/pdfresources.dtx b/pdfresources.dtx
index 8f00897..c542d6f 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -690,6 +690,18 @@
     \__pdf_dict_show:Nn \msg_show:nnxxxx
   }
 %    \end{macrocode}
+% \begin{function}[EXP, pTF,added = 2020-04-08]
+%   {\pdfdict_if_exist:n }
+%   \begin{syntax}
+%     \cs{pdfdict_if_exist:n}  \Arg{dictionary}
+%   \end{syntax}
+%   This tests if the dictionary exists.
+%\end{function}
+%    \begin{macrocode}
+\prg_new_eq_conditional:NNn \pdfdict_if_exist:n \@@_prop_if_exist:n
+  { TF , T , F , p }
+
+%    \end{macrocode}
 % \begin{function}[added = 2020-04-07]
 %   {\pdfdict_get:nn }
 %   \begin{syntax}
diff --git a/testfiles/show.luatex.tlg b/testfiles/show.luatex.tlg
new file mode 100644
index 0000000..6776f2a
--- /dev/null
+++ b/testfiles/show.luatex.tlg
@@ -0,0 +1,89 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+The global dictionary 'Catalog' contains the pairs (without outer braces):
+>  {PageMode}  =>  {/UseOutlines}
+>  {OpenAction}  =>  {[5 0 R /Fit]}.
+<recently read> }
+l. ...\pdfdict_show:n{Catalog}
+The global dictionary 'Info' contains the pairs (without outer braces):
+>  {Author}  =>  {()}
+>  {Title}  =>  {()}
+>  {Subject}  =>  {()}
+>  {Creator}  =>  {(LaTeX with hyperref)}
+>  {CreationDate}  =>  {()}
+>  {ModDate}  =>  {()}
+>  {Keywords}  =>  {()}.
+<recently read> }
+l. ...\pdfdict_show:n{Info}
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0, direction TLT
+.\hbox(0.0+0.0)x0.0, direction TLT
+.\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
+..\kern0.0
+..\kern16.0
+..\kern-1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 60.99626fil, direction TLT
+...\kern0.0
+...\kern62.0
+...\kern-1.00374
+...\pdfdest name{page.1} xyz
+...\penalty 10000
+...\glue 0.0 plus 1.0fil minus 1.0fil
+..\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue(\lineskip) 0.0
+.\vbox(633.0+0.0)x407.0, direction TLT
+..\hbox(0.0+0.0)x0.0, direction TLT
+...\latelua0{l3kernel.__pdf.backend_PageN_gpush(tex.count["g__pdf_abspage_int"]
+)}
+..\glue 16.0
+..\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT
+...\vbox(12.0+0.0)x345.0, glue set 12.0fil, direction TLT
+....\glue 0.0 plus 1.0fil
+....\hbox(0.0+0.0)x345.0, direction TLT
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 539.94232fil, direction TLT
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\glue(\topskip) 2.95
+....\hbox(7.05+0.11)x345.0, glue set 267.96002fil, direction TLT
+.....\localpar
+......\localinterlinepenalty=0
+......\localbrokenpenalty=0
+......\localleftbox=null
+......\localrightbox=null
+.....\hbox(0.0+0.0)x15.0, direction TLT
+.....\TU/lmr/m/n/10 a
+.....\TU/lmr/m/n/10 b
+.....\TU/lmr/m/n/10 b
+.....\TU/lmr/m/n/10 b
+.....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+.....\TU/lmr/m/n/10 f
+.....\TU/lmr/m/n/10 a
+.....\TU/lmr/m/n/10 l
+.....\TU/lmr/m/n/10 s
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 r
+.....\TU/lmr/m/n/10 u
+.....\TU/lmr/m/n/10 e
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\glue -0.11
+....\glue 0.0 plus 1.0fil
+....\glue 0.0
+....\glue 0.0 plus 0.0001fil
+...\glue(\baselineskip) 23.34
+...\hbox(6.66+0.0)x345.0, glue set 170.0fil, direction TLT
+....\glue 0.0 plus 1.0fil
+....\TU/lmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+..\kern0.0
+.\kern0.0
+Package atveryend Info: Empty hook `BeforeClearDocument' on input line ....
+Package atveryend Info: Executing hook `AfterLastShipout' on input line ...
+(show.aux)
+Package atveryend Info: Empty hook `AtVeryEndDocument' on input line ....
+Package atveryend Info: Empty hook `AtEndAfterFileList' on input line ....
+Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line ....
diff --git a/testfiles/show.lvt b/testfiles/show.lvt
new file mode 100644
index 0000000..efdc857
--- /dev/null
+++ b/testfiles/show.lvt
@@ -0,0 +1,15 @@
+\input{regression-test}
+\documentclass{article}
+\usepackage{pdfresources}
+\usepackage[customdriver=hgeneric-experimental]{hyperref}
+\begin{document}
+\START
+\showoutput
+abbb
+\ExplSyntaxOn
+\pdfdict_show:n{Catalog}
+\pdfdict_show:n{Info}
+\pdfdict_if_exist:nTF {blub}{true}{false}
+\pdfdict_if_exist:nTF {Info}{true}{false}
+\ExplSyntaxOff
+\end{document}
diff --git a/testfiles/show.tlg b/testfiles/show.tlg
new file mode 100644
index 0000000..facbd18
--- /dev/null
+++ b/testfiles/show.tlg
@@ -0,0 +1,81 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+The global dictionary 'Catalog' contains the pairs (without outer braces):
+>  {PageMode}  =>  {/UseOutlines}
+>  {OpenAction}  =>  {[5 0 R /Fit]}.
+<recently read> }
+l. ...\pdfdict_show:n{Catalog}
+The global dictionary 'Info' contains the pairs (without outer braces):
+>  {Author}  =>  {()}
+>  {Title}  =>  {()}
+>  {Subject}  =>  {()}
+>  {Creator}  =>  {(LaTeX with hyperref)}
+>  {CreationDate}  =>  {()}
+>  {ModDate}  =>  {()}
+>  {Keywords}  =>  {()}.
+<recently read> }
+l. ...\pdfdict_show:n{Info}
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+.\vbox(0.0+0.0)x0.0, glue set - 14.99626fil
+..\kern 0.0
+..\kern 16.0
+..\kern -1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 60.99626fil
+...\kern 0.0
+...\kern 62.0
+...\kern -1.00374
+...\pdfdest name{page.1} xyz
+...\penalty 10000
+...\glue 0.0 plus 1.0fil minus 1.0fil
+..\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue(\lineskip) 0.0
+.\vbox(633.0+0.0)x407.0
+..\hbox(0.0+0.0)x0.0
+..\glue 16.0
+..\vbox(617.0+0.0)x345.0, shifted 62.0
+...\vbox(12.0+0.0)x345.0, glue set 12.0fil
+....\glue 0.0 plus 1.0fil
+....\hbox(0.0+0.0)x345.0
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\glue(\topskip) 3.05556
+....\hbox(6.94444+0.0)x345.0, glue set 267.97209fil
+.....\hbox(0.0+0.0)x15.0
+.....\OT1/cmr/m/n/10 a
+.....\OT1/cmr/m/n/10 b
+.....\OT1/cmr/m/n/10 b
+.....\OT1/cmr/m/n/10 b
+.....\glue 3.33333 plus 1.66666 minus 1.11111
+.....\OT1/cmr/m/n/10 f
+.....\OT1/cmr/m/n/10 a
+.....\OT1/cmr/m/n/10 l
+.....\OT1/cmr/m/n/10 s
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 r
+.....\OT1/cmr/m/n/10 u
+.....\OT1/cmr/m/n/10 e
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\glue 0.0 plus 1.0fil
+....\glue 0.0
+....\glue 0.0 plus 0.0001fil
+...\glue(\baselineskip) 23.55556
+...\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\OT1/cmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+..\kern 0.0
+.\kern 0.0
+Package atveryend Info: Empty hook `BeforeClearDocument' on input line ....
+Package atveryend Info: Executing hook `AfterLastShipout' on input line ...
+(show.aux)
+Package atveryend Info: Empty hook `AtVeryEndDocument' on input line ....
+Package atveryend Info: Empty hook `AtEndAfterFileList' on input line ....
+Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line ....
diff --git a/testfiles/show.xetex.tlg b/testfiles/show.xetex.tlg
new file mode 100644
index 0000000..7f8d3f8
--- /dev/null
+++ b/testfiles/show.xetex.tlg
@@ -0,0 +1,90 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+The global dictionary 'Catalog' contains the pairs (without outer braces):
+>  {PageMode}  =>  {/UseOutlines}
+>  {OpenAction}  =>  {[@page1 /Fit]}.
+<recently read> }
+l. ...\pdfdict_show:n{Catalog}
+The global dictionary 'Info' contains the pairs (without outer braces):
+>  {Author}  =>  {()}
+>  {Title}  =>  {()}
+>  {Subject}  =>  {()}
+>  {Creator}  =>  {(LaTeX with hyperref)}
+>  {CreationDate}  =>  {()}
+>  {ModDate}  =>  {()}
+>  {Keywords}  =>  {()}.
+<recently read> }
+l. ...\pdfdict_show:n{Info}
+Package atveryend Info: Empty hook `BeforeClearDocument' on input line ....
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+.\vbox(0.0+0.0)x0.0, glue set - 14.99626fil
+..\kern 0.0
+..\kern 16.0
+..\kern -1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 60.99626fil
+...\kern 0.0
+...\kern 62.0
+...\kern -1.00374
+...\special{pdf:dest (page.1)[@thispage/XYZ @xpos @ypos null]}
+...\penalty 10000
+...\glue 0.0 plus 1.0fil minus 1.0fil
+..\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue(\lineskip) 0.0
+.\vbox(633.0+0.0)x407.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf: put @thispage <<>>}
+...\special{pdf:put @resources <</ExtGState @pdf.obj1>>}
+...\special{pdf:put @resources <</ColorSpace @pdf.obj2>>}
+...\special{pdf:put @resources <</Pattern @pdf.obj3>>}
+...\special{pdf:put @resources <</Shading @pdf.obj4>>}
+...\special{pdf:put @pages <<>>}
+...\special{pdf:docinfo<</Author ()>>}
+...\special{pdf:docinfo<</Title ()>>}
+...\special{pdf:docinfo<</Subject ()>>}
+...\special{pdf:docinfo<</Creator (LaTeX with hyperref)>>}
+...\special{pdf:docinfo<</CreationDate ()>>}
+...\special{pdf:docinfo<</ModDate ()>>}
+...\special{pdf:docinfo<</Keywords ()>>}
+...\special{pdf:put @catalog<</PageMode /UseOutlines>>}
+...\special{pdf:put @catalog<</OpenAction [@page1 /Fit]>>}
+..\glue 16.0
+..\vbox(617.0+0.0)x345.0, shifted 62.0
+...\vbox(12.0+0.0)x345.0, glue set 12.0fil
+....\glue 0.0 plus 1.0fil
+....\hbox(0.0+0.0)x345.0
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+....\write-{}
+....\special{pdf:obj @pdf.obj1 <<  >>}
+....\special{pdf:obj @pdf.obj2 <<  >>}
+....\special{pdf:obj @pdf.obj3 <<  >>}
+....\special{pdf:obj @pdf.obj4 <<  >>}
+....\special{pdf:dest (Doc-Start)[@thispage/XYZ @xpos @ypos null]}
+....\glue(\topskip) 2.95
+....\hbox(7.05+0.10999)x345.0, glue set 267.95999fil
+.....\hbox(0.0+0.0)x15.0
+.....\TU/lmr/m/n/10 abbb
+.....\glue 3.33 plus 1.665 minus 1.11
+.....\TU/lmr/m/n/10 falsetrue
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\glue -0.10999
+....\glue 0.0 plus 1.0fil
+....\glue 0.0
+....\glue 0.0 plus 0.0001fil
+...\glue(\baselineskip) 23.34
+...\hbox(6.66+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\TU/lmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+..\kern 0.0
+.\kern 0.0
+Package atveryend Info: Executing hook `AfterLastShipout' on input line ...
+(show.aux)
+Package atveryend Info: Empty hook `AtVeryEndDocument' on input line ....
+Package atveryend Info: Empty hook `AtEndAfterFileList' on input line ....
+Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line ....





More information about the latex3-commits mailing list.