ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fastcolor and linenumbering in MkII
@ 2011-04-20  4:32 Aditya Mahajan
  2011-04-20  7:21 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Aditya Mahajan @ 2011-04-20  4:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

In MkII, linenumbering stops working if \dostartattributes with a color is 
used inside; for example:

\setupcolors[state=start]
\getparameters[test][color=red,style=]

\starttext
\startlinenumbering
\dostartattributes{test}{style}{color}
     Why no number?
\dostopattributes
\stoplinenumbering
\stoptext

The output of the above does not have a line number. I have been able to 
reduce it to the following minimal example.

\setupcolors[state=start]
\starttext
\startlinenumbering
\faststartcolor[red]
     Why no number?
\faststopcolor
\stoplinenumbering
\stoptext

It works if I add any text before \faststartcolor

\setupcolors[state=start]
\starttext
\startlinenumbering
Got it now!
% or \strut
\faststartcolor[red]
     Why no number?
\faststopcolor
\stoplinenumbering
\stoptext

What is going on here?

Of course, everything works correctly in MkIV.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fastcolor and linenumbering in MkII
  2011-04-20  4:32 Fastcolor and linenumbering in MkII Aditya Mahajan
@ 2011-04-20  7:21 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2011-04-20  7:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 20-4-2011 6:32, Aditya Mahajan wrote:
> Hi,
>
> In MkII, linenumbering stops working if \dostartattributes with a color
> is used inside; for example:
>
> \setupcolors[state=start]
> \getparameters[test][color=red,style=]
>
> \starttext
> \startlinenumbering
> \dostartattributes{test}{style}{color}
> Why no number?
> \dostopattributes
> \stoplinenumbering
> \stoptext
>
> The output of the above does not have a line number. I have been able to
> reduce it to the following minimal example.
>
> \setupcolors[state=start]
> \starttext
> \startlinenumbering
> \faststartcolor[red]
> Why no number?
> \faststopcolor
> \stoplinenumbering
> \stoptext
>
> It works if I add any text before \faststartcolor
>
> \setupcolors[state=start]
> \starttext
> \startlinenumbering
> Got it now!
> % or \strut
> \faststartcolor[red]
> Why no number?
> \faststopcolor
> \stoplinenumbering
> \stoptext
>
> What is going on here?

probably some side effect of grouping and/or colors being pdfliterals 
(you can find out by putting a \tracingall someplace clever and compere 
the outputs ... taco is a real master in that art of comparison

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-20  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20  4:32 Fastcolor and linenumbering in MkII Aditya Mahajan
2011-04-20  7:21 ` Hans Hagen

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).