diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-01-05 19:27:43 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-01-05 19:27:43 +0100 |
commit | 027f62e76cbada6f7fea7fc71189517d45677aa3 (patch) | |
tree | c7147c600ba888f2b5207e29c33e4d5b5a159ab1 /tex/context/base/colo-ini.mkiv | |
parent | 624e0d91fc8cbdf4f480f25ab54ddb5787affcc9 (diff) | |
download | context-027f62e76cbada6f7fea7fc71189517d45677aa3.tar.gz |
beta 2011.12.15 23:39
Diffstat (limited to 'tex/context/base/colo-ini.mkiv')
-rw-r--r-- | tex/context/base/colo-ini.mkiv | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv index 411ff9fbb..76bd14f09 100644 --- a/tex/context/base/colo-ini.mkiv +++ b/tex/context/base/colo-ini.mkiv @@ -759,12 +759,31 @@ % Since we couple definitions, we could stick to one test. Todo. Same for mpcolor. +% : in currentpalet, maybe not, ugly (some day at the lua end) + \letvalueempty{(cs:-} \letvalueempty{(ts:-} -\unexpanded\def\doactivatecolor#1% : in currentpalet, maybe not, ugly (some day at the lua end) +% \unexpanded\def\doactivatecolor#1% : in currentpalet, maybe not, ugly (some day at the lua end) +% {\edef\currentcolorname{#1}% +% \ifcsname(cs:\currentpalet\currentcolorname)\endcsname +% \csname(cs:\currentpalet\currentcolorname)\endcsname +% \csname(ts:\currentpalet\currentcolorname)\endcsname +% \else\ifcsname(cs:\currentcolorname)\endcsname +% \csname(cs:\currentcolorname)\endcsname +% \csname(ts:\currentcolorname)\endcsname +% \fi\fi} + +\unexpanded\def\doactivatecolor#1% not that much faster but less tracing {\edef\currentcolorname{#1}% - \ifcsname(cs:\currentpalet\currentcolorname)\endcsname + \ifx\currentpalet\empty + \expandafter\doactivatecolor_nop + \else + \expandafter\doactivatecolor_yes + \fi} + +\unexpanded\def\doactivatecolor_yes + {\ifcsname(cs:\currentpalet\currentcolorname)\endcsname \csname(cs:\currentpalet\currentcolorname)\endcsname \csname(ts:\currentpalet\currentcolorname)\endcsname \else\ifcsname(cs:\currentcolorname)\endcsname @@ -772,6 +791,12 @@ \csname(ts:\currentcolorname)\endcsname \fi\fi} +\unexpanded\def\doactivatecolor_nop + {\ifcsname(cs:\currentcolorname)\endcsname + \csname(cs:\currentcolorname)\endcsname + \csname(ts:\currentcolorname)\endcsname + \fi} + \let\normaldoactivatecolor\doactivatecolor % new: |