texlive[55130] Master/texmf-dist: hyperxmp (13may20)

commits+karl at tug.org commits+karl at tug.org
Wed May 13 23:07:20 CEST 2020


Revision: 55130
          http://tug.org/svn/texlive?view=revision&revision=55130
Author:   karl
Date:     2020-05-13 23:07:20 +0200 (Wed, 13 May 2020)
Log Message:
-----------
hyperxmp (13may20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
    trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex
    trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
    trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty

Modified: trunk/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2020-05-13 21:07:02 UTC (rev 55129)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2020-05-13 21:07:20 UTC (rev 55130)
@@ -117,6 +117,7 @@
             </rdf:Bag>
           </dc:type>
           <dc:source>\metavalue{einstein.tex}</dc:source>
+          <dc:identifier>\metavalue{info:lccn/50013519}</dc:identifier>
           <photoshop:AuthorsPosition>
             \metavalue{Technical Assistant, Level III}
           </photoshop:AuthorsPosition>

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2020-05-13 21:07:02 UTC (rev 55129)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2020-05-13 21:07:20 UTC (rev 55130)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2011--2020 by Scott Pakin <scott+hyxmp at pakin.org>
-% ---------------------------------------------------------------
+% Copyright (C) 2011-2020 by Scott Pakin <scott+hyxmp at pakin.org>
+% --------------------------------------------------------------
 %
 % This file may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3c
@@ -22,7 +22,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{hyperxmp}
 %<*package>
-    [2020/04/08 v5.1 Store hyperref metadata in XMP format]
+    [2020/05/12 v5.2 Store hyperref metadata in XMP format]
 %</package>
 %
 %<*driver>
@@ -81,6 +81,7 @@
   pdflang={en-US},
   pdftrapped={False},
   pdfstartpage={},
+  pdfsource={hyperxmp.dtx},
   pdfurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/hyperxmp.pdf},
   baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/}
 }
@@ -111,7 +112,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{2354}
+% \CheckSum{2425}
 %
 % \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
@@ -168,6 +169,9 @@
 %   standards, as requested by Robin Schwab}
 % \changes{v5.0}{2020/02/26}{Added support for \protect\acro{PDF/X}
 %   standards, as requested by Robin Schwab}
+% \changes{v5.2}{2020/04/29}{Introduced the \protect\optname{pdfidentifier}
+%   package option, which enables an author to specify a unique identifier
+%   for the document}
 %
 % ^^A \GetFileInfo{hyperxmp.dtx}
 %
@@ -413,6 +417,7 @@
 %   \item trapping of colors (\xmpprop{pdf:trapped})
 %   \item type of document (\xmpprop{dc:type})
 %   \item type of parent publication (\xmpprop{prism:aggregationType})
+%   \item unique identifier for the document (\xmpprop{dc:identifier})
 %   \item \acro{URL} of the document (\xmpprop{prism:url})
 %   \item \acro{URL}(s) of the primary author (\xmpprop[CiUrlWork]{Iptc4xmpCore:CreatorContactInfo})
 %   \item \acro{UUID} for the document (\xmpprop{xmpMM:DocumentID})
@@ -499,6 +504,7 @@
 %   \item \optname{pdfdocumentid}
 %   \item \optname{pdfdoi}
 %   \item \optname{pdfeissn}
+%   \item \optname{pdfidentifier}
 %   \item \optname{pdfinstanceid}
 %   \item \optname{pdfisbn}
 %   \item \optname{pdfissn}
@@ -632,6 +638,27 @@
 % In contrast, \moptname{baseurl} points one level up and is used to
 % resolve relative \acro{URL}s.
 %
