summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-03 13:03:25 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-03 13:03:25 +0000
commitf53d41771bd380e3a5c63ff43cc0350764e62b13 (patch)
treefce4a2ab346790b91e5bcb20593a74ee44d31b63
parentb9f872020f9b231de20afe30533a2c8b8c8dff29 (diff)
hyperxmp 2011/06/12 v1.4
git-svn-id: svn://tug.org/texlive/trunk@23378 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdfbin445189 -> 444805 bytes
-rw-r--r--Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx114
-rw-r--r--Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty29
3 files changed, 92 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf b/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
index 9cd2dc9e371..3af3045155a 100644
--- a/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
+++ b/Master/texmf-dist/doc/latex/hyperxmp/hyperxmp.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
index 2cc3ff17731..4bfa8d7b474 100644
--- a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
+++ b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{hyperxmp}
%<*package>
- [2011/04/30 v1.3 Store hyperref metadata in XMP format]
+ [2011/06/12 v1.4 Store hyperref metadata in XMP format]
%</package>
%
%<*driver>
@@ -42,7 +42,7 @@
%</driver>
% \fi
%
-% \CheckSum{872}
+% \CheckSum{884}
%
% \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
@@ -194,11 +194,11 @@
% \item authors (\xmpterm{dc:creator})
% \item copyright (\xmpterm{dc:rights})
% \item date (\xmpterm{dc:date})
-% \item document identifier (\xmpterm{xapMM:DocumentID})
-% \item document instance identifier (\xmpterm{xapMM:InstanceID})
+% \item document identifier (\xmpterm{xmpMM:DocumentID})
+% \item document instance identifier (\xmpterm{xmpMM:InstanceID})
% \item format (\xmpterm{dc:format})
% \item keywords (\xmpterm{pdf:Keyword} and \xmpterm{dc:subject})
-% \item license \acro{URL} (\xmpterm{xapRights:WebStatement})
+% \item license \acro{URL} (\xmpterm{xmpRights:WebStatement})
% \item metadata writer (\xmpterm{photoshop:CaptionWriter})
% \item \acro{PDF}-generating tool (\xmpterm{pdf:Producer})
% \item primary author's position/title (\xmpterm{photoshop:AuthorsPosition})
@@ -262,7 +262,7 @@
% \noindent
% |pdfauthortitle| indicates the primary author's position or title.
% |pdfcaptionwriter| specifies the name of the person who added
-% the metadata to the document. |\pdfcopyright| defines the copyright
+% the metadata to the document. |pdfcopyright| defines the copyright
% text. |pdflicenseurl| identifies a \acro{URL} that points to the
% document's license agreement. |pdfmetalang| indicates the natural
% language in which the metadata is written, typically as an \acro{IETF}
@@ -271,13 +271,16 @@
% for German, and so forth. If |pdfmetalang| is not specified,
% \pkgname{hyperxmp} assumes the metadata language is the same as the
% document language (\pkgname{hyperref}'s |pdflang| option). If neither
-% |pdfmetalang| nor |pdflang| is specified, \pkgname{hyperxmp} uses
-% ``|x-default|'' as the metadata language.
+% |pdfmetalang| nor |pdflang| is specified, \pkgname{hyperxmp} uses only
+% ``|x-default|'' as the metadata language. Note that ``|x-default|''
+% metadata is always included in addition to the specified metadata
+% language, as the user reading the document may not have specified a
+% language preference.
%
-% It's usually more convenient to provide values for those options using
+% 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{ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/hyperref/doc/manual.pdf}{the
+% \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:
@@ -349,19 +352,25 @@
% <dc:title>
% <rdf:Alt>
% <rdf:li xml:lang="en">On a heuristic viewpoint
-% concerning the production and transformation of
-% light</rdf:li>
+% concerning the production and transformation of
+% light</rdf:li>
+% <rdf:li xml:lang="x-default">On a heuristic viewpoint
+% concerning the production and transformation of
+% light</rdf:li>
% </rdf:Alt>
% </dc:title>
% <dc:description>
% <rdf:Alt>
% <rdf:li xml:lang="en">photoelectric effect</rdf:li>
+% <rdf:li xml:lang="x-default">photoelectric effect</rdf:li>
% </rdf:Alt>
% </dc:description>
% <dc:rights>
% <rdf:Alt>
% <rdf:li xml:lang="en">Copyright (C) 1905,
-% Albert Einstein</rdf:li>
+% Albert Einstein</rdf:li>
+% <rdf:li xml:lang="x-default">Copyright (C) 1905,
+% Albert Einstein</rdf:li>
% </rdf:Alt>
% </dc:rights>
% <dc:creator>
@@ -383,9 +392,9 @@
% </dc:date>
% </rdf:Description>
% <rdf:Description rdf:about=""
-% xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/">
-% <xapMM:DocumentID>uuid:c4188820-aef2-0a82-626ce4182b62</xapMM:DocumentID>
-% <xapMM:InstanceID>uuid:9b62b67f-d754-626c-4c959595fd75</xapMM:InstanceID>
+% xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
+% <xmpMM:DocumentID>uuid:c4188820-aef2-0a82-626ce4182b62</xmpMM:DocumentID>
+% <xmpMM:InstanceID>uuid:9b62b67f-d754-626c-4c959595fd75</xmpMM:InstanceID>
% </rdf:Description>
% </rdf:RDF>
% </x:xmpmeta>
@@ -540,15 +549,16 @@
%
% An important design decision underlying \pkgname{hyperxmp} is that the
% package should integrate seamlessly with \pkgname{hyperref}. To that
-% end, \pkgname{hyperxmp} takes its \acro{XMP} metadata from the
-% \pkgname{hyperref} |pdftitle|, |pdfauthor|, |pdfsubject|, and
-% |pdfkeywords| options plus two new options, |pdfcopyright| and
-% |pdflicenseurl|, introduced by \pkgname{hyperxmp}. For consistency
-% with \pkgname{hyperref}'s document-metadata naming conventions (which
-% are in turn based on \LaTeX's document-metadata naming conventions),
-% we do not prefix metadata-related macro names with our
-% package-specific |\hyxmp@| prefix. That is, we use names like
-% |\@pdfcopyright| instead of |\hyxmp@pdfcopyright|.
+% end, \pkgname{hyperxmp} takes its \acro{XMP} metadata from
+% \pkgname{hyperref}'s |pdftitle|, |pdfauthor|, |pdfsubject|,
+% |pdfkeywords|, and |pdflang| options. It also introduces five new
+% options: |pdfcopyright|, |pdflicenseurl|, |pdfauthortitle|,
+% |pdfcaptionwriter|, and |pdfmetalang|. For consistency with
+% \pkgname{hyperref}'s document-metadata naming conventions (which are
+% in turn based on \LaTeX's document-metadata naming conventions), we do
+% not prefix metadata-related macro names with our package-specific
+% |\hyxmp@| prefix. That is, we use names like |\@pdfcopyright| instead
+% of |\hyxmp@pdfcopyright|.
%
% \bigskip
%
@@ -656,7 +666,7 @@ metadata values to hyperxmp}%
% \begin{macrocode}
\ifx\@pdfmetalang\@empty
\ifx\@pdflang\@empty
- \def\@pdfmetalang{x-default}%
+ \let\@pdfmetalang=\hyxmp@x@default
\else
\edef\@pdfmetalang{\@pdflang}%
\fi
@@ -1110,7 +1120,7 @@ disabled}%
% We use a linear congruential generator to produce pseudorandom
% \acro{UUID}s. True, this method has its flaws but it's simple to
% implement in \TeX\ and is good enough for producing the \acro{XMP}
-% \xmpterm{xapMM:DocumentID} and \xmpterm{xapMM:InstanceID} fields.
+% \xmpterm{xmpMM:DocumentID} and \xmpterm{xmpMM:InstanceID} fields.
%
% \begin{macro}{\hyxmp@modulo@a}
% Replace the contents of |\@tempcnta| with the contents modulo~|#1|.
@@ -1370,7 +1380,6 @@ __________________________________________________^^J%
% \end{macro}
% \end{macro}
%
-%
% \begin{macro}{\hyxmp@today}
% Define today's date in \textit{YYYY}-\textit{MM}-\textit{DD} format.
% \begin{macrocode}
@@ -1388,6 +1397,15 @@ __________________________________________________^^J%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\hyxmp@x@default}
+% Define an |x-default| string that we can use in comparisons with
+% |\@pdfmetalang|.
+% \begin{macrocode}
+\newcommand*{\hyxmp@x@default}{x-default}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsubsection{The Adobe PDF schema}
% \label{sec:adobe-pdf}
%
@@ -1448,6 +1466,8 @@ ______</rdf:Description>^^J%
% Given a Dublin Core property~(|#1|) and a macro containing some
% |\pdfstringdef|-defined text~(|#2|), append the appropriate block of
% \acro{XML} to the |\hyxmp@xml| macro but only if |#2| is non-empty.
+% \changes{v1.4}{2011/06/12}{Included metadata in the \texttt{x-default}
+% language regardless of the specified metadata language}
% \begin{macrocode}
\newcommand*{\hyxmp@rdf@dc}[2]{%
\ifx#2\@empty
@@ -1456,7 +1476,15 @@ ______</rdf:Description>^^J%
\hyxmp@add@to@xml{%
_________<dc:#1>^^J%
____________<rdf:Alt>^^J%
+ }%
+ \ifx\@pdfmetalang\hyxmp@x@default
+ \else
+ \hyxmp@add@to@xml{%
_______________<rdf:li xml:lang="\@pdfmetalang">\hyxmp@xmlified</rdf:li>^^J%
+ }%
+ \fi
+ \hyxmp@add@to@xml{%
+_______________<rdf:li xml:lang="\hyxmp@x@default">\hyxmp@xmlified</rdf:li>^^J%
____________</rdf:Alt>^^J%
_________</dc:#1>^^J%
}%
@@ -1543,22 +1571,24 @@ ______</rdf:Description>^^J%
% \subsubsection{The XMP Rights Management schema}
% \label{sec:xmp-rights}
%
-% \begin{macro}{\hyxmp@xapRights@schema}
+% \begin{macro}{\hyxmp@xmpRights@schema}
% Add properties defined by the XMP Rights Management schema to the
% |\hyxmp@xml| macro. Currently, these are only the
-% \xmpterm{xapRights:Marked} property and the
-% \xmpterm{xapRights:WebStatement} property and only if the author
+% \xmpterm{xmpRights:Marked} property and the
+% \xmpterm{xmpRights:WebStatement} property and only if the author
% defined a |pdflicenseurl|.
+% \changes{v1.4}{2011/05/29}{Renamed the \texttt{xapRights} namespace
+% prefix to \texttt{xmpRights}}
% \begin{macrocode}
-\newcommand*{\hyxmp@xapRights@schema}{%
+\newcommand*{\hyxmp@xmpRights@schema}{%
\ifx\@pdflicenseurl\@empty
\else
\hyxmp@xmlify{\@pdflicenseurl}%
\hyxmp@add@to@xml{%
______<rdf:Description rdf:about=""^^J%
-___________xmlns:xapRights="http://ns.adobe.com/xap/1.0/rights/">^^J%
-_________<xapRights:Marked>True</xapRights:Marked>^^J%
-_________<xapRights:WebStatement>\hyxmp@xmlified</xapRights:WebStatement>^^J%
+___________xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">^^J%
+_________<xmpRights:Marked>True</xmpRights:Marked>^^J%
+_________<xmpRights:WebStatement>\hyxmp@xmlified</xmpRights:WebStatement>^^J%
______</rdf:Description>^^J%
}%
\fi
@@ -1572,20 +1602,22 @@ ______</rdf:Description>^^J%
% \begin{macro}{\hyxmp@mm@schema}
% Add properties defined by the XMP Media Management schema to the
% |\hyxmp@xml| macro. According to the \acro{XMP} specification, the
-% \xmpterm{xapMM:DocumentID} property is supposed to uniquely identify a
-% document, and the \xmpterm{xapMM:InstanceID} property is supposed to
+% \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{Adobe2010:XMP}. As seen in
% Section~\ref{sec:uuid-gen}, we do what we can to honor this intention
% from within a \TeX-based workflow.
+% \changes{v1.4}{2011/05/29}{Renamed the \texttt{xapMM} namespace
+% prefix to \texttt{xmpMM}}
% \begin{macrocode}
\gdef\hyxmp@mm@schema{%
\hyxmp@def@DocumentID
\hyxmp@def@InstanceID
\hyxmp@add@to@xml{%
______<rdf:Description rdf:about=""^^J%
-____________xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
-_________<xapMM:DocumentID>\hyxmp@DocumentID</xapMM:DocumentID>^^J%
-_________<xapMM:InstanceID>\hyxmp@InstanceID</xapMM:InstanceID>^^J%
+____________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
+_________<xmpMM:DocumentID>\hyxmp@DocumentID</xmpMM:DocumentID>^^J%
+_________<xmpMM:InstanceID>\hyxmp@InstanceID</xmpMM:InstanceID>^^J%
______</rdf:Description>^^J%
}%
}
@@ -1675,7 +1707,7 @@ ______</rdf:Description>^^J%
___<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns\hyxmp@hash">^^J%
}%
\hyxmp@pdf@schema
- \hyxmp@xapRights@schema
+ \hyxmp@xmpRights@schema
\hyxmp@dc@schema
\hyxmp@photoshop@schema
\hyxmp@mm@schema
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
index 19ea78638f9..ba39d4a3e94 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}
- [2011/04/30 v1.3 Store hyperref metadata in XMP format]
+ [2011/06/12 v1.4 Store hyperref metadata in XMP format]
\edef\hyxmp@dq@code{\the\catcode`\"}
\catcode`\"=12
\RequirePackage{keyval}
@@ -62,7 +62,7 @@ metadata values to hyperxmp}%
{%
\ifx\@pdfmetalang\@empty
\ifx\@pdflang\@empty
- \def\@pdfmetalang{x-default}%
+ \let\@pdfmetalang=\hyxmp@x@default
\else
\edef\@pdfmetalang{\@pdflang}%
\fi
@@ -346,6 +346,7 @@ __________________________________________________^^J%
\else
\xdef\hyxmp@today{\hyxmp@today-\the\day}%
\fi
+\newcommand*{\hyxmp@x@default}{x-default}
\newcommand*{\hyxmp@pdf@schema}{%
\let\hyxmp@have@any=!%
\ifx\@pdfkeywords\@empty
@@ -385,7 +386,15 @@ ______</rdf:Description>^^J%
\hyxmp@add@to@xml{%
_________<dc:#1>^^J%
____________<rdf:Alt>^^J%
+ }%
+ \ifx\@pdfmetalang\hyxmp@x@default
+ \else
+ \hyxmp@add@to@xml{%
_______________<rdf:li xml:lang="\@pdfmetalang">\hyxmp@xmlified</rdf:li>^^J%
+ }%
+ \fi
+ \hyxmp@add@to@xml{%
+_______________<rdf:li xml:lang="\hyxmp@x@default">\hyxmp@xmlified</rdf:li>^^J%
____________</rdf:Alt>^^J%
_________</dc:#1>^^J%
}%
@@ -434,15 +443,15 @@ _________<dc:format>application/pdf</dc:format>^^J%
______</rdf:Description>^^J%
}%
}
-\newcommand*{\hyxmp@xapRights@schema}{%
+\newcommand*{\hyxmp@xmpRights@schema}{%
\ifx\@pdflicenseurl\@empty
\else
\hyxmp@xmlify{\@pdflicenseurl}%
\hyxmp@add@to@xml{%
______<rdf:Description rdf:about=""^^J%
-___________xmlns:xapRights="http://ns.adobe.com/xap/1.0/rights/">^^J%
-_________<xapRights:Marked>True</xapRights:Marked>^^J%
-_________<xapRights:WebStatement>\hyxmp@xmlified</xapRights:WebStatement>^^J%
+___________xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">^^J%
+_________<xmpRights:Marked>True</xmpRights:Marked>^^J%
+_________<xmpRights:WebStatement>\hyxmp@xmlified</xmpRights:WebStatement>^^J%
______</rdf:Description>^^J%
}%
\fi
@@ -452,9 +461,9 @@ ______</rdf:Description>^^J%
\hyxmp@def@InstanceID
\hyxmp@add@to@xml{%
______<rdf:Description rdf:about=""^^J%
-____________xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
-_________<xapMM:DocumentID>\hyxmp@DocumentID</xapMM:DocumentID>^^J%
-_________<xapMM:InstanceID>\hyxmp@InstanceID</xapMM:InstanceID>^^J%
+____________xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">^^J%
+_________<xmpMM:DocumentID>\hyxmp@DocumentID</xmpMM:DocumentID>^^J%
+_________<xmpMM:InstanceID>\hyxmp@InstanceID</xmpMM:InstanceID>^^J%
______</rdf:Description>^^J%
}%
}
@@ -500,7 +509,7 @@ ______</rdf:Description>^^J%
___<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns\hyxmp@hash">^^J%
}%
\hyxmp@pdf@schema
- \hyxmp@xapRights@schema
+ \hyxmp@xmpRights@schema
\hyxmp@dc@schema
\hyxmp@photoshop@schema
\hyxmp@mm@schema