* Strange interaction between textcolor and backgrounds in mkii
@ 2009-03-20 2:22 Aditya Mahajan
2009-03-20 18:32 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2009-03-20 2:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange interaction between textcolor and backgrounds in mkii
2009-03-20 2:22 Strange interaction between textcolor and backgrounds in mkii Aditya Mahajan
@ 2009-03-20 18:32 ` Hans Hagen
2009-03-20 22:14 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2009-03-20 18:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange interaction between textcolor and backgrounds in mkii
2009-03-20 18:32 ` Hans Hagen
@ 2009-03-20 22:14 ` Aditya Mahajan
0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan @ 2009-03-20 22:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-20 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-20 2:22 Strange interaction between textcolor and backgrounds in mkii Aditya Mahajan
2009-03-20 18:32 ` Hans Hagen
2009-03-20 22:14 ` Aditya Mahajan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).