diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-28 23:02:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-28 23:02:21 +0000 |
commit | 35aaa338a3a95a725bc3961cc689b9262164c6a1 (patch) | |
tree | 743f8583aa149845bbbb4e597230c1f33d5fdb2c /Master/texmf-dist/tex | |
parent | a30dc652eb93949bfefbdb8f7a536f185cd10377 (diff) |
oberdiek update (28jan10)
git-svn-id: svn://tug.org/texlive/trunk@16857 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/etexcmds.sty | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/ifpdf.sty | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty | 131 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty (renamed from Master/texmf-dist/tex/latex/oberdiek/pdfrender.sty) | 405 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/grffile.sty | 69 |
6 files changed, 523 insertions, 133 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/etexcmds.sty b/Master/texmf-dist/tex/generic/oberdiek/etexcmds.sty index e23877b0e42..65f5129285c 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/etexcmds.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/etexcmds.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +%% Copyright (C) 2007, 2010 by Heiko Oberdiek <oberdiek@uni-freiburg.de> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -93,7 +93,7 @@ \fi \expandafter\x\csname ver@etexcmds.sty\endcsname \ProvidesPackage{etexcmds}% - [2007/12/12 v1.2 Prefix for e-TeX command names (HO)] + [2010/01/28 v1.3 Prefix for e-TeX command names (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -127,13 +127,26 @@ \escapechar\the\escapechar\relax } \escapechar=92 % backslash +\def\etexcmds@newif#1{% + \expandafter\edef\csname etex@#1false\endcsname{% + \let + \expandafter\noexpand\csname ifetex@#1\endcsname + \noexpand\iffalse + }% + \expandafter\edef\csname etex@#1true\endcsname{% + \let + \expandafter\noexpand\csname ifetex@#1\endcsname + \noexpand\iftrue + }% + \csname etex@#1false\endcsname +} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname RequirePackage\endcsname\relax \input infwarerr.sty\relax \else \RequirePackage{infwarerr}[2007/09/09]% \fi -\newif\ifetex@unexpanded +\etexcmds@newif{unexpanded} \begingroup \edef\x{\string\unexpanded}% \edef\y{\meaning\unexpanded}% @@ -165,7 +178,7 @@ \fi \fi \fi -\newif\ifetex@expanded +\etexcmds@newif{expanded} \begingroup \edef\x{\string\expanded}% \edef\y{\meaning\expanded}% diff --git a/Master/texmf-dist/tex/generic/oberdiek/ifpdf.sty b/Master/texmf-dist/tex/generic/oberdiek/ifpdf.sty index cf59d050ae3..56fa0aa20e5 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/ifpdf.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/ifpdf.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2001, 2005-2009 by +%% Copyright (C) 2001, 2005-2010 by %% Heiko Oberdiek <oberdiek@uni-freiburg.de> %% %% This work may be distributed and/or modified under the @@ -92,7 +92,7 @@ \fi \expandafter\x\csname ver@ifpdf.sty\endcsname \ProvidesPackage{ifpdf}% - [2009/04/10 v2.0 Provides the ifpdf switch (HO)] + [2010/01/28 v2.1 Provides the ifpdf switch (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -180,7 +180,22 @@ \fi \relax \endgroup -\newif\ifpdf +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname newif\endcsname\relax + \edef\pdffalse{% + \let + \expandafter\noexpand\csname ifpdf\endcsname + \expandafter\noexpand\csname iffalse\endcsname + }% + \edef\pdftrue{% + \let + \expandafter\noexpand\csname ifpdf\endcsname + \expandafter\noexpand\csname iftrue\endcsname + }% + \pdffalse +\else + \csname newif\expandafter\endcsname\csname ifpdf\endcsname +\fi \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname pdfoutput\endcsname\relax \else diff --git a/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty b/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty index 0bad6780861..399bdaa29a4 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2006, 2007, 2009 by +%% Copyright (C) 2006, 2007, 2009, 2010 by %% Heiko Oberdiek <oberdiek@uni-freiburg.de> %% %% This work may be distributed and/or modified under the @@ -94,7 +94,7 @@ \fi \expandafter\x\csname ver@kvsetkeys.sty\endcsname \ProvidesPackage{kvsetkeys}% - [2009/12/22 v1.7 Key value parser (HO)] + [2010/01/28 v1.8 Key value parser (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -134,7 +134,10 @@ \input etexcmds.sty\relax \else \RequirePackage{infwarerr}[2007/09/09]% - \RequirePackage{etexcmds}[2007/09/09]% + \RequirePackage{etexcmds}[2010/01/28]% +\fi +\expandafter\ifx\csname toks@\endcsname\relax + \toksdef\toks@=0 % \fi \begingroup\expandafter\endgroup \ifcase0\ifetex@unexpanded diff --git a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty index a11f9ac8a3c..dd2f19bc4c7 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +%% Copyright (C) 2009, 2010 by Heiko Oberdiek <oberdiek@uni-freiburg.de> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -92,12 +92,12 @@ \fi \expandafter\x\csname ver@ltxcmds.sty\endcsname \ProvidesPackage{ltxcmds}% - [2009/12/12 v1.1 LaTeX kernel commands for general use (HO)] + [2010/01/28 v1.2 LaTeX kernel commands for general use (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } \def\x{\endgroup - \expandafter\edef\csname ltx@AtEnd\endcsname{% + \expandafter\edef\csname LTXcmds@AtEnd\endcsname{% \catcode35 \the\catcode35\relax \catcode64 \the\catcode64\relax \catcode123 \the\catcode123\relax @@ -110,14 +110,25 @@ \catcode123 1 % { \catcode125 2 % } \def\TMP@EnsureCode#1#2{% - \edef\ltx@AtEnd{% - \ltx@AtEnd + \edef\LTXcmds@AtEnd{% + \LTXcmds@AtEnd \catcode#1 \the\catcode#1\relax }% \catcode#1 #2\relax } +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{60}{12}% < \TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{91}{12}% [ \TMP@EnsureCode{96}{12}% ` +\TMP@EnsureCode{93}{12}% ] +\TMP@EnsureCode{94}{12}% ^ (superscript) (!) +\TMP@EnsureCode{124}{12}% | \long\def\ltx@gobble#1{} \long\def\ltx@gobbletwo#1#2{} \long\def\ltx@gobblethree#1#2#3{} @@ -182,7 +193,115 @@ }% \let\ltx@IfUndefined\ltx@ifundefined } -\ltx@AtEnd +\def\ltx@RemovePrefix#1>{} +\def\ltx@StripPrefix{% + \expandafter\ltx@RemovePrefix +} +\def\ltx@clsextension{% + \ltx@ifundefined{@clsextension}{cls}\@clsextension +} +\def\ltx@pkgextension{% + \ltx@ifundefined{@pkgextension}{sty}\@pkgextension +} +\def\ltx@iffileloaded#1{% + \ltx@ifundefined{ver@#1}\ltx@secondoftwo\ltx@firstoftwo +} +\def\ltx@ifclassloaded#1{% + \ltx@iffileloaded{#1.\ltx@clsextension}% +} +\def\ltx@ifpackageloaded#1{% + \ltx@iffileloaded{#1.\ltx@pkgextension}% +} +\def\ltx@iffilelater#1#2{% + \ltx@iffileloaded{#1}{% + \expandafter\LTXcmds@IfLater\expandafter{% + \number + \expandafter\expandafter\expandafter\LTXcmds@ParseVersion + \expandafter\expandafter\expandafter{% + \csname ver@#1\endcsname + }% + \expandafter}\expandafter{% + \number + \expandafter\LTXcmds@ParseVersion\expandafter{#2}% + }% + }\ltx@secondoftwo +} +\def\LTXcmds@IfLater#1#2{% + \ifcase 0% + \ifnum#1<19940101 % + \else + \ifnum#2<19940101 % + \else + \ifnum#2>#1 % + \else + 1% + \fi + \fi + \fi + \ltx@space + \expandafter\ltx@secondoftwo + \else + \expandafter\ltx@firstoftwo + \fi +} +\def\ltx@ifclasslater#1{% + \ltx@ifclasslater{#1.\ltx@clsextension}% +} +\def\ltx@ifpackagelater#1{% + \ltx@iffilelater{#1.\ltx@pkgextension}% +} +\ltx@IfUndefined{pdfmatch}{% + \def\LTXcmds@ParseVersion#1{% + \LTXcmds@@ParseVersion#10000/00/00\@nil + }% + \def\LTXcmds@@ParseVersion#1#2#3#4/#5#6/#7#8#9\@nil{% + #1#2#3#4#5#6#7#8% + }% +}{% + \def\LTXcmds@ParseVersion#1{% + \ifnum\pdfmatch{% + ^% + (199[4-9]|[2-9][0-9][0-9][0-9])/% + (0[1-9]|1[0-2])/% + (0[1-9]|[1-2][0-9]|3[0-1])% + }{#1}=1 % + \ltx@StripPrefix\pdflastmatch1 % + \ltx@StripPrefix\pdflastmatch2 % + \ltx@StripPrefix\pdflastmatch3 % + \else + 0% + \fi + }% +} +\def\ltx@GlobalAppendToMacro#1#2{% + \ifx\ltx@undefined#1% + \let#1\ltx@empty + \else + \ifx\relax#1% + \let#1\ltx@empty + \fi + \fi + \begingroup + \toks0\expandafter{#1#2}% + \xdef#1{\the\toks0}% + \endgroup +} +\def\ltx@LocalAppendToMacro#1#2{% + \global\let\LTXcmds@gtemp#1% + \ifx\ltx@undefined\LTXcmds@gtemp + \global\let\LTXcmds@gtemp\ltx@empty + \else + \ifx\relax\LTXcmds@gtemp + \global\letLTXcmds@gtemp\ltx@empty + \fi + \fi + \begingroup + \toks0\expandafter{\LTXcmds@gtemp#2}% + \xdef\LTXcmds@gtemp{\the\toks0}% + \endgroup + \let#1\LTXcmds@gtemp +} +\LTXcmds@AtEnd \endinput %% %% End of file `ltxcmds.sty'. diff --git a/Master/texmf-dist/tex/latex/oberdiek/pdfrender.sty b/Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty index 2b579d1856b..5b6e07a2083 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/pdfrender.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty @@ -24,10 +24,15 @@ %% %% This Current Maintainer of this work is Heiko Oberdiek. %% +%% The Base Interpreter refers to any `TeX-Format', +%% because some files are installed in TDS:tex/generic//. +%% %% This work consists of the main source file pdfrender.dtx %% and the derived files %% pdfrender.sty, pdfrender.pdf, pdfrender.ins, pdfrender.drv, -%% pdfrender-test1.tex, pdfrender-test2.tex. +%% pdfrender-test1.tex, pdfrender-test2.tex, +%% pdfrender-test3.tex, pdfrender-test4.tex, +%% pdfrender-test5.tex. %% \begingroup \catcode44 12 % , @@ -89,7 +94,7 @@ \fi \expandafter\x\csname ver@pdfrender.sty\endcsname \ProvidesPackage{pdfrender}% - [2010/01/26 v1.0 Access to some PDF graphics parameters (HO)] + [2010/01/28 v1.2 Access to some PDF graphics parameters (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -135,12 +140,50 @@ \TMP@EnsureCode{94}{7}% ^ (superscript) \TMP@EnsureCode{96}{12}% ` \TMP@EnsureCode{124}{12}% | -\g@addto@macro\PdfRender@AtEnd{\endinput} -\newif\ifPdfRender@Stack -\newif\ifPdfRender@Match -\RequirePackage{ifpdf}[2009/04/10] -\RequirePackage{infwarerr}[2007/09/09] -\RequirePackage{ltxcmds}[2009/12/12] +\def\PdfRender@AtEndHook{} +\expandafter\def\expandafter\PdfRender@AtEnd\expandafter{% + \expandafter\PdfRender@AtEndHook + \PdfRender@AtEnd + \endinput +} +\def\PdfRender@newif#1{% + \expandafter\edef\csname PdfRender@#1true\endcsname{% + \let + \expandafter\noexpand\csname ifPdfRender@#1\endcsname + \noexpand\iftrue + }% + \expandafter\edef\csname PdfRender@#1false\endcsname{% + \let + \expandafter\noexpand\csname ifPdfRender@#1\endcsname + \noexpand\iffalse + }% + \csname PdfRender@#1false\endcsname +} +\PdfRender@newif{Stack} +\PdfRender@newif{Match} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname RequirePackage\endcsname\relax + \def\PdfRender@RequirePackage#1[#2]{% + \expandafter\def\expandafter\PdfRender@AtEndHook\expandafter{% + \PdfRender@AtEndHook + \ltx@ifpackagelater{#1}{#2}{}{% + \@PackageWarningNoLine{pdfrender}{% + You have requested version\MessageBreak + `#2' of package `#1',\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\ltx@pkgextension\endcsname'\MessageBreak + is available% + }% + }% + }% + \input #1.sty\relax + }% +\else + \let\PdfRender@RequirePackage\RequirePackage +\fi +\PdfRender@RequirePackage{ifpdf}[2010/01/28] +\PdfRender@RequirePackage{infwarerr}[2007/09/09] +\PdfRender@RequirePackage{ltxcmds}[2010/01/28] \ifpdf \ltx@IfUndefined{pdfcolorstackinit}{% \@PackageWarning{pdfrender}{% @@ -162,32 +205,139 @@ \@PackageWarning{pdfrender}{% Missing pdfTeX in PDF mode% }% - \newcommand*{\pdfrender}[1]{}% - \newcommand{\textpdfrender}[2]{#2}% + \ltx@IfUndefined{newcommand}{% + \def\pdfrender#1{}% + \long\def\textpdfrender#1#2{#2}% + }{% + \newcommand*{\pdfrender}[1]{}% + \newcommand{\textpdfrender}[2]{#2}% + }% \expandafter\PdfRender@AtEnd \fi -\RequirePackage{color} -\RequirePackage{keyval} -\RequirePackage{kvsetkeys}[2009/07/19] -\newcommand*{\pdfrender}[1]{% - \global\let\PdfRender@FillColor\ltx@empty - \global\let\PdfRender@StrokeColor\ltx@empty - \setkeys{PDFRENDER}{#1}% - \PdfRender@SetColor +\ltx@ifpackageloaded{color}{}{% + \def\color@setgroup{\begingroup\set@color}% + \let\color@begingroup\begingroup + \def\color@endgroup{\endgraf\endgroup}% + \def\color@hbox{\hbox\bgroup\color@begingroup}% + \def\color@vbox{\vbox\bgroup\color@begingroup}% + \def\color@endbox{\color@endgroup\egroup}% + \ltx@ifundefined{bgroup}{% + \let\bgroup={\let\egroup=}% + }{}% + \ltx@ifundefined{endgraf}{% + \let\endgraf=\par + }{}% +} +\def\PdfRender@NormalColorHook{} +\def\PdfRender@ColorSetGroupHook{} +\def\PdfRender@TestBox#1{% + \setbox0=\color@hbox#1\color@endbox } -\newcommand{\textpdfrender}[2]{% +\def\PdfRender@PatchNormalColor{% + \ltx@ifundefined{normalcolor}{% + \gdef\normalcolor{\PdfRender@NormalColorHook}% + }{% + \begingroup + \def\PdfRender@NormalColorHook{\let\PdfRender@temp=Y}% + \PdfRender@TestBox{% + \let\set@color\relax + \normalcolor + \ifx\PdfRender@temp Y% + \else + \ltx@GlobalAppendToMacro\normalcolor{% + \PdfRender@NormalColorHook + }% + \fi + }% + \endgroup + }% + \ifx\@nodocument\relax + \global\let\PdfRender@PatchNormalColor\relax + \fi +}% +\def\PdfRender@PatchColorSetGroup{% \begingroup - \pdfrender{#1}% - #2% + \def\PdfRender@ColorSetGroupHook{\let\PdfRender@temp=Y}% + \PdfRender@TestBox{% + \let\set@color\relax + \color@setgroup\color@endgroup + \ifx\PdfRender@temp Y% + \else + \ltx@GlobalAppendToMacro\color@setgroup{% + \PdfRender@ColorSetGroupHook + }% + \fi + }% \endgroup + \ifx\@nodocument\relax + \global\let\PdfRender@PatchColorSetGroup\relax + \fi +}% +\def\PdfRender@PatchColor{% + \PdfRender@PatchNormalColor + \PdfRender@PatchColorSetGroup +} +\PdfRender@PatchColor +\ltx@IfUndefined{AtBeginDocument}{}{% + \AtBeginDocument{\PdfRender@PatchColor}% +} +\ltx@IfUndefined{AfterPackage}{% +}{% + \AfterPackage{color}{\PdfRender@PatchColor}% + \AfterPackage{xcolor}{\PdfRender@PatchColor}% + \AfterPackage{etoolbox}{% + \AfterEndPreamble{\PdfRender@PatchColor}% + }% +}% +\ltx@IfUndefined{AfterEndPreamble}{% +}{% + \AfterEndPreamble{\PdfRender@PatchColor}% +}% + +\PdfRender@RequirePackage{kvsetkeys}[2010/01/28] +\def\PdfRender@texorpdfstring{% + \ltx@IfUndefined{texorpdfstring}\ltx@firstoftwo\texorpdfstring +} +\ltx@IfUndefined{DeclareRobustCommand}% +\ltx@firstoftwo\ltx@secondoftwo +{% + \def\pdfrender#1% +}{% + \newcommand{\pdfrender}{}% + \DeclareRobustCommand*{\pdfrender}[1]% +}% +{% + \PdfRender@texorpdfstring{% + \PdfRender@PatchNormalColor + \global\let\PdfRender@FillColor\ltx@empty + \global\let\PdfRender@StrokeColor\ltx@empty + \kvsetkeys{PDFRENDER}{#1}% + \PdfRender@SetColor + }{}% +} +\ltx@IfUndefined{DeclareRobustCommand}% +\ltx@firstoftwo\ltx@secondoftwo +{% + \long\def\textpdfrender#1#2% +}{% + \newcommand{\textpdfrender}{}% + \DeclareRobustCommand{\textpdfrender}[2]% +}% +{% + \PdfRender@texorpdfstring{% + \begingroup + \pdfrender{#1}% + #2% + \endgroup + }{#2}% } -\newif\ifPdfRender@Values +\PdfRender@newif{Values} \def\PdfRender@NewClassValues#1#2#3#4{% \PdfRender@Valuestrue \PdfRender@NewClass{#1}{#2}{#3}{#4}{}% } \def\PdfRender@NewClass#1#2#3#4#5{% - \expandafter\newif\csname ifPdfRender@Active#1\endcsname + \PdfRender@newif{Active#1}% \expandafter\def\csname PdfRender@Default#1\endcsname{#2}% \expandafter\let\csname PdfRender@Current#1\expandafter\endcsname \csname PdfRender@Default#1\endcsname @@ -241,11 +391,11 @@ \expandafter\noexpand\csname PdfRender@Default#1\endcsname \noexpand\PdfRender@Set{#1}% }% - \expandafter\g@addto@macro\expandafter\normalcolor + \expandafter\ltx@GlobalAppendToMacro\expandafter\PdfRender@NormalColorHook \expandafter{% \csname PdfRender@Normal#1\endcsname }% - \g@addto@macro\color@setgroup{% + \ltx@GlobalAppendToMacro\PdfRender@ColorSetGroupHook{% \PdfRender@Set{#1}% }% \ifPdfRender@Values @@ -257,14 +407,14 @@ \fi \ltx@gobbletwo }% - \define@key{PDFRENDER}{#1}[1]{% + \PdfRender@define@key{PDFRENDER}{#1}{% \global\csname PdfRender@Active#1true\endcsname \def\PdfRender@Current{##1}% \PdfRender@SetValidateValues{#1}% }% \PdfRender@Valuesfalse \else - \define@key{PDFRENDER}{#1}[1]{% + \PdfRender@define@key{PDFRENDER}{#1}{% \global\csname PdfRender@Active#1true\endcsname \expandafter\def\csname PdfRender@Current#1\endcsname{##1}% \ltx@IfUndefined{PdfRender@PostProcess#1}{% @@ -275,6 +425,13 @@ }% \fi }% +\ltx@IfUndefined{define@key}{% + \def\PdfRender@define@key#1#2{% + \expandafter\def\csname KV@#1@#2\endcsname##1% + }% +}{% + \let\PdfRender@define@key\define@key +} \def\PdfRender@Set#1{% \csname ifPdfRender@Active#1\endcsname \csname PdfRender@Set#1\expandafter\endcsname @@ -350,7 +507,7 @@ \def\PdfRender@PostProcessLineWidth{% \begingroup \afterassignment\PdfRender@@PostProcessLineWidth - \dimen@=\PdfRender@dimexpr\PdfRender@CurrentLineWidth bp % + \dimen0=\PdfRender@dimexpr\PdfRender@CurrentLineWidth bp % \PdfRender@let\PdfRender@relax\PdfRender@relax } \let\PdfRender@let\let @@ -359,10 +516,10 @@ \ifx\\#1\\% \endgroup \else - \dimen@=.996264\dimen@ % 72/72.27 + \dimen0=.996264\dimen0 % 72/72.27 \edef\x{\endgroup \def\noexpand\PdfRender@CurrentLineWidth{% - \strip@pt\dimen@ + \strip@pt\dimen0% }% }% \expandafter\x @@ -399,44 +556,60 @@ Saturation,% Perceptual,% }% -\define@key{PDFRENDER}{FillColor}{% +\PdfRender@define@key{PDFRENDER}{FillColor}{% \begingroup \def\PdfRender@Color{#1}% \ifx\PdfRender@Color\ltx@empty \global\let\PdfRender@FillColor\ltx@empty \else - \sbox0{% - \expandafter\PdfRender@TryColor\PdfRender@Color\ltx@empty - \PdfRender@GetFillColor - \ifx\PdfRender@FillColor\ltx@empty - \@PackageWarning{pdfrender}{% - Cannot extract fill color\MessageBreak - from value `#1'% - }% - \fi + \PdfRender@ColorAvailable{% + \PdfRender@TestBox{% + \expandafter\PdfRender@TryColor\PdfRender@Color\ltx@empty + \PdfRender@GetFillColor + \ifx\PdfRender@FillColor\ltx@empty + \@PackageWarning{pdfrender}{% + Cannot extract fill color\MessageBreak + from value `#1'% + }% + \fi + }% }% \fi \endgroup } -\define@key{PDFRENDER}{StrokeColor}{% +\PdfRender@define@key{PDFRENDER}{StrokeColor}{% \begingroup \def\PdfRender@Color{#1}% \ifx\PdfRender@Color\ltx@empty \global\let\PdfRender@StrokeColor\ltx@empty \else - \sbox0{% - \expandafter\PdfRender@TryColor\PdfRender@Color\ltx@empty - \PdfRender@GetStrokeColor - \ifx\PdfRender@StrokeColor\ltx@empty - \@PackageWarning{pdfrender}{% - Cannot extract stroke color\MessageBreak - from value `#1'% - }% - \fi + \PdfRender@ColorAvailable{% + \PdfRender@TestBox{% + \expandafter\PdfRender@TryColor\PdfRender@Color\ltx@empty + \PdfRender@GetStrokeColor + \ifx\PdfRender@StrokeColor\ltx@empty + \@PackageWarning{pdfrender}{% + Cannot extract stroke color\MessageBreak + from value `#1'% + }% + \fi + }% }% \fi \endgroup } +\def\PdfRender@ColorAvailable{% + \@ifundefined{set@color}{% + \@PackageError{pdfrender}{% + Ignoring color options, because neither\MessageBreak + package `color' nor package `xcolor' is loaded% + }\@ehc + \global\let\PdfRender@ColorAvailable\ltx@gobble + }{% + \global\let\PdfRender@ColorAvailable\ltx@firstofone + }% + \PdfRender@ColorAvailable +} \def\PdfRender@TryColor{% \@ifnextchar[\color\PdfRender@@TryColor } @@ -490,32 +663,56 @@ \fi \fi } +\edef\PdfRender@PatternFillColor{ % space + (% + [0-9\string\.]+ g|% + [0-9\string\.]+ [0-9\string\.]+ [0-9\string\.]+ rg|% + [0-9\string\.]+ [0-9\string\.]+ % + [0-9\string\.]+ [0-9\string\.]+ k% + ) % space + (.*)$% +} +\edef\PdfRender@PatternStrokeColor{ % space + (% + [0-9\string\.]+ G|% + [0-9\string\.]+ [0-9\string\.]+ [0-9\string\.]+ RG|% + [0-9\string\.]+ [0-9\string\.]+ % + [0-9\string\.]+ [0-9\string\.]+ K% + ) % space + (.*)$% +} +\def\PdfRender@MatchPattern#1{% + \ifnum\pdfmatch{\PdfRender@Pattern}{\PdfRender@String}=1 % + \xdef#1{% + \expandafter\strip@prefix\pdflastmatch 1% + }% + \edef\PdfRender@String{% + \expandafter\strip@prefix\pdflastmatch 2% + }% + \ifx\PdfRender@String\ltx@empty + \else + \expandafter\expandafter\expandafter\PdfRender@MatchPattern + \expandafter\expandafter\expandafter#1% + \fi + \fi +} \def\PdfRender@GetFillColor{% \global\let\PdfRender@FillColor\ltx@empty \begingroup \ifPdfRender@Match - \edef\current@color{\ltx@space\current@color\ltx@space}% - \ifnum\pdfmatch{ % - (% - [0-9\string\.]+ g|% - [0-9\string\.]+ [0-9\string\.]+ [0-9\string\.]+ rg|% - [0-9\string\.]+ [0-9\string\.]+ % - [0-9\string\.]+ [0-9\string\.]+ k% - )% - }{\current@color}=1 % - \xdef\PdfRender@FillColor{% - \expandafter\strip@prefix\pdflastmatch 1% - }% - \fi + \let\PdfRender@Pattern\PdfRender@PatternFillColor + \edef\PdfRender@String{\ltx@space\current@color\ltx@space}% + \PdfRender@MatchPattern\PdfRender@FillColor \else - \edef\x{% - \lowercase{% - \xdef\noexpand\PdfRender@FillColor{% - \current@color - }% - }% - }% - \x + \edef\current@color{\current@color\ltx@space}% + \let\PdfRender@OP\relax + \PdfRender@FindOp{g}0% + \PdfRender@FindOp{G}1% + \PdfRender@FindOp{rg}0% + \PdfRender@FindOp{RG}1% + \PdfRender@FindOp{k}0% + \PdfRender@FindOp{K}1% + \PdfRender@FilterOp 0\PdfRender@FillColor \fi \endgroup } @@ -523,31 +720,55 @@ \global\let\PdfRender@StrokeColor\ltx@empty \begingroup \ifPdfRender@Match - \edef\current@color{\ltx@space\current@color\ltx@space}% - \ifnum\pdfmatch{ % - (% - [0-9\string\.]+ G|% - [0-9\string\.]+ [0-9\string\.]+ [0-9\string\.]+ RG|% - [0-9\string\.]+ [0-9\string\.]+ % - [0-9\string\.]+ [0-9\string\.]+ K% - )% - }{\current@color}=1 % - \xdef\PdfRender@StrokeColor{% - \expandafter\strip@prefix\pdflastmatch 1% - }% - \fi + \let\PdfRender@Pattern\PdfRender@PatternStrokeColor + \edef\PdfRender@String{\ltx@space\current@color\ltx@space}% + \PdfRender@MatchPattern\PdfRender@StrokeColor \else - \edef\x{% - \uppercase{% - \xdef\noexpand\PdfRender@StrokeColor{% - \current@color - }% - }% - }% - \x + \edef\current@color{\current@color\ltx@space}% + \let\PdfRender@OP\relax + \PdfRender@FindOp{g}0% + \PdfRender@FindOp{G}1% + \PdfRender@FindOp{rg}0% + \PdfRender@FindOp{RG}1% + \PdfRender@FindOp{k}0% + \PdfRender@FindOp{K}1% + \PdfRender@FilterOp 1\PdfRender@StrokeColor \fi \endgroup } +\ifPdfRender@Match + \expandafter\PdfRender@AtEnd +\fi +\def\PdfRender@FindOp#1#2{% + \def\PdfRender@temp##1 #1 ##2\@nil{% + ##1% + \ifx\\##2\\% + \expandafter\@gobble + \else + \PdfRender@OP{#1}#2% + \expandafter\@firstofone + \fi + {% + \PdfRender@temp##2\@nil + }% + }% + \edef\current@color{% + \@firstofone{\expandafter\PdfRender@temp\current@color} #1 \@nil + }% +} +\def\PdfRender@FilterOp#1#2{% + \expandafter\PdfRender@@FilterOp\expandafter#1\expandafter#2% + \current@color\PdfRender@OP{}{}% +} +\def\PdfRender@@FilterOp#1#2#3\PdfRender@OP#4#5{% + \ifx\\#4#5\\% + \else + \ifnum#1=#5 % + \xdef#2{#3 #4}% + \fi + \expandafter\PdfRender@@FilterOp\expandafter#1\expandafter#2% + \fi +} \PdfRender@AtEnd \endinput %% diff --git a/Master/texmf-dist/tex/latex/oberdiek/grffile.sty b/Master/texmf-dist/tex/latex/oberdiek/grffile.sty index fc08a47147c..fd96bfaaab8 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/grffile.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/grffile.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2006-2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +%% Copyright (C) 2006-2010 by Heiko Oberdiek <oberdiek@uni-freiburg.de> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{grffile}% - [2009/09/25 v1.10 Extended file name support for graphics (HO)]% + [2010/01/28 v1.11 Extended file name support for graphics (HO)]% \edef\grffile@RestoreCatcodes{% \catcode`\noexpand\=\the\catcode`\=\relax \catcode`\noexpand\:\the\catcode`\:\relax @@ -191,31 +191,50 @@ }{% }% } -\def\grffile@IfFileExists#1{% - \expandafter\expandafter\expandafter - \ifx\expandafter\expandafter\expandafter\\\pdf@filesize{#1}\\% - \let\reserved@a\@secondoftwo - \ifx\input@path\@undefined +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdf@filesize\endcsname\relax + \begingroup + \let\on@line\@empty + \PackageInfo{grffile}{% + \string\grffile@IfFileExists\space without space support,% + \MessageBreak + because pdfTeX's \string\pdffilesize\space is not available% + }% + \endgroup + \def\grffile@IfFileExists#1{% + \IfFileExists{#1}{% + \let\grffile@IFE@next\@firstoftwo + }{% + \let\grffile@IFE@next\@secondoftwo + }% + \grffile@IFE@next + }% +\else + \def\grffile@IfFileExists#1{% + \expandafter\expandafter\expandafter + \ifx\expandafter\expandafter\expandafter\\\pdf@filesize{#1}\\% + \let\reserved@a\@secondoftwo + \ifx\input@path\@undefined + \else + \expandafter\@tfor\expandafter\reserved@b\expandafter + :\expandafter=\input@path\do{% + \expandafter\expandafter\expandafter + \ifx\expandafter\expandafter\expandafter + \\\pdf@filesize{\reserved@b#1}\\% + \else + \edef\grffile@file@found{\reserved@b#1}% + \let\reserved@a\@firstoftwo + \@break@tfor + \fi + }% + \fi + \expandafter\reserved@a \else - \expandafter\@tfor\expandafter\reserved@b\expandafter - :\expandafter=\input@path\do{% - \expandafter\expandafter\expandafter - \ifx\expandafter\expandafter\expandafter - \\\pdf@filesize{\reserved@b#1}\\% - \else - \edef\grffile@file@found{\reserved@b#1}% - \let\reserved@a\@firstoftwo - \@break@tfor - \fi - }% + \edef\grffile@file@found{#1}% + \expandafter\@firstoftwo \fi - \expandafter\reserved@a - \else - \edef\grffile@file@found{#1}% - \expandafter\@firstoftwo - \fi -} - + }% +\fi \def\grffile@Ginclude@graphics#1{% \begingroup \ifgrffile@space |