[latex3-commits] [git/LaTeX3-latex3-l3build] pdfregression: use pdfmeta command if available for compability with pdfmanagement (dcc39a3)
Ulrike Fischer
fischer at troubleshooting-tex.de
Fri Mar 11 12:40:29 CET 2022
Repository : https://github.com/latex3/l3build
On branch : pdfregression
Link : https://github.com/latex3/l3build/commit/dcc39a354d6808b305336111aecf906c8468af97
>---------------------------------------------------------------
commit dcc39a354d6808b305336111aecf906c8468af97
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri Mar 11 12:40:29 2022 +0100
use pdfmeta command if available for compability with pdfmanagement
>---------------------------------------------------------------
dcc39a354d6808b305336111aecf906c8468af97
CHANGELOG.md | 4 +++
l3build.dtx | 79 ++++++++++++++++++++++++++++++++----------------------------
2 files changed, 46 insertions(+), 37 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a8002e8..d0ba05c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+ - if `\pdfmeta_set_regression_data:` is defined it is used
+ to set the meta data.
+
## [2022-02-24]
### Fixed
diff --git a/l3build.dtx b/l3build.dtx
index df9d152..7165cb8 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -2497,48 +2497,53 @@
% environment side (as not all output can be controlled here).
% There is a limit to what can be done with the underlying PDF structure so
% there is no point entirely suppressing \texttt{Producer}: simply avoid
-% any version numbers.
+% any version numbers. If the pdfmanagement is loaded we use its function
+% if it exists.
% \begin{macrocode}
-\ifnum 0%
- \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
- \ifx\outputmode\@undefined\else\ifnum\outputmode>0 1\fi\fi
- >0 %
- \ifx\pdfvariable\@undefined
- \pdfinfo{/Producer (\ifx\directlua\@undefined pdf\else Lua\fi TeX)}
- \ifx\pdfinfoomitdate\@undefined\else
- \pdfinfoomitdate = 1 %
- \pdfsuppressptexinfo = \numexpr
+\ifcsname pdfmeta_set_regression_data:\endcsname
+ \csname pdfmeta_set_regression_data:\endcsname
+\else
+ \ifnum 0%
+ \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
+ \ifx\outputmode\@undefined\else\ifnum\outputmode>0 1\fi\fi
+ >0 %
+ \ifx\pdfvariable\@undefined
+ \pdfinfo{/Producer (\ifx\directlua\@undefined pdf\else Lua\fi TeX)}
+ \ifx\pdfinfoomitdate\@undefined\else
+ \pdfinfoomitdate = 1 %
+ \pdfsuppressptexinfo = \numexpr
+ 0
+ + 1 % PTEX.Fullbanner
+ + 2 % PTEX.FileName
+ \relax
+ \pdftrailerid{}
+ \fi
+ \else
+ \pdfextension info{/Producer (LuaTeX)}
+ \pdfvariable suppressoptionalinfo \numexpr
0
- + 1 % PTEX.Fullbanner
- + 2 % PTEX.FileName
+ + 1 % PTEX.Fullbanner
+ + 2 % PTEX.FileName
+ + 32 % CreationDate
+ + 64 % ModDate
+ + 512 % ID
\relax
- \pdftrailerid{}
\fi
\else
- \pdfextension info{/Producer (LuaTeX)}
- \pdfvariable suppressoptionalinfo \numexpr
- 0
- + 1 % PTEX.Fullbanner
- + 2 % PTEX.FileName
- + 32 % CreationDate
- + 64 % ModDate
- + 512 % ID
- \relax
- \fi
-\else
- \ifx\XeTeXversion\@undefined
- \special{! <</DocumentUUID (DocumentUUID)>> setpagedevice}
- \special{! <</InstanceUUID (InstanceUUID)>> setpagedevice}
- \else
- \special{%
- pdf: docinfo
- <<
- /Creator (TeX)
- /CreationDate ()
- /ModDate ()
- /Producer (xdvipdfmx)
- >>
- }
+ \ifx\XeTeXversion\@undefined
+ \special{! <</DocumentUUID (DocumentUUID)>> setpagedevice}
+ \special{! <</InstanceUUID (InstanceUUID)>> setpagedevice}
+ \else
+ \special{%
+ pdf: docinfo
+ <<
+ /Creator (TeX)
+ /CreationDate ()
+ /ModDate ()
+ /Producer (xdvipdfmx)
+ >>
+ }
+ \fi
\fi
\fi
% \end{macrocode}
More information about the latex3-commits
mailing list.