texlive[44902] Master/texmf-dist: hyperxmp (27jul17)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 27 23:26:52 CEST 2017


Revision: 44902
          http://tug.org/svn/texlive?view=revision&revision=44902
Author:   karl
Date:     2017-07-27 23:26:51 +0200 (Thu, 27 Jul 2017)
Log Message:
-----------
hyperxmp (27jul17)

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

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

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2017-07-27 21:26:37 UTC (rev 44901)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/einstein-xmp.tex	2017-07-27 21:26:51 UTC (rev 44902)
@@ -37,6 +37,10 @@
                      \metavalue{On a heuristic viewpoint concerning the production and
                      transformation of light}
                    </rdf:li>
+                   <rdf:li xml:lang="de">
+                     \metavalue{\"Uber einen die Erzeugung und Verwandlung des Lichtes
+                     betreffenden heuristischen Gesichtspunkt}
+                   </rdf:li>
                 </rdf:Alt>
              </dc:title>
              <dc:description>

Modified: trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2017-07-27 21:26:37 UTC (rev 44901)
+++ trunk/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx	2017-07-27 21:26:51 UTC (rev 44902)
@@ -22,7 +22,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{hyperxmp}
 %<*package>
-    [2017/02/23 v3.2 Store hyperref metadata in XMP format]
+    [2017/07/25 v3.3 Store hyperref metadata in XMP format]
 %</package>
 %
 %<*driver>
@@ -39,8 +39,9 @@
 \usepackage{varioref}
 \usepackage{alltt}
 \usepackage{needspace}
+\usepackage[utf8]{inputenc}
 \usepackage{hyperxmp}
-\usepackage[bookmarksopen,bookmarksopenlevel=2,bookmarksnumbered]{hyperref}
+\usepackage[unicode,bookmarksopen,bookmarksopenlevel=2,bookmarksnumbered]{hyperref}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -81,7 +82,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1775}
+% \CheckSum{1833}
 %
 % \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
