Skip to content

Commit

Permalink
\pdfcolorstack is always defined
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed May 19, 2017
1 parent ac2124c commit 676372e
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions pdftex.def
Expand Up @@ -115,15 +115,6 @@
}%
}

\ltx@IfUndefined{pdfcolorstack}{%
\def\set@color{%
\pdfliteral{\current@color}%
\aftergroup\reset@color
}%
\def\reset@color{%
\pdfliteral{\current@color}%
}%
}{%
\chardef\main@pdfcolorstack=0 %
\@ifundefined{@pdfcolorstack}{%
\def\@pdfcolorstack{\main@pdfcolorstack}%
Expand All @@ -135,7 +126,6 @@
\def\reset@color{%
\pdfcolorstack\@pdfcolorstack pop\relax
}%
}
\def\define@color@named#1#2{%
\expandafter\edef\csname col@#1\endcsname{#2}%
}
Expand Down Expand Up @@ -216,38 +206,6 @@ E \else
}
\catcode`\X=11 %
\catcode`\E=11 %

% Need the `colorfix' modifications as no internal colour stack
% is maintained
%<*colorfix>
\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
\ltx@ifundefined{@ldc@l@r}{%
\let\@ldc@l@r\color
\def\color{%
\ltx@IfUndefined{if@inlabel}{}{%
\csname if@inlabel\expandafter\endcsname
\expandafter\leavevmode\csname fi\endcsname
}%
\@ldc@l@r
}%
}{}%
\ltx@ifundefined{@lduseb@x}{%
\ltx@IfUndefined{usebox}{}{%
\let\@lduseb@x\usebox
\def\usebox#1{\@lduseb@x{#1}\reset@color}%
}%
}{}%
\fi
}%
\fi
%</colorfix>

%
% Graphic inclusion. Currently supports .png, .jpg, .mps and .pdf inclusion;
% .tif support is dropped since pdfTeX 1.10a.
Expand Down

0 comments on commit 676372e

Please sign in to comment.