texlive[49261] Master/texmf-dist: hyperxmp (27nov18)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 27 23:49:11 CET 2018


Revision: 49261
          http://tug.org/svn/texlive?view=revision&revision=49261
Author:   karl
Date:     2018-11-27 23:49:11 +0100 (Tue, 27 Nov 2018)
Log Message:
-----------
hyperxmp (27nov18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hyperxmp/README
    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/source/latex/hyperxmp/hyperxmp.ins
    trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty

Modified: trunk/Master/texmf-dist/doc/latex/hyperxmp/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hyperxmp/README	2018-11-27 01:23:23 UTC (rev 49260)
+++ trunk/Master/texmf-dist/doc/latex/hyperxmp/README	2018-11-27 22:49:11 UTC (rev 49261)
@@ -51,7 +51,7 @@
 Copyright and license
 =====================
 
-Copyright (C) 2017 Scott Pakin
+Copyright (C) 2018 Scott Pakin
 
 This file may be distributed and/or modified under the conditions of
 the LaTeX Project Public License, either version 1.3c of this license

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	2018-11-27 01:23:23 UTC (rev 49260)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2018-11-27 22:49:11 UTC (rev 49261)
@@ -203,10 +203,10 @@
           <rdf:Description rdf:about=""
                 xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
              <xmpMM:DocumentID>
-               \metavalue{uuid:0595fdce-41dc-e4c4-6c418dc4ce46}
+               \metavalue{uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0}
              </xmpMM:DocumentID>
              <xmpMM:InstanceID>
-               \metavalue{uuid:efd754c4-1d7f-200a-ef754ce413ea}
+               \metavalue{uuid:059b675f-2bb6-4262-80a3-9b6c9b6759b6}
              </xmpMM:InstanceID>
           </rdf:Description>
        </rdf:RDF>

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2018-11-27 01:23:23 UTC (rev 49260)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2018-11-27 22:49:11 UTC (rev 49261)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2017 by Scott Pakin <scott+hyxmp at pakin.org>
+% Copyright (C) 2018 by Scott Pakin <scott+hyxmp at pakin.org>
 % -------------------------------------------------------
 %
 % This file may be distributed and/or modified under the
@@ -22,7 +22,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{hyperxmp}
 %<*package>
-    [2017/11/26 v3.4 Store hyperref metadata in XMP format]
+    [2018/11/27 v3.5 Store hyperref metadata in XMP format]
 %</package>
 %
 %<*driver>
@@ -55,7 +55,7 @@
   pdftitle={The hyperxmp package},
   pdfsubject={LaTeX2e support for XMP metadata},
   pdfkeywords={LaTeX, embedded metadata, XMP, PDF, copyright, license, comments},
-  pdfcopyright={Copyright (C) 2017, Scott Pakin},
+  pdfcopyright={Copyright (C) 2018, Scott Pakin},
   pdflicenseurl={http://www.latex-project.org/lppl/},
   pdfcaptionwriter={Scott Pakin},
   pdfcontactemail={scott+hyxmp at pakin.org},
@@ -82,7 +82,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1825}
+% \CheckSum{1845}
 %
 % \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
@@ -403,6 +403,8 @@
 %   \item \optname{pdfcontacturl}
 %   \item \optname{pdfcopyright}
 %   \item \optname{pdfdate}
+%   \item \optname{pdfdocumentid}
+%   \item \optname{pdfinstanceid}
 %   \item \optname{pdflicenseurl}
 %   \item \optname{pdfmetadate}
 %   \item \optname{pdfmetalang}
@@ -474,6 +476,22 @@
 % \optname{pdflicenseurl} identifies a \acro{URL} that points to the
 % document's license agreement.
 %
+% \acro{XMP} can include a universally unique identifier (\acro{UUID})
+% for each document and for each instance of a given document.  By
+% default, \pkgname{hyperxmp} assigns a version~4 (i.e.,~pseudorandom)
+% \acro{UUID}~\cite{Leach2005:uuid} for each of these.  However, a
+% document can alternatively specify a particular document identifier
+% using \optname{pdfdocumentid} and (not normally recommended) a
+% particular instance identifier using \optname{pdfinstanceid}.  These
+% should be of the form
+% \texttt{uuid:}\textit{xxxxxxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxx}\texttt{-}\textit{xxxxxxxxxxxx},
+% where ``\textit{x}'' is a lowercase hexadecimal number.  For example,
+% \texttt{uuid:53ab7f19-a48c-5177-8bb2-403ad907f632} is a valid argument
+% to \optname{pdfdocumentid} (or \optname{pdfinstanceid}).  See Leach,
+% Mealling, and Salz's \acro{UUID} specification document for details on
+% how to produce the various forms of
+% \acro{UUID}s~\cite{Leach2005:uuid}.
+%
 % \optname{pdfmetalang} indicates the natural language in which certain
 % metadata---specifically, the document's title, subject, and copyright
 % statement---are written.  The language should be specified using an
@@ -553,6 +571,7 @@
 %         http://einstein.biz/,
 %         https://www.facebook.com/AlbertEinstein
 %       },
