summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdftex-def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdftex-def')
-rw-r--r--Master/texmf-dist/tex/latex/pdftex-def/pdftex.def40
1 files changed, 38 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def b/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def
index d07b0d6f12b..cfebffba882 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/03/15 v0.04e Graphics/color for pdfTeX]
+\ProvidesFile{pdftex.def}[2007/04/06 v0.04f Graphics/color for pdfTeX]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% LaTeX Colour and Graphics support for PDFTeX
@@ -151,6 +151,15 @@
% the correct value, if pdftex.def is loaded.
% 2007/03/15 v0.04e (HO)
% * Missing comma in \Gin@extensions added (found by Reinhard Kotucha).
+% 2007/04/06 v0.04f (HO)
+% * Fix for \pagecolor, text before page color can lead to an invalid
+% page stream. Therefore "page" is now used instead of "direct"
+% as modifier for \pdfliteral.
+% * Boolean option `resetcolor' added (pdfTeX >= 0.12n).
+% The current color is used for PDF or MPS images, unless
+% the images contain their own color settings.
+% If option `resetcolor' is set to `true', then the current color
+% is reset to \normalcolor during image inclusion.
%
% prefix of internal commands for this file `pdftex.def':
% \GPT@ (Graphics bundle PdfTex driver)
@@ -396,7 +405,7 @@
}%
\gdef\GPT@pageliteral{%
\ifGPT@pagecolor
- \pdfliteral direct{%
+ \pdfliteral page{%
q % gsave
\current@page@color\space
n % newpath
@@ -472,13 +481,36 @@
% because it's dictionary contains the additional key /Alternates.
% * not supported by Ghostscript or xpdf.
% * option quiet
+% * option resetcolor
%
% \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
+\newif\ifGPT@ResetColor
+\let\GPT@ResetColorEnd\relax
+\def\GPT@ResetColorBegin{%
+ \ifGPT@ResetColor
+ \ifGPT@IsBitmap
+ \else
+ \begingroup
+ \normalcolor
+ \let\GPT@ResetColorEnd\endgroup
+ \fi
+ \fi
+}
\begingroup
\toks@{%
+ \define@key{Gin}{resetcolor}[true]{%
+ \csname GPT@ResetColor%
+ \expandafter\ifx\csname iftrue\expandafter\endcsname
+ \csname if#1\endcsname
+ true%
+ \else
+ false%
+ \fi
+ \endcsname
+ }%
\ifnum\driver@release>5
\define@key{Gin}{page}{%
\def\GPT@page{#1}%
@@ -690,6 +722,7 @@
>%
}%
\hbox{%
+ \GPT@ResetColorBegin
\Gscale@box{\Gin@scalex}[\Gin@scaley]{%
\@ifundefined{Gin@vllx}{%
\GPT@viewportfalse
@@ -729,6 +762,7 @@
\GPT@clipend
\fi
}%
+ \GPT@ResetColorEnd
}%
}
\newif\ifGPT@viewport
@@ -822,6 +856,7 @@
\ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
\fi
\hbox{%
+ \GPT@ResetColorBegin
\Gscale@box{\Gin@scalex}[\Gin@scaley]{%
\@ifundefined{Gin@vllx}{%
\GPT@viewportfalse
@@ -859,6 +894,7 @@
\GPT@clipend
\fi
}%
+ \GPT@ResetColorEnd
}%
}
\def\Gread@mps{\Gread@eps}