summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hyperxmp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-04-11 22:20:53 +0000
committerKarl Berry <karl@freefriends.org>2020-04-11 22:20:53 +0000
commit9ba05f7c343e9c9ef750fc1cc4a49049e29de19c (patch)
tree3d5a11816aecba4b72ed35fd67bb4e10553bf1ba /Master/texmf-dist/source/latex/hyperxmp
parenta0fc5a65fc2886b3bd8a04e94db45c2f9f126d24 (diff)
hyperxmp (11apr20)
git-svn-id: svn://tug.org/texlive/trunk@54652 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperxmp')
-rw-r--r--Master/texmf-dist/source/latex/hyperxmp/hyperxmp-stds.tex96
-rw-r--r--Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx68
2 files changed, 147 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp-stds.tex b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp-stds.tex
new file mode 100644
index 00000000000..e236b8a6b37
--- /dev/null
+++ b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp-stds.tex
@@ -0,0 +1,96 @@
+%%
+%% This is file `hyperxmp-stds.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% hyperxmp.dtx (with options: `doc-helper')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2011-2020 by Scott Pakin <scott+hyxmp@pakin.org>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008/05/04 or later.
+%%
+\let\next=\endinput
+\IfFileExists{FOGRA29L_uncoated.icc}
+ {\let\next=\relax}
+ {}
+\next
+\let\next=\endinput
+\ifPDFTeX
+ \let\next=\relax
+\else
+ \ifLuaTeX
+ \usepackage{luatex85}
+ \let\next=\relax
+ \fi
+\fi
+\next
+\def\wantpdfstandards{}
+\typeout{Generating PDF/A-1b compliant hyperxmp documentation.}
+\AtBeginDocument{%
+ \hypersetup{%
+ pdfapart=1,
+ pdfaconformance=b
+ }%
+}
+\pdfobjcompresslevel=0
+\immediate\pdfobj stream attr {/N 4} file {FOGRA29L_uncoated.icc}
+\edef\iccobj{\the\pdflastobj}
+\pdfcatalog{%
+ /OutputIntents [
+ <<
+ /Type /OutputIntent
+ /S /GTS_PDFA1
+ /DestOutputProfile \iccobj\space 0 R
+ /OutputConditionIdentifier (Uncoated FOGRA29)
+ /Info (FOGRA29L)
+ >>
+ <<
+ /Type /OutputIntent
+ /S /GTS_PDFX
+ /DestOutputProfile \iccobj\space 0 R
+ /OutputConditionIdentifier (Uncoated FOGRA29)
+ /Info (FOGRA29L)
+ >>
+ ]
+}
+\makeatletter
+\AtBeginDocument{%
+ \let\HyColor@HyperrefBorderColor\HyColor@XZeroOneThreeFour
+}
+\makeatother
+\AtBeginDocument{%
+ \hypersetup{%
+ citebordercolor=green,
+ linkbordercolor=red,
+ urlbordercolor=cyan
+ }%
+}
+\makeatletter
+\@tempdima=0.996264\paperwidth
+\edef\boxwd{\strip@pt\@tempdima}
+\@tempdima=0.996264\paperheight
+\edef\boxht{\strip@pt\@tempdima}
+\makeatother
+\edef\next{%
+ \protect\pdfpageattr{
+ /BleedBox [0.0 0.0 \boxwd\space \boxht]
+ /TrimBox [0.0 0.0 \boxwd\space \boxht]
+ /StructParents 0
+ /Tabs /S
+ }%
+}
+\next
+\endinput
+%%
+%% End of file `hyperxmp-stds.tex'.
diff --git a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
index bad62e4b981..a2cc59e97f8 100644
--- a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
+++ b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{hyperxmp}
%<*package>
- [2020/03/20 v5.0 Store hyperref metadata in XMP format]
+ [2020/04/08 v5.1 Store hyperref metadata in XMP format]
%</package>
%
%<*driver>
@@ -111,7 +111,7 @@
%</driver>
% \fi
%
-% \CheckSum{2342}
+% \CheckSum{2354}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -1612,9 +1612,10 @@
% \end{macro}
%
% \begin{macro}{\@pdfapart}
-% Prepare to store the \acro{PDF/A} part ID, which defaults to~``1''.
+% Prepare to store the \acro{PDF/A} part ID, which defaults to~``1''
+% if \optname{pdfa} is passed to \pkgname{hyperref}.
% \begin{macrocode}
-\def\@pdfapart{1}
+\def\@pdfapart{}
\define@key{Hyp}{pdfapart}{%
\afterassignment\hyxmp@no@bad@parts\@tempcnta=0#1\relax
\hyxmp@pdfstringdef\@pdfapart{\the\@tempcnta}%
@@ -1623,9 +1624,11 @@
% \end{macro}
%
% \begin{macro}{\@pdfaconformance}
-% Prepare to store the \acro{PDF/A} conformance ID, which defaults to~``B''.
+% Prepare to store the \acro{PDF/A} conformance ID, which defaults to~``b''
+% if \optname{pdfa} is passed to \pkgname{hyperref} and |\@pdfapart| is
+% empty.
% \begin{macrocode}
-\def\@pdfaconformance{B}
+\def\@pdfaconformance{}
\define@key{Hyp}{pdfaconformance}{%
\uppercase{\hyxmp@pdfstringdef\@pdfaconformance{#1}}%
}
@@ -2328,12 +2331,28 @@
% \begin{macrocode}
\newcommand*{\hyxmp@check@standards}{%
% \end{macrocode}
+% If the \optname{pdfa} option was passed to \pkgname{hyperref} but
+% |\@pdfapart| is not set, set it to~|1| and |\@pdfaconformance| to~|B|.
+% \begin{macrocode}
+ \ifHy@pdfa
+ \@ifmtargexp{\@pdfapart}{%
+ \PackageWarningNoLine{hyperxmp}{%
+ `pdfa' was passed to hyperref, but `pdfapart' was\MessageBreak
+ not specified.\space\space Setting pdfapart to `1' and\MessageBreak
+ pdfaconformance to `B'%
+ }%
+ \gdef\@pdfapart{1}%
+ \gdef\@pdfaconformance{B}%
+ }%
+ \fi
+% \end{macrocode}
+%
% \begin{macro}{\hyxmp@standards}
% We define |\hyxmp@standards| to be non-empty if \emph{any} \acro{PDF}
% standard is claimed (currently, \acro{PDF/A}, \acro{PDF/X}, or
% \acro{PDF/UA}.
% \begin{macrocode}
- \def\hyxmp@standards{%
+ \edef\hyxmp@standards{%
\@pdfapart
\@pdfxstandard
\@pdfuapart
@@ -2343,7 +2362,7 @@
% \begin{macrocode}
\@ifnotmtargexp{\hyxmp@standards}{%
\@ifmtargexp{\@pdftitle}{%
- \PackageWarning{hyperxmp}{%
+ \PackageWarningNoLine{hyperxmp}{%
Missing pdftitle (required for PDF standards\MessageBreak
compliance)%
}%
@@ -3001,12 +3020,18 @@
\edef\hyxmp@today@xmp{\expandafter\hyxmp@pdf@to@xmp@date\pdffeedback creationdate}%
}
% \end{macrocode}
+% \begin{macro}{\hyxmp@timestamp}
% Case 3: |\filemoddate| is defined (\XeLaTeX).
-% In this case, we treat the timestamp of the job's |.aux| file as the
+% In this case, we treat the timestamp of the job's |.log| file as the
% current date/time.
+% \changes{v5.1}{2020/04/08}{Don't rely on
+% \string\cs{jobname}\string\texttt{.aux} existing to query the
+% current time under \string\XeLaTeX\string\@. Instead, use
+% \string\cs{jobname}\string\texttt{.log}. Thanks to Ulrike Fischer
+% for the bug report and for her suggestion to use the log file.}
% \begin{macrocode}
\hyxmp@try@today{filemoddate}{%
- \edef\hyxmp@today@xmp{\filemoddate{\jobname.aux}}%
+ \edef\hyxmp@today@xmp{\filemoddate{\jobname.log}}%
\edef\next{%
\edef\noexpand\hyxmp@today@xmp{\noexpand\hyxmp@as@xmp@date{\hyxmp@today@xmp}}%
}%
@@ -3022,6 +3047,7 @@
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\hyxmp@today@pdf}
% Define |\hyxmp@today@pdf| as the current date and (if available) time
@@ -4047,17 +4073,21 @@ _______________________________________________________________^^J%
% Define |\@pdfproducer| using the banner string if available or the
% \tex\ engine's version number if not.
% \changes{v5.0}{2020/03/01}{Added this macro}
+% \changes{v5.1}{2020/04/06}{Check for \string\LuaTeX\ before checking for
+% \string\pdfTeX\ to work around \string\pkgname{luatex85}'s confusing
+% \string\pkgname{iftex} by defining \string\cs{pdftexversion}. Thanks
+% to Robin Schwab for the bug report}
% \begin{macrocode}
\newcommand*{\hyxmp@define@pdfproducer}{%
\gdef\@pdfproducer{TeX}
- \ifPDFTeX
- \expandafter\hyxmp@banner@to@producer\expandafter{\pdftexbanner}
+ \ifLuaTeX
+ \expandafter\hyxmp@banner@to@producer\expandafter{\luatexbanner}%
\else
- \ifLuaTeX
- \expandafter\hyxmp@banner@to@producer\expandafter{\luatexbanner}
+ \ifPDFTeX
+ \expandafter\hyxmp@banner@to@producer\expandafter{\pdftexbanner}%
\else
\ifXeTeX
- \edef\@pdfproducer{XeTeX version \the\XeTeXversion\XeTeXrevision}
+ \edef\@pdfproducer{XeTeX version \the\XeTeXversion\XeTeXrevision}%
\fi
\fi
\fi
@@ -4082,12 +4112,16 @@ _______________________________________________________________^^J%
% removing the initial ``\texttt{This is}'' if possible (specifically,
% when $\varepsilon$-\TeX's\index{e-TeX=$\varepsilon$-\TeX}
% |\scantokens| primitive is available).
+% \changes{v5.1}{2020/04/03}{Prevent the category code of ``@'' from
+% propagating past the \cs{begin}\string\texttt{\{document\}}.
+% Thanks to Robert Schlicht for noticing this catcode ``leak'' and
+% providing a correction}
% \begin{macrocode}
\def\hyxmp@banner@to@producer#1{%
\ifx\scantokens\relax
\gdef\@pdfproducer{#1}%
\else
- \scantokens{\makeatletter\hyxmp@remove@this#1\relax\makeatother}%
+ {\scantokens{\makeatletter\hyxmp@remove@this#1\relax}}%
\fi
}
% \end{macrocode}
@@ -4535,7 +4569,7 @@ ______</dc:#2>^^J%
% properties identify a document as conforming to a particular
% \acro{PDF/A} standard. We default to \PDFstd{A}{1}{b}{} if any
% \acro{PDF/A} compliance is detected but let the author override the
-% ``1'' with \optname{pdfapart} and the ``B'' with
+% ``1'' with \optname{pdfapart} and the ``b'' with
% \optname{pdfaconformance}.
% \changes{v2.4}{2013/12/21}{Added this macro}
% \changes{v2.9}{2016/04/12}{Let the author specify the \protect\acro{PDF/A}