+%       pdfdocumentid={uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0},
 %       pdflang={en},
 %       pdfmetalang={en},
 %       baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/}
@@ -1171,6 +1190,27 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\hyxmp at DocumentID}
+% Prepare to store a \acro{UUID} that represents the document.
+% \changes{v3.5}{2018/11/27}{Added the \protect\optname{pdfdocumentid}
+%   option, at Michael Osipov's request}
+%    \begin{macrocode}
+\def\hyxmp at DocumentID{}
+\define at key{Hyp}{pdfdocumentid}{\hyxmp at pdfstringdef\hyxmp at DocumentID{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at InstanceID}
+% Prepare to store a \acro{UUID} that represents the current instance of
+% the document.
+% \changes{v3.5}{2018/11/27}{Added the \protect\optname{pdfinstanceid}
+%   option, at Michael Osipov's request}
+%    \begin{macrocode}
+\def\hyxmp at InstanceID{}
+\define at key{Hyp}{pdfinstanceid}{\hyxmp at pdfstringdef\hyxmp at InstanceID{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % The following eight macros---|\@pdfcontactaddress|,
 % |\@pdfcontactcity|, |\@pdfcontactregion|, |\@pdfcontactpostcode|,
 % |\@pdfcontactcountry|, |\@pdfcontactphone|, |\@pdfcontactemail|, and
@@ -2015,7 +2055,7 @@
 % \end{macro}
 %
 % \begin{macro}{\hyxmp at today@define}
-% Use \TeX\ primitives to define a given macro as today's date in
+% Use \tex\ primitives to define a given macro as today's date in
 % \textsc{yyyy}-\textsc{mm}-\textsc{dd}|T|hh|:|mm format.
 % \changes{v2.4}{2013/12/21}{Added this macro}
 % \changes{v3.0}{2016/07/03}{Modified to accept the name of a macro
@@ -2024,7 +2064,7 @@
 %    \begin{macrocode}
 \def\hyxmp at today@define#1{%
 %    \end{macrocode}
-% The date is a straightforward representation of \TeX's |\year|,
+% The date is a straightforward representation of \tex's |\year|,
 % |\month|, and |\day| primitives, with the latter two zero-padded to
 % two digits apiece.
 %    \begin{macrocode}
@@ -2040,9 +2080,9 @@
     \xdef#1{#1-\the\day}%
   \fi
 %    \end{macrocode}
-% \TeX\ does not provide the time in terms of separate hours and minutes
+% \tex\ does not provide the time in terms of separate hours and minutes
 % but rather as the total number of minutes since midnight (|\time|).
-% There's no mechanism in \TeX\ to query the number of seconds since
+% There's no mechanism in \tex\ to query the number of seconds since
 % midnight or the timezone so we omit those fields when defining
 % macro~|#1|.
 %    \begin{macrocode}
@@ -2223,7 +2263,7 @@
 %
 % \begin{macro}{\hyxmp at xmlify}
 % \changes{v2.0}{2012/08/02}{Completely rewritten by Heiko Oberdiek to
-%   better support Unicode-enabled \tex\ programs}
+%   better support Unicode-enabled \TeX\ programs}
 % \begin{macro}{\hyxmp at xmlified}
 % \begin{macro}{\hyxmp at text}
 % Given a piece of text defined using |\pdfstringdef| (i.e.,~with many
@@ -2861,10 +2901,20 @@
 % Seed the random-number generator with a function of the current
 % filename, \acro{PDF} document title, \acro{PDF} author, and the
 % current timestamp, then invoke |\hyxmp at create@uuid| to define
-% |\hyxmp at InstanceID| as a random \acro{UUID}.
+% |\hyxmp at InstanceID| as a random \acro{UUID}.  For the current
+% timestamp, we use both the document-specified timestamp from
+% \optname{pdfdate} and the \tex\ time.  The former can be more precise
+% (to sub-seconds) but may be less random (as it depends on manual
+% document modifications) while the latter is typically less precise (to
+% minutes) but may be more random (as it is updated automatically).
+% \changes{v3.5}{2018/11/27}{Seed with the \protect\TeX\ timestamp in
+%   addition to the document-specified timestamp}
 %    \begin{macrocode}
 \newcommand*{\hyxmp at def@InstanceID}{%
-  \edef\hyxmp at seed@string{\jobname:\@pdftitle:\@pdfauthor:\hyxmp at today}%
+  \hyxmp at today@define{\hyxmp at seed@string}%
+  \edef\hyxmp at seed@string{%
+    \jobname:\@pdftitle:\@pdfauthor:\hyxmp at today:\hyxmp at seed@string
+  }%
   \expandafter\hyxmp at seed@rng\expandafter{\hyxmp at seed@string}%
   \edef\hyxmp at rand@num{\the\@tempcnta}%
   \hyxmp at create@uuid\hyxmp at InstanceID
@@ -3335,15 +3385,21 @@
 % from within a \tex-based workflow.
 % \changes{v1.4}{2011/05/29}{Renamed the \texttt{xapMM} namespace
 %   prefix to \texttt{xmpMM}}
+% \changes{v3.5}{2018/11/27}{Generate \protect\cs{hyxmp at DocumentID} and
+%   \protect\cs{hyxmp at InstanceID} only if the document does not already
+%   define these using the \protect\optname{pdfdocumentid} and
+%   \protect\optname{pdfinstanceid} options}
 %    \begin{macrocode}
 \gdef\hyxmp at mm@schema{%
-  \hyxmp at def@DocumentID
-  \hyxmp at def@InstanceID
+  \@ifmtargexp{\hyxmp at DocumentID}{\hyxmp at def@DocumentID}{}%
+  \@ifmtargexp{\hyxmp at InstanceID}{\hyxmp at def@InstanceID}{}%
   \hyxmp at add@to at xml{%
 ______<rdf:Description rdf:about=""^^J%
 ____________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
-_________<xmpMM:DocumentID>\hyxmp at DocumentID</xmpMM:DocumentID>^^J%
-_________<xmpMM:InstanceID>\hyxmp at InstanceID</xmpMM:InstanceID>^^J%
+  }%
+  \hyxmp at add@simple{xmpMM:DocumentID}{\hyxmp at DocumentID}%
+  \hyxmp at add@simple{xmpMM:InstanceID}{\hyxmp at InstanceID}%
+  \hyxmp at add@to at xml{%
 ______</rdf:Description>^^J%
   }%
 }

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.ins	2018-11-27 01:23:23 UTC (rev 49260)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.ins	2018-11-27 22:49:11 UTC (rev 49261)
@@ -1,5 +1,5 @@
 %%
-%% Copyright (C) 2017 by Scott Pakin <scott+hyxmp at pakin.org>
+%% Copyright (C) 2018 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 of this license
@@ -21,7 +21,7 @@
 
 This is a generated file.
 
-Copyright (C) 2017 by Scott Pakin <scott+hyxmp at pakin.org>
+Copyright (C) 2018 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 of this license

Modified: trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2018-11-27 01:23:23 UTC (rev 49260)
+++ trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2018-11-27 22:49:11 UTC (rev 49261)
@@ -8,7 +8,7 @@
 %% 
 %% This is a generated file.
 %% 
-%% Copyright (C) 2017 by Scott Pakin <scott+hyxmp at pakin.org>
+%% Copyright (C) 2018 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 of this license
@@ -22,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{hyperxmp}
-    [2017/11/26 v3.4 Store hyperref metadata in XMP format]
+    [2018/11/27 v3.5 Store hyperref metadata in XMP format]
 \edef\hyxmp at dq@code{\the\catcode`\"}
 \catcode`\"=12
 \def\hyxmp at driver{hpdftex}
@@ -86,6 +86,10 @@
 \define at key{Hyp}{pdfaconformance}{\hyxmp at pdfstringdef\@pdfaconformance{#1}}
 \edef\@pdfsource{\jobname.tex}
 \define at key{Hyp}{pdfsource}{\hyxmp at pdfstringdef\@pdfsource{#1}}
+\def\hyxmp at DocumentID{}
+\define at key{Hyp}{pdfdocumentid}{\hyxmp at pdfstringdef\hyxmp at DocumentID{#1}}
+\def\hyxmp at InstanceID{}
+\define at key{Hyp}{pdfinstanceid}{\hyxmp at pdfstringdef\hyxmp at InstanceID{#1}}
 \def\@pdfcontactaddress{}
 \define at key{Hyp}{pdfcontactaddress}{%
   \let\xmpcomma=\hyxmp at comma
@@ -722,7 +726,10 @@
   \hyxmp at create@uuid\hyxmp at DocumentID
 }
 \newcommand*{\hyxmp at def@InstanceID}{%
-  \edef\hyxmp at seed@string{\jobname:\@pdftitle:\@pdfauthor:\hyxmp at today}%
+  \hyxmp at today@define{\hyxmp at seed@string}%
+  \edef\hyxmp at seed@string{%
+    \jobname:\@pdftitle:\@pdfauthor:\hyxmp at today:\hyxmp at seed@string
+  }%
   \expandafter\hyxmp at seed@rng\expandafter{\hyxmp at seed@string}%
   \edef\hyxmp at rand@num{\the\@tempcnta}%
   \hyxmp at create@uuid\hyxmp at InstanceID
@@ -914,13 +921,15 @@
   \fi
 }
 \gdef\hyxmp at mm@schema{%
-  \hyxmp at def@DocumentID
-  \hyxmp at def@InstanceID
+  \@ifmtargexp{\hyxmp at DocumentID}{\hyxmp at def@DocumentID}{}%
+  \@ifmtargexp{\hyxmp at InstanceID}{\hyxmp at def@InstanceID}{}%
   \hyxmp at add@to at xml{%
 ______<rdf:Description rdf:about=""^^J%
 ____________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
-_________<xmpMM:DocumentID>\hyxmp at DocumentID</xmpMM:DocumentID>^^J%
-_________<xmpMM:InstanceID>\hyxmp at InstanceID</xmpMM:InstanceID>^^J%
+  }%
+  \hyxmp at add@simple{xmpMM:DocumentID}{\hyxmp at DocumentID}%
+  \hyxmp at add@simple{xmpMM:InstanceID}{\hyxmp at InstanceID}%
+  \hyxmp at add@to at xml{%
 ______</rdf:Description>^^J%
   }%
 }



More information about the tex-live-commits mailing list