summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperxmp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-04 00:17:36 +0000
committerKarl Berry <karl@freefriends.org>2014-01-04 00:17:36 +0000
commitf5e68d092b878b0f0d86b10cbd8830cf08a153b8 (patch)
tree3af0704addd30b061b556c76697932eb61efbd8a /Master/texmf-dist/tex/latex/hyperxmp
parent64cabb7b36a81f41f4bbe49f00cf5aa4fc83f66c (diff)
hyperxmp (3jan14)
git-svn-id: svn://tug.org/texlive/trunk@32560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperxmp')
-rw-r--r--Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty131
1 files changed, 94 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
index 25e9287f3b7..b92791d4308 100644
--- a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
+++ b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2013 by Scott Pakin <scott+hyxmp@pakin.org>
+%% Copyright (C) 2014 by Scott Pakin <scott+hyxmp@pakin.org>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{hyperxmp}
- [2013/07/18 v2.3b Store hyperref metadata in XMP format]
+ [2014/01/02 v2.4 Store hyperref metadata in XMP format]
\edef\hyxmp@dq@code{\the\catcode`\"}
\catcode`\"=12
\def\hyxmp@driver{hpdftex}
@@ -192,6 +192,10 @@ disabled}%
\gdef\hyxmp@comma{^^C}
\egroup
\let\xmpquote=\relax
+\bgroup
+ \catcode`\~=12%
+ \gdef\xmptilde{~}%
+\egroup
\newcommand{\XMPTruncateList}[1]{{%
\edef\hyxmp@temp@str{\csname hyxmp@#1\endcsname}%
\hyxmp@commas@to@list{\hyxmp@temp@list}{\hyxmp@temp@str}%
@@ -459,10 +463,13 @@ disabled}%
\fi
\fi
}
-\def\hyxmp@append@hex@iv#1{%
+\def\hyxmp@append@hex@iii#1{%
\hyxmp@append@hex#1%
\hyxmp@append@hex#1%
\hyxmp@append@hex#1%
+}
+\def\hyxmp@append@hex@iv#1{%
+ \hyxmp@append@hex@iii#1%
\hyxmp@append@hex#1%
}
\def\hyxmp@create@uuid#1{%
@@ -471,8 +478,19 @@ disabled}%
\hyxmp@append@hex@iv#1%
\g@addto@macro#1{-}%
\hyxmp@append@hex@iv#1%
+ \g@addto@macro#1{-4}%
+ \hyxmp@append@hex@iii#1%
\g@addto@macro#1{-}%
- \hyxmp@append@hex@iv#1%
+ \hyxmp@set@rand@num
+ \@tempcnta=\hyxmp@rand@num
+ \hyxmp@modulo@a{4}%
+ \ifcase\@tempcnta
+ \g@addto@macro#1{8}%
+ \or\g@addto@macro#1{9}%
+ \or\g@addto@macro#1{a}%
+ \or\g@addto@macro#1{b}%
+ \fi
+ \hyxmp@append@hex@iii#1%
\g@addto@macro#1{-}%
\hyxmp@append@hex@iv#1%
\hyxmp@append@hex@iv#1%
@@ -485,11 +503,7 @@ disabled}%
\hyxmp@create@uuid\hyxmp@DocumentID
}
\newcommand*{\hyxmp@def@InstanceID}{%
- \edef\hyxmp@seed@string{%
- \jobname:\@pdftitle:\@pdfauthor:%
- \the\year/\the\month/\the\day:%
- \the\time
- }%
+ \edef\hyxmp@seed@string{\jobname:\@pdftitle:\@pdfauthor:\hyxmp@today}%
\expandafter\hyxmp@seed@rng\expandafter{\hyxmp@seed@string}%
\edef\hyxmp@rand@num{\the\@tempcnta}%
\hyxmp@create@uuid\hyxmp@InstanceID
@@ -523,40 +537,59 @@ __________________________________________________^^J%
\xdef\hyxmp@padding{\hyxmp@padding\hyxmp@padding}
\xdef\hyxmp@padding{\hyxmp@padding\hyxmp@padding}
\xdef\hyxmp@padding{\hyxmp@padding\hyxmp@padding}
-\xdef\hyxmp@today{\the\year}%
-\ifnum\month<10
- \xdef\hyxmp@today{\hyxmp@today-0\the\month}%
-\else
- \xdef\hyxmp@today{\hyxmp@today-\the\month}%
-\fi
-\ifnum\day<10
- \xdef\hyxmp@today{\hyxmp@today-0\the\day}%
+\def\hyxmp@pdf@to@xmp@date#1:#2#3#4#5#6#7#8#9{%
+ #2#3#4#5-#6#7-#8#9%
+ \hyxmp@parse@time
+}
+\def\hyxmp@parse@time#1#2#3#4#5#6{%
+ T#1#2:#3#4:#5#6%
+ \hyxmp@parse@tz@char
+}
+\def\hyxmp@parse@tz@char#1{%
+ #1%
+ \ifx#1-%
+ \expandafter\hyxmp@parse@tz
+ \else
+ \ifx#1+%
+ \expandafter\hyxmp@parse@tz
+ \fi
+ \fi
+}
+\def\hyxmp@parse@tz#1'#2'{%
+ #1:#2%
+}
+\def\hyxmp@today@define{%
+ \xdef\hyxmp@today{\the\year}%
+ \ifnum\month<10
+ \xdef\hyxmp@today{\hyxmp@today-0\the\month}%
+ \else
+ \xdef\hyxmp@today{\hyxmp@today-\the\month}%
+ \fi
+ \ifnum\day<10
+ \xdef\hyxmp@today{\hyxmp@today-0\the\day}%
+ \else
+ \xdef\hyxmp@today{\hyxmp@today-\the\day}%
+ \fi
+}
+\expandafter\ifx\csname pdfcreationdate\endcsname\relax
+ \hyxmp@today@define
\else
- \xdef\hyxmp@today{\hyxmp@today-\the\day}%
+ \edef\hyxmp@today{\expandafter\hyxmp@pdf@to@xmp@date\pdfcreationdate}%
\fi
\newcommand*{\hyxmp@x@default}{x-default}
\newcommand*{\hyxmp@pdf@schema}{%
- \let\hyxmp@have@any=!%
- \ifx\@pdfkeywords\@empty
- \ifx\@pdfproducer\@empty
- \let\hyxmp@have@any=\@empty
- \fi
- \fi
- \ifx\hyxmp@have@any\@empty
- \else
- \hyxmp@add@to@xml{%
+ \hyxmp@add@to@xml{%
______<rdf:Description rdf:about=""^^J%
___________xmlns:pdf="http://ns.adobe.com/pdf/1.3/">^^J%
- }%
- \hyxmp@add@simple{pdf:Keywords}{\@pdfkeywords}%
- \hyxmp@add@simple{pdf:Producer}{\@pdfproducer}%
- \@ifundefined{pdfminorversion}{}{%
- \hyxmp@add@simple{pdf:PDFVersion}{1.\the\pdfminorversion}%
- }%
- \hyxmp@add@to@xml{%
+ }%
+ \hyxmp@add@simple@var{pdf:Keywords}{@pdfkeywords}%
+ \hyxmp@add@simple@var{pdf:Producer}{@pdfproducer}%
+ \@ifundefined{pdfminorversion}{}{%
+ \hyxmp@add@simple{pdf:PDFVersion}{1.\the\pdfminorversion}%
+ }%
+ \hyxmp@add@to@xml{%
______</rdf:Description>^^J%
- }%
- \fi
+ }%
}
\newcommand*{\hyxmp@add@simple}[2]{%
\edef\hyxmp@string{#2}%
@@ -568,6 +601,15 @@ _________<#1>\hyxmp@xmlified</#1>^^J%
}%
\fi
}
+\newcommand*{\hyxmp@add@simple@var}[2]{%
+ \expandafter\ifx\csname#2\endcsname\relax
+ \else
+ \hyxmp@xmlify{\csname#2\endcsname}%
+ \hyxmp@add@to@xml{%
+_________<#1>\hyxmp@xmlified</#1>^^J%
+ }%
+ \fi
+}
\newcommand*{\hyxmp@rdf@dc}[2]{%
\ifx#2\@empty
\else
@@ -624,7 +666,7 @@ _________<dc:format>application/pdf</dc:format>^^J%
\hyxmp@list@to@xml{creator}{Seq}{\hyxmp@pdfauthor}%
\hyxmp@list@to@xml{subject}{Bag}{\hyxmp@pdfkeywords}%
\hyxmp@list@to@xml{date}{Seq}{\hyxmp@today}%
- \hyxmp@add@simple{dc:language}{\@pdflang}%
+ \hyxmp@list@to@xml{language}{Bag}{\@pdflang}%
\hyxmp@add@simple{dc:source}{\jobname.tex}%
\hyxmp@add@to@xml{%
______</rdf:Description>^^J%
@@ -831,6 +873,20 @@ __________________________<pdfaField:description>#2</pdfaField:description>^^J%
________________________</rdf:li>^^J%
}
}
+
+\newcommand*{\hyxmp@pdfa@id@schema}{%
+ \ifHy@pdfa
+ \hyxmp@add@to@xml{%
+______<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@to@xml{%
+______</rdf:Description>^^J%
+ }%
+ \fi
+}
\begingroup
\ifhyxmp@unicodetex
\lccode`\!="FEFF %
@@ -858,6 +914,7 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns\hyxmp@hash">^^J%
\hyxmp@photoshop@schema
\hyxmp@photometa@schema
\hyxmp@xmp@basic@schema
+ \hyxmp@pdfa@id@schema
\hyxmp@mm@schema
\hyxmp@add@to@xml{%
___</rdf:RDF>^^J%