From a378f2ec2345730937b85fbf2929272ac1a4cc00 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 31 Jan 2011 16:56:00 +0000 Subject: pdftex-def (30jan11) git-svn-id: svn://tug.org/texlive/trunk@21241 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pdftex-def/pdftex.def | 32 +++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 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 d409db4071c..be19240f954 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}[2010/11/26 v0.05c Graphics/color for pdfTeX] +\ProvidesFile{pdftex.def}[2011/01/28 v0.05d Graphics/color for pdfTeX] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% LaTeX Colour and Graphics support for PDFTeX @@ -6,7 +6,7 @@ %% License %% ======= %% -%% Copyright (C) 2000-2010 David Carlisle, Sebastian Rahtz, Hans Hagen, +%% Copyright (C) 2000-2011 David Carlisle, Sebastian Rahtz, Hans Hagen, %% Heiko Oberdiek and Martin Schr\"oder %% %% This work may be distributed and/or modified under the @@ -237,6 +237,10 @@ % * Fix, \pagecolor got broken accidentally (in v0.05a). % 2010/11/26 v0.05c (HO) % * \stockwidth and \stockheight of class `memoir' respected. +% 2011/01/28 v0.05d (HO) +% * Patching trig.sty is improved by doing it earlier in some +% cases, e.g. if one of class `memoir', package `scrlfile' or +% package `filehook' is loaded. % % Prefix of internal commands for this file `pdftex.def': % \GPT@ (Graphics bundle PdfTex driver) @@ -476,6 +480,10 @@ \fi } +\def\GPT@ifpackageloaded#1{% + \GPT@ifundefined{ver@#1.sty}\@secondoftwo\@firstoftwo +} + % Colour Support. The following models may be used. % * cmyk supported directly. % * rgb supported directly. @@ -1780,9 +1788,9 @@ E \else % undo the trig.sty `optimization' so that these 0 1 and -1 values % get written out as digits, not unexpandable TeX primitives. % 0.04q: space added to remain consistent with trig.sty. -\AtBeginDocument{% - \def\GPT@temp#1(#2)=#3 {% - \expandafter\def\csname #1(#2)\endcsname{#3 }% +\def\GPT@PatchTrig{% + \def\GPT@temp##1(##2)=##3 {% + \expandafter\def\csname ##1(##2)\endcsname{##3 }% }% \GPT@temp sin(0)=0 % \GPT@temp cos(0)=1 % @@ -1803,6 +1811,20 @@ E \else \GPT@temp cos(-270)=0 % \GPT@temp sin(-360)=0 % \GPT@temp cos(-360)=1 % + \GPT@ifpackageloaded{trig}{% + \let\GPT@PatchTrig\relax + }{}% +} +\AtBeginDocument{\GPT@PatchTrig} +\GPT@ifpackageloaded{trig}{\GPT@PatchTrig}{} +\GPT@ifundefined{AfterPackage}{}{% scrlfile.sty + \AfterPackage{trig}{\GPT@PatchTrig}% +} +\GPT@ifundefined{AtEndOfPackageFile}{}{% filehook.sty + \AtEndOfPackageFile{trig}{\GPT@PatchTrig}% +} +\GPT@ifundefined{AtEndPackage}{}{% memoir.cls + \AtEndPackage{trig}{\GPT@PatchTrig}% } % v0.02e: Restore catcodes of context letters. -- cgit v1.2.3