diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-20 01:01:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-20 01:01:33 +0000 |
commit | e4d3b62937c429d281f1e1fca5957ea8611abd23 (patch) | |
tree | a7d2ae74c91dddd01c6b95c6304f80ca683c7d38 /Master/texmf-dist/tex | |
parent | 5af451181bedf2c59e80219d7db88e1f91b43086 (diff) |
hyperxmp 1.2 (19apr11)
git-svn-id: svn://tug.org/texlive/trunk@22127 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty | 94 |
1 files changed, 77 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty index 6824688b0e5..175df1bbfd0 100644 --- a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty +++ b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty @@ -8,39 +8,49 @@ %% %% This is a generated file. %% -%% Copyright (C) 2006 by Scott Pakin <scott+dtx@pakin.org> +%% Copyright (C) 2011 by Scott Pakin <scott+dtx@pakin.org> %% %% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3b of this license +%% the LaTeX Project Public License, either version 1.3c of this license %% or (at your option) any later version. The latest version of this %% license is in: %% %% http://www.latex-project.org/lppl.txt %% -%% and version 1.3b or later is part of all distributions of LaTeX -%% version 2006/01/07 or later. +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008/05/04 or later. %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{hyperxmp} - [2006/05/21 v1.1 Store hyperref metadata in XMP format] + [2011/04/17 v1.2 Store hyperref metadata in XMP format] +\edef\hyxmp@dq@code{\the\catcode`\"} +\catcode`\"=12 \RequirePackage{keyval} \def\@pdfcopyright{} \define@key{Hyp}{pdfcopyright}{\pdfstringdef\@pdfcopyright{#1}} \def\@pdflicenseurl{} \define@key{Hyp}{pdflicenseurl}{\pdfstringdef\@pdflicenseurl{#1}} +\def\@pdfauthortitle{} +\define@key{Hyp}{pdfauthortitle}{\pdfstringdef\@pdfauthortitle{#1}} +\def\@pdfcaptionwriter{} +\define@key{Hyp}{pdfcaptionwriter}{\pdfstringdef\@pdfcaptionwriter{#1}} \newcommand*{\hyxmp@find@metadata}{% \ifx\@pdfauthor\@empty \ifx\@pdfcopyright\@empty \ifx\@pdfkeywords\@empty \ifx\@pdflicenseurl\@empty - \ifx\@pdfsubject\@empty - \ifx\@pdftitle\@empty - \PackageWarningNoLine{hyperxmp}{% + \ifx\@pdfauthortitle\@empty + \ifx\@pdfcaptionwriter\@empty + \ifx\@pdfsubject\@empty + \ifx\@pdftitle\@empty + \PackageWarningNoLine{hyperxmp}{% \jobname.tex did not specify any metadata to\MessageBreak include in the XMP packet.\space\space Please see the hyperxmp\MessageBreak documentation for instructions on how to provide\MessageBreak metadata values to hyperxmp% - }% + }% + \fi + \fi \fi \fi \fi @@ -421,6 +431,36 @@ _________<xapMM:InstanceID>\hyxmp@InstanceID</xapMM:InstanceID>^^J% ______</rdf:Description>^^J% }% } +\gdef\hyxmp@photoshop@schema{% + \def\hyxmp@photoshop@data{\@pdfauthortitle\@pdfcaptionwriter}% + \ifx\@hyxmp@photoshop@data\@empty + \else + \hyxmp@add@to@xml{% +______<rdf:Description rdf:about=""^^J% +____________xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">^^J% + }% + \fi + \ifx\@pdfauthortitle\@empty + \else + \hyxmp@xmlify{\@pdfauthortitle}% + \hyxmp@add@to@xml{% +_________<photoshop:AuthorsPosition>\hyxmp@xmlified</photoshop:AuthorsPosition>^^J% + }% + \fi + \ifx\@pdfcaptionwriter\@empty + \else + \hyxmp@xmlify{\@pdfcaptionwriter}% + \hyxmp@add@to@xml{% +_________<photoshop:CaptionWriter>\hyxmp@xmlified</photoshop:CaptionWriter>^^J% + }% + \fi + \ifx\@hyxmp@photoshop@data\@empty + \else + \hyxmp@add@to@xml{% +______</rdf:Description>^^J% + }% + \fi +} \bgroup \catcode`\^^ef=12 \catcode`\^^bb=12 @@ -435,6 +475,7 @@ ___<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns\hyxmp@hash">^^ \hyxmp@pdf@schema \hyxmp@xapRights@schema \hyxmp@dc@schema + \hyxmp@photoshop@schema \hyxmp@mm@schema \hyxmp@add@to@xml{% ___</rdf:RDF>^^J% @@ -454,14 +495,19 @@ ___</rdf:RDF>^^J% \ifx\hyxmp@driver\Hy@driver \hyxmp@embed@packet@dvipdfm \else - \@ifundefined{pdfmark}{% - \PackageWarningNoLine{hyperxmp}{% - Unrecognized hyperref driver `\Hy@driver'.\MessageBreak - \jobname.tex's XMP metadata will *not* be\MessageBreak - embedded in the resulting file}% - }{% - \hyxmp@embed@packet@pdfmark - }% + \def\hyxmp@driver{hxetex}% + \ifx\hyxmp@driver\Hy@driver + \hyxmp@embed@packet@xetex + \else + \@ifundefined{pdfmark}{% + \PackageWarningNoLine{hyperxmp}{% + Unrecognized hyperref driver `\Hy@driver'.\MessageBreak + \jobname.tex's XMP metadata will *not* be\MessageBreak + embedded in the resulting file}% + }{% + \hyxmp@embed@packet@pdfmark + }% + \fi \fi \fi } @@ -544,6 +590,20 @@ ___</rdf:RDF>^^J% \expandafter\hyxmp@count@non@spaces \fi } +\newcommand*{\hyxmp@embed@packet@xetex}{% + \special{pdf:stream @hyxmp@Metadata (\hyxmp@xml) + << + /Type /Metadata + /Subtype /XML + >> + }% + \special{pdf:put @catalog + << + /Metadata @hyxmp@Metadata + >> + }% +} +\catcode`\"=\hyxmp@dq@code \endinput %% %% End of file `hyperxmp.sty'. |