summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdftex-def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-01-02 23:10:35 +0000
committerKarl Berry <karl@freefriends.org>2007-01-02 23:10:35 +0000
commitba6926c101253924caf62c34816833cef75525f0 (patch)
treef14736ef9f25f69e3d7ed74cf86e5caa36bf9d65 /Master/texmf-dist/tex/latex/pdftex-def
parent0a17be9af1c1cd8e5452befa92ff920a401c47fb (diff)
pdftex-def update + interim tpm (3jan07)
git-svn-id: svn://tug.org/texlive/trunk@3103 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.def150
1 files changed, 102 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def b/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def
index 8285c1e1942..d9106c92639 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}[2006/08/14 v0.03t Graphics/color for pdfTeX]
+\ProvidesFile{pdftex.def}[2007/01/02 v0.04b Graphics/color for pdfTeX]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% LaTeX Colour and Graphics support for PDFTeX
@@ -131,7 +131,17 @@
% 2006/08/14 v0.03t (HO)
% * Extensions added: .jpeg, .JPG, .JPEG, .PNG, .PDF
% No variants for .tif, because TIFF support is no longer available.
-% No need for uppercase variant of .msp.
+% No need for uppercase variant of .mps.
+% 2007/01/01 v0.04a (HO)
+% * Support of color stack, introduced in pdfTeX 1.40.0.
+% * Support of transform matrix commands of pdfTeX 1.40.0.
+% * The argument for option `page' can be a register.
+% 2007/01/02 v0.04b (HO)
+% * Internal change: Switching of color stacks is easier by using
+% \@pdfcolorstack for the stack number. Thus this command
+% should be redefined, if someone wants to use another color stack
+% (e.g. for footnotes). \main@pdfcolorstack should not be changed
+% for this purpose.
%
% prefix of internal commands for this file `pdftex.def':
% \GPT@ (Graphics bundle PdfTex driver)
@@ -304,11 +314,28 @@
}%
}
-\def\set@color{%
- \pdfliteral{\current@color}%
- \aftergroup\reset@color
-}
-\def\reset@color{\pdfliteral{\current@color}}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfcolorstack\endcsname\relax
+ \def\set@color{%
+ \pdfliteral{\current@color}%
+ \aftergroup\reset@color
+ }%
+ \def\reset@color{%
+ \pdfliteral{\current@color}%
+ }%
+\else
+ \chardef\main@pdfcolorstack=0 %
+ \@ifundefined{@pdfcolorstack}{%
+ \def\@pdfcolorstack{\main@pdfcolorstack}%
+ }{}%
+ \def\set@color{%
+ \pdfcolorstack\@pdfcolorstack push{\current@color}%
+ \aftergroup\reset@color
+ }%
+ \def\reset@color{%
+ \pdfcolorstack\@pdfcolorstack pop\relax
+ }%
+\fi
\def\define@color@named#1#2{%
\expandafter\edef\csname col@#1\endcsname{#2}%
}
@@ -373,31 +400,34 @@
% Need the `colorfix' modifications as no internal colour stack
% is maintained
%<*colorfix>
-\AtBeginDocument{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname color\endcsname\relax
- % Without color we don't need any fixes.
- \else
- \@ifundefined{@ldc@l@r}{%
- \let\@ldc@l@r\color
- \def\color{%
- \@ifundefined{if@inlabel}{}{%
- \csname if@inlabel\expandafter\endcsname
- \expandafter\leavevmode\csname fi\endcsname
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfcolorstack\endcsname\relax
+ \AtBeginDocument{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname color\endcsname\relax
+ % Without color we don't need any fixes.
+ \else
+ \@ifundefined{@ldc@l@r}{%
+ \let\@ldc@l@r\color
+ \def\color{%
+ \@ifundefined{if@inlabel}{}{%
+ \csname if@inlabel\expandafter\endcsname
+ \expandafter\leavevmode\csname fi\endcsname
+ }%
+ \@ldc@l@r
}%
- \@ldc@l@r
- }%
- }{}%
- \@ifundefined{@lduseb@x}{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname usebox\endcsname\relax
- \else
- \let\@lduseb@x\usebox
- \def\usebox#1{\@lduseb@x{#1}\reset@color}%
- \fi
- }{}%
- \fi
-}
+ }{}%
+ \@ifundefined{@lduseb@x}{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname usebox\endcsname\relax
+ \else
+ \let\@lduseb@x\usebox
+ \def\usebox#1{\@lduseb@x{#1}\reset@color}%
+ \fi
+ }{}%
+ \fi
+ }%
+\fi
%</colorfix>
%
@@ -438,6 +468,10 @@
\ifnum\driver@release>5
\define@key{Gin}{page}{%
\def\GPT@page{#1}%
+ \ifx\GPT@page\@empty
+ \else
+ \edef\GPT@page{\number\GPT@page}%
+ \fi
}%
\define@key{Gin}{print}{%
\def\GPT@print{#1}%
@@ -871,25 +905,45 @@
% slightly hacky, but set width of box 0 to 0pt otherwise
% the CTM gets restored in the wrong place.
-% Patrick Daly found an error here with doubled minus signs when \Grot@sin is
-% negative. Fixed.
-\def\Grot@start{%
- \pdfliteral{ q
- \Grot@cos\space\Grot@sin\space\if-\Grot@sin\else-\Grot@sin\fi\space\Grot@cos\space
- 0 0 cm%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfsetmatrix\endcsname\relax
+ % Patrick Daly found an error here with doubled minus signs when
+ % \Grot@sin is negative. Fixed.
+ \def\Grot@start{%
+ \pdfliteral{ %
+ q %
+ \Grot@cos\space\Grot@sin\space
+ \if-\Grot@sin\else-\Grot@sin\fi\space\Grot@cos\space
+ 0 0 cm%
+ }%
+ \wd\z@\z@
}%
- \wd\z@\z@
-}
-
-\def\Grot@end{\pdfliteral{ Q}}
-
-% Scaling is OK, as graphics package does it right here.
-\def\Gscale@start{%
- \pdfliteral{ q
- \Gscale@x\space0 0 \Gscale@y\space 0 0 cm%
+ \def\Grot@end{%
+ \pdfliteral{ Q}%
}%
-}
-
+ % Scaling is OK, as graphics package does it right here.
+ \def\Gscale@start{%
+ \pdfliteral{ q %
+ \Gscale@x\space0 0 \Gscale@y\space 0 0 cm%
+ }%
+ }%
+\else
+ \def\Grot@start{%
+ \pdfsave
+ \pdfsetmatrix{%
+ \Grot@cos\space\Grot@sin\space
+ \if-\Grot@sin\else-\Grot@sin\fi\space\Grot@cos
+ }%
+ \wd\z@\z@
+ }%
+ \def\Grot@end{\pdfrestore}
+ \def\Gscale@start{%
+ \pdfsave
+ \pdfsetmatrix{%
+ \Gscale@x\space0 0 \Gscale@y
+ }%
+ }%
+\fi
\let\Gscale@end\Grot@end
% undo the trig.sty `optimisation' so that these 0 1 and -1 values