Strange interaction between textcolor and backgrounds in mkii
Hi Hans, Something has changed recently with the mkii color model, due to which page backgrounds do not change. (I am guessing that this is a grouping issue, but then colors are like a black box to me). Consider the following example \setuppapersize[S6][S6] \setupcolors[state=start] \definecolor [simpleslidestextcolor][s=0] \setupcolors[textcolor=simpleslidestextcolor] \startuseMPgraphic{simpleslides:MP:horizontal} StartPage ; fill Page withcolor 0.5white ; StopPage ; \stopuseMPgraphic \defineoverlay [simpleslides:background:title] [\useMPgraphic{simpleslides:MP:horizontal}] \starttext test \page \setupbackgrounds[page][background={simpleslides:background:title}] test again \stoptext In MKII, the background of the second page does not change. This used to work until a few months ago (around Dec, 2008) but stopped working after that. (It does not work in the Jan 18 version that I have). In MKIV, this works fine. Aditya
Aditya Mahajan wrote:
Hi Hans,
Something has changed recently with the mkii color model, due to which page backgrounds do not change. (I am guessing that this is a grouping issue, but then colors are like a black box to me). Consider the following example
\setuppapersize[S6][S6] \setupcolors[state=start]
\definecolor [simpleslidestextcolor][s=0] \setupcolors[textcolor=simpleslidestextcolor]
\startuseMPgraphic{simpleslides:MP:horizontal} StartPage ; fill Page withcolor 0.5white ; StopPage ; \stopuseMPgraphic
\defineoverlay [simpleslides:background:title] [\useMPgraphic{simpleslides:MP:horizontal}]
\starttext test \page
\setupbackgrounds[page][background={simpleslides:background:title}]
test again \stoptext
In MKII, the background of the second page does not change. This used to work until a few months ago (around Dec, 2008) but stopped working after that. (It does not work in the Jan 18 version that I have).
In MKIV, this works fine.
this is one of those messy areas where no robust solution is possible the same can happen with header and footers and such (it does not happen with color in mkiv because we use attributes) I wonder, if we add \page here we might solve this kind of problems but it might also have other side effects ... let's do it for a while (i probably need to move some code) \def\stoptext {\global\advance\textlevel\minusone \ifnum\textlevel>\zerocount \else \page % new, flushes headers, colors etc etc etc \the\everystoptext \expandafter\finalend \fi} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 20 Mar 2009, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi Hans,
Something has changed recently with the mkii color model, due to which page backgrounds do not change. (I am guessing that this is a grouping issue, but then colors are like a black box to me). Consider the following example
\setuppapersize[S6][S6] \setupcolors[state=start]
\definecolor [simpleslidestextcolor][s=0] \setupcolors[textcolor=simpleslidestextcolor]
\startuseMPgraphic{simpleslides:MP:horizontal} StartPage ; fill Page withcolor 0.5white ; StopPage ; \stopuseMPgraphic
\defineoverlay [simpleslides:background:title] [\useMPgraphic{simpleslides:MP:horizontal}]
\starttext test \page
\setupbackgrounds[page][background={simpleslides:background:title}]
test again \stoptext
In MKII, the background of the second page does not change. This used to work until a few months ago (around Dec, 2008) but stopped working after that. (It does not work in the Jan 18 version that I have).
In MKIV, this works fine.
this is one of those messy areas where no robust solution is possible
the same can happen with header and footers and such (it does not happen with color in mkiv because we use attributes)
I wonder, if we add \page here we might solve this kind of problems but it might also have other side effects ... let's do it for a while (i probably need to move some code)
\def\stoptext {\global\advance\textlevel\minusone \ifnum\textlevel>\zerocount \else \page % new, flushes headers, colors etc etc etc \the\everystoptext \expandafter\finalend \fi}
Thanks. This works in the bigger examples that I have. Aditya
participants (2)
-
Aditya Mahajan
-
Hans Hagen