summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-27 21:26:51 +0000
committerKarl Berry <karl@freefriends.org>2017-07-27 21:26:51 +0000
commit163883bed154d373386a4ec682c67a89c10dd75e (patch)
tree82c0ddac5fceee8feb1f976937bcca8b53353121 /Master/texmf-dist/tex/latex
parent489bf93080c55ee77ca42507502afcbfdec203aa (diff)
hyperxmp (27jul17)
git-svn-id: svn://tug.org/texlive/trunk@44902 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty51
1 files changed, 43 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
index d5ed768c567..282bebe5177 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}
- [2017/02/23 v3.2 Store hyperref metadata in XMP format]
+ [2017/07/25 v3.3 Store hyperref metadata in XMP format]
\edef\hyxmp@dq@code{\the\catcode`\"}
\catcode`\"=12
\def\hyxmp@driver{hpdftex}
@@ -81,6 +81,8 @@
\define@key{Hyp}{pdfapart}{\hyxmp@pdfstringdef\@pdfapart{#1}}
\def\@pdfaconformance{B}
\define@key{Hyp}{pdfaconformance}{\hyxmp@pdfstringdef\@pdfaconformance{#1}}
+\edef\@pdfsource{\jobname.tex}
+\define@key{Hyp}{pdfsource}{\hyxmp@pdfstringdef\@pdfsource{#1}}
\def\@pdfcontactaddress{}
\define@key{Hyp}{pdfcontactaddress}{%
\let\xmpcomma=\hyxmp@comma
@@ -194,10 +196,12 @@ provide metadata values to hyperxmp}%
\ifx\@pdflang\relax
\let\@pdflang=\@empty
\fi
- \ifx\@pdflang\@empty
- \let\@pdfmetalang=\hyxmp@x@default
- \else
- \edef\@pdfmetalang{\@pdflang}%
+ \ifx\@pdfmetalang\@empty
+ \ifx\@pdflang\@empty
+ \let\@pdfmetalang=\hyxmp@x@default
+ \else
+ \edef\@pdfmetalang{\@pdflang}%
+ \fi
\fi
\hyxmp@xmlify\@pdfmetalang
\ifx\@pdfdatetime\@empty
@@ -608,6 +612,23 @@ disabled}%
\catcode0=12 %
\gdef\hyxmp@zero{^^00}%
\endgroup
+\def\hyxmp@alt@title{}
+\def\hyxmp@alt@description{}
+\def\hyxmp@alt@rights{}
+\newcommand{\hyxmp@LA@accept}[2]{%
+ \define@key{hyxmp@LA}{#1}{%
+ \hyxmp@pdfstringdef\hyxmp@value{##1}%
+ \xdef#2{#2\noexpand\do {\hyxmp@cur@lang} {\hyxmp@value}}%
+ }
+}
+\hyxmp@LA@accept{pdftitle}{\hyxmp@alt@title}
+\hyxmp@LA@accept{pdfsubject}{\hyxmp@alt@description}
+\hyxmp@LA@accept{pdfcopyright}{\hyxmp@alt@rights}
+\newcommand{\XMPLangAlt}[2]{%
+ \let\do=\relax
+ \edef\hyxmp@cur@lang{#1}%
+ \setkeys{hyxmp@LA}{#2}%
+}
\def\hyxmp@modulo@a#1{%
\@tempcntb=\@tempcnta
\divide\@tempcntb by #1
@@ -789,18 +810,29 @@ _________<#1>\hyxmp@xmlified</#1>^^J%
\fi
\if@tempswa
\hyxmp@xmlify{#3}%
+ \let\hyxmp@value=\hyxmp@xmlified
\hyxmp@add@to@xml{%
_________<dc:#2>^^J%
____________<rdf:Alt>^^J%
}%
\ifx\@pdfmetalang\hyxmp@x@default
\else
+ \hyxmp@xmlify{\@pdfmetalang}%
\hyxmp@add@to@xml{%
-_______________<rdf:li xml:lang="\@pdfmetalang">\hyxmp@xmlified</rdf:li>^^J%
+_______________<rdf:li xml:lang="\hyxmp@xmlified">\hyxmp@value</rdf:li>^^J%
}%
\fi
\hyxmp@add@to@xml{%
-_______________<rdf:li xml:lang="\hyxmp@x@default">\hyxmp@xmlified</rdf:li>^^J%
+_______________<rdf:li xml:lang="\hyxmp@x@default">\hyxmp@value</rdf:li>^^J%
+ }%
+ \def\do##1##2{
+ \hyxmp@xmlify{##2}%
+ \hyxmp@add@to@xml{%
+_______________<rdf:li xml:lang="##1">\hyxmp@xmlified</rdf:li>^^J%
+ }%
+ }%
+ \csname hyxmp@alt@#2\endcsname
+ \hyxmp@add@to@xml{%
____________</rdf:Alt>^^J%
_________</dc:#2>^^J%
}%
@@ -850,7 +882,10 @@ _________<dc:format>application/pdf</dc:format>^^J%
\hyxmp@list@to@xml{date}{Seq}{\hyxmp@today}%
\hyxmp@list@to@xml{language}{Bag}{\@pdflang}%
\hyxmp@list@to@xml{type}{Bag}{\@pdftype}%
- \hyxmp@add@simple{dc:source}{\jobname.tex}%
+ \ifx\@pdfsource\@empty
+ \else
+ \hyxmp@add@simple{dc:source}{\@pdfsource}%
+ \fi
\hyxmp@add@to@xml{%
______</rdf:Description>^^J%
}%