From 67e8fdf0c52653c7559b4665070a96c9c97d0d25 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Apr 2019 21:12:27 +0000 Subject: hyperxmp (2apr19) git-svn-id: svn://tug.org/texlive/trunk@50713 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/hyperxmp/README | 20 +- Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf | Bin 604007 -> 648724 bytes .../source/latex/hyperxmp/einstein-xmp.tex | 349 ++-- .../texmf-dist/source/latex/hyperxmp/hyperxmp.dtx | 1698 +++++++++++++++----- Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty | 586 +++++-- 5 files changed, 1822 insertions(+), 831 deletions(-) diff --git a/Master/texmf-dist/doc/latex/hyperxmp/README b/Master/texmf-dist/doc/latex/hyperxmp/README index cd0eb250ce1..c65c6452239 100644 --- a/Master/texmf-dist/doc/latex/hyperxmp/README +++ b/Master/texmf-dist/doc/latex/hyperxmp/README @@ -19,24 +19,20 @@ their documents as well. hyperxmp integrates seamlessly with hyperref and requires virtually no modifications to documents that already exploit hyperref's mechanisms -for specifying PDF metadata. The current version of hyperxmp can -embed the following metadata as XMP: authors, base URL, contact -telephone number/postal address/email address/URL, copyright -statement, creation date, document identifier, document instance -identifier, document type, file format, keywords, language, LaTeX file -name, license URL, metadata writer, PDF version, PDF-generating tool, -PDF/A compliance level and version, primary author's position or -title, subject/summary, and title. hyperxmp is compatible with -pdflatex, latex+dvips+ps2pdf, latex+dvipdfm, xelatex, and lualatex. - +for specifying PDF metadata. hyperxmp can embed a wide variety of +metadata as XMP, including the list of authors, document title, +contact information (telephone number, postal address, email address, +etc.), copyright statement, keywords, natural language, and much more. +hyperxmp is compatible with pdflatex, latex+dvips+ps2pdf, +latex+dvipdfm, xelatex, and lualatex. Installation ============ To create hyperxmp.sty simply run "tex hyperxmp.ins". Install hyperxmp.sty somewhere where LaTeX can find it. See -http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages for -general information about installing packages. +https://texfaq.org/FAQ-installthings for general information about +installing packages. Building hyperxmp.pdf is a little more involved: diff --git a/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf b/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf index 59c20d11d32..dcb5fe524d9 100644 Binary files a/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf and b/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf differ diff --git a/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex b/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex index 793996a4ff6..d12291b4fc6 100644 --- a/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex +++ b/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex @@ -8,208 +8,153 @@ \begin{alltt} - - - - - \metavalue{energy quanta, Hertz effect, quantum physics} - - \metavalue{pdfTeX-1.40.10} - - - \metavalue{True} - - \metavalue{http://creativecommons.org/licenses/by-nc-nd/3.0/} - - - - \metavalue{application/pdf} - - - - \metavalue{On a heuristic viewpoint concerning the production and - transformation of light} - - - \metavalue{On a heuristic viewpoint concerning the production and - transformation of light} - - - \metavalue{\"Uber einen die Erzeugung und Verwandlung des Lichtes - betreffenden heuristischen Gesichtspunkt} - - - - - - \metavalue{photoelectric effect} - \metavalue{photoelectric effect} - - - - - - \metavalue{Copyright (C) 1905, Albert Einstein} - - - \metavalue{Copyright (C) 1905, Albert Einstein} - - - - - - \metavalue{Albert Einstein} - - - - - \metavalue{energy quanta} - \metavalue{Hertz effect} - \metavalue{quantum physics} - - - - - \metavalue{1905-03-17} - - - - - \metavalue{en} - - - - - \metavalue{Text} - - - \metavalue{einstein.tex} - - - - \metavalue{Technical Assistant, Level III} - - \metavalue{Scott Pakin} - - - - - - IPTC Core Schema - http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/ - Iptc4xmpCore - - - - CreatorContactInfo - contactinfo - external - contact information for the document's creator - - - - - - - contactinfo - http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/ - Iptc4xmpCore - contact information - - - - CiAdrExtadr - Text - contact address - - - CiAdrCity - Text - contact city - - - CiAdrRegion - Text - contact region - - - CiAdrPcode - Text - contact postal code - - - CiAdrCtry - Text - contact country - - - CiTelWork - Text - contact telephone number - - - CiEmailWork - Text - contact email address - - - CiUrlWork - Text - contact url - - - - - - - - - - - - - \metavalue{Kramgasse 49} - \metavalue{Bern} - \metavalue{3011} - \metavalue{Switzerland} - \metavalue{031 312 00 91} - \metavalue{aeinstein@ipi.ch} - - \metavalue{http://einstein.biz/, - https://www.facebook.com/AlbertEinstein} - - - - - \metavalue{\todayISO} - \metavalue{\todayISO} - \metavalue{\todayISO} - \metavalue{LaTeX with hyperref package} - - \metavalue{http://mirror.ctan.org/macros/latex/contrib/hyperxmp/} - - - - - \metavalue{uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0} - - - \metavalue{uuid:059b675f-2bb6-4262-80a3-9b6c9b6759b6} - - - + + + + + +\end{alltt} +\begin{center} + $\vdots$\par + \emph{[over 100 lines of boilerplate definitions not shown]}\par + $\vdots$\par +\end{center} +\begin{alltt} + + + + \metavalue{energy quanta, Hertz effect, quantum physics} + + \metavalue{pdfTeX-1.40.19} + \metavalue{1.5} + \metavalue{True} + + \metavalue{http://creativecommons.org/licenses/by-nc-nd/3.0/} + + \metavalue{application/pdf} + + + + \metavalue{On a heuristic viewpoint concerning the production + and transformation of light} + + + \metavalue{On a heuristic viewpoint concerning the production + and transformation of light} + + + \metavalue{\"Uber einen die Erzeugung und Verwandlung des Lichtes + betreffenden heuristischen Gesichtspunkt} + + + + + + \metavalue{photoelectric effect} + \metavalue{photoelectric effect} + + + + + + \metavalue{Copyright (C) 1905, Albert Einstein} + + + \metavalue{Copyright (C) 1905, Albert Einstein} + + + + + + \metavalue{Albert Einstein} + + + + + \metavalue{energy quanta} + \metavalue{Hertz effect} + \metavalue{quantum physics} + + + + + \metavalue{1905-03-17} + + + + + \metavalue{en} + + + + + \metavalue{Text} + + + \metavalue{einstein.tex} + + \metavalue{Technical Assistant, Level III} + + \metavalue{Scott Pakin} + \metavalue{2019-03-16T23:07:38-06:00} + \metavalue{2019-03-16T23:07:38-06:00} + \metavalue{2019-03-16T23:07:38-06:00} + \metavalue{LaTeX with hyperref package} + + \metavalue{uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0} + + + \metavalue{uuid:3e4c4182-b182-46c9-995f-754c41d13390} + + \metavalue{2.998e8} + + \metavalue{Kramgasse 49} + \metavalue{Bern} + \metavalue{3011} + \metavalue{Switzerland} + \metavalue{031 312 00 91} + \metavalue{aeinstein@ipi.ch} + + \metavalue{http://einstein.biz/,} + \metavalue{https://www.facebook.com/AlbertEinstein} + + + \metavalue{three} + + \metavalue{Putting that bum Maxwell in his place} + + + \metavalue{Annalen der Physik} + + \metavalue{journal} + \metavalue{322} + \metavalue{6} + \metavalue{132-148} + \metavalue{0003-3804} + \metavalue{1521-3889} + \metavalue{10.1002/andp.19053220607} + + \metavalue{http://www.physik.uni-augsburg.de/annalen/history/einstein-papers/190517132-148.pdf} + + \metavalue{56884} + \metavalue{17} + + \end{alltt} diff --git a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx index dd4cd3b9d4c..c52380e5734 100644 --- a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx +++ b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx @@ -22,7 +22,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{hyperxmp} %<*package> - [2019/02/25 v3.5a Store hyperref metadata in XMP format] + [2019/03/31 v4.0 Store hyperref metadata in XMP format] % % %<*driver> @@ -38,7 +38,7 @@ \usepackage{needspace} \usepackage{varioref} \usepackage{alltt} -\usepackage{needspace} +\usepackage{multicol} \usepackage[utf8]{inputenc} \usepackage{hyperxmp} \usepackage[unicode,bookmarksopen,bookmarksopenlevel=2,bookmarksnumbered]{hyperref} @@ -47,9 +47,13 @@ \RecordChanges % Specify this document's metadata. +\GetFileInfo{hyperxmp.dtx} \title{The \pkgname{hyperxmp} package\thanks{This document corresponds to \pkgname{hyperxmp}~\fileversion, dated \filedate.}} \author{Scott Pakin \\ \texttt{scott+hyxmp@pakin.org}} +\makeatletter +\edef\versionnumber{\expandafter\@gobble\fileversion} % Drop the "v" in the file version. +\makeatother \hypersetup{% pdfauthor={Scott Pakin}, pdftitle={The hyperxmp package}, @@ -60,8 +64,10 @@ pdfcaptionwriter={Scott Pakin}, pdfcontactemail={scott+hyxmp@pakin.org}, pdfcontacturl={http://www.pakin.org/\xmptilde scott/}, + pdfversionid={\versionnumber}, pdflang={en-US}, - baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/hyperxmp.pdf} + pdfurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/hyperxmp.pdf}, + baseurl={http://mirror.ctan.org/macros/latex/contrib/hyperxmp/} } \begin{document} @@ -82,7 +88,7 @@ % % \fi % -% \CheckSum{1845} +% \CheckSum{2082} % % \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 @@ -130,8 +136,10 @@ % \protect\pkgname{hyperxmp} code} % \changes{v3.4}{2017/11/04}{Use \protect\pkgname{ifmtarg} to test for % 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} % -% \GetFileInfo{hyperxmp.dtx} +% ^^A \GetFileInfo{hyperxmp.dtx} % % \DoNotIndex{,\,\ ,\!,\",\#,\(,\),\*,\<,\>,\@cons,\@empty} % \DoNotIndex{\@ifpackageloaded,\@ifundefined,\@nil,\@tempcnta,\@tempcntb} @@ -152,7 +160,7 @@ % \ifx\xmptermopt\@empty % \mbox{\textsf{#2}}^^A % \else -% \mbox{\textsf{#2}}\slash\mbox{\textsf{#1}}^^A +% \mbox{\textsf{#2}}.\mbox{\textsf{#1}}^^A % \SortIndex{#1}{\textsf{#1}}^^A % \fi % \SortIndex{#2}{\textsf{#2}}^^A @@ -165,6 +173,12 @@ % \SortIndex{#1}{\textsf{#1} (option)}^^A % \index{options=\textsf{#1}}^^A % } +% ^^A \moptname is the same as \optname but also typesets the +% ^^A option name in the margin. +% \DeclareRobustCommand{\moptname}[1]{^^A +% \optname{#1}^^A +% \marginpar{\raggedleft\strut\mbox{\textsf{#1}}}^^A +% } % \DeclareRobustCommand{\acrostyle}[1]{\textsc{\MakeLowercase{#1}}} % \DeclareRobustCommand{\acro}[1]{^^A % \mbox{\acrostyle{#1}}^^A @@ -172,7 +186,7 @@ % } % \newcounter{note} % \newcommand{\usagenote}[1]{^^A -% \addtocounter{note}{1}^^A +% \refstepcounter{note}^^A % \paragraph{Note~\thenote: #1}% % } % @@ -305,37 +319,53 @@ % \pkgname{hyperxmp} knows how to embed all of the following types of % metadata within a document: % +% \label{page:begin-metadata-list} % \begin{itemize} \raggedright -% \item authors (\xmpterm{dc:creator}) -% \item base \acro{URL} (\xmpterm{xmp:BaseURL}) -% \item contact address +% \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 contact email address(es) (\xmpterm[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo}) -% \item contact telephone number(s) (\xmpterm[CiTelWork]{Iptc4xmpCore:CreatorContactInfo}) -% \item contact \acro{URL}(s) (\xmpterm[CiUrlWork]{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 document identifier (\xmpterm{xmpMM:DocumentID}) -% \item document instance identifier (\xmpterm{xmpMM:InstanceID}) -% \item document type (\xmpterm{dc:type}) +% \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 (\xmpterm{dc:language}) -% \item \LaTeX\ file name (\xmpterm{dc:source}) +% \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 primary author's position/title (\xmpterm{photoshop:AuthorsPosition}) +% \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}) % \end{itemize} +% \label{page:end-metadata-list} % % \noindent % More types of metadata may be added in a future release. @@ -371,7 +401,9 @@ % |\hypersetup{|\dots|}|). \pkgname{hyperxmp} will construct its % \acro{XMP} data using the following \pkgname{hyperref} options: % -% \begin{itemize} +% \begin{multicols}{3} +% \raggedcolumns +% \begin{itemize} % \item \optname{baseurl} % \item \optname{pdfauthor} % \item \optname{pdfcreationdate} @@ -381,17 +413,22 @@ % \item \optname{pdfproducer} % \item \optname{pdfsubject} % \item \optname{pdftitle} -% \end{itemize} +% \end{itemize} +% \end{multicols} % % \noindent % \mbox{}\label{page:begin-new-options} % \pkgname{hyperxmp} instructs \pkgname{hyperref} also to accept the % following options, which have meaning only to \pkgname{hyperxmp}: % -% \begin{itemize} +% \begin{multicols}{3} +% \raggedcolumns +% \begin{itemize} % \item \optname{pdfaconformance} % \item \optname{pdfapart} % \item \optname{pdfauthortitle} +% \item \optname{pdfbookedition} +% \item \optname{pdfbytes} % \item \optname{pdfcaptionwriter} % \item \optname{pdfcontactaddress} % \item \optname{pdfcontactcity} @@ -404,43 +441,167 @@ % \item \optname{pdfcopyright} % \item \optname{pdfdate} % \item \optname{pdfdocumentid} +% \item \optname{pdfdoi} +% \item \optname{pdfeissn} % \item \optname{pdfinstanceid} +% \item \optname{pdfisbn} +% \item \optname{pdfissn} +% \item \optname{pdfissuenum} % \item \optname{pdflicenseurl} % \item \optname{pdfmetadate} % \item \optname{pdfmetalang} +% \item \optname{pdfpagecount} +% \item \optname{pdfpagerange} +% \item \optname{pdfpublication} +% \item \optname{pdfpubtype} % \item \optname{pdfsource} +% \item \optname{pdfsubtitle} % \item \optname{pdftype} -% \end{itemize} +% \item \optname{pdfurl} +% \item \optname{pdfversionid} +% \item \optname{pdfvolumenum} +% \end{itemize} +% \end{multicols} % \label{page:end-new-options} % -% The two most obscure---but alphabetically first---of the above, -% \optname{pdfaconformance} and \optname{pdfapart}, are used in -% conjunction with \pkgname{hyperref}'s \optname{pdfa} option to claim a -% particular \acro{PDF/A} standard by which the document abides. They -% default to \optname{pdfapart}=|1| and \optname{pdfaconformance}=|B|, -% indicating the \acro{PDF/A}-\textsc{1b} standard. These can be -% changed (with caution) to assert that the document abides by a -% different standard (e.g.,~\acro{PDF/A}-\textsc{2u}). -% -% \optname{pdfauthortitle} indicates the primary author's position or -% title. \optname{pdfcaptionwriter} specifies the name of the person +% +% \subsection{Option descriptions} +% +% The document title is specified as normal for \pkgname{hyperref} with +% \moptname{pdftitle}, but see Note~\ref{note:multilingual} on +% page~\pageref{note:multilingual} for instructions on how to specify a +% title in multiple languages. \pkgname{hyperxmp} introduces a +% complementary \moptname{pdfsubtitle} option: +% +% \begin{verbatim} +% pdftitle={Frankenstein}, +% pdfsubtitle={The Modern Prometheus}, +% \end{verbatim} +% +% Unfortunately, the subtitle can appear in only one language. It +% assumed to be the same language as the document language +% (\optname{pdflang}) but can be overridden by preceding the text with a +% bracketed \acro{ISO} \mbox{639-1} two-letter language code and an +% optional \acro{ISO} \mbox{3166-1} two-letter region code. See the +% example below for \optname{pdfpublication}. +% +% \Needspace{6\baselineskip} +% \moptname{pdfauthortitle} indicates the primary author's position or +% title. \moptname{pdfcaptionwriter} specifies the name of the person % who added the metadata to the document. The next eight items describe % how to contact the person or institution responsible for the document -% (the ``contact''). \optname{pdfcontactaddress} is the contact's +% (the ``contact''). \moptname{pdfcontactaddress} is the contact's % street address and can include the institution name if the contact is -% an institution; \optname{pdfcontactcity} is the contact's city. -% \optname{pdfcontactcountry} is the contact's country; -% \optname{pdfcontactemail} is the contact's email address (or multiple, -% comma-separated email addresses); \optname{pdfcontactphone} is the -% contact's telephone number (or multiple, comma-separated telephone -% numbers); \optname{pdfcontactpostcode} is the contact's postal code; -% \optname{pdfcontactregion} is the contact's state or province; and -% \optname{pdfcontacturl} is the contact's \acro{URL} (or multiple, -% comma-separated \acro{URL}s). +% an institution; \moptname{pdfcontactcity} is the contact's city; +% \moptname{pdfcontactcountry} is the contact's country; +% \moptname{pdfcontactemail} is the contact's email address (or +% multiple, comma-separated email addresses); \moptname{pdfcontactphone} +% is the contact's telephone number (or multiple, comma-separated +% telephone numbers); \moptname{pdfcontactpostcode} is the contact's +% postal code; \moptname{pdfcontactregion} is the contact's state or +% province; and \moptname{pdfcontacturl} is the contact's \acro{URL} (or +% multiple, comma-separated \acro{URL}s). +% +% \Needspace{2\baselineskip} +% \moptname{pdfcopyright} defines the copyright text, and +% \moptname{pdflicenseurl} identifies a \acro{URL} that points to the +% document's license agreement. +% +% \moptname{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 +% \acro{IETF} language tag~\cite{IANA2011:lang-tags}, for example, +% ``|en|'' for English, ``|en-US|'' for specifically United States +% English, ``|de|'' for German, and so forth. If \optname{pdfmetalang} +% is not specified, \pkgname{hyperxmp} assumes the metadata language is +% the same as the document language (\pkgname{hyperref}'s +% \moptname{pdflang} option). If neither \optname{pdfmetalang} nor +% \optname{pdflang} is specified, \pkgname{hyperxmp} uses only +% ``|x-default|'' as the metadata language. Note that ``|x-default|'' +% metadata are always included in addition to the specified metadata +% language, as the user reading the document may not have specified a +% language preference. +% +% \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 \moptname{pdfdocumentid} and (not normally recommended) a +% particular instance identifier using \moptname{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}. A more freeform mechanism than +% \optname{pdfinstanceid} for versioning documents is available via +% \moptname{pdfversionid}. The version specified by +% \optname{pdfversionid} can be incremented as~|1|, |2|, |3|,~\dots; +% identified with a hierarchical numbering scheme (e.g.,~this document +% is versioned \texttt{\versionnumber} to match the package version); or +% labeled using any other approach. One possibility is to use a +% revision number or commit hash from the version-control software +% maintaining the document. For example, the |\gitVer| macro from the +% \pkgname{gitver} package is an expandable (see +% Note~\ref{note:expandable} on page~\pageref{note:expandable}) version +% of the current \href{https://git-scm.com/}{Git} hash that can suitably +% be passed to \optname{pdfversionid}. +% +% Already-published documents can be identified in a number of ways. +% \moptname{pdfisbn} specifies the \acro{ISBN}. \moptname{pdfissn} +% refers to the \acro{ISSN} of the \emph{print} version of the document +% while \moptname{pdfeissn} refers to the \acro{ISSN} of the +% \emph{electronic} version of the document. \moptname{pdfdoi} +% specifies the \acro{DOI} and should include only the \acro{DOI} name +% without any \acro{URL} prefix. For example, specify +% |pdfdoi={10.1145/3149526.3149532}|, \emph{not} +% |pdfdoi={https://doi.org/10.1145/3149526.3149532}|. +% \moptname{pdfurl} points to the complete \acro{URL} for the document. +% In contrast, \moptname{baseurl} points one level up and is used to +% resolve relative \acro{URL}s. +% +% 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 +% title language is assumed to be the same as the document language +% (\optname{pdflang}) but can be overridden by preceding the text with a +% bracketed \acro{ISO} \mbox{639-1} two-letter language code and an +% optional \acro{ISO} \mbox{3166-1} two-letter region code. For +% example, |pdfpublication={[fr]Charlie Hedbo}| indicates a +% 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|). +% +% \moptname{pdfpubtype} indicates the type of publication in which the +% document was published. This should be one of the \acro{PRISM} +% aggregation types~\cite{PRISM2012:cont-voc} such as |book|, |journal|, +% |magazine|, |manual|, |report|, or |whitepaper|. For publications in +% journals, magazines, and similar periodicals, a document can specify +% the volume number with \moptname{pdfvolumenum} and the issue number +% within the volume with \moptname{pdfissuenum}. +% \moptname{pdfpagerange} indicates the page numbers at which the +% document appears within the publication. The intention is that this +% be a comma-separated list of dash-separated ranges, as in +% |pdfpagerange={1,4-5}|. See Note~\ref{note:page-counting} on +% page~\pageref{note:page-counting} for advice on how to assign +% \optname{pdfpagerange} semi-automatically. For books, +% \moptname{pdfbookedition} names the edition of the book. This is +% specified as text, not a number. As with \optname{pdfpublication} +% (above), \optname{pdfbookedition} accepts a bracketed language code, +% as in |pdfbookedition={[en]Second| |edition}|. +% +% The number of pages in the published, print version of the document +% can be expressed with \moptname{pdfnumpages}. +% Note~\ref{note:page-counting} on page~\pageref{note:page-counting} +% explains how to automatically assign a value to \optname{pdfnumpages}. % % \acro{XMP} metadata can include a number of dates (in fact, % timestamps, as they include both date and time components). -% \optname{pdfdate} specifies the document date. It is analogous to the +% \moptname{pdfdate} specifies the document date. It is analogous to the % \LaTeX\ |\date| command, and, like |\date|, defaults to the date the % document was built. It must be specified in either \acro{XMP} % format~\cite{Adobe2012:XMP} or \acro{PDF} format~\cite{Adobe2008:PDF}. @@ -453,16 +614,16 @@ % midnight U.S. Mountain Daylight Time (UTC-6) on the 23rd day of % September in the year~2014 should be written as % \texttt{2014-09-23T14:15:09-06:00}. This can be truncated (with loss -% of information) to \texttt{2014-09-23T14:15:09} or -% \texttt{2014-09-23T14:15} or \texttt{2014-09-23} or \texttt{2014-09} +% of information) to \texttt{2014-09-23T14:15:09}, +% \texttt{2014-09-23T14:15}, \texttt{2014-09-23}, \texttt{2014-09}, % or \texttt{2014} but no other subsets. \acro{PDF} dates are written % in the form |D:|\textsc{yyyymmdd}hhmmss|+|\textsc{tt}|'|tt|'|. The % same date in the preceding example would be written as % \texttt{D:20140923141509-06'00'} in \acro{PDF} format. % % The document's creation date, modification date, and metadata date are -% normally set automatically, but \optname{pdfcreationdate}, -% \optname{pdfmoddate}, and \optname{pdfmetadate} can be used to +% normally set automatically, but \moptname{pdfcreationdate}, +% \moptname{pdfmoddate}, and \moptname{pdfmetadate} can be used to % override the defaults. Like \optname{pdfdate}, \optname{pdfmetadate} % can be specified in either \acro{XMP} or \acro{PDF} format. However, % because \pkgname{hyperref} defines \optname{pdfcreationdate} and @@ -472,119 +633,123 @@ % would need to specify any of \optname{pdfcreationdate}, % \optname{pdfmoddate}, or \optname{pdfmetadate}. % -% \optname{pdfcopyright} defines the copyright text, and -% \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 -% \acro{IETF} language tag~\cite{IANA2011:lang-tags}, for example, -% ``|en|'' for English, ``|en-US|'' for specifically United States -% English, ``|de|'' for German, and so forth. If \optname{pdfmetalang} -% is not specified, \pkgname{hyperxmp} assumes the metadata language is -% the same as the document language (\pkgname{hyperref}'s -% \optname{pdflang} option). If neither \optname{pdfmetalang} nor -% \optname{pdflang} is specified, \pkgname{hyperxmp} uses only -% ``|x-default|'' as the metadata language. Note that ``|x-default|'' -% metadata are always included in addition to the specified metadata -% language, as the user reading the document may not have specified a -% language preference. +% \moptname{pdftype} describes the type of document being produced. +% This refers to ``the nature or genre of the +% resource''~\cite{Adobe2012:XMP} such as |poem|, |novel| or |working| +% |paper|, as opposed to the file format (always |application/pdf| when +% generated by \pkgname{hyperxmp}). Although \optname{pdftype} can be +% assigned an arbitrary piece of text, the \acro{XMP} specification +% recommends selecting types from a ``controlled vocabulary'' such as +% the \acro{DCMI} Type Vocabulary~\cite{DCMI2012:meta-terms}. The +% \acro{DCMI} Type Vocabulary currently consists of only |Collection|, +% |Dataset|, |Event|, |Image|, |InteractiveResource|, |MovingImage|, +% |PhysicalObject|, |Service|, |Software|, |Sound|, |StillImage|, and +% |Text|. \optname{pdftype} defaults to |Text|, which refers to +% ``books, letters, dissertations, poems, newspapers, articles, archives +% of mailing lists,''~\cite{DCMI2012:meta-terms} and other forms of +% text---all things \LaTeX\ is commonly used to typeset. % -% A rarely needed option, \optname{pdfsource}, overrides the name of the -% \LaTeX\ source file. It defaults to ``|\jobname.tex|'' but can be +% The \moptname{pdfbytes} option expresses the document's file size in +% bytes. The intention is for this to be used to display an estimate of +% download time to a user or to serve as a quick check on whether a file +% was transmitted correctly between systems. This feature is easiest to +% use in conjunction with \pdfTeX's |\pdffilesize| primitive: +% ``|pdfbytes={\pdffilesize{\jobname.pdf}}|''. Note that this requires +% a second run of |pdftex| because it queries the size of the \acro{PDF} +% file from the \emph{previous} run. +% +% A rarely needed option, \moptname{pdfsource}, overrides the name of +% the \LaTeX\ source file. It defaults to |\jobname.tex| but can be % replaced by any other string. If \optname{pdfsource} is given an % empty argument, no document source will be specified at all. % -% \optname{pdftype} describes the type of document being produced. This -% refers to ``the nature or genre of the resource''~\cite{Adobe2012:XMP} -% such as ``|poem|'', ``|novel|'' or ``|working paper|'', as opposed to -% the file format (always ``|application/pdf|'' when generated by -% \pkgname{hyperxmp}). Although \optname{pdftype} can be assigned an -% arbitrary piece of text, the \acro{XMP} specification recommends -% selecting types from a ``controlled vocabulary'' such as the DCMI Type -% Vocabulary~\cite{DCMI2012:meta-terms}. The DCMI Type Vocabulary -% currently consists of only ``|Collection|'', ``|Dataset|'', -% ``|Event|'', ``|Image|'', ``|InteractiveResource|'', -% ``|MovingImage|'', ``|PhysicalObject|'', ``|Service|'', -% ``|Software|'', ``|Sound|'', ``|StillImage|'', and ``|Text|''. -% \optname{pdftype} defaults to ``|Text|'', which refers to ``books, -% letters, dissertations, poems, newspapers, articles, archives of -% mailing lists,''~\cite{DCMI2012:meta-terms} and other forms of -% text---all things \LaTeX\ is commonly used to typeset. +% Two other rarely needed options, \moptname{pdfaconformance} and +% \moptname{pdfapart}, are used in conjunction with \pkgname{hyperref}'s +% \optname{pdfa} option to claim a particular \acro{PDF/A} standard by +% which the document abides. They default to \optname{pdfapart}=|1| and +% \optname{pdfaconformance}=|B|, indicating the \acro{PDF/A}-\textsc{1b} +% standard. These can be changed (with caution) to assert that the +% document abides by a different standard +% (e.g.,~\acro{PDF/A}-\textsc{2u}). +% +% \bigskip % % It is usually more convenient to provide values for those options using % \pkgname{hyperref}'s |\hypersetup| command than on the |\usepackage| % command line. See % \href{http://mirrors.ctan.org/macros/latex/contrib/hyperref/hyperref.pdf}{the -% \pkgname{hyperref} manual} for more information. The following is a -% sample \LaTeX\ document that provides values for most of the metadata -% options that \pkgname{hyperxmp} recognizes: +% \pkgname{hyperref} manual} for more information. +% +% +% \subsection{A complete example} +% +% The following is a sample \LaTeX\ document that provides values for +% most of the metadata options that \pkgname{hyperxmp} recognizes: % % \Needspace{4\baselineskip} % \refstepcounter{pagelabel} % \label{page:begin-sample-doc} % \begin{verbatim} -% \documentclass{article} -% \usepackage{hyperxmp} -% \usepackage[unicode]{hyperref} -% \title{% -% On a heuristic viewpoint concerning the production and -% transformation of light} -% \author{Albert Einstein} -% \date{March 17, 1905} -% \hypersetup{% -% pdftitle={% -% On a heuristic viewpoint concerning the production and -% transformation of light}, -% pdfauthor={Albert Einstein}, -% pdfauthortitle={Technical Assistant, Level III}, -% pdfdate={1905-03-17}, -% pdfcopyright={Copyright (C) 1905, Albert Einstein}, -% pdfsubject={photoelectric effect}, -% pdfkeywords={energy quanta, Hertz effect, quantum physics}, -% pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/3.0/}, -% pdfcaptionwriter={Scott Pakin}, -% pdfcontactaddress={Kramgasse 49}, -% pdfcontactcity={Bern}, -% pdfcontactpostcode={3011}, -% pdfcontactcountry={Switzerland}, -% pdfcontactphone={031 312 00 91}, -% pdfcontactemail={aeinstein@ipi.ch}, -% pdfcontacturl={% -% 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/} -% } -% \XMPLangAlt{de}{pdftitle={Über einen die Erzeugung und Verwandlung -% des Lichtes betreffenden heuristischen Gesichtspunkt}} -% \begin{document} -% \maketitle -% A profound formal difference exists between the theoretical -% concepts that physicists have formed about gases and other -% ponderable bodies, and Maxwell's theory of electromagnetic -% processes in so-called empty space\dots -% \end{document} +% \documentclass{article} +% \usepackage[utf8]{inputenc} +% \usepackage{hyperxmp} +% \usepackage[unicode]{hyperref} +% +% \title{% +% On a heuristic viewpoint concerning the production and +% transformation of light} +% \author{Albert Einstein} +% \date{March 17, 1905} +% +% \hypersetup{% +% pdftitle={% +% On a heuristic viewpoint concerning the production and +% transformation of light}, +% pdfsubtitle={[en-US]Putting that bum Maxwell in his place}, +% pdfauthor={Albert Einstein}, +% pdfauthortitle={\xmpquote{Technical Assistant\xmpcomma\ Level III}}, +% pdfdate={1905-03-17}, +% pdfcopyright={Copyright (C) 1905, Albert Einstein}, +% pdfsubject={photoelectric effect}, +% pdfkeywords={energy quanta, Hertz effect, quantum physics}, +% pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/3.0/}, +% pdfcaptionwriter={Scott Pakin}, +% pdfcontactaddress={Kramgasse 49}, +% pdfcontactcity={Bern}, +% pdfcontactpostcode={3011}, +% pdfcontactcountry={Switzerland}, +% pdfcontactphone={031 312 00 91}, +% pdfcontactemail={aeinstein@ipi.ch}, +% pdfcontacturl={% +% http://einstein.biz/, +% https://www.facebook.com/AlbertEinstein +% }, +% pdfdocumentid={uuid:6d1ac9ec-4ff2-515a-954b-648eeb4853b0}, +% pdfversionid={2.998e8}, +% pdfpublication={[de]Annalen der Physik}, +% pdfpubtype={journal}, +% pdfvolumenum={322}, +% pdfissuenum={6}, +% pdfpagerange={132-148}, +% pdfnumpages={17}, +% pdfissn={0003-3804}, +% pdfeissn={1521-3889}, +% pdflang={en}, +% pdfmetalang={en}, +% pdfurl={http://www.physik.uni-augsburg.de/annalen/history/einstein-papers/1905_17_132-148.pdf}, +% pdfdoi={10.1002/andp.19053220607}, +% pdfbytes={\pdffilesize{\jobname.pdf}} % Requires pdflatex +% } +% \XMPLangAlt{de}{pdftitle={Über einen die Erzeugung und Verwandlung des +% Lichtes betreffenden heuristischen Gesichtspunkt}} +% +% \begin{document} +% \maketitle +% A profound formal difference exists between the theoretical +% concepts that physicists have formed about gases and other +% ponderable bodies, and Maxwell's theory of electromagnetic +% processes in so-called empty space\dots +% \end{document} % \end{verbatim} % \refstepcounter{pagelabel} % \label{page:end-sample-doc} @@ -635,51 +800,68 @@ % \label{fig:xmp-metadata-2} % \end{figure} % -% \usagenote{Acrobat \pdfterm{Author} bug} -% \label{page:author-bug} -% A bug in Adobe Acrobat---at least in versions~10.0.1 and -% earlier---causes that \acro{PDF} reader to confuse the \acro{XMP} and -% non-\acro{XMP} author lists when displaying the document's metadata. -% Specifically, the first author is displayed as the concatenated list -% of authors from the non-\acro{XMP} data (\pdfterm{Author}) while the -% remaining authors are displayed from the \acro{XMP} data -% (\xmpterm{dc:creator}). For example, suppose that a document's authors -% are Jack Napier, Edward Nigma, and Harvey Dent. When displaying the -% document properties, Adobe Acrobat replaces ``Jack Napier'' with a -% single author named ``Jack Napier, Edward Nigma, Harvey Dent'' and -% leaves ``Edward Nigma'' and ``Harvey Dent'' as the second and third -% authors, respectively. -% -% \DescribeMacro{\XMPTruncateList} -% The \pkgname{hyperxmp} package provides a workaround for this bug in -% the form of the |\XMPTruncateList| macro. |\XMPTruncateList| takes -% the name of a list (a \pkgname{hyperref} option name) and replaces the -% list with the value of its first element. Currently, the only -% meaningful usage is to put % +% \subsection{Usage notes} +% +% \usagenote{Conflicting metadata in PDF/A documents} +% A \acro{PDF} file includes an \pdfterm{Info} dictionary containing +% \pdfterm{Author}, \pdfterm{Title}, \pdfterm{Subject}, and +% \pdfterm{Keywords} keys. The \pkgname{hyperref} package's +% \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 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 +% +% \Needspace{7\baselineskip} % \begin{verbatim} -% \XMPTruncateList{pdfauthor} +% +% +% Curly Howard +% Larry Fine +% Moe Howard +% +% % \end{verbatim} % % \noindent -% in your document's preamble. This will cause Adobe Acrobat to -% properly display all of the authors but at the cost of other -% \acro{PDF} readers likely displaying only the first author. +% while in \acro{PDF}, the author and keywords are specified as flat +% strings. Alas, there is no definition of how a list should be +% collapsed to a flat string: ``\texttt{Curly Howard, Larry Fine, Moe +% Howard}'' or ``\texttt{Curly Howard; Larry Fine; Moe Howard}'' or +% something else. I have not yet found a form of flat string that +% passes all \acro{PDF/A} validators. Furthermore, when Adobe +% Acrobat---at least Adobe Acrobat DC (2019) and earlier +% versions---converts a \acro{PDF} file to \acro{PDF/A} format, it does +% so by discarding all but the first author, which is an unsatisfying +% solution. +% +% Starting with version~4.0, \pkgname{hyperxmp}'s solution is to +% suppress writing metadata to the \acro{PDF} \pdfterm{Info} dictionary +% and write it only to the \acro{XMP} packet. This appears to pacify +% \acro{PDF/A} validators yet retains the author and keyword lists in +% their non-truncated form. If desired, the \pdfterm{Info} dictionary +% can be retained by passing the \optname{keeppdfinfo} option to +% \cs{hypersetup}. % % \usagenote{Acrobat multiline-field bug} % The \acro{IPTC} Photo Metadata schema states that ``the [contact] % address is a multiline field''~\cite{IPTC2010:photo-meta}. % \pkgname{hyperxmp} converts commas in \optname{pdfcontactaddress}'s % argument to line breaks in the generated \acro{XML}\@. Unfortunately, -% A bug in Adobe Acrobat---at least in versions~10.0.1 and -% earlier---causes that \acro{PDF} reader to discard line breaks in the -% contact address. Interestingly, Adobe Illustrator CS5 correctly -% displays the contact address. -% \DescribeMacro{\xmplinesep} -% If you find Adobe Acrobat's behavior bothersome, you can redefine the -% |\xmplinesep| macro as a string to use as an address-line separator. -% For example, the following replaces all commas appearing in -% \optname{pdfcontactaddress}'s argument with semicolons: +% A bug in Adobe Acrobat---at least in Adobe Acrobat DC (2019) and +% earlier versions---causes that \acro{PDF} reader to discard line +% breaks in the contact address. Interestingly, Adobe Illustrator CS5 +% correctly displays the contact address. If you find Adobe Acrobat's +% behavior bothersome, you can redefine the +% \DescribeMacro{\xmplinesep}|\xmplinesep| macro as a string to use as +% an address-line separator. For example, the following replaces all +% commas appearing in \optname{pdfcontactaddress}'s argument with +% semicolons: % % \begin{verbatim} % \renewcommand*{\xmlinesep}{;} @@ -800,6 +982,7 @@ % a modicum of \acro{XMP} metadata with no additional effort. % % \usagenote{Multilingual metadata} +% \label{note:multilingual} % The \optname{pdfmetalang} option specifies the language in which the % document's metadata is written. It defaults to the value of % \optname{pdflang}, which specifies the document language. @@ -836,6 +1019,7 @@ % \end{verbatim} % % \usagenote{Expandable arguments} +% \label{note:expandable} % All arguments passed to \pkgname{hyperxmp} options must be expandable, % in \tex\ terminology. This implies that any macros that are used in % arguments are limited to a relatively small set of operations (such as @@ -870,12 +1054,77 @@ % package in the output file to ensure that any macros used in arguments % to \pkgname{hyperxmp} options produced the expected output. % +% \usagenote{Automatic page counting} +% \label{note:page-counting} +% Although \optname{pdfnumpages} and \optname{pdfpagerange} are intended +% to refer to pages in the final, published version of a document, it +% would be convenient for them to be generated automatically when +% producing a standalone \acro{PDF} file that is not intended to be +% incorporated into a book, journal, or other publication (or if it is +% known that the pages will not be renumbered for publication). One +% approach is to use the \pkgname{totpages} package to keep track of the +% number of pages. +% +% \begin{verbatim} +% \hypersetup{% +% pdfnumpages={\ref*{TotPages}} +% } +% \end{verbatim} +% +% \pkgname{totpages} can likewise help generate \optname{pdfpagerange}. +% For documents numbered from~1 to~$n$, a simple +% +% \begin{verbatim} +% \hypersetup{% +% pdfpagerange={1-\ref*{TotPages}} +% } +% \end{verbatim} +% +% \noindent +% should suffice. A bit more effort is needed for documents that change +% numbering schemes, such as using lowercase Roman numerals for the +% front matter and Arabic numerals for the main matter and back matter. +% One approach is to use \cs{label} to mark the first and last page of +% each numbering scheme and specify \optname{pdfpagerange} as in the +% following: +% +% \Needspace{6\baselineskip} +% \begin{verbatim} +% \hypersetup{% +% pdfpagerange={% +% \pageref*{page:begin-front}-\pageref*{page:end-front},% +% 1-\pageref*{TotPages}% +% } +% } +% \end{verbatim} +% +% I don't know how unnumbered pages (e.g.,~blank pages and the title +% page) are supposed to be handled. I suppose blank pages can be +% omitted from \optname{pdfpagerange}, and title page can be either +% omitted or listed as |title|, for example. +% +% It appears that at least with version~2.00 of \pkgname{totpages}, the +% |TotPages| label is not defined until after the |\begin{document}|. +% Consequently, using |TotPages| within a \cs{hypersetup} invocation in +% the document's preamble will produce ``|??|'' as the page count in the +% \acro{XMP} packet. The solution is either to assign +% \optname{pdfnumpages} and \optname{pdfpagerange} after the +% |\begin{document}| or to ask \LaTeX\ to do that on your behalf: +% +% \begin{verbatim} +% \AtBeginDocument{% +% \hypersetup{% +% pdfnumpages={\ref*{TotPages}}, +% pdfpagerange={1-\ref*{TotPages}} +% }% +% } +% \end{verbatim} +% % % \StopEventually{^^A -% \section{Future Work} -% \label{sec:future-work} +% \section{Help Wanted} % -% \paragraph{Help wanted} +% \paragraph{Comma handling} % Ideally, \texttt{\string\xmpquote} should automatically replace all % commas with \texttt{\string\xmpcomma}. Unfortunately, my \tex\ skills % are insufficient to pull that off. If you know a way to make @@ -886,7 +1135,7 @@ % % \appendix % -% \section{Sample XMP packet} +% \section{Sample XMP Packet} % \label{sec:sample-packet} % % The following is an example of a complete \acro{XMP} packet as may be @@ -901,32 +1150,32 @@ % \begin{thebibliography}{1} % \bibitem{Adobe2010:pdfmark} % Adobe Systems, Inc., San Jose, California. -% \newblock {\em {A}dobe {A}crobat~{X} {SDK} Help, pdfmark Reference}. +% \newblock \emph{{A}dobe {A}crobat~{X} {SDK} Help, pdfmark Reference}. % \newblock Available from % \url{http://www.adobe.com/devnet/acrobat/documentation.html}. % % \bibitem{Adobe1996:postscript} % {Adobe Systems, Inc.} -% \newblock {\em {P}ost{S}cript Language Reference Manual}. +% \newblock \emph{{P}ost{S}cript Language Reference Manual}. % \newblock Addison-Wesley, 2nd edition, January 1996, ISBN: \mbox{0-201-18127-4}. % % \bibitem{Adobe2008:PDF} % Adobe Systems, Inc., San Jose, California. -% \newblock {\em Document Management---Portable Document Format---Part 1: +% \newblock \emph{Document Management---Portable Document Format---Part 1: % PDF~1.7}, July 2008. % \newblock ISO \mbox{32000-1} standard document. Available from % \url{http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf}. % % \bibitem{Adobe2012:XMP} % Adobe Systems, Inc., San Jose, California. -% \newblock {\em {XMP} Specification Part~1: Data model, Serialization, and Core +% \newblock \emph{{XMP} Specification Part~1: Data model, Serialization, and Core % Properties}, April 2012. % \newblock Available from % \url{http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cc-201306/XMPSpecificationPart1.pdf}. % % \bibitem{DCMI2012:meta-terms} % DCMI Usage Board -% \newblock {\em DCMI Metadata Terms}, June~14, 2012. +% \newblock \emph{DCMI Metadata Terms}, June~14, 2012. % \newblock Available from \url{http://dublincore.org/documents/dcmi-terms/}. % % \bibitem{Downes1994:ATB15} @@ -937,9 +1186,23 @@ % \newblock Archived by Google at % \url{http://groups.google.com/group/comp.text.tex/msg/7da7643b9e8f3b48}. % +% \bibitem{PRISM2012:basic-meta} +% International Digital Enterprise Alliance, Inc. +% \newblock \emph{Publishing Requirements for Industry Standard Metadata, +% Version~3.0: {PRISM} Basic Metadata Specification}, October~12, 2012. +% \newblock Available from +% \url{http://www.prismstandard.org/specifications/3.0/PRISM_Basic_Metadata_3.0.htm}. +% +% \bibitem{PRISM2012:cont-voc} +% International Digital Enterprise Alliance, Inc. +% \newblock \emph{Publishing Requirements for Industry Standard Metadata, +% Version~3.0: {PRISM} Controlled Vocabularies Specification}, October~4, 2012. +% \newblock Available from +% \url{http://www.prismstandard.org/specifications/3.0/PRISM_CV_Spec_3.0.pdf}. +% % \bibitem{IPTC2010:photo-meta} % International Press Telecommunications Council. -% \newblock {\em {IPTC} Photo Metadata: Core 1.1/Extension 1.1}, July 2010. +% \newblock \emph{{IPTC} Photo Metadata: Core 1.1/Extension 1.1}, July 2010. % \newblock Revision~1. Available from % \url{http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-201007_1.pdf}. % @@ -959,14 +1222,14 @@ % % \bibitem{PDFA2008:xmp-props} % PDF/A Competence Center, Berlin, Germany. -% \newblock {\em {T}ech{N}ote~0008: Predefined {XMP} Properties in {PDF/A-1}}, +% \newblock \emph{{T}ech{N}ote~0008: Predefined {XMP} Properties in {PDF/A-1}}, % March~20, 2008. % \newblock Available from % \url{http://www.pdfa.org/wp-content/uploads/2011/08/tn0008_predefined_xmp_properties_in_pdfa-1_2008-03-20.pdf}. % % \bibitem{PDFA2008:ext-schemas} % PDF/A Competence Center, Berlin, Germany. -% \newblock {\em {T}ech{N}ote~0009: {XMP} Extension Schemas in {PDF/A-1}}, +% \newblock \emph{{T}ech{N}ote~0009: {XMP} Extension Schemas in {PDF/A-1}}, % March~20, 2008. % \newblock Available from % \url{http://www.pdfa.org/wp-content/uploads/2011/08/tn0009_xmp_extension_schemas_in_pdfa-1_2008-03-20.pdf}. @@ -1100,7 +1363,7 @@ % \begin{macro}{\@pdfdatetime} % Prepare to store the document's date and (optionally) time. Whether % specified by the author in \acro{XMP} format or \acro{PDF} format -% (cf.~Section~\ref{sec:date-manip}) we always store |\@pdfdatetime| as +% (see Section~\ref{sec:date-manip}) we always store |\@pdfdatetime| as % an \acro{XMP}-format string. % \begin{macrocode} \def\@pdfdatetime{} @@ -1125,7 +1388,7 @@ % \begin{macro}{\@pdfmetadatetime} % Prepare to store the document's metadata date and (optionally) time. % Whether specified by the author in \acro{XMP} format or \acro{PDF} -% format (cf.~Section~\ref{sec:date-manip}) we always store +% format (see Section~\ref{sec:date-manip}) we always store % |\@pdfmetadatetime| as an \acro{XMP}-format string. % \begin{macrocode} \def\@pdfmetadatetime{} @@ -1246,6 +1509,139 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@pdfversionid} +% Prepare to store a \acro{UUID} that represents the current version of +% the document. +% \begin{macrocode} +\def\@pdfversionid{} +\define@key{Hyp}{pdfversionid}{\hyxmp@pdfstringdef\@pdfversionid{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfpublication} +% Prepare to store the name of the publication in which the +% document was published. +% \begin{macrocode} +\def\@pdfpublication{} +\define@key{Hyp}{pdfpublication}{\hyxmp@pdfstringdef\@pdfpublication{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfpubtype} +% Prepare to store the type of the publication in which the +% document was published. +% \begin{macrocode} +\def\@pdfpubtype{} +\define@key{Hyp}{pdfpubtype}{\hyxmp@pdfstringdef\@pdfpubtype{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfbytes} +% Prepare to store the size of the file in bytes. +% \begin{macrocode} +\def\@pdfbytes{} +\define@key{Hyp}{pdfbytes}{\hyxmp@pdfstringdef\@pdfbytes{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfnumpages} +% Prepare to store the number of pages in the file. +% \begin{macrocode} +\def\@pdfnumpages{} +\define@key{Hyp}{pdfnumpages}{\hyxmp@pdfstringdef\@pdfnumpages{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfissn} +% Prepare to store the \acro{ISSN} of the publication in which the +% document was published. +% \begin{macrocode} +\def\@pdfissn{} +\define@key{Hyp}{pdfissn}{\hyxmp@pdfstringdef\@pdfissn{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfeissn} +% Prepare to store the \acro{ISSN} of the electronic version of the +% publication in which the document was published. +% \begin{macrocode} +\def\@pdfeissn{} +\define@key{Hyp}{pdfeissn}{\hyxmp@pdfstringdef\@pdfeissn{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfisbn} +% Prepare to store the \acro{ISBN} of the publication in which the +% document was published. +% \begin{macrocode} +\def\@pdfisbn{} +\define@key{Hyp}{pdfisbn}{\hyxmp@pdfstringdef\@pdfisbn{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfbookedition} +% Prepare to store the edition of the book in which the document +% was published. +% \begin{macrocode} +\def\@pdfbookedition{} +\define@key{Hyp}{pdfbookedition}{\hyxmp@pdfstringdef\@pdfbookedition{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfvolumenum} +% Prepare to store the volume identifier of the publication in which the +% document was published. +% \begin{macrocode} +\def\@pdfvolumenum{} +\define@key{Hyp}{pdfvolumenum}{\hyxmp@pdfstringdef\@pdfvolumenum{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfissuenum} +% Prepare to store the identifier of the issue within a volume of the +% publication in which the document was published. +% \begin{macrocode} +\def\@pdfissuenum{} +\define@key{Hyp}{pdfissuenum}{\hyxmp@pdfstringdef\@pdfissuenum{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfpagerange} +% Prepare to store the document's range of pages within the publication +% in which the document was published. +% \begin{macrocode} +\def\@pdfpagerange{} +\define@key{Hyp}{pdfpagerange}{\hyxmp@pdfstringdef\@pdfpagerange{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfdoi} +% Prepare to store a \acro{DOI} that represents the current instance of +% the document. +% \begin{macrocode} +\def\@pdfdoi{} +\define@key{Hyp}{pdfdoi}{\hyxmp@pdfstringdef\@pdfdoi{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfurl} +% Prepare to store a \acro{URL} that represents where the document +% can be found. Note that we do not prepend \optname{baseurl} to +% the value provided. +% \begin{macrocode} +\def\@pdfurl{} +\define@key{Hyp}{pdfurl}{\hyxmp@pdfstringdef\@pdfurl{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pdfsubtitle} +% Prepare to store the document's subtitle. +% \begin{macrocode} +\def\@pdfsubtitle{} +\define@key{Hyp}{pdfsubtitle}{\hyxmp@pdfstringdef\@pdfsubtitle{#1}} +% \end{macrocode} +% \end{macro} +% % The following eight macros---|\@pdfcontactaddress|, % |\@pdfcontactcity|, |\@pdfcontactregion|, |\@pdfcontactpostcode|, % |\@pdfcontactcountry|, |\@pdfcontactphone|, |\@pdfcontactemail|, and @@ -1342,6 +1738,25 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\hyxmp@suppress@pdf@metadata} +% Suppress \pkgname{hyperref} from writing \pdfterm{Author}, +% \pdfterm{Title}, \pdfterm{Subject}, and other \acro{PDF} metadata into +% the \pdfterm{Info} dictionary. This prevents conflicts between the +% \acro{PDF} metadata and the \acro{XMP} metadata, which cause +% \acro{PDF/A} validation to fail. The \acro{PDF} metadata can be +% restored by passing the \optname{keeppdfinfo} option to +% |\hypersetup|. +% \changes{v4.0}{2019/03/31}{Added this macro} +% \begin{macrocode} +\def\hyxmp@suppress@pdf@metadata{% + \global\let\PDF@FinishDoc=\@empty +} +\define@key{Hyp}{keeppdfinfo}[true]{% + \gdef\hyxmp@suppress@pdf@metadata{}% +} +% \end{macrocode} +% \end{macro} +% % \changes{v2.1}{2012/09/16}{Enabled \protect\pkgname{hyperxmp} and % \protect\pkgname{hyperref} to be loaded in either order. This addresses % a bug report by Yury Donskoy} @@ -1536,6 +1951,8 @@ \@baseurl \@pdfauthor \@pdfauthortitle + \@pdfbookedition + \@pdfbytes \@pdfcaptionwriter \@pdfcontactaddress \@pdfcontactcity @@ -1548,14 +1965,27 @@ \@pdfcopyright \@pdfcreationdate \@pdfdatetime + \@pdfdoi + \@pdfeissn + \@pdfisbn + \@pdfissn + \@pdfissuenum \@pdfkeywords \@pdflang \@pdflicenseurl \@pdfmetadatetime \@pdfmoddate + \@pdfnumpages + \@pdfpagerange + \@pdfpublication + \@pdfpubtype \@pdfsubject + \@pdfsubtitle \@pdftitle \@pdftype + \@pdfurl + \@pdfversionid + \@pdfvolumenum }% \ifx\hyxmp@concated@metadata\@empty \PackageWarningNoLine{hyperxmp}{% @@ -1653,6 +2083,7 @@ provide metadata values to hyperxmp}% % and thereby \pkgname{hyperxmp}. % \begin{macrocode} \hyxmp@at@end{% + \hyxmp@suppress@pdf@metadata \hyxmp@find@metadata \hyxmp@embed@packet }% @@ -1795,17 +2226,22 @@ disabled}% % \changes{v2.3b}{2013/07/18}{Made all definitions local to avoid % spurious \texttt{Too many unprocessed floats} errors when running % with \string\pkgname{memoir}} +% \changes{v4.0}{2019/03/31}{Deprecated this macro} % \begin{macro}{\hyxmp@temp@str} % \begin{macro}{\hyxmp@temp@list} % \begin{macro}{\@elt} -% As a workaround for Adobe Acrobat's inability to display author lists -% correctly (cf.~``Acrobat \pdfterm{Author} bug'' on -% page~\pageref{page:author-bug}) we introduce a hack that replaces a +% As a workaround for the inability of older Adobe Acrobat versions to +% display author lists correctly we introduce a hack that replaces a % list with its first element. One can then write % ``|\XMPTruncateList{pdfauthor}|'' and have Adobe Acrobat display the -% author list correctly. It's sad that this is necessary, though. +% author list correctly. % \begin{macrocode} \newcommand{\XMPTruncateList}[1]{{% + \PackageWarning{hyperxmp}{% + \noexpand\XMPTruncateList has been deprecated since\MessageBreak + hyperxmp 4.0 and may be removed in future\MessageBreak + versions of the package. \noexpand\XMPTruncateList\MessageBreak + was found}% \edef\hyxmp@temp@str{\csname hyxmp@#1\endcsname}% \hyxmp@commas@to@list{\hyxmp@temp@list}{\hyxmp@temp@str}% \def\@elt##1{% @@ -2310,7 +2746,7 @@ disabled}% \newcommand*{\hyxmp@xmlify}[1]{% \gdef\hyxmp@xmlified{}% % \end{macrocode} -% Escaped PDF string~$\rightarrow$ \term{PDFDocEncoding}/\term{Unicode} +% Escaped \acro{PDF} string~$\rightarrow$ \term{PDFDocEncoding}/\term{Unicode} % \begin{macrocode} \EdefUnescapeString\hyxmp@text{#1}% \ifhyxmp@unicodetex @@ -3090,10 +3526,6 @@ _______________________________________________________________^^J% % even when empty. Florian Breitwieser noted that this is necessary % for \protect\acro{PDF/A}-1b compliance} % \begin{macrocode} - \hyxmp@add@to@xml{% -______^^J% - }% \hyxmp@add@simple@var{pdf:Keywords}{@pdfkeywords}% \hyxmp@add@simple@var{pdf:Producer}{@pdfproducer}% \@ifundefined{pdfvariable}{% @@ -3114,15 +3546,20 @@ ___________xmlns:pdf="http://ns.adobe.com/pdf/1.3/">^^J% % \begin{macrocode} \hyxmp@add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}% }% - \hyxmp@add@to@xml{% -______^^J% - }% } % \end{macrocode} % \end{macro} % +% \begin{macro}{\hyxmp@extra@indent} +% This macro is used internally to increase the amount of indentation +% when writing certain \acro{XML} data. It is normally defined as empty +% but can temporarily be redefined to a sequence of |\space| characters. +% \begin{macrocode} +\newcommand*{\hyxmp@extra@indent}{} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\hyxmp@add@simple} -% \begin{macro}{\hyxmp@string} % Given an \acro{XMP} tag~(|#1|) and a string~(|#2|), if the string is % nonempty, add a begin tag, the string, and an end tag to the packet. % The ``|simple|'' in the macro name indicates that the string is output @@ -3130,18 +3567,15 @@ ______^^J% % \changes{v2.0}{2012/08/25}{Added this macro} % \begin{macrocode} \newcommand*{\hyxmp@add@simple}[2]{% - \edef\hyxmp@string{#2}% - \ifx\hyxmp@string\@empty - \else - \hyxmp@xmlify{\hyxmp@string}% + \@ifnotmtargexp{#2}{% + \hyxmp@xmlify{#2}% \hyxmp@add@to@xml{% -_________<#1>\hyxmp@xmlified^^J% + \hyxmp@extra@indent______<#1>\hyxmp@xmlified^^J% }% - \fi + }% } % \end{macrocode} % \end{macro} -% \end{macro} % % \begin{macro}{\hyxmp@add@simple@var} % Given an \acro{XMP} tag~(|#1|) and a variable name~(|#2|), if the @@ -3158,13 +3592,64 @@ _________<#1>\hyxmp@xmlified^^J% \else \hyxmp@xmlify{\csname#2\endcsname}% \hyxmp@add@to@xml{% -_________<#1>\hyxmp@xmlified^^J% + \hyxmp@extra@indent______<#1>\hyxmp@xmlified^^J% }% \fi } % \end{macrocode} % \end{macro} % +% \begin{macro}{\hyxmp@add@simple@lang} +% Given an \acro{XMP} tag~(|#1|) and a string~(|#2|), if the string is +% nonempty, add a begin tag, the string, and an end tag to the packet. +% The ``|simple|'' in the macro name indicates that the string is output +% without variations for different languages. However, if the string +% begins with a language code in square brackets, specify that as the +% (sole) language for the tag. +% \changes{v4.0}{2019/03/12}{Added this macro} +% \begin{macrocode} +\newcommand*{\hyxmp@add@simple@lang}[2]{% + \@ifnotmtarg{#2}{% + \hyxmp@xmlify{#2}% + \expandafter\hyxmp@add@simple@lang@i\hyxmp@xmlified\relax{#1}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@add@simple@lang@i} +% This is a helper macro for |\hyxmp@add@simple@lang|. It takes an +% optional language code (in brackets), text up to |\relax|, and a tag, +% and typesets the text within the \acro{XML} tag. +% \begin{macrocode} +\newcommand*{\hyxmp@add@simple@lang@i}{% + \@ifnextchar[\hyxmp@add@simple@lang@ii{\hyxmp@add@simple@lang@ii[]}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@add@simple@lang@ii} +% This is another helper macro for |\hyxmp@add@simple@lang|. It takes +% an mandatory language code (in brackets; can be empty), text up to +% |\relax|, and a tag, and typesets the text within the \acro{XML} tag. +% \begin{macrocode} +\def\hyxmp@add@simple@lang@ii[#1]#2\relax#3{% + \@ifnotmtarg{#2}{% + \hyxmp@xmlify{#2}% + \@ifmtarg{#1}{% + \hyxmp@add@to@xml{% +______<#3>\hyxmp@xmlified^^J% + }% + }{% + \hyxmp@add@to@xml{% +______<#3 xml:lang="#1">\hyxmp@xmlified^^J% + }% + }% + }% +} +% \end{macrocode} +% \end{macro} +% % % \subsubsection{The Dublin Core schema} % \label{sec:dublin-core} @@ -3201,18 +3686,18 @@ _________<#1>\hyxmp@xmlified^^J% % \begin{macrocode} \let\hyxmp@value=\hyxmp@xmlified \hyxmp@add@to@xml{% -_________^^J% -____________^^J% +______^^J% +________^^J% }% \ifx\@pdfmetalang\hyxmp@x@default \else \hyxmp@xmlify{\@pdfmetalang}% \hyxmp@add@to@xml{% -_______________\hyxmp@value^^J% +__________\hyxmp@value^^J% }% \fi \hyxmp@add@to@xml{% -_______________\hyxmp@value^^J% +__________\hyxmp@value^^J% }% % \end{macrocode} % Include variants of the text expressed in other languages, as specified by @@ -3221,7 +3706,7 @@ _______________\hyxmp@value^^J% \def\do##1##2{ \hyxmp@xmlify{##2}% \hyxmp@add@to@xml{% -_______________\hyxmp@xmlified^^J% +__________\hyxmp@xmlified^^J% }% }% \csname hyxmp@alt@#2\endcsname @@ -3229,8 +3714,8 @@ _______________\hyxmp@xmlified^^J% % Complete this \acro{XMP} element. % \begin{macrocode} \hyxmp@add@to@xml{% -____________^^J% -_________^^J% +________^^J% +______^^J% }% \fi }% @@ -3260,8 +3745,8 @@ _________^^J% % \begin{macrocode} \if@tempswa \hyxmp@add@to@xml{% -_________^^J% -____________^^J% +______^^J% +________^^J% }% \bgroup % \end{macrocode} @@ -3274,14 +3759,14 @@ ____________^^J% \hyxmp@commas@to@list\hyxmp@list{\hyxmp@xmlified}% \def\@elt##1{% \hyxmp@add@to@xml{% -_______________##1^^J% +__________##1^^J% }% }% \hyxmp@list \egroup \hyxmp@add@to@xml{% -____________^^J% -_________^^J% +________^^J% +______^^J% }% \fi } @@ -3310,11 +3795,7 @@ _________^^J% % \acro{XMP} specifications, a detail identified by Florian Breitwieser} % \begin{macrocode} \newcommand*{\hyxmp@dc@schema}{% - \hyxmp@add@to@xml{% -______^^J% -_________application/pdf^^J% - }% + \hyxmp@add@simple{dc:format}{application/pdf}% \hyxmp@rdf@dc[\ifHy@pdfa]{title}{\@pdftitle}% \hyxmp@rdf@dc[\ifHy@pdfa]{description}{\@pdfsubject}% \hyxmp@rdf@dc{rights}{\@pdfcopyright}% @@ -3327,9 +3808,6 @@ _________application/pdf^^J% \else \hyxmp@add@simple{dc:source}{\@pdfsource}% \fi - \hyxmp@add@to@xml{% -______^^J% - }% } % \end{macrocode} % \end{macro} @@ -3374,32 +3852,11 @@ ______^^J% % \begin{macrocode} \ifx\hyxmp@rights\@empty \else -% \end{macrocode} -% Header -% \begin{macrocode} - \hyxmp@add@to@xml{% -______^^J% - }% -% \end{macrocode} -% Copyright indication -% \begin{macrocode} \ifx\@pdfcopyright\@empty \else - \hyxmp@add@to@xml{% -_________True^^J% - }% + \hyxmp@add@simple{xmpRights:Marked}{True}% \fi -% \end{macrocode} -% License \acro{URL} -% \begin{macrocode} \hyxmp@add@simple{xmpRights:WebStatement}{\@pdflicenseurl}% -% \end{macrocode} -% Trailer -% \begin{macrocode} - \hyxmp@add@to@xml{% -______^^J% - }% \fi } % \end{macrocode} @@ -3411,32 +3868,30 @@ ______^^J% % \label{sec:xmp-media} % % \begin{macro}{\hyxmp@mm@schema} -% Add properties defined by the \acro{XMP} Media Management schema to the -% |\hyxmp@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 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. +% Add properties defined by the \acro{XMP} Media Management schema to +% the |\hyxmp@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 +% 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 author using \optname{pdfversionid}. % \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@DocumentID} and % \protect\cs{hyxmp@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 +% the \protect\acro{XMP} packet} % \begin{macrocode} \gdef\hyxmp@mm@schema{% \@ifmtargexp{\hyxmp@DocumentID}{\hyxmp@def@DocumentID}{}% \@ifmtargexp{\hyxmp@InstanceID}{\hyxmp@def@InstanceID}{}% - \hyxmp@add@to@xml{% -______^^J% - }% \hyxmp@add@simple{xmpMM:DocumentID}{\hyxmp@DocumentID}% \hyxmp@add@simple{xmpMM:InstanceID}{\hyxmp@InstanceID}% - \hyxmp@add@to@xml{% -______^^J% - }% + \hyxmp@add@simple{xmpMM:VersionID}{\@pdfversionid}% } % \end{macrocode} % \end{macro} @@ -3449,8 +3904,8 @@ ______^^J% % \begin{macro}{\hyxmp@createdate} % Define |\hyxmp@createdate| as the document's creation date but in % \acro{XMP} date format, not \acro{PDF} date format. We use -% |\hyxmp@createdate| for the \xmpterm{CreateDate}, -% \xmpterm{ModifyDate}, and \xmpterm{MetadataDate} fields. +% |\hyxmp@createdate| for the \xmpterm{xmp:CreateDate}, +% \xmpterm{xmp:ModifyDate}, and \xmpterm{xmp:MetadataDate} fields. % \begin{macrocode} \newcommand*{\hyxmp@define@createdate}{% \@ifundefined{pdffeedback}{% @@ -3484,8 +3939,8 @@ ______^^J% % \optname{baseurl}. % \changes{v2.0}{2012/08/26}{Added this macro} % \changes{v3.0}{2016/07/04}{Made the \protect\acro{XMP} -% \protect\xmpterm{CreateDate}, \protect\xmpterm{ModifyDate}, and -% \protect\xmpterm{MetadataDate} match the \protect\acro{PDF} +% \protect\xmpterm{xmp:CreateDate}, \protect\xmpterm{xmp:ModifyDate}, +% and \protect\xmpterm{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} @@ -3494,10 +3949,6 @@ ______^^J% % \protect\pkgname{hyperxmp} code} % \begin{macrocode} \newcommand*{\hyxmp@xmp@basic@schema}{% - \hyxmp@add@to@xml{% -______^^J% - }% \hyxmp@define@createdate % \end{macrocode} % For the document's creation date, use the user-specified @@ -3544,9 +3995,6 @@ ____________xmlns:xmp="http://ns.adobe.com/xap/1.0/">^^J% % \begin{macrocode} \hyxmp@add@simple{xmp:CreatorTool}{\@pdfcreator}% \hyxmp@add@simple{xmp:BaseURL}{\@baseurl}% - \hyxmp@add@to@xml{% -______^^J% - }% } % \end{macrocode} % \end{macro} @@ -3566,27 +4014,38 @@ ______^^J% % \begin{macrocode} \gdef\hyxmp@photoshop@schema{% \edef\hyxmp@photoshop@data{\@pdfauthortitle\@pdfcaptionwriter}% - \ifx\hyxmp@photoshop@data\@empty - \else - \hyxmp@add@to@xml{% -______^^J% - }% - \fi \hyxmp@add@simple{photoshop:AuthorsPosition}{\@pdfauthortitle}% \hyxmp@add@simple{photoshop:CaptionWriter}{\@pdfcaptionwriter}% - \ifx\hyxmp@photoshop@data\@empty - \else - \hyxmp@add@to@xml{% -______^^J% - }% - \fi } % \end{macrocode} % \end{macro} % \end{macro} % % +% \subsubsection{The PDF/A Identification schema} +% \label{sec:pdfa-id} +% +% \begin{macro}{\hyxmp@pdfa@id@schema} +% Add properties defined by the \acro{PDF/A} Identification +% schema~\cite{PDFA2008:xmp-props} to the |\hyxmp@xml| macro. These +% properties identify a document as conforming to a particular +% \acro{PDF/A} standard. We default to \acro{PDF/A}-1b if any \acro{PDF/A} +% compliance is detected but let the author override the ``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} +% part and conformance IDs, as requested by Leonid Sinev} +% \begin{macrocode} +\newcommand*{\hyxmp@pdfa@id@schema}{% + \ifHy@pdfa + \hyxmp@add@simple{pdfaid:part}{\@pdfapart}% + \hyxmp@add@simple{pdfaid:conformance}{\@pdfaconformance}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% % \subsubsection{The IPTC Photo Metadata schema} % \label{sec:photo-meta} % @@ -3615,7 +4074,7 @@ ______^^J% \@ifnotmtargexp{#2}{% \bgroup \hyxmp@add@to@xml{% -_________<#1>% + \hyxmp@extra@indent______<#1>% }% % \end{macrocode} % \begin{macro}{\@elt@first} @@ -3652,50 +4111,50 @@ _________<#1>% % \end{macro} % \end{macro} % -% \begin{macro}{\hyxmp@photometa@schema} +% \begin{macro}{\hyxmp@iptc@schema} +% Add properties defined by the \acro{IPTC} Photo Metadata +% schema~\cite{IPTC2010:photo-meta} to the |\hyxmp@xml| macro. We +% currently support only the \xmpterm{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 % \textsf{Iptc4ContInfo} as the contact-information metadata prefix. % Leonid Sinev reports that Acrobat's \acro{PDF/A} validator seems to % prefer \textsf{Iptc4xmpCore}} -% \begin{macro}{\hyxmp@photometa@data} -% Add properties defined by the \acro{IPTC} Photo Metadata -% schema~\cite{IPTC2010:photo-meta} to the |\hyxmp@xml| macro. We -% currently support only the contact-information details structure, -% viz.\ the \xmpterm[CiAdrExtadr]{Iptc4xmpCore:CreatorContactInfo}, -% \xmpterm[CiAdrCity]{Iptc4xmpCore:CreatorContactInfo}, -% \xmpterm[CiAdrRegion]{Iptc4xmpCore:CreatorContactInfo}, -% \xmpterm[CiAdrPcode]{Iptc4xmpCore:CreatorContactInfo}, -% \xmpterm[CiAdrCtry]{Iptc4xmpCore:CreatorContactInfo}, -% \xmpterm[CiTelWork]{Iptc4xmpCore:CreatorContactInfo}, -% \xmpterm[CiEmailWork]{Iptc4xmpCore:CreatorContactInfo}, and -% \xmpterm[CiUrlWork]{Iptc4xmpCore:CreatorContactInfo} properties. -% \begin{macrocode} -\gdef\hyxmp@photometa@schema{% - \edef\hyxmp@photometa@data{% - \@pdfcontactaddress - \@pdfcontactcity - \@pdfcontactregion - \@pdfcontactpostcode - \@pdfcontactcountry - \@pdfcontactphone - \@pdfcontactemail - \@pdfcontacturl - }% - \ifx\hyxmp@photometa@data\@empty +% \changes{v4.0}{2019/03/09}{Moved the definition of +% \protect\cs{hyxmp@iptc@data} from here into +% \protect\cs{hyxmp@check@iptc@data}} +% \changes{v4.0}{2019/03/16}{Renamed this macro to +% \protect\cs{hyxmp@iptc@schema} from +% \protect\cs{hyxmp@photometa@schema}} +% \changes{v4.0}{2019/03/16}{Rewrote this macro entirely to correct +% the use of fields within a structure} +% \begin{macrocode} +\gdef\hyxmp@iptc@schema{% +% \end{macrocode} +% Because we currently support only +% \xmpterm{Iptc4xmpCore:CreatorContactInfo} it suffices to check if we +% have any relevant data. If so, we instantiate a +% \xmpterm{Iptc4xmpCore:ContactInfo} structure with all available +% fields. +% \begin{macrocode} + \ifx\hyxmp@iptc@data\@empty \else - \hyxmp@iptc@extensions \hyxmp@add@to@xml{% -______^^J% -_______^^J% +______^^J% }% - \fi - \hyxmp@list@to@lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}% +% \end{macrocode} +% We locally redefine |\hyxmp@extra@indent| to increase the indentation +% of the assignments to \xmpterm{Iptc4xmpCore:CreatorContactInfo}'s +% fields. +% \begin{macrocode} + \bgroup + \edef\hyxmp@extra@indent{\hyxmp@extra@indent\space\space}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}% % \end{macrocode} % \begin{macro}{\xmplinesep} % The \acro{IPTC} standard states that sets of telephone numbers, email @@ -3708,23 +4167,259 @@ _______^^J% % |\hyxmp@list@to@lines| to insert the data. Unlike % |\hyxmp@add@simple|, this approach trims all spaces surrounding commas. % \begin{macrocode} - \bgroup - \def\xmplinesep{,}% - \hyxmp@list@to@lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}% - \hyxmp@list@to@lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}% - \hyxmp@list@to@lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}% - \egroup - \ifx\hyxmp@photometa@data\@empty - \else + \def\xmplinesep{,}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}% + \egroup \hyxmp@add@to@xml{% -_______^^J% -______^^J% +______^^J% }% \fi } % \end{macrocode} % \end{macro} % \end{macro} +% +% \subsubsection{The PRISM Basic Metadata schema} +% \label{sec:prism-meta} +% +% \begin{macro}{\hyxmp@prism@schema} +% \changes{v4.0}{2019/03/10}{Added this macro} +% Add properties defined by the \acro{PRISM} Basic Metadata +% schema~\cite{PRISM2012:basic-meta}. +% \begin{macrocode} +\newcommand*{\hyxmp@prism@schema}{% + \ifx\hyxmp@prism@data\@empty + \else + \hyxmp@add@simple{prism:complianceProfile}{three}% + \fi + \hyxmp@add@simple@lang{prism:subtitle}{\@pdfsubtitle}% + \hyxmp@add@simple@lang{prism:publicationName}{\@pdfpublication}% + \hyxmp@add@simple{prism:aggregationType}{\@pdfpubtype}% + \hyxmp@add@simple@lang{prism:bookEdition}{\@pdfbookedition}% + \hyxmp@add@simple{prism:volume}{\@pdfvolumenum}% + \hyxmp@add@simple{prism:number}{\@pdfissuenum}% + \hyxmp@add@simple{prism:pageRange}{\@pdfpagerange}% + \hyxmp@add@simple{prism:isbn}{\@pdfisbn}% + \hyxmp@add@simple{prism:issn}{\@pdfissn}% + \hyxmp@add@simple{prism:eIssn}{\@pdfeissn}% + \hyxmp@add@simple{prism:doi}{\@pdfdoi}% + \hyxmp@add@simple{prism:url}{\@pdfurl}% + \hyxmp@add@simple{prism:byteCount}{\@pdfbytes}% + \hyxmp@add@simple{prism:pageCount}{\@pdfnumpages}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{XMP extension schemata} +% \label{sec:extension-schemata} +% +% Not all of the schemata supported by \pkgname{hyperxmp} are predefined +% by \acro{XMP}. \acro{PDF/A} conversion would normally fail for +% documents that employ ``custom'' schemata. However, this problem can +% be circumvented by declaring non-standard schemata in the \acro{XMP} +% packet itself, following a technique described in a PDF Association +% technical note~\cite{PDFA2008:ext-schemas}. In this section, we +% declare only those schemata we actually use. +% +% \begin{macro}{\hyxmp@check@iptc@data} +% Define |\hyxmp@iptc@data| as the concatenation of all \acro{IPTC} +% photo metadata supplied by the document. +% \begin{macrocode} +\newcommand*{\hyxmp@check@iptc@data}{% +% \end{macrocode} +% \begin{macro}{\hyxmp@iptc@data} +% \begin{macrocode} + \edef\hyxmp@iptc@data{% + \@pdfcontactaddress + \@pdfcontactcity + \@pdfcontactregion + \@pdfcontactpostcode + \@pdfcontactcountry + \@pdfcontactphone + \@pdfcontactemail + \@pdfcontacturl + }% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\hyxmp@check@prism@data} +% Define |\hyxmp@prism@data| as the concatenation of all \acro{PRISM} +% metadata supplied by the document. +% \begin{macrocode} +\newcommand*{\hyxmp@check@prism@data}{% +% \end{macrocode} +% \begin{macro}{\hyxmp@prism@data} +% \begin{macrocode} + \edef\hyxmp@prism@data{% + \@pdfbookedition + \@pdfbytes + \@pdfdoi + \@pdfeissn + \@pdfisbn + \@pdfissn + \@pdfissuenum + \@pdfnumpages + \@pdfpagerange + \@pdfpublication + \@pdfpubtype + \@pdfsubtitle + \@pdfurl + \@pdfvolumenum + }% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\hyxmp@begin@extension@decls} +% Begin a block of \acro{XML} tags that indicates we're declaring one or +% more extension schemata. +% \begin{macrocode} +\newcommand*{\hyxmp@begin@extension@decls}{% + \hyxmp@add@to@xml{% +______^^J% +________^^J% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@end@extension@decls} +% End the block of \acro{XML} tags begun by |\hyxmp@begin@extension@decls|. +% \begin{macrocode} +\newcommand*{\hyxmp@end@extension@decls}{% + \hyxmp@add@to@xml{% +________^^J% +______^^J% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@begin@ext@decl} +% Begin the declaration of a single extension schema. +% |\hyxmp@begin@ext@decl| accepts the schema's name, prefix, and +% namespace URI. +% \changes{v4.0}{2019/03/15}{Added this macro} +% \begin{macrocode} +\newcommand*{\hyxmp@begin@ext@decl}[3]{% + \hyxmp@add@to@xml{% +__________^^J% +____________#1^^J% +____________#2^^J% +____________#3^^J% +____________^^J% +______________^^J% + }% +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@end@ext@decl} +% End the declaration of a single extension schema. +% \changes{v4.0}{2019/03/15}{Added this macro} +% \begin{macrocode} +\newcommand*{\hyxmp@end@ext@decl}{% + \hyxmp@add@to@xml{% +______________^^J% +____________^^J% +__________^^J% + }% +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@declare@property} +% Declare a single extension-schema property. |\hyxmp@declare@property| +% takes as input an optional type (defaults to \xmpterm{Text}) and a +% mandatory name, category, and description. +% \changes{v4.0}{2019/03/15}{Added this macro} +% \begin{macrocode} +\newcommand{\hyxmp@declare@property}[4][Text]{% + \hyxmp@add@to@xml{% +________________^^J% +__________________#2^^J% +__________________#1^^J% +__________________#3^^J% +__________________#4^^J% +________________^^J% + }% +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@declare@field} +% Declare a single field in a custom datatype required by an extension +% schema. |\hyxmp@declare@field| takes as input an optional type +% (defaults to \xmpterm{Text}) and a mandatory name and description. +% \changes{v4.0}{2019/03/16}{Replaced +% \protect\cs{hyxmp@declare@resource} with this macro} +% \begin{macrocode} +\newcommand{\hyxmp@declare@field}[3][Text]{% + \hyxmp@add@to@xml{% +______________________^^J% +________________________#2^^J% +________________________#1^^J% +________________________#3^^J% +______________________^^J% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@mm@extensions} +% Declare the \acro{XMP} Media Management schema. +% \changes{v4.0}{2019/03/15}{Added this macro} +% \begin{macrocode} +\newcommand*{\hyxmp@mm@extensions}{% + \hyxmp@begin@ext@decl + {XMP Media Management Schema}% + {xmpMM}% + {http://ns.adobe.com/xap/1.0/mm/}% + \hyxmp@declare@property + [URI] + {DocumentID}% + {internal}% + {UUID based identifier for all versions and renditions of a document}% + \hyxmp@declare@property + [URI] + {InstanceID}% + {internal}% + {UUID based identifier for specific incarnation of a document}% + \hyxmp@declare@property + {VersionID}% + {internal}% + {Document version identifier}% + \hyxmp@end@ext@decl +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hyxmp@pdfa@id@extensions} +% Declare the \acro{PDF/A} Identification schema~\cite{PDFA2008:xmp-props}. +% \changes{v4.0}{2019/03/15}{Added this macro} +% \begin{macrocode} +\newcommand*{\hyxmp@pdfa@id@extensions}{% + \hyxmp@begin@ext@decl + {PDF/A Identification Schema}% + {pdfaid}% + {http://www.aiim.org/pdfa/ns/id/}% + \hyxmp@declare@property + [Integer]% + {part}% + {internal}% + {Part of PDF/A standard}% + \hyxmp@declare@property + {conformance}% + {internal}% + {Conformance level of PDF/A standard}% + \hyxmp@end@ext@decl +}% +% \end{macrocode} % \end{macro} % % \begin{macro}{\hyxmp@iptc@extensions} @@ -3734,124 +4429,204 @@ ______^^J% % \xmpterm{Iptc4xmpCore:CreatorContactInfo} fields a unique % \xmpterm{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@begin@extension@decls} and the trailer code +% from here into \protect\cs{hyxmp@end@extension@decls}} +% \changes{v4.0}{2019/03/16}{Rewrote to more closely honor the +% \acro{XMP} specification} % Because \acro{IPTC} metadata are not recognized by the \acro{PDF/A} % standard, \acro{PDF/A} conversion would normally fail for documents -% that utilize |\pdfcontactaddress|, |\pdfcontactcity|, etc. However, -% there exists a technique, described in a PDF Association technical -% note~\cite{PDFA2008:ext-schemas}, for describing nonstandard -% \acro{XMP} metadata within the \acro{XMP} packet itself. We use that -% technique here to describe all of the metadata that -% |\hyxmp@photometa@schema| can produce. Doing so enables the document -% to be converted to \acro{PDF/A} format. +% that utilize \acro{IPTC} metadata. Declaring the \acro{IPTC} +% metadata we support enables the document to be converted to +% \acro{PDF/A} format. % \begin{macrocode} \newcommand*{\hyxmp@iptc@extensions}{% + \hyxmp@begin@ext@decl + {IPTC Core Schema}% + {Iptc4xmpCore}% + {http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/}% + \hyxmp@declare@property + [ContactInfo] + {CreatorContactInfo} + {external} + {Document creator's contact information} +% \end{macrocode} +% We can't call |\hyxmp@end@ext@decl| because we need first need to +% define the \xmpterm{Iptc4xmpCore:ContactInfo} structure. +% \begin{macrocode} \hyxmp@add@to@xml{% -______^^J% -________^^J% -__________^^J% -____________^^J% -______________IPTC Core Schema^^J% -______________http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/^^J% -______________Iptc4xmpCore^^J% -______________^^J% -________________^^J% -__________________^^J% -____________________CreatorContactInfo^^J% -____________________contactinfo^^J% -____________________external^^J% -____________________contact information for the document's creator^^J% -__________________^^J% -________________^^J% -______________^^J% -______________^^J% -________________^^J% -__________________^^J% -____________________contactinfo^^J% -____________________http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/^^J% -____________________Iptc4xmpCore^^J% -____________________contact information^^J% -____________________^^J% -______________________^^J% +______________^^J% +____________^^J% +____________^^J% +______________^^J% +________________^^J% +__________________ContactInfo^^J% +__________________http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/^^J% +__________________Iptc4xmpCore^^J% +__________________% + Basic set of information to get in contact with a person% + ^^J% +__________________^^J% +____________________^^J% }% -% \end{macrocode} -% \begin{macrocode} - \hyxmp@text@resource{CiAdrExtadr}{contact address}% - \hyxmp@text@resource{CiAdrCity}{contact city}% - \hyxmp@text@resource{CiAdrRegion}{contact region}% - \hyxmp@text@resource{CiAdrPcode}{contact postal code}% - \hyxmp@text@resource{CiAdrCtry}{contact country}% - \hyxmp@text@resource{CiTelWork}{contact telephone number}% - \hyxmp@text@resource{CiEmailWork}{contact email address}% - \hyxmp@text@resource{CiUrlWork}{contact url}% -% \end{macrocode} -% \begin{macrocode} + \hyxmp@declare@field + {CiAdrCity}% + {Contact information city}% + \hyxmp@declare@field + {CiAdrCtry}% + {Contact information country}% + \hyxmp@declare@field + {CiAdrExtadr}% + {Contact information address}% + \hyxmp@declare@field + {CiAdrPcode}% + {Contact information local postal code}% + \hyxmp@declare@field + {CiAdrRegion}% + {Contact information regional information such as state or province}% + \hyxmp@declare@field + {CiEmailWork}% + {Contact information email address(es)}% + \hyxmp@declare@field + {CiTelWork}% + {Contact information telephone number(s)}% + \hyxmp@declare@field + {CiUrlWork}% + {Contact information Web URL(s)}% \hyxmp@add@to@xml{% -______________________^^J% -____________________^^J% -__________________^^J% -________________^^J% -______________^^J% -____________^^J% -__________^^J% -________^^J% -______^^J% +____________________^^J% +__________________^^J% +________________^^J% +______________^^J% +____________^^J% +__________^^J% }% } % \end{macrocode} % \end{macro} % -% \begin{macro}{\hyxmp@text@resource} -% \changes{v2.2}{2012/12/13}{Added this macro} -% Output a single \xmpterm{Text} resource given its name and description. -% \begin{macrocode} -\newcommand*{\hyxmp@text@resource}[2]{% - \hyxmp@add@to@xml{% -________________________^^J% -__________________________#1^^J% -__________________________Text^^J% -__________________________#2^^J% -________________________^^J% - } -} +% \begin{macro}{\hyxmp@prism@extensions} +% \changes{v4.0}{2019/03/15}{Added this macro} +% Because \acro{PRISM} metadata are not recognized by the \acro{PDF/A} +% standard, \acro{PDF/A} conversion would normally fail for documents +% that utilize \acro{PRISM} metadata. Declaring the \acro{PRISM} +% metadata we support enables the document to be converted to +% \acro{PDF/A} format. +% \begin{macrocode} +\newcommand*{\hyxmp@prism@extensions}{% + \hyxmp@begin@ext@decl + {PRISM Basic Metadata}% + {prism}% + {http://prismstandard.org/namespaces/basic/2.1/}% + \hyxmp@declare@property + {complianceProfile}% + {internal}% + {PRISM specification compliance profile to which this document adheres}% + \hyxmp@declare@property + {publicationName}% + {external}% + {Publication name}% + \hyxmp@declare@property + {aggregationType}% + {external}% + {Publication type}% + \hyxmp@declare@property + {bookEdition}% + {external}% + {Edition of the book in which the document was published}% + \hyxmp@declare@property + {volume}% + {external}% + {Publication volume number}% + \hyxmp@declare@property + {number}% + {external}% + {Publication issue number within a volume}% + \hyxmp@declare@property + {pageRange}% + {external}% + {Page range for the document within the print version of its publication}% + \hyxmp@declare@property + {issn}% + {external}% + {ISSN for the printed publication in which the document was published}% + \hyxmp@declare@property + {eIssn}% + {external}% + {ISSN for the electronic publication in which the document was published}% + \hyxmp@declare@property + {isbn}% + {external}% + {ISBN for the publication in which the document was published}% + \hyxmp@declare@property + {doi}% + {external}% + {Digital Object Identifier for the document}% + \hyxmp@declare@property + [URL] + {url}% + {external}% + {URL at which the document can be found}% + \hyxmp@declare@property + [Integer] + {byteCount}% + {internal}% + {Approximate file size in octets}% + \hyxmp@declare@property + [Integer] + {pageCount}% + {internal}% + {Number of pages in the print version of the document}% + \hyxmp@declare@property + {subtitle}% + {external}% + {Document's subtitle}% + \hyxmp@end@ext@decl +}% % \end{macrocode} % \end{macro} % -% \subsubsection{The PDF/A Identification schema} -% \label{sec:pdfa-id} -% -% \begin{macro}{\hyxmp@pdfa@id@schema} -% Add properties defined by the \acro{PDF/A} Identification -% schema~\cite{PDFA2008:xmp-props} to the |\hyxmp@xml| macro. These -% properties identify a document as conforming to a particular -% \acro{PDF/A} standard. We default to \acro{PDF/A}-1b if any \acro{PDF/A} -% compliance is detected but let the author override the ``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} -% part and conformance IDs, as requested by Leonid Sinev} +% \begin{macro}{\hyxmp@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} +% values. +% \begin{macrocode} +\newcommand*{\hyxmp@declare@extensions}{% + \hyxmp@begin@extension@decls +% \end{macrocode} +% Declare the \acro{XMP} Media Management extensions (always present). +% \begin{macrocode} + \hyxmp@mm@extensions +% \end{macrocode} +% Declare the \acro{PDF/A} Identification extensions, but only when +% generating a \acro{PDF/A} document. % \begin{macrocode} -\newcommand*{\hyxmp@pdfa@id@schema}{% \ifHy@pdfa - \hyxmp@add@to@xml{% -______^^J% - }% - \hyxmp@add@simple{pdfaid:part}{\@pdfapart}% - \hyxmp@add@simple{pdfaid:conformance}{\@pdfaconformance}% - \hyxmp@add@to@xml{% -______^^J% - }% + \hyxmp@mm@extensions + \fi +% \end{macrocode} +% Conditionally declare \acro{IPTC} photo metadata extensions. +% \begin{macrocode} + \ifx\hyxmp@iptc@data\@empty + \else + \hyxmp@iptc@extensions \fi +% \end{macrocode} +% Conditionally declare \acro{PRISM} basic metadata extensions. +% \begin{macrocode} + \ifx\hyxmp@prism@data\@empty + \else + \hyxmp@prism@extensions + \fi +% \end{macrocode} +% \begin{macrocode} + \hyxmp@end@extension@decls } % \end{macrocode} % \end{macro} % -% % \subsubsection{Combining schemata into an XMP packet} % \label{sec:combining-schemata} % @@ -3891,20 +4666,51 @@ ______^^J% \gdef\hyxmp@xml{}% \hyxmp@add@to@xml{^^J% -^^J% -___^^J% +__^^J% +____^^J% }% +% \end{macrocode} +% Declare non-standard schemata. +% \begin{macrocode} + \hyxmp@check@iptc@data + \hyxmp@check@prism@data + \hyxmp@declare@extensions +% \end{macrocode} +% Insert all the metadata we know how to insert. +% \begin{macrocode} \hyxmp@pdf@schema \hyxmp@xmpRights@schema \hyxmp@dc@schema \hyxmp@photoshop@schema - \hyxmp@photometa@schema \hyxmp@xmp@basic@schema \hyxmp@pdfa@id@schema \hyxmp@mm@schema + \hyxmp@iptc@schema + \hyxmp@prism@schema \hyxmp@add@to@xml{% -___^^J% +____^^J% +__^^J% ^^J% \hyxmp@padding ^^J% @@ -3975,8 +4781,8 @@ ___^^J% % uncompress \emph{every} \acro{PDF} stream. The solution, provided by % Hans Hagen on the |luatex| mailing list (thread: % \href{http://tug.org/pipermail/luatex/2016-July/006077.html}{``Leaving -% a single PDF object uncompressed''}, 6\,\textsc{Jul}\,2016), is to -% provide the |uncompressed| flag to |\pdfobj|. Our definition of +% a single \acro{PDF} object uncompressed''}, 6\,\textsc{Jul}\,2016), +% is to provide the |uncompressed| flag to |\pdfobj|. Our definition of % |\hyxmp@embed@packet@pdftex| uses the \pkgname{ifluatex} package to % distinguish the \pdfTeX\ case from the pre-0.85 \LuaTeX\ case. % diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty index ff8d81bd246..e76fa1e8799 100644 --- a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty +++ b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{hyperxmp} - [2019/02/25 v3.5a Store hyperref metadata in XMP format] + [2019/03/31 v4.0 Store hyperref metadata in XMP format] \edef\hyxmp@dq@code{\the\catcode`\"} \catcode`\"=12 \def\hyxmp@driver{hpdftex} @@ -90,6 +90,36 @@ \define@key{Hyp}{pdfdocumentid}{\hyxmp@pdfstringdef\hyxmp@DocumentID{#1}} \def\hyxmp@InstanceID{} \define@key{Hyp}{pdfinstanceid}{\hyxmp@pdfstringdef\hyxmp@InstanceID{#1}} +\def\@pdfversionid{} +\define@key{Hyp}{pdfversionid}{\hyxmp@pdfstringdef\@pdfversionid{#1}} +\def\@pdfpublication{} +\define@key{Hyp}{pdfpublication}{\hyxmp@pdfstringdef\@pdfpublication{#1}} +\def\@pdfpubtype{} +\define@key{Hyp}{pdfpubtype}{\hyxmp@pdfstringdef\@pdfpubtype{#1}} +\def\@pdfbytes{} +\define@key{Hyp}{pdfbytes}{\hyxmp@pdfstringdef\@pdfbytes{#1}} +\def\@pdfnumpages{} +\define@key{Hyp}{pdfnumpages}{\hyxmp@pdfstringdef\@pdfnumpages{#1}} +\def\@pdfissn{} +\define@key{Hyp}{pdfissn}{\hyxmp@pdfstringdef\@pdfissn{#1}} +\def\@pdfeissn{} +\define@key{Hyp}{pdfeissn}{\hyxmp@pdfstringdef\@pdfeissn{#1}} +\def\@pdfisbn{} +\define@key{Hyp}{pdfisbn}{\hyxmp@pdfstringdef\@pdfisbn{#1}} +\def\@pdfbookedition{} +\define@key{Hyp}{pdfbookedition}{\hyxmp@pdfstringdef\@pdfbookedition{#1}} +\def\@pdfvolumenum{} +\define@key{Hyp}{pdfvolumenum}{\hyxmp@pdfstringdef\@pdfvolumenum{#1}} +\def\@pdfissuenum{} +\define@key{Hyp}{pdfissuenum}{\hyxmp@pdfstringdef\@pdfissuenum{#1}} +\def\@pdfpagerange{} +\define@key{Hyp}{pdfpagerange}{\hyxmp@pdfstringdef\@pdfpagerange{#1}} +\def\@pdfdoi{} +\define@key{Hyp}{pdfdoi}{\hyxmp@pdfstringdef\@pdfdoi{#1}} +\def\@pdfurl{} +\define@key{Hyp}{pdfurl}{\hyxmp@pdfstringdef\@pdfurl{#1}} +\def\@pdfsubtitle{} +\define@key{Hyp}{pdfsubtitle}{\hyxmp@pdfstringdef\@pdfsubtitle{#1}} \def\@pdfcontactaddress{} \define@key{Hyp}{pdfcontactaddress}{% \let\xmpcomma=\hyxmp@comma @@ -112,6 +142,12 @@ \define@key{Hyp}{pdfcontactemail}{\hyxmp@pdfstringdef\@pdfcontactemail{#1}} \def\@pdfcontacturl{} \define@key{Hyp}{pdfcontacturl}{\hyxmp@pdfstringdef\@pdfcontacturl{#1}} +\def\hyxmp@suppress@pdf@metadata{% + \global\let\PDF@FinishDoc=\@empty +} +\define@key{Hyp}{keeppdfinfo}[true]{% + \gdef\hyxmp@suppress@pdf@metadata{}% +} \def\hyxmp@pdfauthor{} \def\hyxmp@pdfkeywords{} \newcommand*{\hyxmp@redefine@Hyp}{% @@ -169,6 +205,8 @@ \@baseurl \@pdfauthor \@pdfauthortitle + \@pdfbookedition + \@pdfbytes \@pdfcaptionwriter \@pdfcontactaddress \@pdfcontactcity @@ -181,14 +219,27 @@ \@pdfcopyright \@pdfcreationdate \@pdfdatetime + \@pdfdoi + \@pdfeissn + \@pdfisbn + \@pdfissn + \@pdfissuenum \@pdfkeywords \@pdflang \@pdflicenseurl \@pdfmetadatetime \@pdfmoddate + \@pdfnumpages + \@pdfpagerange + \@pdfpublication + \@pdfpubtype \@pdfsubject + \@pdfsubtitle \@pdftitle \@pdftype + \@pdfurl + \@pdfversionid + \@pdfvolumenum }% \ifx\hyxmp@concated@metadata\@empty \PackageWarningNoLine{hyperxmp}{% @@ -228,6 +279,7 @@ provide metadata values to hyperxmp}% }% {}% \hyxmp@at@end{% + \hyxmp@suppress@pdf@metadata \hyxmp@find@metadata \hyxmp@embed@packet }% @@ -270,6 +322,11 @@ disabled}% \gdef\xmptilde{~}% \egroup \newcommand{\XMPTruncateList}[1]{{% + \PackageWarning{hyperxmp}{% + \noexpand\XMPTruncateList has been deprecated since\MessageBreak + hyperxmp 4.0 and may be removed in future\MessageBreak + versions of the package. \noexpand\XMPTruncateList\MessageBreak + was found}% \edef\hyxmp@temp@str{\csname hyxmp@#1\endcsname}% \hyxmp@commas@to@list{\hyxmp@temp@list}{\hyxmp@temp@str}% \def\@elt##1{% @@ -772,10 +829,6 @@ _______________________________________________________________^^J% \xdef\hyxmp@padding{\hyxmp@padding\hyxmp@padding} \newcommand*{\hyxmp@x@default}{x-default} \newcommand*{\hyxmp@pdf@schema}{% - \hyxmp@add@to@xml{% -______^^J% - }% \hyxmp@add@simple@var{pdf:Keywords}{@pdfkeywords}% \hyxmp@add@simple@var{pdf:Producer}{@pdfproducer}% \@ifundefined{pdfvariable}{% @@ -786,29 +839,48 @@ ___________xmlns:pdf="http://ns.adobe.com/pdf/1.3/">^^J% }{% \hyxmp@add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}% }% - \hyxmp@add@to@xml{% -______^^J% - }% } +\newcommand*{\hyxmp@extra@indent}{} \newcommand*{\hyxmp@add@simple}[2]{% - \edef\hyxmp@string{#2}% - \ifx\hyxmp@string\@empty - \else - \hyxmp@xmlify{\hyxmp@string}% + \@ifnotmtargexp{#2}{% + \hyxmp@xmlify{#2}% \hyxmp@add@to@xml{% -_________<#1>\hyxmp@xmlified^^J% + \hyxmp@extra@indent______<#1>\hyxmp@xmlified^^J% }% - \fi + }% } \newcommand*{\hyxmp@add@simple@var}[2]{% \expandafter\ifx\csname#2\endcsname\relax \else \hyxmp@xmlify{\csname#2\endcsname}% \hyxmp@add@to@xml{% -_________<#1>\hyxmp@xmlified^^J% + \hyxmp@extra@indent______<#1>\hyxmp@xmlified^^J% }% \fi } +\newcommand*{\hyxmp@add@simple@lang}[2]{% + \@ifnotmtarg{#2}{% + \hyxmp@xmlify{#2}% + \expandafter\hyxmp@add@simple@lang@i\hyxmp@xmlified\relax{#1}% + }% +} +\newcommand*{\hyxmp@add@simple@lang@i}{% + \@ifnextchar[\hyxmp@add@simple@lang@ii{\hyxmp@add@simple@lang@ii[]}% +} +\def\hyxmp@add@simple@lang@ii[#1]#2\relax#3{% + \@ifnotmtarg{#2}{% + \hyxmp@xmlify{#2}% + \@ifmtarg{#1}{% + \hyxmp@add@to@xml{% +______<#3>\hyxmp@xmlified^^J% + }% + }{% + \hyxmp@add@to@xml{% +______<#3 xml:lang="#1">\hyxmp@xmlified^^J% + }% + }% + }% +} \newcommand*{\hyxmp@rdf@dc}[3][\iffalse]{% \@ifmtargexp{#3}{\@tempswafalse}{\@tempswatrue}% #1 @@ -818,29 +890,29 @@ _________<#1>\hyxmp@xmlified^^J% \hyxmp@xmlify{#3}% \let\hyxmp@value=\hyxmp@xmlified \hyxmp@add@to@xml{% -_________^^J% -____________^^J% +______^^J% +________^^J% }% \ifx\@pdfmetalang\hyxmp@x@default \else \hyxmp@xmlify{\@pdfmetalang}% \hyxmp@add@to@xml{% -_______________\hyxmp@value^^J% +__________\hyxmp@value^^J% }% \fi \hyxmp@add@to@xml{% -_______________\hyxmp@value^^J% +__________\hyxmp@value^^J% }% \def\do##1##2{ \hyxmp@xmlify{##2}% \hyxmp@add@to@xml{% -_______________\hyxmp@xmlified^^J% +__________\hyxmp@xmlified^^J% }% }% \csname hyxmp@alt@#2\endcsname \hyxmp@add@to@xml{% -____________^^J% -_________^^J% +________^^J% +______^^J% }% \fi }% @@ -851,31 +923,27 @@ _________^^J% \fi \if@tempswa \hyxmp@add@to@xml{% -_________^^J% -____________^^J% +______^^J% +________^^J% }% \bgroup \hyxmp@xmlify{#4}% \hyxmp@commas@to@list\hyxmp@list{\hyxmp@xmlified}% \def\@elt##1{% \hyxmp@add@to@xml{% -_______________##1^^J% +__________##1^^J% }% }% \hyxmp@list \egroup \hyxmp@add@to@xml{% -____________^^J% -_________^^J% +________^^J% +______^^J% }% \fi } \newcommand*{\hyxmp@dc@schema}{% - \hyxmp@add@to@xml{% -______^^J% -_________application/pdf^^J% - }% + \hyxmp@add@simple{dc:format}{application/pdf}% \hyxmp@rdf@dc[\ifHy@pdfa]{title}{\@pdftitle}% \hyxmp@rdf@dc[\ifHy@pdfa]{description}{\@pdfsubject}% \hyxmp@rdf@dc{rights}{\@pdfcopyright}% @@ -888,9 +956,6 @@ _________application/pdf^^J% \else \hyxmp@add@simple{dc:source}{\@pdfsource}% \fi - \hyxmp@add@to@xml{% -______^^J% - }% } \newcommand*{\hyxmp@xmpRights@schema}{% \let\hyxmp@rights=\@empty @@ -904,34 +969,19 @@ ______^^J% \fi \ifx\hyxmp@rights\@empty \else - \hyxmp@add@to@xml{% -______^^J% - }% \ifx\@pdfcopyright\@empty \else - \hyxmp@add@to@xml{% -_________True^^J% - }% + \hyxmp@add@simple{xmpRights:Marked}{True}% \fi \hyxmp@add@simple{xmpRights:WebStatement}{\@pdflicenseurl}% - \hyxmp@add@to@xml{% -______^^J% - }% \fi } \gdef\hyxmp@mm@schema{% \@ifmtargexp{\hyxmp@DocumentID}{\hyxmp@def@DocumentID}{}% \@ifmtargexp{\hyxmp@InstanceID}{\hyxmp@def@InstanceID}{}% - \hyxmp@add@to@xml{% -______^^J% - }% \hyxmp@add@simple{xmpMM:DocumentID}{\hyxmp@DocumentID}% \hyxmp@add@simple{xmpMM:InstanceID}{\hyxmp@InstanceID}% - \hyxmp@add@to@xml{% -______^^J% - }% + \hyxmp@add@simple{xmpMM:VersionID}{\@pdfversionid}% } \newcommand*{\hyxmp@define@createdate}{% \@ifundefined{pdffeedback}{% @@ -945,10 +995,6 @@ ______^^J% }% } \newcommand*{\hyxmp@xmp@basic@schema}{% - \hyxmp@add@to@xml{% -______^^J% - }% \hyxmp@define@createdate \@ifundefined{@pdfcreationdate}{% \hyxmp@add@simple{xmp:CreateDate}{\hyxmp@createdate}% @@ -977,26 +1023,16 @@ ____________xmlns:xmp="http://ns.adobe.com/xap/1.0/">^^J% \fi \hyxmp@add@simple{xmp:CreatorTool}{\@pdfcreator}% \hyxmp@add@simple{xmp:BaseURL}{\@baseurl}% - \hyxmp@add@to@xml{% -______^^J% - }% } \gdef\hyxmp@photoshop@schema{% \edef\hyxmp@photoshop@data{\@pdfauthortitle\@pdfcaptionwriter}% - \ifx\hyxmp@photoshop@data\@empty - \else - \hyxmp@add@to@xml{% -______^^J% - }% - \fi \hyxmp@add@simple{photoshop:AuthorsPosition}{\@pdfauthortitle}% \hyxmp@add@simple{photoshop:CaptionWriter}{\@pdfcaptionwriter}% - \ifx\hyxmp@photoshop@data\@empty - \else - \hyxmp@add@to@xml{% -______^^J% - }% +} +\newcommand*{\hyxmp@pdfa@id@schema}{% + \ifHy@pdfa + \hyxmp@add@simple{pdfaid:part}{\@pdfapart}% + \hyxmp@add@simple{pdfaid:conformance}{\@pdfaconformance}% \fi } \begingroup @@ -1008,7 +1044,7 @@ ______^^J% \@ifnotmtargexp{#2}{% \bgroup \hyxmp@add@to@xml{% -_________<#1>% + \hyxmp@extra@indent______<#1>% }% \def\@elt@first##1{% \hyxmp@add@to@xml{##1}% @@ -1025,8 +1061,51 @@ _________<#1>% \egroup }% } -\gdef\hyxmp@photometa@schema{% - \edef\hyxmp@photometa@data{% +\gdef\hyxmp@iptc@schema{% + \ifx\hyxmp@iptc@data\@empty + \else + \hyxmp@add@to@xml{% +______^^J% + }% + \bgroup + \edef\hyxmp@extra@indent{\hyxmp@extra@indent\space\space}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}% + \hyxmp@add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}% + \def\xmplinesep{,}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}% + \hyxmp@list@to@lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}% + \egroup + \hyxmp@add@to@xml{% +______^^J% + }% + \fi +} +\newcommand*{\hyxmp@prism@schema}{% + \ifx\hyxmp@prism@data\@empty + \else + \hyxmp@add@simple{prism:complianceProfile}{three}% + \fi + \hyxmp@add@simple@lang{prism:subtitle}{\@pdfsubtitle}% + \hyxmp@add@simple@lang{prism:publicationName}{\@pdfpublication}% + \hyxmp@add@simple{prism:aggregationType}{\@pdfpubtype}% + \hyxmp@add@simple@lang{prism:bookEdition}{\@pdfbookedition}% + \hyxmp@add@simple{prism:volume}{\@pdfvolumenum}% + \hyxmp@add@simple{prism:number}{\@pdfissuenum}% + \hyxmp@add@simple{prism:pageRange}{\@pdfpagerange}% + \hyxmp@add@simple{prism:isbn}{\@pdfisbn}% + \hyxmp@add@simple{prism:issn}{\@pdfissn}% + \hyxmp@add@simple{prism:eIssn}{\@pdfeissn}% + \hyxmp@add@simple{prism:doi}{\@pdfdoi}% + \hyxmp@add@simple{prism:url}{\@pdfurl}% + \hyxmp@add@simple{prism:byteCount}{\@pdfbytes}% + \hyxmp@add@simple{prism:pageCount}{\@pdfnumpages}% +} +\newcommand*{\hyxmp@check@iptc@data}{% + \edef\hyxmp@iptc@data{% \@pdfcontactaddress \@pdfcontactcity \@pdfcontactregion @@ -1036,109 +1115,253 @@ _________<#1>% \@pdfcontactemail \@pdfcontacturl }% - \ifx\hyxmp@photometa@data\@empty - \else - \hyxmp@iptc@extensions - \hyxmp@add@to@xml{% -______^^J% -_______^^J% - }% - \fi - \hyxmp@list@to@lines{Iptc4xmpCore:CiAdrExtadr}{\@pdfcontactaddress}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrCity}{\@pdfcontactcity}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrRegion}{\@pdfcontactregion}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrPcode}{\@pdfcontactpostcode}% - \hyxmp@add@simple{Iptc4xmpCore:CiAdrCtry}{\@pdfcontactcountry}% - \bgroup - \def\xmplinesep{,}% - \hyxmp@list@to@lines{Iptc4xmpCore:CiTelWork}{\@pdfcontactphone}% - \hyxmp@list@to@lines{Iptc4xmpCore:CiEmailWork}{\@pdfcontactemail}% - \hyxmp@list@to@lines{Iptc4xmpCore:CiUrlWork}{\@pdfcontacturl}% - \egroup - \ifx\hyxmp@photometa@data\@empty - \else - \hyxmp@add@to@xml{% -_______^^J% -______^^J% - }% - \fi +}% +\newcommand*{\hyxmp@check@prism@data}{% + \edef\hyxmp@prism@data{% + \@pdfbookedition + \@pdfbytes + \@pdfdoi + \@pdfeissn + \@pdfisbn + \@pdfissn + \@pdfissuenum + \@pdfnumpages + \@pdfpagerange + \@pdfpublication + \@pdfpubtype + \@pdfsubtitle + \@pdfurl + \@pdfvolumenum + }% +}% +\newcommand*{\hyxmp@begin@extension@decls}{% + \hyxmp@add@to@xml{% +______^^J% +________^^J% + }% } -\newcommand*{\hyxmp@iptc@extensions}{% +\newcommand*{\hyxmp@end@extension@decls}{% + \hyxmp@add@to@xml{% +________^^J% +______^^J% + }% +} +\newcommand*{\hyxmp@begin@ext@decl}[3]{% \hyxmp@add@to@xml{% -______^^J% -________^^J% -__________^^J% -____________^^J% -______________IPTC Core Schema^^J% -______________http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/^^J% -______________Iptc4xmpCore^^J% -______________^^J% -________________^^J% -__________________^^J% -____________________CreatorContactInfo^^J% -____________________contactinfo^^J% -____________________external^^J% -____________________contact information for the document's creator^^J% -__________________^^J% -________________^^J% -______________^^J% -______________^^J% -________________^^J% -__________________^^J% -____________________contactinfo^^J% -____________________http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/^^J% -____________________Iptc4xmpCore^^J% -____________________contact information^^J% -____________________^^J% -______________________^^J% +__________^^J% +____________#1^^J% +____________#2^^J% +____________#3^^J% +____________^^J% +______________^^J% }% - \hyxmp@text@resource{CiAdrExtadr}{contact address}% - \hyxmp@text@resource{CiAdrCity}{contact city}% - \hyxmp@text@resource{CiAdrRegion}{contact region}% - \hyxmp@text@resource{CiAdrPcode}{contact postal code}% - \hyxmp@text@resource{CiAdrCtry}{contact country}% - \hyxmp@text@resource{CiTelWork}{contact telephone number}% - \hyxmp@text@resource{CiEmailWork}{contact email address}% - \hyxmp@text@resource{CiUrlWork}{contact url}% +}% +\newcommand*{\hyxmp@end@ext@decl}{% + \hyxmp@add@to@xml{% +______________^^J% +____________^^J% +__________^^J% + }% +}% +\newcommand{\hyxmp@declare@property}[4][Text]{% + \hyxmp@add@to@xml{% +________________^^J% +__________________#2^^J% +__________________#1^^J% +__________________#3^^J% +__________________#4^^J% +________________^^J% + }% +}% +\newcommand{\hyxmp@declare@field}[3][Text]{% \hyxmp@add@to@xml{% -______________________^^J% -____________________^^J% -__________________^^J% -________________^^J% -______________^^J% -____________^^J% -__________^^J% -________^^J% -______^^J% +______________________^^J% +________________________#2^^J% +________________________#1^^J% +________________________#3^^J% +______________________^^J% }% } -\newcommand*{\hyxmp@text@resource}[2]{% +\newcommand*{\hyxmp@mm@extensions}{% + \hyxmp@begin@ext@decl + {XMP Media Management Schema}% + {xmpMM}% + {http://ns.adobe.com/xap/1.0/mm/}% + \hyxmp@declare@property + [URI] + {DocumentID}% + {internal}% + {UUID based identifier for all versions and renditions of a document}% + \hyxmp@declare@property + [URI] + {InstanceID}% + {internal}% + {UUID based identifier for specific incarnation of a document}% + \hyxmp@declare@property + {VersionID}% + {internal}% + {Document version identifier}% + \hyxmp@end@ext@decl +}% +\newcommand*{\hyxmp@pdfa@id@extensions}{% + \hyxmp@begin@ext@decl + {PDF/A Identification Schema}% + {pdfaid}% + {http://www.aiim.org/pdfa/ns/id/}% + \hyxmp@declare@property + [Integer]% + {part}% + {internal}% + {Part of PDF/A standard}% + \hyxmp@declare@property + {conformance}% + {internal}% + {Conformance level of PDF/A standard}% + \hyxmp@end@ext@decl +}% +\newcommand*{\hyxmp@iptc@extensions}{% + \hyxmp@begin@ext@decl + {IPTC Core Schema}% + {Iptc4xmpCore}% + {http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/}% + \hyxmp@declare@property + [ContactInfo] + {CreatorContactInfo} + {external} + {Document creator's contact information} \hyxmp@add@to@xml{% -________________________^^J% -__________________________#1^^J% -__________________________Text^^J% -__________________________#2^^J% -________________________^^J% - } +______________^^J% +____________^^J% +____________^^J% +______________^^J% +________________^^J% +__________________ContactInfo^^J% +__________________http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/^^J% +__________________Iptc4xmpCore^^J% +__________________% + Basic set of information to get in contact with a person% + ^^J% +__________________^^J% +____________________^^J% + }% + \hyxmp@declare@field + {CiAdrCity}% + {Contact information city}% + \hyxmp@declare@field + {CiAdrCtry}% + {Contact information country}% + \hyxmp@declare@field + {CiAdrExtadr}% + {Contact information address}% + \hyxmp@declare@field + {CiAdrPcode}% + {Contact information local postal code}% + \hyxmp@declare@field + {CiAdrRegion}% + {Contact information regional information such as state or province}% + \hyxmp@declare@field + {CiEmailWork}% + {Contact information email address(es)}% + \hyxmp@declare@field + {CiTelWork}% + {Contact information telephone number(s)}% + \hyxmp@declare@field + {CiUrlWork}% + {Contact information Web URL(s)}% + \hyxmp@add@to@xml{% +____________________^^J% +__________________^^J% +________________^^J% +______________^^J% +____________^^J% +__________^^J% + }% } -\newcommand*{\hyxmp@pdfa@id@schema}{% +\newcommand*{\hyxmp@prism@extensions}{% + \hyxmp@begin@ext@decl + {PRISM Basic Metadata}% + {prism}% + {http://prismstandard.org/namespaces/basic/2.1/}% + \hyxmp@declare@property + {complianceProfile}% + {internal}% + {PRISM specification compliance profile to which this document adheres}% + \hyxmp@declare@property + {publicationName}% + {external}% + {Publication name}% + \hyxmp@declare@property + {aggregationType}% + {external}% + {Publication type}% + \hyxmp@declare@property + {bookEdition}% + {external}% + {Edition of the book in which the document was published}% + \hyxmp@declare@property + {volume}% + {external}% + {Publication volume number}% + \hyxmp@declare@property + {number}% + {external}% + {Publication issue number within a volume}% + \hyxmp@declare@property + {pageRange}% + {external}% + {Page range for the document within the print version of its publication}% + \hyxmp@declare@property + {issn}% + {external}% + {ISSN for the printed publication in which the document was published}% + \hyxmp@declare@property + {eIssn}% + {external}% + {ISSN for the electronic publication in which the document was published}% + \hyxmp@declare@property + {isbn}% + {external}% + {ISBN for the publication in which the document was published}% + \hyxmp@declare@property + {doi}% + {external}% + {Digital Object Identifier for the document}% + \hyxmp@declare@property + [URL] + {url}% + {external}% + {URL at which the document can be found}% + \hyxmp@declare@property + [Integer] + {byteCount}% + {internal}% + {Approximate file size in octets}% + \hyxmp@declare@property + [Integer] + {pageCount}% + {internal}% + {Number of pages in the print version of the document}% + \hyxmp@declare@property + {subtitle}% + {external}% + {Document's subtitle}% + \hyxmp@end@ext@decl +}% +\newcommand*{\hyxmp@declare@extensions}{% + \hyxmp@begin@extension@decls + \hyxmp@mm@extensions \ifHy@pdfa - \hyxmp@add@to@xml{% -______^^J% - }% - \hyxmp@add@simple{pdfaid:part}{\@pdfapart}% - \hyxmp@add@simple{pdfaid:conformance}{\@pdfaconformance}% - \hyxmp@add@to@xml{% -______^^J% - }% + \hyxmp@mm@extensions + \fi + \ifx\hyxmp@iptc@data\@empty + \else + \hyxmp@iptc@extensions + \fi + \ifx\hyxmp@prism@data\@empty + \else + \hyxmp@prism@extensions \fi + \hyxmp@end@extension@decls } \begingroup \ifhyxmp@unicodetex @@ -1157,20 +1380,41 @@ ______^^J% \gdef\hyxmp@xml{}% \hyxmp@add@to@xml{^^J% -^^J% -___^^J% +__^^J% +____^^J% }% + \hyxmp@check@iptc@data + \hyxmp@check@prism@data + \hyxmp@declare@extensions \hyxmp@pdf@schema \hyxmp@xmpRights@schema \hyxmp@dc@schema \hyxmp@photoshop@schema - \hyxmp@photometa@schema \hyxmp@xmp@basic@schema \hyxmp@pdfa@id@schema \hyxmp@mm@schema + \hyxmp@iptc@schema + \hyxmp@prism@schema \hyxmp@add@to@xml{% -___^^J% +____^^J% +__^^J% ^^J% \hyxmp@padding ^^J% -- cgit v1.2.3