+% \moptname{pdfidentifier} provides an alternative mechanism to uniquely
+% identify a document.  Its advantage relative to \optname{pdfisbn},
+% \optname{pdfissn}, \optname{pdfdoi}, etc.\ is its flexibility; any of
+% a wide variety of identification types can be used.\footnote{See, for
+%   example,
+%   \url{https://www.iana.org/assignments/urn-namespaces/urn-namespaces.xhtml}
+%   for the \texttt{urn:} \acro{URI} scheme and
+%   \url{http://info-uri.info/registry/} for the \texttt{info:}
+%   \acro{URI} scheme.}  \optname{pdfidentifier}'s disadvantage is that
+% it allows only a single identifier per document.  For example, a
+% document could use |pdfidentifier=urn:iso:std:32000:ed-1:v1:en| to
+% identify itself as version~1 of English-language \acro{ISO} standard
+% 32000-1, but then this same document could not also use
+% \optname{pdfidentifier} to identify itself by \acro{DOI}
+% (|info:doi/|\dots), \acro{ISBN} (|urn:ISSN:|\dots), etc.  (It can
+% still use the options described in the previous paragraph, though.)  If
+% \optname{pdfidentifier} is not specified explicitly,
+% \pkgname{hyperxmp} will use the first non-empty value out of the
+% \acro{DOI}, electronic \acro{ISSN}, print \acro{ISSN}, and \acro{ISBN}
+% or skip the identifier entirely if all of those are empty.
+%
 % Already-published documents can further be identified by the
 % publication in which they appear.  \moptname{pdfpublication} specifies
 % the title of the journal, magazine, or other parent document.  The
@@ -761,7 +788,7 @@
 % \optname{pdfuapart}=|1| asserts that the document respects
 % \PDFstd{UA}{1}{}{}.  \moptname{pdfxstandard} indicates
 % the particular \acro{PDF/X} standard by which the document abides.
-% Unlike \optname{pdfpart} and \optname{pdfaconformance}, which accept a
+% Unlike \optname{pdfapart} and \optname{pdfaconformance}, which accept a
 % number and a letter, respectively, \optname{pdfxstandard} expects a
 % textual identification of a standard name.  The following are the
 % \acro{PDF/X} standard names that are considered acceptable at the time
@@ -863,6 +890,7 @@
 %      pdfmetalang={en},
 %      pdfurl={http://www.physik.uni-augsburg.de/annalen/history/einstein-papers/1905_17_132-148.pdf},
 %      pdfdoi={10.1002/andp.19053220607},
+%      pdfidentifier={info:lccn/50013519},
 %      pdfbytes={\pdffilesize{\jobname.pdf}}   % Requires pdflatex
 %    }
 %    \XMPLangAlt{de}{pdftitle={Über einen die Erzeugung und Verwandlung des
@@ -1778,9 +1806,17 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\ifdraft}
+% Use the \pkgname{ifdraft} package to determine if this is a draft or
+% final document.
+% \changes{v5.2}{2020/04/18}{Define \protect\cs{ifdraft} only locally, at
+%   Niklas Beisert's request}
 %    \begin{macrocode}
+\begingroup
+\let\ifdraft=\relax
 \RequirePackage{ifdraft}
 %    \end{macrocode}
+% \end{macro}
 %
 % \begin{macro}{\@pdfrendition}
 % \changes{v5.0}{2020/02/27}{Added the \protect\optname{pdfrendition}
@@ -1792,10 +1828,11 @@
 % |draft|.
 %    \begin{macrocode}
 \ifdraft{%
-  \def\@pdfrendition{draft}%
+  \gdef\@pdfrendition{draft}%
 }{%
-  \def\@pdfrendition{default}%
+  \gdef\@pdfrendition{default}%
 }
+\endgroup
 \define at key{Hyp}{pdfrendition}{\hyxmp at pdfstringdef\@pdfrendition{#1}}
 %    \end{macrocode}
 % \end{macro}
@@ -1924,6 +1961,14 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@pdfidentifier}
+% Prepare to store an identifier that uniquely represents the document.
+%    \begin{macrocode}
+\def\@pdfidentifier{}
+\define at key{Hyp}{pdfidentifier}{\hyxmp at pdfstringdef\@pdfidentifier{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@pdfsubtitle}
 % Prepare to store the document's subtitle.
 %    \begin{macrocode}
@@ -2291,6 +2336,7 @@
     \@pdfdatetime
     \@pdfdoi
     \@pdfeissn
+    \@pdfidentifier
     \@pdfisbn
     \@pdfissn
     \@pdfissuenum
@@ -2344,6 +2390,7 @@
       \gdef\@pdfapart{1}%
       \gdef\@pdfaconformance{B}%
     }%
+    {}%
   \fi
 %    \end{macrocode}
 %
@@ -2367,6 +2414,7 @@
         compliance)%
       }%
     }%
+    {}%
   }%
 }
 %    \end{macrocode}
@@ -2993,7 +3041,8 @@
 \def\hyxmp at try@today#1#2{%
   \@ifmtargexp{\hyxmp at today@xmp}{%
     \@ifundefined{#1}{}{#2}%
-  }{}%
+  }%
+  {}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3636,7 +3685,30 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\hyxmp at add@simple at pfx}
+% Given an \acro{XMP} tag~(|#1|), a---typically hard-wired---prefix
+% string~(|#2|), and a main string~(|#2|), if the main string is
+% nonempty, add a begin tag, both strings, and an end tag to the packet.
+% The ``|simple|'' in the macro name indicates that the string is output
+% without variations for different languages.
+% \changes{v5.2}{2020/04/29}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at add@simple at pfx}[3]{%
+  \@ifnotmtargexp{#3}{%
+    \hyxmp at add@to at xml{\hyxmp at extra@indent______<}%
+    \xdef\hyxmp at xml{\hyxmp at xml#1}%
+    \hyxmp at pdfstringdef\hyxmp at iprefix{#2}%
+    \hyxmp at xmlify{\hyxmp at iprefix}%
+    \hyxmp at add@to at xml{>\hyxmp at xmlified}%
+    \hyxmp at xmlify{#3}%
+    \hyxmp at add@to at xml{\hyxmp at xmlified</}%
+    \xdef\hyxmp at xml{\hyxmp at xml#1>^^J}%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
 %
+%
 % \subsubsection{Providing metadata in multiple languages}
 % \label{sec:lang-alt}
 %
@@ -4151,6 +4223,52 @@
 }
 %    \end{macrocode}
 %
+% \begin{macro}{\hyxmp at assign@major at minor}
+% Assign |\hyxmp at major@minor| to be the \acro{PDF} version targeted by
+% the running \TeX\ engine.
+% \changes{v5.2}{2020/05/10}{Added this macro.  \string\pkgname{hyperxmp}
+%   now correctly specifies \string\xmpterm{pdf:PDFVersion} when
+%   generating \string\acro{PDF}~2.0+.  Thanks to Ulrike Fischer for
+%   alerting me to \string\acro{PDF}~2.0's availability in the
+%   \string\TeX\ ecosystem and informing me how to activate it}
+% \begin{macro}{\hyxmp at major@minor}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at assign@major at minor}{%
+  \@ifundefined{pdfvariable}{%
+    \@ifundefined{pdfminorversion}{%
+%    \end{macrocode}
+% Case 1: Neither |\pdfvariable| nor |\pdfminorversion| is defined
+% (\XeLaTeX\ and regular \LaTeX).
+%    \begin{macrocode}
+    }{%
+%    \end{macrocode}
+% Case 2: |\pdfminorversion| is defined (\pdfLaTeX\ and pre-0.85 \LuaLaTeX).
+%    \begin{macrocode}
+      \xdef\hyxmp at major@minor{\the\pdfminorversion}%
+      \@ifundefined{pdfmajorversion}{%
+%    \end{macrocode}
+% Case 2(a): |\pdfmajorversion| is not defined (older versions of
+% \pdfLaTeX\ and \LuaLaTeX).
+%    \begin{macrocode}
+        \xdef\hyxmp at major@minor{1.\hyxmp at major@minor}%
+      }{%
+%    \end{macrocode}
+% Case 2(b): |\pdfmajorversion| is defined (\pdfLaTeX~1.40.21+).
+%    \begin{macrocode}
+        \xdef\hyxmp at major@minor{\the\pdfmajorversion.\hyxmp at major@minor}%
+      }%
+    }%
+  }{%
+%    \end{macrocode}
+% Case 3: |\pdfvariable| is defined (\LuaLaTeX~0.85+).
+%    \begin{macrocode}
+    \xdef\hyxmp at major@minor{\the\pdfvariable majorversion.\the\pdfvariable minorversion}%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\hyxmp at pdf@schema}
 % Add properties defined by the Adobe \acro{PDF} schema to the |\hyxmp at xml|
 % macro.
@@ -4181,27 +4299,8 @@
   \hyxmp at add@simple at var{pdf:Producer}{@pdfproducer}%
   \hyxmp at add@simple at var{pdf:Keywords}{@pdfkeywords}%
   \hyxmp at add@simple{pdf:Trapped}{\@pdftrapped}%
-%    \end{macrocode}
-% Specify the \acro{PDF} version.
-%    \begin{macrocode}
-  \@ifundefined{pdfvariable}{%
-    \@ifundefined{pdfminorversion}{%
-%    \end{macrocode}
-% Case 1: Neither |\pdfvariable| nor |\pdfminorversion| is defined
-% (\XeLaTeX\ and regular \LaTeX).
-%    \begin{macrocode}
-    }{%
-%    \end{macrocode}
-% Case 2: |\pdfminorversion| is defined (\pdfLaTeX\ and pre-0.85 \LuaLaTeX).
-%    \begin{macrocode}
-      \hyxmp at add@simple{pdf:PDFVersion}{1.\the\pdfminorversion}%
-    }%
-  }{%
-%    \end{macrocode}
-% Case 3: |\pdfvariable| is defined (\LuaLaTeX~0.85+).
-%    \begin{macrocode}
-    \hyxmp at add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}%
-  }%
+  \hyxmp at assign@major at minor
+  \hyxmp at add@simple at var{pdf:PDFVersion}{hyxmp at major@minor}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -4351,6 +4450,24 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\hyxmp at cond@dc at identifier}
+% Conditionally add a \xmpterm{dc:identifier} tag.  Given a prefix
+% string~(|#1|) and a main string~(|#2|), wrap these in a
+% \xmpterm{dc:identifier} if the main string is nonempty and
+% |\hyxmp at xmlified| \emph{is} empty (implying the
+% \xmpterm{dc:identifier} has not yet been written).
+% \changes{v5.2}{2020/04/29}{Added this macro}
+%    \begin{macrocode}
+\newcommand*{\hyxmp at cond@dc at identifier}[2]{%
+  \ifx\hyxmp at xmlified\@empty
+    \@ifnotmtargexp{#2}{%
+      \hyxmp at add@simple at pfx{dc:identifier}{#1}{#2}%
+    }%
+  \fi
+}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\hyxmp at dc@schema}
 % Add properties defined by the Dublin Core schema to the |\hyxmp at xml|
 % macro.  Specifically, we add entries for the \xmpprop{dc:title}
@@ -4360,11 +4477,14 @@
 % specified a \optname{pdfcopyright}, the \xmpprop{dc:creator} property
 % if the author specified a \optname{pdfauthor}, the
 % \xmpprop{dc:subject} property if the author specified
-% \optname{pdfkeywords}, and the \xmpprop{dc:language} property if the
-% author specified \optname{pdflang}.  We also specify the
-% \xmpprop{dc:date} property using the date the document was run through
-% \LaTeX\ and the \xmpprop{dc:source} property using the base name of
-% the source file with |.tex| appended.
+% \optname{pdfkeywords}, the \xmpprop{dc:language} property if the
+% author specified \optname{pdflang}, the \xmpprop{dc:type} property if
+% the author specified \optname{pdftype}, and the
+% \xmpprop{dc:identifier} if the author specified
+% \optname{pdfidentifier} or if we can derive it from other options.  We
+% also specify the \xmpprop{dc:date} property using the date the
+% document was run through \LaTeX\ and the \xmpprop{dc:source} property
+% using the base name of the source file with |.tex| appended.
 % \changes{v2.0}{2012/08/26}{Added support for \xmpprop{dc:language}
 %   and \xmpprop{dc:source}}
 % \changes{v2.4}{2013/12/21}{Made \xmpprop{dc:language} a \xmpterm{Bag}
@@ -4386,6 +4506,20 @@
   \else
     \hyxmp at add@simple{dc:source}{\@pdfsource}%
   \fi
+%    \end{macrocode}
+% If |\@pdfidentifier| is empty, try setting it to each of |\@pdfdoi|,
+% |\@pdfeissn|, |\@pdfissn|, and |\@pdfisbn|, in turn, with proper
+% syntactic adjustments.
+%    \begin{macrocode}
+  \@ifmtargexp{\@pdfidentifier}{%
+    \let\hyxmp at xmlified=\@empty
+    \hyxmp at cond@dc at identifier{info:doi/}{\@pdfdoi}%
+    \hyxmp at cond@dc at identifier{urn:ISSN:}{\@pdfeissn}%
+    \hyxmp at cond@dc at identifier{urn:ISSN:}{\@pdfissn}%
+    \hyxmp at cond@dc at identifier{urn:ISBN:}{\@pdfisbn}%
+  }{%
+    \hyxmp at add@simple{dc:identifier}{\@pdfidentifier}%
+  }%
 }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2020-05-13 21:07:02 UTC (rev 55129)
+++ trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2020-05-13 21:07:20 UTC (rev 55130)
@@ -22,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{hyperxmp}
-    [2020/04/08 v5.1 Store hyperref metadata in XMP format]
+    [2020/05/12 v5.2 Store hyperref metadata in XMP format]
 \edef\hyxmp at dq@code{\the\catcode`\"}
 \catcode`\"=12
 \def\hyxmp at driver{hpdftex}
@@ -141,12 +141,15 @@
 \define at key{Hyp}{pdfinstanceid}{\hyxmp at pdfstringdef\hyxmp at InstanceID{#1}}
 \def\@pdfversionid{1}
 \define at key{Hyp}{pdfversionid}{\hyxmp at pdfstringdef\@pdfversionid{#1}}
+\begingroup
+\let\ifdraft=\relax
 \RequirePackage{ifdraft}
 \ifdraft{%
-  \def\@pdfrendition{draft}%
+  \gdef\@pdfrendition{draft}%
 }{%
-  \def\@pdfrendition{default}%
+  \gdef\@pdfrendition{default}%
 }
+\endgroup
 \define at key{Hyp}{pdfrendition}{\hyxmp at pdfstringdef\@pdfrendition{#1}}
 \def\@pdfpublication{}
 \define at key{Hyp}{pdfpublication}{\hyxmp at pdfstringdef\@pdfpublication{#1}}
@@ -176,6 +179,8 @@
 \define at key{Hyp}{pdfdoi}{\hyxmp at pdfstringdef\@pdfdoi{#1}}
 \def\@pdfurl{}
 \define at key{Hyp}{pdfurl}{\hyxmp at pdfstringdef\@pdfurl{#1}}
+\def\@pdfidentifier{}
+\define at key{Hyp}{pdfidentifier}{\hyxmp at pdfstringdef\@pdfidentifier{#1}}
 \def\@pdfsubtitle{}
 \define at key{Hyp}{pdfsubtitle}{\hyxmp at pdfstringdef\@pdfsubtitle{#1}}
 \def\@pdfcontactaddress{}
@@ -299,6 +304,7 @@
     \@pdfdatetime
     \@pdfdoi
     \@pdfeissn
+    \@pdfidentifier
     \@pdfisbn
     \@pdfissn
     \@pdfissuenum
@@ -338,6 +344,7 @@
       \gdef\@pdfapart{1}%
       \gdef\@pdfaconformance{B}%
     }%
+    {}%
   \fi
   \edef\hyxmp at standards{%
     \@pdfapart
@@ -351,6 +358,7 @@
         compliance)%
       }%
     }%
+    {}%
   }%
 }
 \AtBeginDocument{%
@@ -569,7 +577,8 @@
 \def\hyxmp at try@today#1#2{%
   \@ifmtargexp{\hyxmp at today@xmp}{%
     \@ifundefined{#1}{}{#2}%
-  }{}%
+  }%
+  {}%
 }
 \def\hyxmp at today@xmp{}
 \hyxmp at try@today{pdfcreationdate}{%
@@ -841,6 +850,18 @@
     }%
   }%
 }
+\newcommand*{\hyxmp at add@simple at pfx}[3]{%
+  \@ifnotmtargexp{#3}{%
+    \hyxmp at add@to at xml{\hyxmp at extra@indent______<}%
+    \xdef\hyxmp at xml{\hyxmp at xml#1}%
+    \hyxmp at pdfstringdef\hyxmp at iprefix{#2}%
+    \hyxmp at xmlify{\hyxmp at iprefix}%
+    \hyxmp at add@to at xml{>\hyxmp at xmlified}%
+    \hyxmp at xmlify{#3}%
+    \hyxmp at add@to at xml{\hyxmp at xmlified</}%
+    \xdef\hyxmp at xml{\hyxmp at xml#1>^^J}%
+  }%
+}
 \def\hyxmp at alt@title{}
 \def\hyxmp at alt@description{}
 \def\hyxmp at alt@rights{}
@@ -1020,19 +1041,28 @@
     \hyxmp at define@pdfproducer
   \fi
 }
-\newcommand*{\hyxmp at pdf@schema}{%
-  \hyxmp at add@simple at var{pdf:Producer}{@pdfproducer}%
-  \hyxmp at add@simple at var{pdf:Keywords}{@pdfkeywords}%
-  \hyxmp at add@simple{pdf:Trapped}{\@pdftrapped}%
+\newcommand*{\hyxmp at assign@major at minor}{%
   \@ifundefined{pdfvariable}{%
     \@ifundefined{pdfminorversion}{%
     }{%
-      \hyxmp at add@simple{pdf:PDFVersion}{1.\the\pdfminorversion}%
+      \xdef\hyxmp at major@minor{\the\pdfminorversion}%
+      \@ifundefined{pdfmajorversion}{%
+        \xdef\hyxmp at major@minor{1.\hyxmp at major@minor}%
+      }{%
+        \xdef\hyxmp at major@minor{\the\pdfmajorversion.\hyxmp at major@minor}%
+      }%
     }%
   }{%
-    \hyxmp at add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}%
+    \xdef\hyxmp at major@minor{\the\pdfvariable majorversion.\the\pdfvariable minorversion}%
   }%
 }
+\newcommand*{\hyxmp at pdf@schema}{%
+  \hyxmp at add@simple at var{pdf:Producer}{@pdfproducer}%
+  \hyxmp at add@simple at var{pdf:Keywords}{@pdfkeywords}%
+  \hyxmp at add@simple{pdf:Trapped}{\@pdftrapped}%
+  \hyxmp at assign@major at minor
+  \hyxmp at add@simple at var{pdf:PDFVersion}{hyxmp at major@minor}%
+}
 \newcommand*{\hyxmp at rdf@dc}[3][\iffalse]{%
   \@ifmtargexp{#3}{\@tempswafalse}{\@tempswatrue}%
   #1
@@ -1106,6 +1136,13 @@
     }%
   }
 }
+\newcommand*{\hyxmp at cond@dc at identifier}[2]{%
+  \ifx\hyxmp at xmlified\@empty
+    \@ifnotmtargexp{#2}{%
+      \hyxmp at add@simple at pfx{dc:identifier}{#1}{#2}%
+    }%
+  \fi
+}
 \newcommand*{\hyxmp at dc@schema}{%
   \hyxmp at add@simple{dc:format}{application/pdf}%
   \hyxmp at rdf@dc[\ifHy at pdfa]{title}{\@pdftitle}%
@@ -1121,6 +1158,15 @@
   \else
     \hyxmp at add@simple{dc:source}{\@pdfsource}%
   \fi
+  \@ifmtargexp{\@pdfidentifier}{%
+    \let\hyxmp at xmlified=\@empty
+    \hyxmp at cond@dc at identifier{info:doi/}{\@pdfdoi}%
+    \hyxmp at cond@dc at identifier{urn:ISSN:}{\@pdfeissn}%
+    \hyxmp at cond@dc at identifier{urn:ISSN:}{\@pdfissn}%
+    \hyxmp at cond@dc at identifier{urn:ISBN:}{\@pdfisbn}%
+  }{%
+    \hyxmp at add@simple{dc:identifier}{\@pdfidentifier}%
+  }%
 }
 \newcommand*{\hyxmp at xmpRights@schema}{%
   \let\hyxmp at rights=\@empty



More information about the tex-live-commits mailing list.