From 7518aae005c5ab74eae9c9902b7ffc82c7da1cd6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Apr 2007 23:09:46 +0000 Subject: pdftex-def 0.04f (10apr07) git-svn-id: svn://tug.org/texlive/trunk@4151 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pdftex-def/pdftex.def | 40 +++++++++++++++++++++-- Master/texmf-dist/tpm/pdftex-def.tpm | 4 +-- 2 files changed, 40 insertions(+), 4 deletions(-) (limited to 'Master') 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} diff --git a/Master/texmf-dist/tpm/pdftex-def.tpm b/Master/texmf-dist/tpm/pdftex-def.tpm index 2afce0c6cd7..bc227413d13 100644 --- a/Master/texmf-dist/tpm/pdftex-def.tpm +++ b/Master/texmf-dist/tpm/pdftex-def.tpm @@ -9,10 +9,10 @@ The pdftex-def package. - 31553 + 31652 - + texmf-dist/tex/latex/pdftex-def/pdftex.def texmf-dist/tpm/pdftex-def.tpm -- cgit v1.2.3