diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperxmp')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty | 66 |
1 files changed, 56 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty index e538450b175..9aaa6b6e101 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} - [2020/04/08 v5.1 Store hyperref metadata in XMP format] + [2020/05/12 v5.2 Store hyperref metadata in XMP format] \edef\hyxmp@dq@code{\the\catcode`\"} \catcode`\"=12 \def\hyxmp@driver{hpdftex} @@ -141,12 +141,15 @@ \define@key{Hyp}{pdfinstanceid}{\hyxmp@pdfstringdef\hyxmp@InstanceID{#1}} \def\@pdfversionid{1} \define@key{Hyp}{pdfversionid}{\hyxmp@pdfstringdef\@pdfversionid{#1}} +\begingroup +\let\ifdraft=\relax \RequirePackage{ifdraft} \ifdraft{% - \def\@pdfrendition{draft}% + \gdef\@pdfrendition{draft}% }{% - \def\@pdfrendition{default}% + \gdef\@pdfrendition{default}% } +\endgroup \define@key{Hyp}{pdfrendition}{\hyxmp@pdfstringdef\@pdfrendition{#1}} \def\@pdfpublication{} \define@key{Hyp}{pdfpublication}{\hyxmp@pdfstringdef\@pdfpublication{#1}} @@ -176,6 +179,8 @@ \define@key{Hyp}{pdfdoi}{\hyxmp@pdfstringdef\@pdfdoi{#1}} \def\@pdfurl{} \define@key{Hyp}{pdfurl}{\hyxmp@pdfstringdef\@pdfurl{#1}} +\def\@pdfidentifier{} +\define@key{Hyp}{pdfidentifier}{\hyxmp@pdfstringdef\@pdfidentifier{#1}} \def\@pdfsubtitle{} \define@key{Hyp}{pdfsubtitle}{\hyxmp@pdfstringdef\@pdfsubtitle{#1}} \def\@pdfcontactaddress{} @@ -299,6 +304,7 @@ \@pdfdatetime \@pdfdoi \@pdfeissn + \@pdfidentifier \@pdfisbn \@pdfissn \@pdfissuenum @@ -338,6 +344,7 @@ \gdef\@pdfapart{1}% \gdef\@pdfaconformance{B}% }% + {}% \fi \edef\hyxmp@standards{% \@pdfapart @@ -351,6 +358,7 @@ compliance)% }% }% + {}% }% } \AtBeginDocument{% @@ -569,7 +577,8 @@ \def\hyxmp@try@today#1#2{% \@ifmtargexp{\hyxmp@today@xmp}{% \@ifundefined{#1}{}{#2}% - }{}% + }% + {}% } \def\hyxmp@today@xmp{} \hyxmp@try@today{pdfcreationdate}{% @@ -841,6 +850,18 @@ ______<#3 xml:lang="#1">\hyxmp@xmlified</#3>^^J% }% }% } +\newcommand*{\hyxmp@add@simple@pfx}[3]{% + \@ifnotmtargexp{#3}{% + \hyxmp@add@to@xml{\hyxmp@extra@indent______<}% + \xdef\hyxmp@xml{\hyxmp@xml#1}% + \hyxmp@pdfstringdef\hyxmp@iprefix{#2}% + \hyxmp@xmlify{\hyxmp@iprefix}% + \hyxmp@add@to@xml{>\hyxmp@xmlified}% + \hyxmp@xmlify{#3}% + \hyxmp@add@to@xml{\hyxmp@xmlified</}% + \xdef\hyxmp@xml{\hyxmp@xml#1>^^J}% + }% +} \def\hyxmp@alt@title{} \def\hyxmp@alt@description{} \def\hyxmp@alt@rights{} @@ -1020,19 +1041,28 @@ _______________________________________________________________^^J% \hyxmp@define@pdfproducer \fi } -\newcommand*{\hyxmp@pdf@schema}{% - \hyxmp@add@simple@var{pdf:Producer}{@pdfproducer}% - \hyxmp@add@simple@var{pdf:Keywords}{@pdfkeywords}% - \hyxmp@add@simple{pdf:Trapped}{\@pdftrapped}% +\newcommand*{\hyxmp@assign@major@minor}{% \@ifundefined{pdfvariable}{% \@ifundefined{pdfminorversion}{% }{% - \hyxmp@add@simple{pdf:PDFVersion}{1.\the\pdfminorversion}% + \xdef\hyxmp@major@minor{\the\pdfminorversion}% + \@ifundefined{pdfmajorversion}{% + \xdef\hyxmp@major@minor{1.\hyxmp@major@minor}% + }{% + \xdef\hyxmp@major@minor{\the\pdfmajorversion.\hyxmp@major@minor}% + }% }% }{% - \hyxmp@add@simple{pdf:PDFVersion}{1.\the\pdfvariable minorversion}% + \xdef\hyxmp@major@minor{\the\pdfvariable majorversion.\the\pdfvariable minorversion}% }% } +\newcommand*{\hyxmp@pdf@schema}{% + \hyxmp@add@simple@var{pdf:Producer}{@pdfproducer}% + \hyxmp@add@simple@var{pdf:Keywords}{@pdfkeywords}% + \hyxmp@add@simple{pdf:Trapped}{\@pdftrapped}% + \hyxmp@assign@major@minor + \hyxmp@add@simple@var{pdf:PDFVersion}{hyxmp@major@minor}% +} \newcommand*{\hyxmp@rdf@dc}[3][\iffalse]{% \@ifmtargexp{#3}{\@tempswafalse}{\@tempswatrue}% #1 @@ -1106,6 +1136,13 @@ ______</dc:#2>^^J% }% } } +\newcommand*{\hyxmp@cond@dc@identifier}[2]{% + \ifx\hyxmp@xmlified\@empty + \@ifnotmtargexp{#2}{% + \hyxmp@add@simple@pfx{dc:identifier}{#1}{#2}% + }% + \fi +} \newcommand*{\hyxmp@dc@schema}{% \hyxmp@add@simple{dc:format}{application/pdf}% \hyxmp@rdf@dc[\ifHy@pdfa]{title}{\@pdftitle}% @@ -1121,6 +1158,15 @@ ______</dc:#2>^^J% \else \hyxmp@add@simple{dc:source}{\@pdfsource}% \fi + \@ifmtargexp{\@pdfidentifier}{% + \let\hyxmp@xmlified=\@empty + \hyxmp@cond@dc@identifier{info:doi/}{\@pdfdoi}% + \hyxmp@cond@dc@identifier{urn:ISSN:}{\@pdfeissn}% + \hyxmp@cond@dc@identifier{urn:ISSN:}{\@pdfissn}% + \hyxmp@cond@dc@identifier{urn:ISBN:}{\@pdfisbn}% + }{% + \hyxmp@add@simple{dc:identifier}{\@pdfidentifier}% + }% } \newcommand*{\hyxmp@xmpRights@schema}{% \let\hyxmp@rights=\@empty |