diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-28 21:42:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-28 21:42:33 +0000 |
commit | 74fc752cdb92fa64774c1cf73162fb237254cf93 (patch) | |
tree | 6d837dc132af0ff0425977cd99abe1b79f8e2041 /Master/texmf-dist/tex/latex/hyperxmp | |
parent | 421666a3551c85693aa8880d01fa24d9a0ec5dd9 (diff) |
hyperxmp (28apr16)
git-svn-id: svn://tug.org/texlive/trunk@40805 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperxmp')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty | 84 |
1 files changed, 53 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty index c246e65e362..c94b75f5372 100644 --- a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty +++ b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty @@ -22,7 +22,8 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{hyperxmp} - [2016/04/05 v2.8 Store hyperref metadata in XMP format] + [2016/04/27 v2.9 Store hyperref metadata in XMP format] + \edef\hyxmp@dq@code{\the\catcode`\"} \catcode`\"=12 \def\hyxmp@driver{hpdftex} @@ -47,6 +48,8 @@ \define@key{Hyp}{pdfdate}{\hyxmp@pdfstringdef\@pdfdatetime{#1}} \def\@pdfcopyright{} \define@key{Hyp}{pdfcopyright}{\hyxmp@pdfstringdef\@pdfcopyright{#1}} +\def\@pdftype{Text} +\define@key{Hyp}{pdftype}{\hyxmp@pdfstringdef\@pdftype{#1}} \def\@pdflicenseurl{} \define@key{Hyp}{pdflicenseurl}{\hyxmp@pdfstringdef\@pdflicenseurl{#1}} \def\@pdfauthortitle{} @@ -55,6 +58,10 @@ \define@key{Hyp}{pdfcaptionwriter}{\hyxmp@pdfstringdef\@pdfcaptionwriter{#1}} \def\@pdfmetalang{} \define@key{Hyp}{pdfmetalang}{\hyxmp@pdfstringdef\@pdfmetalang{#1}} +\def\@pdfapart{1} +\define@key{Hyp}{pdfapart}{\hyxmp@pdfstringdef\@pdfapart{#1}} +\def\@pdfaconformance{B} +\define@key{Hyp}{pdfaconformance}{\hyxmp@pdfstringdef\@pdfaconformance{#1}} \def\@pdfcontactaddress{} \define@key{Hyp}{pdfcontactaddress}{% \let\xmpcomma=\hyxmp@comma @@ -144,6 +151,7 @@ \@pdfcontactregion \@pdfcontacturl \@pdfcopyright + \@pdftype \@pdfdatetime \@pdfkeywords \@pdflang @@ -650,12 +658,19 @@ _________<#1>\hyxmp@xmlified</#1>^^J% }% \fi } -\newcommand*{\hyxmp@rdf@dc}[2]{% - \ifx#2\@empty +\newcommand*{\hyxmp@rdf@dc}[3][\iffalse]{% + \@tempswafalse + \ifx#3\@empty \else - \hyxmp@xmlify{#2}% + \@tempswatrue + \fi + #1 + \@tempswatrue + \fi + \if@tempswa + \hyxmp@xmlify{#3}% \hyxmp@add@to@xml{% -_________<dc:#1>^^J% +_________<dc:#2>^^J% ____________<rdf:Alt>^^J% }% \ifx\@pdfmetalang\hyxmp@x@default @@ -667,19 +682,26 @@ _______________<rdf:li xml:lang="\@pdfmetalang">\hyxmp@xmlified</rdf:li>^^J% \hyxmp@add@to@xml{% _______________<rdf:li xml:lang="\hyxmp@x@default">\hyxmp@xmlified</rdf:li>^^J% ____________</rdf:Alt>^^J% -_________</dc:#1>^^J% +_________</dc:#2>^^J% }% - \fi% + \fi }% -\newcommand*{\hyxmp@list@to@xml}[3]{% - \ifx#3\@empty +\newcommand*{\hyxmp@list@to@xml}[4][\iffalse]{% + \@tempswafalse + \ifx#4\@empty \else + \@tempswatrue + \fi + #1 + \@tempswatrue + \fi + \if@tempswa \hyxmp@add@to@xml{% -_________<dc:#1>^^J% -____________<rdf:#2>^^J% +_________<dc:#2>^^J% +____________<rdf:#3>^^J% }% \bgroup - \hyxmp@xmlify{#3}% + \hyxmp@xmlify{#4}% \hyxmp@commas@to@list\hyxmp@list{\hyxmp@xmlified}% \def\@elt##1{% \hyxmp@add@to@xml{% @@ -689,8 +711,8 @@ _______________<rdf:li>##1</rdf:li>^^J% \hyxmp@list \egroup \hyxmp@add@to@xml{% -____________</rdf:#2>^^J% -_________</dc:#1>^^J% +____________</rdf:#3>^^J% +_________</dc:#2>^^J% }% \fi } @@ -700,13 +722,14 @@ ______<rdf:Description rdf:about=""^^J% ____________xmlns:dc="http://purl.org/dc/elements/1.1/">^^J% _________<dc:format>application/pdf</dc:format>^^J% }% - \hyxmp@rdf@dc{title}{\@pdftitle}% - \hyxmp@rdf@dc{description}{\@pdfsubject}% + \hyxmp@rdf@dc[\ifHy@pdfa]{title}{\@pdftitle}% + \hyxmp@rdf@dc[\ifHy@pdfa]{description}{\@pdfsubject}% \hyxmp@rdf@dc{rights}{\@pdfcopyright}% - \hyxmp@list@to@xml{creator}{Seq}{\hyxmp@pdfauthor}% + \hyxmp@list@to@xml[\ifHy@pdfa]{creator}{Seq}{\hyxmp@pdfauthor}% \hyxmp@list@to@xml{subject}{Bag}{\hyxmp@pdfkeywords}% \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}% \hyxmp@add@to@xml{% ______</rdf:Description>^^J% @@ -826,21 +849,20 @@ _________<#1>% \hyxmp@iptc@extensions \hyxmp@add@to@xml{% ______<rdf:Description rdf:about=""^^J% -___________xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"^^J% -___________xmlns:IptcContInfo="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/contactinfo/">^^J% +___________xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/">^^J% _______<Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">^^J% }% \fi - \hyxmp@list@to@lines{IptcContInfo:CiAdrExtadr}{\@pdfcontactaddress}% - \hyxmp@add@simple{IptcContInfo:CiAdrCity}{\@pdfcontactcity}% - \hyxmp@add@simple{IptcContInfo:CiAdrRegion}{\@pdfcontactregion}% - \hyxmp@add@simple{IptcContInfo:CiAdrPcode}{\@pdfcontactpostcode}% - \hyxmp@add@simple{IptcContInfo:CiAdrCtry}{\@pdfcontactcountry}% + \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{IptcContInfo:CiTelWork}{\@pdfcontactphone}% - \hyxmp@list@to@lines{IptcContInfo:CiEmailWork}{\@pdfcontactemail}% - \hyxmp@list@to@lines{IptcContInfo:CiUrlWork}{\@pdfcontacturl}% + \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 @@ -878,8 +900,8 @@ ______________<pdfaSchema:valueType>^^J% ________________<rdf:Seq>^^J% __________________<rdf:li rdf:parseType="Resource">^^J% ____________________<pdfaType:type>contactinfo</pdfaType:type>^^J% -____________________<pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/contactinfo/</pdfaType:namespaceURI>^^J% -____________________<pdfaType:prefix>IptcContInfo</pdfaType:prefix>^^J% +____________________<pdfaType:namespaceURI>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</pdfaType:namespaceURI>^^J% +____________________<pdfaType:prefix>Iptc4xmpCore</pdfaType:prefix>^^J% ____________________<pdfaType:description>contact information</pdfaType:description>^^J% ____________________<pdfaType:field>^^J% ______________________<rdf:Seq>^^J% @@ -919,8 +941,8 @@ ________________________</rdf:li>^^J% ______<rdf:Description rdf:about=""^^J% ____________xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">^^J% }% - \hyxmp@add@simple{pdfaid:part}{1}% - \hyxmp@add@simple{pdfaid:conformance}{B}% + \hyxmp@add@simple{pdfaid:part}{\@pdfapart}% + \hyxmp@add@simple{pdfaid:conformance}{\@pdfaconformance}% \hyxmp@add@to@xml{% ______</rdf:Description>^^J% }% |