texlive[50812] Master/texmf-dist: hyperxmp (6apr19)
commits+karl at tug.org
commits+karl at tug.org
Sat Apr 6 23:11:36 CEST 2019
Revision: 50812
http://tug.org/svn/texlive?view=revision&revision=50812
Author: karl
Date: 2019-04-06 23:11:36 +0200 (Sat, 06 Apr 2019)
Log Message:
-----------
hyperxmp (6apr19)
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 2019-04-06 21:07:49 UTC (rev 50811)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex 2019-04-06 21:11:36 UTC (rev 50812)
@@ -79,6 +79,11 @@
</rdf:li>
</rdf:Alt>
</dc:rights>
+ <dc:publisher>
+ <rdf:Bag>
+ <rdf:li>\metavalue{Wiley-VCH}</rdf:li>
+ </rdf:Bag>
+ </dc:publisher>
<dc:creator>
<rdf:Seq>
<rdf:li>\metavalue{Albert Einstein}</rdf:li>
Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx 2019-04-06 21:07:49 UTC (rev 50811)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx 2019-04-06 21:11:36 UTC (rev 50812)
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{hyperxmp}
%<*package>
- [2019/03/31 v4.0 Store hyperref metadata in XMP format]
+ [2019/04/05 v4.1 Store hyperref metadata in XMP format]
%</package>
%
%<*driver>
@@ -39,6 +39,7 @@
\usepackage{varioref}
\usepackage{alltt}
\usepackage{multicol}
+\usepackage{makeidx}
\usepackage[utf8]{inputenc}
\usepackage{hyperxmp}
\usepackage[unicode,bookmarksopen,bookmarksopenlevel=2,bookmarksnumbered]{hyperref}
@@ -88,7 +89,7 @@
%</driver>
% \fi
%
-% \CheckSum{2082}
+% \CheckSum{2095}
%
% \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
@@ -123,8 +124,8 @@
% to work within email addresses, as requested by Leonid Sinev}
% \changes{v2.6}{2014/09/24}{Added support for a new \protect\optname{pdfdate}
% key to explicitly specify the document date (and optionally time)}
-% \changes{v2.9}{2016/04/25}{Force inclusion of \protect\xmpterm{dc:creator},
-% \protect\xmpterm{dc:title}, and \protect\xmpterm{dc:description}---even if
+% \changes{v2.9}{2016/04/25}{Force inclusion of \protect\xmpprop{dc:creator},
+% \protect\xmpprop{dc:title}, and \protect\xmpprop{dc:description}---even if
% empty---when \protect\pkgname{hyperref} is loaded with the
% \protect\optname{pdfa} option (suggested by Leonid Sinev)}
% \changes{v2.9}{2016/04/26}{Introduced the \protect\optname{pdftype}
@@ -138,26 +139,30 @@
% empty arguments, including non-empty but all spaces}
% \changes{v4.0}{2019/03/14}{Include all metadata within a single
% \protect\xmpterm{rdf:Description} block}
+% \changes{v4.1}{2019/04/05}{Updated the documentation to refer to
+% \protect\cs{pdfnumpages} by its correct name. Thanks to Volker RW Schaa
+% for catching the discrepancy}
%
% ^^A \GetFileInfo{hyperxmp.dtx}
%
-% \DoNotIndex{,\,\ ,\!,\",\#,\(,\),\*,\<,\>,\@cons,\@empty}
-% \DoNotIndex{\@ifpackageloaded,\@ifundefined,\@nil,\@tempcnta,\@tempcntb}
-% \DoNotIndex{\MessageBreak,\\,\^,\^,\_,\advance,\afterassignment}
+% \DoNotIndex{\,,\&,\ ,\!,\",\#,\(,\),\*,\<,\>,\\,\^,\~,\^,\_}
+% \DoNotIndex{\@cons,\@empty,\@firstofone,\@firstoftwo,\@gobble,\@gobbletwo}
+% \DoNotIndex{\@ifpackageloaded,\@ifundefined,\@nil,\@secondoftwo}
+% \DoNotIndex{\@tempcnta,\@tempcntb,\MessageBreak,\advance,\afterassignment}
% \DoNotIndex{\aftergroup,\begin,\begingroup,\bgroup,\catcode,\csname,\def}
% \DoNotIndex{\divide,\edef,\egroup,\else,\end,\endcsname,\endgroup}
% \DoNotIndex{\expandafter,\fi,\futurelet,\g at addto@macro,\gdef,\global,\if}
% \DoNotIndex{\ifcase,\ifnum,\ifx,\immediate,\lccode,\let,\loop,\lowercase}
% \DoNotIndex{\multiply,\newcommand,\noexpand,\or,\relax,\repeat,\space}
-% \DoNotIndex{\string,\the,\toks,\uccode,\uppercase,\usepackage,\xdef,\~}
+% \DoNotIndex{\string,\the,\toks,\uccode,\uppercase,\usepackage,\xdef}
%
% ^^A Define a few logical styles.
% \DeclareRobustCommand{\term}[1]{#1\SortIndex{#1}{#1}}
% \DeclareRobustCommand{\pkgname}[1]{\mbox{\textsf{#1}}\SortIndex{#1}{\textsf{#1}}}
% \makeatletter
-% \DeclareRobustCommand{\xmpterm}[2][]{^^A
-% \def\xmptermopt{#1}^^A
-% \ifx\xmptermopt\@empty
+% \DeclareRobustCommand{\xmpprop}[2][]{^^A XMP property
+% \def\xmppropopt{#1}^^A
+% \ifx\xmppropopt\@empty
% \mbox{\textsf{#2}}^^A
% \else
% \mbox{\textsf{#2}}.\mbox{\textsf{#1}}^^A
@@ -164,8 +169,14 @@
% \SortIndex{#1}{\textsf{#1}}^^A
% \fi
% \SortIndex{#2}{\textsf{#2}}^^A
+% \index{properties, \acrostyle{XMP}=\textsf{#2}}^^A
% }
+% \DeclareRobustCommand{\xmpterm}[1]{^^A All other XMP terms
+% \mbox{\textsf{#1}}^^A
+% \SortIndex{#1}{\textsf{#1}}^^A
+% }
% \makeatother
+% \index{XMP=\acrostyle {XMP}&properties|see{properties, \acrostyle{XMP}}}
% \DeclareRobustCommand{\pdfterm}[1]{\mbox{\textsf{#1}}\SortIndex{#1}{\textsf{#1}}}
% \DeclareRobustCommand{\cmdname}[1]{\mbox{\texttt{#1}}\SortIndex{#1}{\texttt{#1}}}
% \DeclareRobustCommand{\optname}[1]{^^A
@@ -173,7 +184,7 @@
% \SortIndex{#1}{\textsf{#1} (option)}^^A
% \index{options=\textsf{#1}}^^A
% }
-% ^^A \moptname is the same as \optname but also typesets the
+% ^^A \moptname is the same as \optname but additionally typesets the
% ^^A option name in the margin.
% \DeclareRobustCommand{\moptname}[1]{^^A
% \optname{#1}^^A
@@ -303,7 +314,7 @@
%
% In the preceding code, the |dc| namespace refers to the
% \href{http://purl.org/DC/}{Dublin Core schema}, a collection of
-% metadata properties. The \xmpterm{dc:creator} property surrounds the
+% metadata properties. The \xmpprop{dc:creator} property surrounds the
% list of authors. The \textsf{rdf} namespace is the
% \href{http://www.w3.org/RDF/}{Resource Description Framework}, which
% defines \xmpterm{rdf:Seq} as an ordered list of values. Each author
@@ -322,48 +333,49 @@
% \label{page:begin-metadata-list}
% \begin{itemize} \raggedright
% \item address of primary author
-% (\xmpterm[CiAdrExtadr]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrCity]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrRegion]{Iptc4xmpCore:CreatorContactInfo},
-% \xmpterm[CiAdrPcode]{Iptc4xmpCore:CreatorContactInfo}, and
-% \xmpterm[CiAdrCtry]{Iptc4xmpCore:CreatorContactInfo})
-% \item author(s) (\xmpterm{dc:creator})
-% \item base \acro{URL} for relative references (\xmpterm{xmp:BaseURL})
-% \item book edition (\xmpterm{prism:bookEdition})
-% \item copyright (\xmpterm{dc:rights} and \xmpterm{xmpRights:Marked})
-% \item date (\xmpterm{dc:date}, \xmpterm{xmp:CreateDate},
-% \xmpterm{xmp:ModifyDate}, and \xmpterm{xmp:MetadataDate})
-% \item \acro{DOI} (\xmpterm{prism:doi})
-% \item email address(es) of primary author (\xmpterm[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo})
-% \item file format (\xmpterm{dc:format})
-% \item file name of main \LaTeX\ source file (\xmpterm{dc:source})
-% \item file size in bytes (\xmpterm{prism:byteCount})
-% \item \acro{ISBN} (\xmpterm{prism:isbn})
-% \item \acro{ISSN}---both print (\xmpterm{prism:issn}) and electronic (\xmpterm{prism:eIssn})
-% \item issue number of parent publication (\xmpterm{prism:number})
-% \item keywords (\xmpterm{pdf:Keywords} and \xmpterm{dc:subject})
-% \item language used (\xmpterm{dc:language})
-% \item license \acro{URL} (\xmpterm{xmpRights:WebStatement})
-% \item metadata writer (\xmpterm{photoshop:CaptionWriter})
-% \item page count (\xmpterm{prism:pageCount})
-% \item page range(s) (\xmpterm{prism:pageRange})
-% \item \acro{PDF} version (\xmpterm{pdf:PDFVersion})
-% \item \acro{PDF}-generating tool (\xmpterm{pdf:Producer} and \xmpterm{xmp:CreatorTool})
-% \item \acro{PDF/A} compliance level and version (\xmpterm{pdfaid:part} and \xmpterm{pdfaid:conformance})
-% \item position/title of primary author (\xmpterm{photoshop:AuthorsPosition})
-% \item publication name of parent publication (\xmpterm{prism:publicationName})
-% \item summary (\xmpterm{dc:description})
-% \item subtitle (\xmpterm{prism:subtitle})
-% \item telephone number(s) of primary author (\xmpterm[CiTelWork]{Iptc4xmpCore:CreatorContactInfo})
-% \item title (\xmpterm{dc:title})
-% \item type of document (\xmpterm{dc:type})
-% \item type of parent publication (\xmpterm{prism:aggregationType})
-% \item \acro{URL} of the document (\xmpterm{prism:url})
-% \item \acro{URL}(s) of the primary author (\xmpterm[CiUrlWork]{Iptc4xmpCore:CreatorContactInfo})
-% \item \acro{UUID} for the document (\xmpterm{xmpMM:DocumentID})
-% \item \acro{UUID} for the document instance (\xmpterm{xmpMM:InstanceID})
-% \item version identifier for the document (\xmpterm{xmpMM:VersionID})
-% \item volume number of parent publication (\xmpterm{prism:volume})
+% (\xmpprop[CiAdrExtadr]{Iptc4xmpCore:CreatorContactInfo},
+% \xmpprop[CiAdrCity]{Iptc4xmpCore:CreatorContactInfo},
+% \xmpprop[CiAdrRegion]{Iptc4xmpCore:CreatorContactInfo},
+% \xmpprop[CiAdrPcode]{Iptc4xmpCore:CreatorContactInfo}, and
+% \xmpprop[CiAdrCtry]{Iptc4xmpCore:CreatorContactInfo})
+% \item author(s) (\xmpprop{dc:creator})
+% \item base \acro{URL} for relative references (\xmpprop{xmp:BaseURL})
+% \item book edition (\xmpprop{prism:bookEdition})
+% \item copyright (\xmpprop{dc:rights} and \xmpprop{xmpRights:Marked})
+% \item date (\xmpprop{dc:date}, \xmpprop{xmp:CreateDate},
+% \xmpprop{xmp:ModifyDate}, and \xmpprop{xmp:MetadataDate})
+% \item \acro{DOI} (\xmpprop{prism:doi})
+% \item email address(es) of primary author (\xmpprop[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo})
+% \item file format (\xmpprop{dc:format})
+% \item file name of main \LaTeX\ source file (\xmpprop{dc:source})
+% \item file size in bytes (\xmpprop{prism:byteCount})
+% \item \acro{ISBN} (\xmpprop{prism:isbn})
+% \item \acro{ISSN}---both print (\xmpprop{prism:issn}) and electronic (\xmpprop{prism:eIssn})
+% \item issue number of parent publication (\xmpprop{prism:number})
+% \item keywords (\xmpprop{pdf:Keywords} and \xmpprop{dc:subject})
+% \item language used (\xmpprop{dc:language})
+% \item license \acro{URL} (\xmpprop{xmpRights:WebStatement})
+% \item metadata writer (\xmpprop{photoshop:CaptionWriter})
+% \item page count (\xmpprop{prism:pageCount})
+% \item page range(s) (\xmpprop{prism:pageRange})
+% \item \acro{PDF} version (\xmpprop{pdf:PDFVersion})
+% \item \acro{PDF}-generating tool (\xmpprop{pdf:Producer} and \xmpprop{xmp:CreatorTool})
+% \item \acro{PDF/A} compliance level and version (\xmpprop{pdfaid:part} and \xmpprop{pdfaid:conformance})
+% \item position/title of primary author (\xmpprop{photoshop:AuthorsPosition})
+% \item publication name of parent publication (\xmpprop{prism:publicationName})
+% \item publisher of the document (\xmpprop{dc:publisher})
+% \item summary (\xmpprop{dc:description})
+% \item subtitle (\xmpprop{prism:subtitle})
+% \item telephone number(s) of primary author (\xmpprop[CiTelWork]{Iptc4xmpCore:CreatorContactInfo})
+% \item title (\xmpprop{dc:title})
+% \item type of document (\xmpprop{dc:type})
+% \item type of parent publication (\xmpprop{prism:aggregationType})
+% \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})
+% \item \acro{UUID} for the document instance (\xmpprop{xmpMM:InstanceID})
+% \item version identifier for the document (\xmpprop{xmpMM:VersionID})
+% \item volume number of parent publication (\xmpprop{prism:volume})
% \end{itemize}
% \label{page:end-metadata-list}
%
@@ -450,9 +462,10 @@
% \item \optname{pdflicenseurl}
% \item \optname{pdfmetadate}
% \item \optname{pdfmetalang}
-% \item \optname{pdfpagecount}
+% \item \optname{pdfnumpages}
% \item \optname{pdfpagerange}
% \item \optname{pdfpublication}
+% \item \optname{pdfpublisher}
% \item \optname{pdfpubtype}
% \item \optname{pdfsource}
% \item \optname{pdfsubtitle}
@@ -574,7 +587,8 @@
% French-language title. Were the language or pronunciation differences
% significant, |fr-FR| would indicate specifically the French spoken in
% France, as opposed to that spoken in, say, Canada (|fr-CA|) or Belgium
-% (|fr-BE|).
+% (|fr-BE|). The publisher itself can be named using
+% \moptname{pdfpublisher}.
%
% \moptname{pdfpubtype} indicates the type of publication in which the
% document was published. This should be one of the \acro{PRISM}
@@ -727,6 +741,7 @@
% pdfdocumentid={uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0},
% pdfversionid={2.998e8},
% pdfpublication={[de]Annalen der Physik},
+% pdfpublisher={Wiley-VCH},
% pdfpubtype={journal},
% pdfvolumenum={322},
% pdfissuenum={6},
@@ -810,9 +825,9 @@
% \optname{pdfauthor}, \optname{pdftitle}, \optname{pdfsubject}, and
% \optname{pdfkeywords} options assign values to those keys. The
% \pkgname{hyperxmp} package additionally uses those options to assign
-% values to various \acro{XMP} metadata: \xmpterm{dc:creator},
-% \xmpterm{dc:title}, \xmpterm{dc:description}, and
-% \xmpterm{pdf:Keywords}. The \acro{PDF/A} specification indicates that
+% values to various \acro{XMP} metadata: \xmpprop{dc:creator},
+% \xmpprop{dc:title}, \xmpprop{dc:description}, and
+% \xmpprop{pdf:Keywords}. The \acro{PDF/A} specification indicates that
% values that appear in both the \acro{PDF} \pdfterm{Info} dictionary
% and \acro{XMP} packet must match. The problem is that in \acro{XMP},
% the author and keywords can be proper lists, as in
@@ -1042,7 +1057,7 @@
% \end{verbatim}
%
% \noindent
-% Rather, it generates a \xmpterm{dc:rights} tag of the form
+% Rather, it generates a \xmpprop{dc:rights} tag of the form
% ``\texttt{Copyright \textcopyright\ =2=0=by-1by=0\the\year, Scott
% Pakin}''. The garbage in that line corresponds to the remnants of
% the |\printfdate| code after expanding all of the \tex\ primitives and
@@ -1588,6 +1603,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@pdfpublisher}
+% Prepare to store the name of the document's publisher.
+% \begin{macrocode}
+\def\@pdfpublisher{}
+\define at key{Hyp}{pdfpublisher}{\hyxmp at pdfstringdef\@pdfpublisher{#1}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@pdfvolumenum}
% Prepare to store the volume identifier of the publication in which the
% document was published.
@@ -1989,10 +2012,10 @@
}%
\ifx\hyxmp at concated@metadata\@empty
\PackageWarningNoLine{hyperxmp}{%
-\jobname.tex did not specify any metadata to\MessageBreak
-include in the XMP packet.\space\space Please see the\MessageBreak
-hyperxmp documentation for instructions on how to\MessageBreak
-provide metadata values to hyperxmp}%
+ \jobname.tex did not specify any metadata to\MessageBreak
+ include in the XMP packet.\space\space Please see the\MessageBreak
+ hyperxmp documentation for instructions on how to\MessageBreak
+ provide metadata values to hyperxmp}%
\fi
}
% \end{macrocode}
@@ -2077,6 +2100,20 @@
}%
{}%
% \end{macrocode}
+% Older versions of \pkgname{hyperref} write the \pdfterm{Info}
+% dictionary to the \acro{PDF} file at the end of the document. New
+% versions of \pkgname{hyperref} write the \pdfterm{Info} dictionary to
+% the \acro{PDF} file at the \emph{beginning} of the document. For
+% compatibility with both old and new \pkgname{hyperref} implementations
+% we suppress writing the \pdfterm{Info} dictionary here, at the
+% beginning of the document.
+% \changes{v4.1}{2019/04/02}{Invoke
+% \protect\cs{hyxmp at suppress@pdf at metadata} at the beginning of the
+% document, for compatibility with both newer and older versions of
+% \protect\pkgname{hyperref}}
+% \begin{macrocode}
+ \hyxmp at suppress@pdf at metadata
+% \end{macrocode}
% We wait until the end of the document to construct the \acro{XMP}
% packet and write it to the \acro{PDF} document catalog. This gives
% the author ample opportunity to provide metadata to \pkgname{hyperref}
@@ -2083,17 +2120,16 @@
% and thereby \pkgname{hyperxmp}.
% \begin{macrocode}
\hyxmp at at@end{%
- \hyxmp at suppress@pdf at metadata
\hyxmp at find@metadata
\hyxmp at embed@packet
}%
}{%
\PackageWarningNoLine{hyperxmp}{%
-\jobname.tex failed to include a\MessageBreak
-\string\usepackage\string{hyperref\string}
-in the preamble.\MessageBreak
-Consequently, all hyperxmp functionality will be\MessageBreak
-disabled}%
+ \jobname.tex failed to include a\MessageBreak
+ \string\usepackage\string{hyperref\string}
+ in the preamble.\MessageBreak
+ Consequently, all hyperxmp functionality will be\MessageBreak
+ disabled}%
}%
}
% \end{macrocode}
@@ -2473,7 +2509,7 @@
% different literal for |\hyxmp at xmp@to at pdf@date at vii|'s pattern-matching
% to work.
% \begin{macrocode}
-\let\@hyxmp at gobbletwo=\@gobbletwo
+\let\hyxmp at gobbletwo=\@gobbletwo
% \end{macrocode}
% \end{macro}
%
@@ -2497,7 +2533,7 @@
Z%
\fi
\ifx#3\relax
- \expandafter\@hyxmp at gobbletwo
+ \expandafter\hyxmp at gobbletwo
\fi
\@gobbletwo #4%
}
@@ -3082,8 +3118,8 @@
% \subsubsection{Providing metadata in multiple languages}
% \label{sec:lang-alt}
%
-% Certain \acro{XMP} tags---\xmpterm{dc:title},
-% \xmpterm{dc:description}, and \xmpterm{dc:rights} (and others? Let me
+% Certain \acro{XMP} tags---\xmpprop{dc:title},
+% \xmpprop{dc:description}, and \xmpprop{dc:rights} (and others? Let me
% know.)---can be expressed in multiple languages. The same text is
% used for both language \optname{pdfmetalang} (default:
% \optname{pdflang}) and language ``|x-default|''. To express the same
@@ -3168,8 +3204,8 @@
% We use a linear congruential generator to produce pseudorandom
% version~4 \acro{UUID}s~\cite{Leach2005:uuid}. True, this method has
% its flaws but it's simple to implement in \tex\ and is good enough for
-% producing the \acro{XMP} \xmpterm{xmpMM:DocumentID} and
-% \xmpterm{xmpMM:InstanceID} fields.
+% producing the \acro{XMP} \xmpprop{xmpMM:DocumentID} and
+% \xmpprop{xmpMM:InstanceID} fields.
%
% \begin{macro}{\hyxmp at modulo@a}
% Replace the contents of |\@tempcnta| with the contents modulo~|#1|.
@@ -3507,10 +3543,10 @@
\newcommand*{\hyxmp at pdf@schema}{%
% \end{macrocode}
% Add a block of \acro{XML} to |\hyxmp at xml| that lists the document's
-% keywords (the \xmpterm{pdf:Keywords} property), the tools used to
-% produce the \acro{PDF} file (the \xmpterm{pdf:Producer} property), and
+% keywords (the \xmpprop{pdf:Keywords} property), the tools used to
+% produce the \acro{PDF} file (the \xmpprop{pdf:Producer} property), and
% the version of the \acro{PDF} standard adhered to (the
-% \xmpterm{pdf:PDFVersion} property). Unlike most of the other schemata
+% \xmpprop{pdf:PDFVersion} property). Unlike most of the other schemata
% that \pkgname{hyperxmp} supports, the Adobe \acro{PDF} schema is
% \emph{always} included in the document, even if all of its keys are
% empty. This is because \acro{PDF/A}-1b requires the keywords and
@@ -3518,7 +3554,7 @@
% metadata. Because \pkgname{hyperref} always specifies the
% \pdfterm{Keywords} and \pdfterm{Producer} fields, even when they're
% empty, \pkgname{hyperxmp} has to follow suit and define
-% \xmpterm{pdf:Keywords} and \xmpterm{pdf:Producer} in the \acro{XMP}
+% \xmpprop{pdf:Keywords} and \xmpprop{pdf:Producer} in the \acro{XMP}
% packet.
% \changes{v2.4}{2013/12/21}{Made
% \texttt{\string\string\string\hyxmp at pdf@schema}
@@ -3774,23 +3810,44 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\hyxmp at singleton@dc}
+% Given an optional list type (|Seq| or |Bag|), a Dublin Core property,
+% and a string, append a block of \acro{XML} representing a one-element
+% list consisting of the given string.
+% \changes{v4.1}{2019/04/05}{Added this macro}
+% \begin{macrocode}
+\newcommand{\hyxmp at singleton@dc}[3][Bag]{%
+ \@ifnotmtarg{#3}{%
+ \hyxmp at xmlify{#3}%
+ \hyxmp at add@to at xml{%
+______<dc:#2>^^J%
+________<rdf:#1>^^J%
+__________<rdf:li>\hyxmp at xmlified</rdf:li>^^J%
+________</rdf:#1>^^J%
+______</dc:#2>^^J%
+ }%
+ }
+}
+% \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 \xmpterm{dc:title}
+% macro. Specifically, we add entries for the \xmpprop{dc:title}
% property if the author specified a \optname{pdftitle}, the
-% \xmpterm{dc:description} property if the author specified a
-% \optname{pdfsubject}, the \xmpterm{dc:rights} property if the author
-% specified a \optname{pdfcopyright}, the \xmpterm{dc:creator} property
+% \xmpprop{dc:description} property if the author specified a
+% \optname{pdfsubject}, the \xmpprop{dc:rights} property if the author
+% specified a \optname{pdfcopyright}, the \xmpprop{dc:creator} property
% if the author specified a \optname{pdfauthor}, the
-% \xmpterm{dc:subject} property if the author specified
-% \optname{pdfkeywords}, and the \xmpterm{dc:language} property if 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
-% \xmpterm{dc:date} property using the date the document was run through
-% \LaTeX\ and the \xmpterm{dc:source} property using the base name of
+% \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 \xmpterm{dc:language}
-% and \xmpterm{dc:source}}
-% \changes{v2.4}{2013/12/21}{Made \xmpterm{dc:language} a \xmpterm{Bag}
+% \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}
% instead of an individual item so as to conform to the latest
% \acro{XMP} specifications, a detail identified by Florian Breitwieser}
% \begin{macrocode}
@@ -3799,11 +3856,12 @@
\hyxmp at rdf@dc[\ifHy at pdfa]{title}{\@pdftitle}%
\hyxmp at rdf@dc[\ifHy at pdfa]{description}{\@pdfsubject}%
\hyxmp at rdf@dc{rights}{\@pdfcopyright}%
+ \hyxmp at singleton@dc{publisher}{\@pdfpublisher}%
+ \hyxmp at singleton@dc[Seq]{date}{\hyxmp at today}%
+ \hyxmp at singleton@dc{language}{\@pdflang}%
+ \hyxmp at singleton@dc{type}{\@pdftype}%
\hyxmp at list@to at xml[\ifHy at pdfa]{creator}{Seq}{\hyxmp at pdfauthor}%
\hyxmp at list@to at xml{subject}{Bag}{\hyxmp at pdfkeywords}%
- \hyxmp at list@to at xml{date}{Seq}{\hyxmp at today}%
- \hyxmp at list@to at xml{language}{Bag}{\@pdflang}%
- \hyxmp at list@to at xml{type}{Bag}{\@pdftype}%
\ifx\@pdfsource\@empty
\else
\hyxmp at add@simple{dc:source}{\@pdfsource}%
@@ -3818,8 +3876,8 @@
% \begin{macro}{\hyxmp at xmpRights@schema}
% Add properties defined by the \acro{XMP} Rights Management schema to the
% |\hyxmp at xml| macro. Currently, these are only the
-% \xmpterm{xmpRights:Marked} property and the
-% \xmpterm{xmpRights:WebStatement} property. If the author specified a
+% \xmpprop{xmpRights:Marked} property and the
+% \xmpprop{xmpRights:WebStatement} property. If the author specified a
% copyright statement we mark the document as copyrighted. If the
% author specified a license statement we include the \acro{URL} in the
% metadata.
@@ -3826,8 +3884,8 @@
% \changes{v1.4}{2011/05/29}{Renamed the \texttt{xapRights} namespace
% prefix to \texttt{xmpRights}}
% \changes{v2.0}{2012/08/25}{Modified to include
-% \xmpterm{xmpRights:Marked} only when \optname{pdfcopyright} is
-% specified and \xmpterm{xmpRights:WebStatement} only when
+% \xmpprop{xmpRights:Marked} only when \optname{pdfcopyright} is
+% specified and \xmpprop{xmpRights:WebStatement} only when
% \optname{pdflicenseurl} is specified}
% \begin{macrocode}
\newcommand*{\hyxmp at xmpRights@schema}{%
@@ -3870,12 +3928,12 @@
% \begin{macro}{\hyxmp at mm@schema}
% Add properties defined by the \acro{XMP} Media Management schema to
% the |\hyxmp at xml| macro. According to the \acro{XMP} specification,
-% the \xmpterm{xmpMM:DocumentID} property is supposed to uniquely
-% identify a document, and the \xmpterm{xmpMM:InstanceID} property is
+% the \xmpprop{xmpMM:DocumentID} property is supposed to uniquely
+% identify a document, and the \xmpprop{xmpMM:InstanceID} property is
% supposed to change with each save operation~\cite{Adobe2012:XMP}. As
% seen in Section~\ref{sec:uuid-gen}, we do what we can to honor this
% intention from within a \tex-based workflow. We additionally support
-% the \xmpterm{xmpMM:VersionID} property, whose value is supplied by
+% the \xmpprop{xmpMM:VersionID} property, whose value is supplied by
% the author using \optname{pdfversionid}.
% \changes{v1.4}{2011/05/29}{Renamed the \texttt{xapMM} namespace
% prefix to \texttt{xmpMM}}
@@ -3883,7 +3941,7 @@
% \protect\cs{hyxmp at InstanceID} only if the document does not already
% define these using the \protect\optname{pdfdocumentid} and
% \protect\optname{pdfinstanceid} options}
-% \changes{v4.0}{2019/03/09}{Include \protect\xmpterm{xmpMM:VersionID} in
+% \changes{v4.0}{2019/03/09}{Include \protect\xmpprop{xmpMM:VersionID} in
% the \protect\acro{XMP} packet}
% \begin{macrocode}
\gdef\hyxmp at mm@schema{%
@@ -3904,8 +3962,8 @@
% \begin{macro}{\hyxmp at createdate}
% Define |\hyxmp at createdate| as the document's creation date but in
% \acro{XMP} date format, not \acro{PDF} date format. We use
-% |\hyxmp at createdate| for the \xmpterm{xmp:CreateDate},
-% \xmpterm{xmp:ModifyDate}, and \xmpterm{xmp:MetadataDate} fields.
+% |\hyxmp at createdate| for the \xmpprop{xmp:CreateDate},
+% \xmpprop{xmp:ModifyDate}, and \xmpprop{xmp:MetadataDate} fields.
% \begin{macrocode}
\newcommand*{\hyxmp at define@createdate}{%
\@ifundefined{pdffeedback}{%
@@ -3939,8 +3997,8 @@
% \optname{baseurl}.
% \changes{v2.0}{2012/08/26}{Added this macro}
% \changes{v3.0}{2016/07/04}{Made the \protect\acro{XMP}
-% \protect\xmpterm{xmp:CreateDate}, \protect\xmpterm{xmp:ModifyDate},
-% and \protect\xmpterm{xmp:MetadataDate} match the \protect\acro{PDF}
+% \protect\xmpprop{xmp:CreateDate}, \protect\xmpprop{xmp:ModifyDate},
+% and \protect\xmpprop{xmp:MetadataDate} match the \protect\acro{PDF}
% \protect\pdfterm{CreationDate}}
% \changes{v3.2}{2017/01/22}{Honor \string\pkgname{hyperref}'s
% \string\optname{pdfcreationdate} and \string\optname{pdfmoddate}
@@ -4009,8 +4067,8 @@
% \begin{macro}{\hyxmp at photoshop@data}
% Add properties defined by the Photoshop schema to the |\hyxmp at xml|
% macro. We currently support only the
-% \xmpterm{photoshop:AuthorsPosition} and
-% \xmpterm{photoshop:CaptionWriter} properties.
+% \xmpprop{photoshop:AuthorsPosition} and
+% \xmpprop{photoshop:CaptionWriter} properties.
% \begin{macrocode}
\gdef\hyxmp at photoshop@schema{%
\edef\hyxmp at photoshop@data{\@pdfauthortitle\@pdfcaptionwriter}%
@@ -4114,7 +4172,7 @@
% \begin{macro}{\hyxmp at iptc@schema}
% Add properties defined by the \acro{IPTC} Photo Metadata
% schema~\cite{IPTC2010:photo-meta} to the |\hyxmp at xml| macro. We
-% currently support only the \xmpterm{Iptc4xmpCore:CreatorContactInfo}
+% currently support only the \xmpprop{Iptc4xmpCore:CreatorContactInfo}
% property, although this is a structure containing multiple fields.
% \changes{v2.2}{2012/12/07}{Added this macro}
% \changes{v2.9}{2016/04/23}{Use \textsf{Iptc4xmpCore} instead of
@@ -4133,9 +4191,9 @@
\gdef\hyxmp at iptc@schema{%
% \end{macrocode}
% Because we currently support only
-% \xmpterm{Iptc4xmpCore:CreatorContactInfo} it suffices to check if we
+% \xmpprop{Iptc4xmpCore:CreatorContactInfo} it suffices to check if we
% have any relevant data. If so, we instantiate a
-% \xmpterm{Iptc4xmpCore:ContactInfo} structure with all available
+% \xmpprop{Iptc4xmpCore:ContactInfo} structure with all available
% fields.
% \begin{macrocode}
\ifx\hyxmp at iptc@data\@empty
@@ -4145,7 +4203,7 @@
}%
% \end{macrocode}
% We locally redefine |\hyxmp at extra@indent| to increase the indentation
-% of the assignments to \xmpterm{Iptc4xmpCore:CreatorContactInfo}'s
+% of the assignments to \xmpprop{Iptc4xmpCore:CreatorContactInfo}'s
% fields.
% \begin{macrocode}
\bgroup
@@ -4426,8 +4484,8 @@
% \changes{v2.2}{2012/12/13}{Added this macro to support
% \acro{PDF/A} generation}
% \changes{v2.3}{2013/01/08}{Gave the
-% \xmpterm{Iptc4xmpCore:CreatorContactInfo} fields a unique
-% \xmpterm{pdfaType:prefix} to better support conversion of the
+% \xmpprop{Iptc4xmpCore:CreatorContactInfo} fields a unique
+% \xmpprop{pdfaType:prefix} to better support conversion of the
% document to \acro{PDF/A}}
% \changes{v4.0}{2019/03/09}{Moved the header code from here into
% \protect\cs{hyxmp at begin@extension at decls} and the trailer code
@@ -4452,7 +4510,7 @@
{Document creator's contact information}
% \end{macrocode}
% We can't call |\hyxmp at end@ext at decl| because we need first need to
-% define the \xmpterm{Iptc4xmpCore:ContactInfo} structure.
+% define the \xmpprop{Iptc4xmpCore:ContactInfo} structure.
% \begin{macrocode}
\hyxmp at add@to at xml{%
______________</rdf:Seq>^^J%
@@ -4589,8 +4647,8 @@
% \begin{macro}{\hyxmp at declare@extensions}
% Declare all \acro{XMP} extension schemata. We'll always have at least
% one, the \acro{XMP} Media Management extensions, because we
-% automatically generate \xmpterm{xmpMM:DocumentID} and
-% \xmpterm{xmpMM:InstanceID}
+% automatically generate \xmpprop{xmpMM:DocumentID} and
+% \xmpprop{xmpMM:InstanceID}
% values.
% \begin{macrocode}
\newcommand*{\hyxmp at declare@extensions}{%
Modified: trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty 2019-04-06 21:07:49 UTC (rev 50811)
+++ trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty 2019-04-06 21:11:36 UTC (rev 50812)
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{hyperxmp}
- [2019/03/31 v4.0 Store hyperref metadata in XMP format]
+ [2019/04/05 v4.1 Store hyperref metadata in XMP format]
\edef\hyxmp at dq@code{\the\catcode`\"}
\catcode`\"=12
\def\hyxmp at driver{hpdftex}
@@ -108,6 +108,8 @@
\define at key{Hyp}{pdfisbn}{\hyxmp at pdfstringdef\@pdfisbn{#1}}
\def\@pdfbookedition{}
\define at key{Hyp}{pdfbookedition}{\hyxmp at pdfstringdef\@pdfbookedition{#1}}
+\def\@pdfpublisher{}
+\define at key{Hyp}{pdfpublisher}{\hyxmp at pdfstringdef\@pdfpublisher{#1}}
\def\@pdfvolumenum{}
\define at key{Hyp}{pdfvolumenum}{\hyxmp at pdfstringdef\@pdfvolumenum{#1}}
\def\@pdfissuenum{}
@@ -243,10 +245,10 @@
}%
\ifx\hyxmp at concated@metadata\@empty
\PackageWarningNoLine{hyperxmp}{%
-\jobname.tex did not specify any metadata to\MessageBreak
-include in the XMP packet.\space\space Please see the\MessageBreak
-hyperxmp documentation for instructions on how to\MessageBreak
-provide metadata values to hyperxmp}%
+ \jobname.tex did not specify any metadata to\MessageBreak
+ include in the XMP packet.\space\space Please see the\MessageBreak
+ hyperxmp documentation for instructions on how to\MessageBreak
+ provide metadata values to hyperxmp}%
\fi
}
\AtBeginDocument{%
@@ -278,18 +280,18 @@
}%
}%
{}%
+ \hyxmp at suppress@pdf at metadata
\hyxmp at at@end{%
- \hyxmp at suppress@pdf at metadata
\hyxmp at find@metadata
\hyxmp at embed@packet
}%
}{%
\PackageWarningNoLine{hyperxmp}{%
-\jobname.tex failed to include a\MessageBreak
-\string\usepackage\string{hyperref\string}
-in the preamble.\MessageBreak
-Consequently, all hyperxmp functionality will be\MessageBreak
-disabled}%
+ \jobname.tex failed to include a\MessageBreak
+ \string\usepackage\string{hyperref\string}
+ in the preamble.\MessageBreak
+ Consequently, all hyperxmp functionality will be\MessageBreak
+ disabled}%
}%
}
\newcommand*{\hyxmp at commas@to at list}[2]{%
@@ -405,7 +407,7 @@
\expandafter\hyxmp at xmp@to at pdf@date at vi\expandafter#4%
\fi
}
-\let\@hyxmp at gobbletwo=\@gobbletwo
+\let\hyxmp at gobbletwo=\@gobbletwo
\def\hyxmp at xmp@to at pdf@date at vi#1#2#3#4{%
#1#2%
\ifx#3+%
@@ -418,7 +420,7 @@
Z%
\fi
\ifx#3\relax
- \expandafter\@hyxmp at gobbletwo
+ \expandafter\hyxmp at gobbletwo
\fi
\@gobbletwo #4%
}
@@ -942,16 +944,29 @@
}%
\fi
}
+\newcommand{\hyxmp at singleton@dc}[3][Bag]{%
+ \@ifnotmtarg{#3}{%
+ \hyxmp at xmlify{#3}%
+ \hyxmp at add@to at xml{%
+______<dc:#2>^^J%
+________<rdf:#1>^^J%
+__________<rdf:li>\hyxmp at xmlified</rdf:li>^^J%
+________</rdf:#1>^^J%
+______</dc:#2>^^J%
+ }%
+ }
+}
\newcommand*{\hyxmp at dc@schema}{%
\hyxmp at add@simple{dc:format}{application/pdf}%
\hyxmp at rdf@dc[\ifHy at pdfa]{title}{\@pdftitle}%
\hyxmp at rdf@dc[\ifHy at pdfa]{description}{\@pdfsubject}%
\hyxmp at rdf@dc{rights}{\@pdfcopyright}%
+ \hyxmp at singleton@dc{publisher}{\@pdfpublisher}%
+ \hyxmp at singleton@dc[Seq]{date}{\hyxmp at today}%
+ \hyxmp at singleton@dc{language}{\@pdflang}%
+ \hyxmp at singleton@dc{type}{\@pdftype}%
\hyxmp at list@to at xml[\ifHy at pdfa]{creator}{Seq}{\hyxmp at pdfauthor}%
\hyxmp at list@to at xml{subject}{Bag}{\hyxmp at pdfkeywords}%
- \hyxmp at list@to at xml{date}{Seq}{\hyxmp at today}%
- \hyxmp at list@to at xml{language}{Bag}{\@pdflang}%
- \hyxmp at list@to at xml{type}{Bag}{\@pdftype}%
\ifx\@pdfsource\@empty
\else
\hyxmp at add@simple{dc:source}{\@pdfsource}%
More information about the tex-live-commits
mailing list