diff options
author | Karl Berry <karl@freefriends.org> | 2017-12-15 22:18:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-12-15 22:18:14 +0000 |
commit | 1701b00c0e998ca69849131bdc8da91164c8674b (patch) | |
tree | 8a68576ed748571964a9a7a8d6f1e73ba28b68b4 /Master/texmf-dist/tex/latex | |
parent | ab4dc0af69e81551c7284576d3e85c436928d0d9 (diff) |
hyperxmp (15dec17)
git-svn-id: svn://tug.org/texlive/trunk@46073 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty index 282bebe5177..1afc3a185e7 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/07/25 v3.3 Store hyperref metadata in XMP format] + [2017/11/26 v3.4 Store hyperref metadata in XMP format] \edef\hyxmp@dq@code{\the\catcode`\"} \catcode`\"=12 \def\hyxmp@driver{hpdftex} @@ -37,6 +37,9 @@ \RequirePackage{stringenc} \RequirePackage{intcalc} \RequirePackage{ifxetex} +\RequirePackage{ifmtarg} +\def\@ifmtargexp#1{\expandafter\@ifmtarg\expandafter{#1}} +\def\@ifnotmtargexp#1{\expandafter\@ifnotmtarg\expandafter{#1}} \newcommand{\hyxmp@pdfstringdef}[2]{% \let\hyxmp@textunderscore=\textunderscore \let\textunderscore=\hyxmp@uscore @@ -208,18 +211,18 @@ provide metadata values to hyperxmp}% \else \edef\hyxmp@today{\@pdfdatetime}% \fi - \ifx\@pdftitle\@empty - \ifx\@title\@empty - \else + \@ifmtargexp{\@pdftitle}{% + \@ifnotmtargexp{\@title}{% \hypersetup{pdftitle={\@title}}% - \fi - \fi - \ifx\@pdfauthor\@empty - \ifx\@author\@empty - \else + }% + }% + {}% + \@ifmtargexp{\@pdfauthor}{% + \@ifnotmtargexp{\@author}{% \hypersetup{pdfauthor={\@author}}% - \fi - \fi + }% + }% + {}% \hyxmp@at@end{% \hyxmp@find@metadata \hyxmp@embed@packet @@ -713,7 +716,7 @@ disabled}% \hyxmp@append@hex@iv#1% } \newcommand*{\hyxmp@def@DocumentID}{% - \edef\hyxmp@seed@string{\jobname:\@pdftitle:\@pdfauthor}% + \edef\hyxmp@seed@string{\jobname:\@pdftitle:\@pdfauthor:}% \expandafter\hyxmp@seed@rng\expandafter{\hyxmp@seed@string}% \edef\hyxmp@rand@num{\the\@tempcnta}% \hyxmp@create@uuid\hyxmp@DocumentID @@ -800,11 +803,7 @@ _________<#1>\hyxmp@xmlified</#1>^^J% \fi } \newcommand*{\hyxmp@rdf@dc}[3][\iffalse]{% - \@tempswafalse - \ifx#3\@empty - \else - \@tempswatrue - \fi + \@ifmtargexp{#3}{\@tempswafalse}{\@tempswatrue}% #1 \@tempswatrue \fi @@ -839,11 +838,7 @@ _________</dc:#2>^^J% \fi }% \newcommand*{\hyxmp@list@to@xml}[4][\iffalse]{% - \@tempswafalse - \ifx#4\@empty - \else - \@tempswatrue - \fi + \@ifmtargexp{#4}{\@tempswafalse}{\@tempswatrue}% #1 \@tempswatrue \fi @@ -1001,8 +996,7 @@ ______</rdf:Description>^^J% \gdef\xmplinesep{
} \endgroup \newcommand*{\hyxmp@list@to@lines}[2]{% - \ifx#2\@empty - \else + \@ifnotmtargexp{#2}{% \bgroup \hyxmp@add@to@xml{% _________<#1>% @@ -1020,7 +1014,7 @@ _________<#1>% \hyxmp@list \hyxmp@add@to@xml{</#1>^^J}% \egroup - \fi + }% } \gdef\hyxmp@photometa@schema{% \edef\hyxmp@photometa@data{% |