diff options
author | Hans Hagen <pragma@wxs.nl> | 2002-01-24 00:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2002-01-24 00:00:00 +0100 |
commit | 492154026fb3d8fa46a58ed89edce6a596e341ad (patch) | |
tree | 9b3d47bea73c10d7a85efcf9b55bd7f6e93ef4a8 /tex/context/base/colo-ini.tex | |
parent | 736de6a312c37fbb8cea65cf0a86eda7dbbe0575 (diff) | |
download | context-492154026fb3d8fa46a58ed89edce6a596e341ad.tar.gz |
stable 2002.01.24
Diffstat (limited to 'tex/context/base/colo-ini.tex')
-rw-r--r-- | tex/context/base/colo-ini.tex | 59 |
1 files changed, 47 insertions, 12 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index b3e10792d..ae7934699 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -568,17 +568,50 @@ \let\maintextcolor\empty -\def\starttextcolor[#1]% to be translated - {\bgroup - \let\starttextcolor\relax - \let\stoptextcolor \relax - \startregistercolor[#1]% - \def\maintextcolor{#1}} +\def\starttextcolor[#1]% + {\doifsomething{#1} + {\bgroup + \def\stoptextcolor % also goes ok with \page after + {\let\maintextcolor\empty % this one because the top of + \stopregistercolor % page sets the color right (side + \egroup}% % effect) + \def\starttextcolor[##1]% + {\bgroup + \let\stoptextcolor\egroup}% + \startregistercolor[#1]% + \def\maintextcolor{#1}}} + +\let\stoptextcolor\relax + +%D The following hook permits proper support at the text +%D level. This definition actually belongs in another +%D module. + +\ifx\initializemaintextcolor\undefined + + % \let\initializemaintextcolor\relax + + \def\initializemaintextcolor + {\doifsomething{\@@cltekstkleur} + {\appendtoks\starttextcolor[\@@cltekstkleur]\to\everystarttext + \appendtoks\stoptextcolor \to\everystoptext + \let\initializemaintextcolor\relax}} + +\fi + +%D The next macro can be used to return to the (normal) +%D page color. This macro is used in the same way as +%D \type {\color}. + +\def\restoretextcolor + {\ifx\maintextcolor\empty + \expandafter\dorestoretextcolor + \else + % obey main text color + \fi} -\def\stoptextcolor % also goes ok with \page after - {\let\maintextcolor\empty % this one because the top of - \stopregistercolor % page sets the color right (side - \egroup} % effect) +\def\dorestoretextcolor + {\color[black]} %D We use some reserved names for local color components. %D Consistent use of these scratch variables saves us @@ -780,7 +813,8 @@ \incolortrue\localcolorfalse \let\@@clstatus\v!globaal, \v!stop=>\incolorfalse\localcolorfalse - \forcegrayMPcolorstrue]} + \forcegrayMPcolorstrue]% + \initializemaintextcolor} %D \macros %D {doifcolorelse} @@ -1700,7 +1734,8 @@ \c!reductie=\v!nee, \c!rgb=\v!ja, \c!cmyk=\v!ja, - \c!mp\c!cmyk=\@@clcmyk] + \c!mp\c!cmyk=\@@clcmyk, + \c!tekstkleur=] \setupcolor [\v!rgb] |