summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdftex-def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-25 16:25:46 +0000
committerKarl Berry <karl@freefriends.org>2008-07-25 16:25:46 +0000
commitaa9ff27acad9d2877bb37d19d028b30a62ffcff3 (patch)
treea79f000a6b7a6dcdcde650b4d86c9c11ac3a4215 /Master/texmf-dist/tex/latex/pdftex-def
parent2355165e810b0a8f667d7622b95ab4434de2bb11 (diff)
pdftex-def 0.04k (24jul08)
git-svn-id: svn://tug.org/texlive/trunk@9771 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdftex-def')
-rw-r--r--Master/texmf-dist/tex/latex/pdftex-def/pdftex.def102
1 files changed, 96 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def b/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def
index 6d61ad41449..40dce39fab9 100644
--- a/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def
+++ b/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def
@@ -1,4 +1,4 @@
-\ProvidesFile{pdftex.def}[2007/12/04 v0.04i Graphics/color for pdfTeX]
+\ProvidesFile{pdftex.def}[2008/07/16 v0.04k Graphics/color for pdfTeX]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% LaTeX Colour and Graphics support for PDFTeX
@@ -6,7 +6,7 @@
%% License
%% =======
%%
-%% Copyright (C) 2000-2007 David Carlisle, Sebastian Rahtz, Hans Hagen,
+%% Copyright (C) 2000-2008 David Carlisle, Sebastian Rahtz, Hans Hagen,
%% Heiko Oberdiek and Martin Schr\"oder
%%
%% This work may be distributed and/or modified under the
@@ -168,6 +168,16 @@
% but this keyword is not available before pdfTeX 1.30.0.
% 2007/12/04 v0.04i (HO)
% * Fatal error is avoided if image file does not exists.
+% 2007/12/06 v0.04j (HO)
+% * Option xmpfile added for adding metadata (experimental).
+% 2008/07/16 v0.04k (HO)
+% * \LoadMetaPostSpecialExtensions
+% loads additional support for MetaPost images (transparency)
+% by loading supp-mpe.tex and supp-mis.tex
+% (method posted in comp.text.tex by Jeremy Lea).
+% As side effect MetaPost images are put in separate objects
+% and are not inlined in the page stream.
+% Status: experimental.
%
% prefix of internal commands for this file `pdftex.def':
% \GPT@ (Graphics bundle PdfTex driver)
@@ -520,11 +530,13 @@ E \else
% * not supported by Ghostscript or xpdf.
% * option quiet
% * option resetcolor
+% * option xmpfile
%
% \GPT@page: page number of pdf image or \@empty otherwise.
\let\GPT@page\@empty
% \GPT@print: file name for alternate image or \@empty otherwise.
\let\GPT@print\@empty
+\let\GPT@xmpfile\@empty
\newif\ifGPT@ResetColor
\let\GPT@ResetColorEnd\relax
\def\GPT@ResetColorBegin{%
@@ -578,6 +590,9 @@ E \else
\define@key{Gin}{resolution}{%
\pdfimageresolution#1\relax
}%
+ \define@key{Gin}{xmpfile}[\Gin@base.xmp]{%
+ \def\GPT@xmpfile{#1}%
+ }%
}%
\@ifundefined{define@key}{%
\edef\x{\endgroup
@@ -724,8 +739,33 @@ E \else
\@ifundefined{#1 image\GPT@page}{%
\ifnum\driver@release>4 %
\ifnum\driver@release>5 %
+ \let\GPT@Attr\@empty
+ \ifx\GPT@xmpfile\@empty
+ \else
+ \@ifundefined{GPT@XMP@\GPT@xmpfile}{%
+ \GPT@IfFileExists{\GPT@xmpfile}{%
+ \begingroup
+ \pdfcompresslevel=0 %
+ \immediate\pdfobj stream attr{%
+ /Type/Metadata%
+ /Subtype/XML%
+ }file{\GPT@xmpfile}%
+ \expandafter\xdef\csname GPT@XMP@\GPT@xmpfile\endcsname{%
+ \the\pdflastobj
+ }%
+ \endgroup
+ }{%
+ \GPT@warn{Missing XMP file (\GPT@xmpfile)}%
+ }%
+ }{}%
+ \edef\GPT@Attr{/Metadata \@nameuse{GPT@XMP@\GPT@xmpfile} 0 R}%
+ \fi
\ifx\GPT@print\@empty
- \let\GPT@RuleAttr\@empty
+ \ifx\GPT@Attr\@empty
+ \let\GPT@RuleAttr\@empty
+ \else
+ \edef\GPT@RuleAttr{attr{\GPT@Attr}}%
+ \fi
\else
\@ifundefined{\GPT@print\space image\GPT@page}{%
\immediate\pdfximage{\GPT@print}%
@@ -741,7 +781,10 @@ E \else
}%
\def\GPT@RuleAttr{%
width\wd\@tempboxa height\ht\@tempboxa
- attr{/Alternates \the\pdflastobj\space 0 R}%
+ attr{%
+ \GPT@Attr
+ /Alternates \the\pdflastobj\space 0 R%
+ }%
}%
}{%
\edef\GPT@PrintObj{%
@@ -757,11 +800,14 @@ E \else
\def\GPT@RuleAttr{%
width \csname\GPT@print\space width\GPT@page\endcsname
height \csname\GPT@print\space height\GPT@page\endcsname
- attr{/Alternates \the\pdflastobj\space 0 R}%
+ attr{%
+ \GPT@Attr
+ /Alternates \the\pdflastobj\space 0 R%
+ }%
}%
}%
\fi
- \pdfximage \GPT@RuleAttr
+ \pdfximage\GPT@RuleAttr
\ifx\GPT@page\@empty
\else
page \GPT@page
@@ -1202,6 +1248,50 @@ E \else
\@tempa
}
+% Adds support for extended MetaPost features (transparency)
+\def\LoadMetaPostSpecialExtensions{%
+ \AtBeginDocument{%
+ \edef\@tempa{%
+ \catcode`\noexpand\=\the\catcode`\= %
+ \catcode`\noexpand\!\the\catcode`\! %
+ \catcode`\noexpand\@\the\catcode`\@ %
+ \catcode`\noexpand\?\the\catcode`\? %
+ }%
+ \@makeother\=%
+ \IfFileExists{supp-pdf}{%
+ \IfFileExists{supp-mis}{%
+ \IfFileExists{supp-mpe}{%
+ \input{supp-mis}%
+ \input{supp-mpe}%
+ \MPcmykcolorstrue
+ \MPspotcolorstrue
+ \chardef\makeMPintoPDFobject=1 %
+ }{%
+ \GPT@warn{%
+ Cannot enable MetaPost Special Extensions,\MessageBreak
+ because supp-mpe.tex is missing%
+ }%
+ }%
+ }{%
+ \GPT@warn{%
+ Cannot enable MetaPost Special Extensions,\MessageBreak
+ because supp-mis.tex is missing%
+ }%
+ }%
+ }{%
+ \GPT@warn{%
+ Cannot enable support for MetaPost images,\MessageBreak
+ because supp-pdf.tex is missing%
+ }%
+ }%
+ \@tempa
+ }%
+}
+\ifx\@onlypreamble\@undefined
+\else
+ \@onlypreamble\LoadMetaPostSpecialExtensions
+\fi
+
% these seem to upset pdftex. ignore them. SPQR 1999/08/02
% allow for plain graphics, not graphicx.
% pdftex.def is loaded before the definition in graphicx,