From: Martin Mares Date: Tue, 5 Jun 2018 20:10:15 +0000 (+0200) Subject: Added macros for primitive operations with pdfTeX color stack X-Git-Tag: v1.99~1^2~22 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ee3028367e35946bd19a8bfd253e57aeb1c94d3c;p=ucwmac.git Added macros for primitive operations with pdfTeX color stack --- diff --git a/ucwmac.tex b/ucwmac.tex index bbee36d..a0b0fe1 100644 --- a/ucwmac.tex +++ b/ucwmac.tex @@ -295,6 +295,14 @@ \let\plaintilde=~ \protected\def~{\plaintilde} +%%% Colors %%% + +\chardef\colorstk=\pdfcolorstackinit page direct{0 g 0 G} +\def\colorpush#1{\pdfcolorstack\colorstk push{#1 rg #1 RG}} +\def\colorpushgray#1{\pdfcolorstack\colorstk push{#1 g #1 G}} +\def\colorpushcmyk#1{\pdfcolorstack\colorstk push{#1 k #1 K}} +\def\colorpop{\pdfcolorstack\colorstk pop} + %%% Localization %%% % Current language