@@ -167,6 +168,11 @@
 %   \mbox{\acrostyle{#1}}^^A
 %   \SortIndex{#1}{\acrostyle{#1}}^^A
 % }
+% \newcounter{note}
+% \newcommand{\usagenote}[1]{^^A
+%   \addtocounter{note}{1}^^A
+%   \paragraph{Note~\thenote: #1}%
+% }
 %
 % ^^A  Define some other shortcut macros.
 % \DeclareRobustCommand{\tex}{^^A
@@ -398,6 +404,7 @@
 %   \item \optname{pdflicenseurl}
 %   \item \optname{pdfmetadate}
 %   \item \optname{pdfmetalang}
+%   \item \optname{pdfsource}
 %   \item \optname{pdftype}
 % \end{itemize}
 % \label{page:end-new-options}
@@ -465,19 +472,26 @@
 % \optname{pdflicenseurl} identifies a \acro{URL} that points to the
 % document's license agreement.
 %
-% \optname{pdfmetalang} indicates the natural language in which the
-% metadata is written, typically as 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 is always included in addition to
-% the specified metadata language, as the user reading the document may
-% not have specified a language preference.
+% \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.
 %
+% A rarely needed option, \optname{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
@@ -509,7 +523,7 @@
 % \begin{verbatim}
 %     \documentclass{article}
 %     \usepackage{hyperxmp}
-%     \usepackage{hyperref}
+%     \usepackage[unicode]{hyperref}
 %     \title{%
 %       On a heuristic viewpoint concerning the production and
 %       transformation of light}
@@ -538,8 +552,11 @@
 %         https://www.facebook.com/AlbertEinstein
 %       },
 %       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
@@ -597,7 +614,7 @@
 %   \label{fig:xmp-metadata-2}
 % \end{figure}
 %
-% \paragraph{Note~1: Acrobat \pdfterm{Author} bug}
+% \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
@@ -628,8 +645,7 @@
 % properly display all of the authors but at the cost of other
 % \acro{PDF} readers likely displaying only the first author.
 %
-%
-% \paragraph{Note~2: Acrobat multiline-field bug}
+% \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
@@ -648,8 +664,7 @@
 %     \renewcommand*{\xmlinesep}{;}
 % \end{verbatim}
 %
-%
-% \paragraph{Note~3: Object compression}
+% \usagenote{Object compression}
 % One intention of \acro{XMP} is that metadata embedded in a file be
 % readable even without knowledge of the file's format.  That is, the
 % metadata are expected to appear as plain text.  Although
@@ -682,8 +697,7 @@
 %   re-saving it with the Save As\dots\ menu option.
 % \end{enumerate}
 %
-%
-% \paragraph{Note~4: Literal commas}
+% \usagenote{Literal commas}
 % \pkgname{hyperxmp} splits the \optname{pdfauthor} and
 % \optname{pdfkeywords} lists at commas.  Therefore, when specifying
 % \optname{pdfauthor} and \optname{pdfkeywords}, you should separate
@@ -747,13 +761,13 @@
 % |scott/|'') in options such as \optname{baseurl},
 % \optname{pdfcontacturl} and \optname{pdflicenseurl}.
 %
-% \paragraph{Note~5: Unicode support}
+% \usagenote{Unicode support}
 % \term{Unicode} support is provided via the \pkgname{hyperref} package.
 % If you specify \optname{unicode}|=true| either as a \pkgname{hyperref}
 % option or as an argument to the |\hypersetup| command, the document
 % can include \term{Unicode} characters in its \acro{XMP} fields.
 %
-% \paragraph{Note~6: Automatically specified metadata}
+% \usagenote{Automatically specified metadata}
 % \optname{pdftitle} defaults to the document's title as specified by
 % |\title{|\dots|}|.  \optname{pdfauthor} defaults to the document's
 % author(s) as specified by |\author{|\dots|}|.  \optname{pdfdate}
@@ -764,7 +778,43 @@
 % |\usepackage{hyperxmp}| in a document's preamble and benefit from
 % a modicum of \acro{XMP} metadata with no additional effort.
 %
+% \usagenote{Multilingual metadata}
+% 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.
+% \DescribeMacro{\XMPLangAlt} As of version~3.3 of \pkgname{hyperxmp},
+% it is possible to include certain metadata---specifically, the
+% document's title, subject, and copyright statement---in more than one
+% language.  The |\XMPLangAlt| macro provides this functionality.  Usage
+% is as follows:
 %
+% \bigskip
+% \indent
+% |\XMPLangAlt| \marg{language} |{| \meta{option}|=|\meta{text},~\dots\ |}|
+% \bigskip
+%
+% \noindent
+% where \meta{language} is an \acro{ISO} \mbox{639-1} two-letter country
+% code with an optional \acro{ISO} \mbox{3166-1} two-letter region code
+% (e.g.,~``|en|'' for English or ``|en-US|'' for specifically US
+% English); \meta{option} is one of ``|pdftitle|'', ``|pdfsubject|'', or
+% ``|pdfcopyright|''; and \meta{text} is the text as expressed in the
+% specified language.  By way, of example, the following code provides
+% the document title in English then specifies an alternative title to
+% use in four other languages:
+%
+% \begin{verbatim}
+%   \hypersetup{%
+%     pdfmetalang={en},
+%     pdftitle={English title}
+%   }
+%   \XMPLangAlt{de}{pdftitle={Deutscher Titel}}
+%   \XMPLangAlt{fr}{pdftitle={Titre fran\c{c}ais}}
+%   \XMPLangAlt{it}{pdftitle={Titolo italiano}}
+%   \XMPLangAlt{rm}{pdftitle={Titel rumantsch}}
+% \end{verbatim}
+%
+%
 % \StopEventually{^^A
 % \section{Future Work}
 % \label{sec:future-work}
@@ -1095,6 +1145,17 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@pdfsource}
+% Prepare to store the document's source, which defaults to the value of
+% |\jobname|.
+% \changes{v3.3}{2017/07/16}{Added this macro and the corresponding
+%   \protect\optname{pdfsource} option, at Niklas Beisert's request}
+%    \begin{macrocode}
+\edef\@pdfsource{\jobname.tex}
+\define at key{Hyp}{pdfsource}{\hyxmp at pdfstringdef\@pdfsource{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % The following eight macros---|\@pdfcontactaddress|,
 % |\@pdfcontactcity|, |\@pdfcontactregion|, |\@pdfcontactpostcode|,
 % |\@pdfcontactcountry|, |\@pdfcontactphone|, |\@pdfcontactemail|, and
@@ -1453,11 +1514,17 @@
 %   wrote the document's metadata}
 % \changes{v2.0}{2012/08/02}{New \cs{AtBeginDocument} code from Heiko
 %   Oberdiek to properly encode \cs{@pdfmetalang}}
+% \changes{v3.3}{2017/07/21}{Don't overwrite an existing
+%   \protect\optname{pdfmetalang} with \protect\optname{pdflang} or
+%   \protect\texttt{x-default}.  This addresses a bug report by Niklas
+%   Beisert}
 %    \begin{macrocode}
-    \ifx\@pdflang\@empty
-      \let\@pdfmetalang=\hyxmp at x@default
-    \else
-      \edef\@pdfmetalang{\@pdflang}%
+    \ifx\@pdfmetalang\@empty
+      \ifx\@pdflang\@empty
+        \let\@pdfmetalang=\hyxmp at x@default
+      \else
+        \edef\@pdfmetalang{\@pdflang}%
+      \fi
     \fi
     \hyxmp at xmlify\@pdfmetalang
 %    \end{macrocode}
@@ -2486,6 +2553,89 @@
 % \end{macro}
 %
 %
+% \subsubsection{Providing metadata in multiple languages}
+% \label{sec:lang-alt}
+%
+% Certain \acro{XMP} tags---\xmpterm{dc:title},
+% \xmpterm{dc:description}, and \xmpterm{dc:rights} (and others?  Let me
+% know.)---can be expressed in multiple languages.  The same text is
+% used for both language \optname{pdfmetalang} (default:
+% \optname{pdflang}) and language ``|x-default|''.  To express the same
+% metadata in multiple languages, we provide an |\XMPLangAlt| macro to
+% construct a list of alternative forms for a piece of metadata.
+%
+% \begin{macro}{\hyxmp at alt@title}
+% \begin{macro}{\hyxmp at alt@description}
+% \begin{macro}{\hyxmp at alt@rights}
+% Each of these macros is a list in which each element is of the form
+% ``|\do| \meta{language} \meta{text}'' in which \meta{language} is an
+% \acro{ISO} \mbox{639-1} two-letter country code with an optional
+% \acro{ISO} \mbox{3166-1} two-letter region code.  For example,
+% |\hyxmp at alt@title| may contain an element, ``|\do| |{es-MX}|
+% |{Este| |es| |mi| |documento}|''.
+%    \begin{macrocode}
+\def\hyxmp at alt@title{}
+\def\hyxmp at alt@description{}
+\def\hyxmp at alt@rights{}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp at LA@accept}
+% This macro wraps |\define at key| to make the option ``|#1|=\meta{value}''
+% append \meta{value} to list~|#2|.
+%    \begin{macrocode}
+\newcommand{\hyxmp at LA@accept}[2]{%
+  \define at key{hyxmp at LA}{#1}{%
+%    \end{macrocode}
+% \begin{macro}{\hyxmp at value}
+% As Niklas Beisert observed, if the option passed to the current key
+% contains \LaTeX\ code, this code will be included in the \acro{XMP}
+% packet, which is undesirable.  Hence, we first clean up the string
+% using |\hyxmp at pdfstringdef|.
+%    \begin{macrocode}
+    \hyxmp at pdfstringdef\hyxmp at value{##1}%
+    \xdef#2{#2\noexpand\do {\hyxmp at cur@lang} {\hyxmp at value}}%
+  }
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Define \meta{key}=\meta{value} options for appending to each of the
+% |\hyxmp at alt|\meta{tag} lists.
+%    \begin{macrocode}
+\hyxmp at LA@accept{pdftitle}{\hyxmp at alt@title}
+\hyxmp at LA@accept{pdfsubject}{\hyxmp at alt@description}
+\hyxmp at LA@accept{pdfcopyright}{\hyxmp at alt@rights}
+%    \end{macrocode}
+%
+% \begin{macro}{\XMPLangAlt}
+% Argument~|#1| is a language expressed as a two-letter country code and
+% optional two-letter region code.  Argument~|#2| is a list of
+% \meta{key}=\meta{value} pairs.  Keys correspond to |\hypersetup|
+% options such as ``|pdftitle|'', ``|pdfsubject|'', and
+% ``|pdfcopyright|''.  Values are the alternative-language form of the
+% text provided for the corresponding option.
+% \changes{v3.3}{2017/07/22}{Added this macro based on a request---and
+%   some code---by Niklas Beisert to support metadata expressed in multiple
+%   languages}
+%    \begin{macrocode}
+\newcommand{\XMPLangAlt}[2]{%
+  \let\do=\relax
+%    \end{macrocode}
+% \begin{macro}{\hyxmp at cur@lang}
+% Store the provided language, which will be used during option processing.
+%    \begin{macrocode}
+  \edef\hyxmp at cur@lang{#1}%
+  \setkeys{hyxmp at LA}{#2}%
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
 % \subsection{UUID generation}
 % \label{sec:uuid-gen}
 %
@@ -2920,6 +3070,9 @@
 % macro.
 % \changes{v1.4}{2011/06/12}{Included metadata in the \texttt{x-default}
 %   language regardless of the specified metadata language}
+% \changes{v3.3}{2017/07/22}{Bug fix: Output the metadata language as
+%   correct \noexpand\acro{XML} even when \noexpand\pkgname{hyperref} is
+%   loaded with the \noexpand\optname{unicode} option}
 %    \begin{macrocode}
 \newcommand*{\hyxmp at rdf@dc}[3][\iffalse]{%
 %    \end{macrocode}
@@ -2939,6 +3092,12 @@
 %    \begin{macrocode}
   \if at tempswa
     \hyxmp at xmlify{#3}%
+%    \end{macrocode}
+% \begin{macro}{\hyxmp at value}
+% Store the \acro{XML}-ified version of |#3| in |\hyxmp at value| so we can
+% reuse |\hyxmp at xmlifiied| if necessary.
+%    \begin{macrocode}
+    \let\hyxmp at value=\hyxmp at xmlified
     \hyxmp at add@to at xml{%
 _________<dc:#2>^^J%
 ____________<rdf:Alt>^^J%
@@ -2945,12 +3104,29 @@
     }%
     \ifx\@pdfmetalang\hyxmp at x@default
     \else
+      \hyxmp at xmlify{\@pdfmetalang}%
       \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\@pdfmetalang">\hyxmp at xmlified</rdf:li>^^J%
+_______________<rdf:li xml:lang="\hyxmp at xmlified">\hyxmp at value</rdf:li>^^J%
       }%
     \fi
     \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at xmlified</rdf:li>^^J%
+_______________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at value</rdf:li>^^J%
+    }%
+%    \end{macrocode}
+% Include variants of the text expressed in other languages, as specified by
+% the author using |\XMPLangAlt| (Section~\ref{sec:lang-alt}).
+%    \begin{macrocode}
+    \def\do##1##2{
+      \hyxmp at xmlify{##2}%
+      \hyxmp at add@to at xml{%
+_______________<rdf:li xml:lang="##1">\hyxmp at xmlified</rdf:li>^^J%
+      }%
+    }%
+    \csname hyxmp at alt@#2\endcsname
+%    \end{macrocode}
+% Complete this \acro{XMP} element.
+%    \begin{macrocode}
+    \hyxmp at add@to at xml{%
 ____________</rdf:Alt>^^J%
 _________</dc:#2>^^J%
     }%
@@ -2958,6 +3134,7 @@
 }%
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\hyxmp at list@to at xml}
 % Given an optional |\if|\meta{something} statement (|#1|), a Dublin Core
@@ -3048,7 +3225,10 @@
   \hyxmp at list@to at xml{date}{Seq}{\hyxmp at today}%
   \hyxmp at list@to at xml{language}{Bag}{\@pdflang}%
   \hyxmp at list@to at xml{type}{Bag}{\@pdftype}%
-  \hyxmp at add@simple{dc:source}{\jobname.tex}%
+  \ifx\@pdfsource\@empty
+  \else
+    \hyxmp at add@simple{dc:source}{\@pdfsource}%
+  \fi
   \hyxmp at add@to at xml{%
 ______</rdf:Description>^^J%
   }%

Modified: trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2017-07-27 21:26:37 UTC (rev 44901)
+++ trunk/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty	2017-07-27 21:26:51 UTC (rev 44902)
@@ -22,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{hyperxmp}
-    [2017/02/23 v3.2 Store hyperref metadata in XMP format]
+    [2017/07/25 v3.3 Store hyperref metadata in XMP format]
 \edef\hyxmp at dq@code{\the\catcode`\"}
 \catcode`\"=12
 \def\hyxmp at driver{hpdftex}
@@ -81,6 +81,8 @@
 \define at key{Hyp}{pdfapart}{\hyxmp at pdfstringdef\@pdfapart{#1}}
 \def\@pdfaconformance{B}
 \define at key{Hyp}{pdfaconformance}{\hyxmp at pdfstringdef\@pdfaconformance{#1}}
+\edef\@pdfsource{\jobname.tex}
+\define at key{Hyp}{pdfsource}{\hyxmp at pdfstringdef\@pdfsource{#1}}
 \def\@pdfcontactaddress{}
 \define at key{Hyp}{pdfcontactaddress}{%
   \let\xmpcomma=\hyxmp at comma
@@ -194,10 +196,12 @@
     \ifx\@pdflang\relax
       \let\@pdflang=\@empty
     \fi
-    \ifx\@pdflang\@empty
-      \let\@pdfmetalang=\hyxmp at x@default
-    \else
-      \edef\@pdfmetalang{\@pdflang}%
+    \ifx\@pdfmetalang\@empty
+      \ifx\@pdflang\@empty
+        \let\@pdfmetalang=\hyxmp at x@default
+      \else
+        \edef\@pdfmetalang{\@pdflang}%
+      \fi
     \fi
     \hyxmp at xmlify\@pdfmetalang
     \ifx\@pdfdatetime\@empty
@@ -608,6 +612,23 @@
   \catcode0=12 %
   \gdef\hyxmp at zero{^^00}%
 \endgroup
+\def\hyxmp at alt@title{}
+\def\hyxmp at alt@description{}
+\def\hyxmp at alt@rights{}
+\newcommand{\hyxmp at LA@accept}[2]{%
+  \define at key{hyxmp at LA}{#1}{%
+    \hyxmp at pdfstringdef\hyxmp at value{##1}%
+    \xdef#2{#2\noexpand\do {\hyxmp at cur@lang} {\hyxmp at value}}%
+  }
+}
+\hyxmp at LA@accept{pdftitle}{\hyxmp at alt@title}
+\hyxmp at LA@accept{pdfsubject}{\hyxmp at alt@description}
+\hyxmp at LA@accept{pdfcopyright}{\hyxmp at alt@rights}
+\newcommand{\XMPLangAlt}[2]{%
+  \let\do=\relax
+  \edef\hyxmp at cur@lang{#1}%
+  \setkeys{hyxmp at LA}{#2}%
+}
 \def\hyxmp at modulo@a#1{%
   \@tempcntb=\@tempcnta
   \divide\@tempcntb by #1
@@ -789,6 +810,7 @@
   \fi
   \if at tempswa
     \hyxmp at xmlify{#3}%
+    \let\hyxmp at value=\hyxmp at xmlified
     \hyxmp at add@to at xml{%
 _________<dc:#2>^^J%
 ____________<rdf:Alt>^^J%
@@ -795,12 +817,22 @@
     }%
     \ifx\@pdfmetalang\hyxmp at x@default
     \else
+      \hyxmp at xmlify{\@pdfmetalang}%
       \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\@pdfmetalang">\hyxmp at xmlified</rdf:li>^^J%
+_______________<rdf:li xml:lang="\hyxmp at xmlified">\hyxmp at value</rdf:li>^^J%
       }%
     \fi
     \hyxmp at add@to at xml{%
-_______________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at xmlified</rdf:li>^^J%
+_______________<rdf:li xml:lang="\hyxmp at x@default">\hyxmp at value</rdf:li>^^J%
+    }%
+    \def\do##1##2{
+      \hyxmp at xmlify{##2}%
+      \hyxmp at add@to at xml{%
+_______________<rdf:li xml:lang="##1">\hyxmp at xmlified</rdf:li>^^J%
+      }%
+    }%
+    \csname hyxmp at alt@#2\endcsname
+    \hyxmp at add@to at xml{%
 ____________</rdf:Alt>^^J%
 _________</dc:#2>^^J%
     }%
@@ -850,7 +882,10 @@
   \hyxmp at list@to at xml{date}{Seq}{\hyxmp at today}%
   \hyxmp at list@to at xml{language}{Bag}{\@pdflang}%
   \hyxmp at list@to at xml{type}{Bag}{\@pdftype}%
-  \hyxmp at add@simple{dc:source}{\jobname.tex}%
+  \ifx\@pdfsource\@empty
+  \else
+    \hyxmp at add@simple{dc:source}{\@pdfsource}%
+  \fi
   \hyxmp at add@to at xml{%
 ______</rdf:Description>^^J%
   }%



More information about the tex-live-commits mailing list