diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-20 21:35:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-20 21:35:15 +0000 |
commit | 1289605ec141e7ea09909ac31c112ef4a07ebe29 (patch) | |
tree | 0ba062ff089faca6fac1ba179c8ab8ff35fef142 /Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx | |
parent | 3db26f906a3a1b7a3bb46203329de73c1bd7aec3 (diff) |
hyperxmp (20sep12)
git-svn-id: svn://tug.org/texlive/trunk@27753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx | 69 |
1 files changed, 52 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx index f1aa01b724e..6858ba47772 100644 --- a/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx +++ b/Master/texmf-dist/source/latex/hyperxmp/hyperxmp.dtx @@ -22,7 +22,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{hyperxmp} %<*package> - [2012/09/10 v2.0 Store hyperref metadata in XMP format] + [2012/09/16 v2.1 Store hyperref metadata in XMP format] %</package> % %<*driver> @@ -56,7 +56,7 @@ %</driver> % \fi % -% \CheckSum{1200} +% \CheckSum{1210} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -285,9 +285,11 @@ % % \pkgname{hyperxmp} works by postprocessing some of the package options % honored by \pkgname{hyperref}. To use \pkgname{hyperxmp}, merely put -% a |\usepackage{hyperxmp}| somewhere in your document's preamble. -% \pkgname{hyperxmp} will construct its \acro{XMP} data using the -% following \pkgname{hyperref} options: +% a |\usepackage{hyperxmp}| in your document's preamble. That line can +% appear anywhere before the \pkgname{hyperref} \acro{PDF} options are +% specified (i.e.,~with either |\usepackage[|\dots|]{hyperref}| or +% |\hypersetup{|\dots|}|). \pkgname{hyperxmp} will construct its +% \acro{XMP} data using the following \pkgname{hyperref} options: % % \begin{itemize} % \item \optname{baseurl} @@ -759,10 +761,10 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\hyxmp@ProcessKeyvalOptions} -% \changes{v2.0}{2012/09/05}{Added this macro} -% \begin{macro}{\ProcessKeyvalOptions} -% \changes{v2.0}{2012/09/05}{Added this macro} +% \changes{v2.1}{2012/09/16}{Enabled \pkgname{hyperxmp} and +% \pkgname{hyperref} to be loaded in either order. This addresses a +% bug report by Yury Donskoy} +% % We need to capture list arguments (viz.~\optname{pdfauthor} and % \optname{pdfkeywords}) before \pkgname{hyperref} converts them to % \term{PDFDocEncoding}. Otherwise, |\xmpcomma| is permanently replaced @@ -778,10 +780,17 @@ % \optname{pdfauthor} and \optname{pdfkeywords}. This is somewhat % heavy-handed as it gets executed for \emph{every} subsequently loaded % package that uses |\ProcessKeyvalOptions|, but at least it does what -% we need. +% we need. \pkgname{hyperxmp} also redefines |\hypersetup| to do the +% same thing. This is required in case \pkgname{hyperref} is loaded +% before \pkgname{hyperxmp}. +% +% \begin{macro}{\hyxmp@redefine@Hyp} +% If not already redefined, redefine \pkgname{hyperref}'s +% \optname{pdfauthor} and \optname{pdfkeywords} options to properly +% handle |\xmpcomma| and |\xmpquote|. +% \changes{v2.1}{2012/09/16}{Added this macro} % \begin{macrocode} -\let\hyxmp@ProcessKeyvalOptions=\ProcessKeyvalOptions -\renewcommand*{\ProcessKeyvalOptions}{% +\newcommand*{\hyxmp@redefine@Hyp}{% % \end{macrocode} % \begin{macro}{\hyxmp@Hyp@pdfauthor} % Store the old definition of |\KV@Hyp@pdfauthor| in @@ -862,11 +871,6 @@ \let\xmpcomma=\relax \let\xmpquote=\relax }% -% \end{macrocode} -% Process the calling package's options as normal but with the preceding -% substitutions. -% \begin{macrocode} - \hyxmp@ProcessKeyvalOptions } % \end{macrocode} % \end{macro} @@ -882,6 +886,37 @@ % \end{macro} % \end{macro} % \end{macro} +% +% \begin{macro}{\hyxmp@ProcessKeyvalOptions} +% \changes{v2.0}{2012/09/05}{Added this macro} +% \begin{macro}{\ProcessKeyvalOptions} +% \changes{v2.0}{2012/09/05}{Added this macro} +% Redefine \pkgname{kvoptions}'s |\ProcessOptions| command to invoke +% |\hyxmp@redefine@Hyp| before performing its normal option processing. +% \begin{macrocode} +\let\hyxmp@ProcessKeyvalOptions=\ProcessKeyvalOptions +\renewcommand*{\ProcessKeyvalOptions}{% + \hyxmp@redefine@Hyp + \hyxmp@ProcessKeyvalOptions +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\hyxmp@hypersetup} +% \changes{v2.1}{2012/09/16}{Added this macro} +% \begin{macro}{\hypersetup} +% \changes{v2.1}{2012/09/16}{Added this macro} +% Redefine \pkgname{hyperref}'s |\hypersetup| command to invoke +% |\hyxmp@redefine@Hyp| before performing its normal option processing. +% \begin{macrocode} +\let\hyxmp@hypersetup=\hypersetup +\def\hypersetup{% + \hyxmp@redefine@Hyp + \hyxmp@hypersetup +} +% \end{macrocode} +% \end{macro} % \end{macro} % % \begin{macro}{\hyxmp@find@metadata} |