ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* colored, marginal chapter numbers
@ 2006-04-20 19:26 Sanjoy Mahajan
  2006-04-20 19:43 ` Miguel Queiros
  2006-04-20 19:54 ` nico
  0 siblings, 2 replies; 5+ messages in thread
From: Sanjoy Mahajan @ 2006-04-20 19:26 UTC (permalink / raw)


I get colored chapter text and numbers with:

\setupcolors[state=start]
\setuphead[chapter][color=blue]
\starttext
\chapter{One}
\stoptext

But if I drive the numbers into the left margin, they escape the blue
paintbrush (but the text is still blue):

\def\sectionnumber#1{\inleft{#1}}
\setupcolors[state=start]
\setuphead[chapter][numbercolor=blue,color=blue,
deepnumbercommand=\sectionnumber]
\starttext
\chapter{One}
\stoptext

Is there a recommended way of doing this?  I could put blue into the
\sectionnumber command, but I'd prefer to specify the color only once
(the numbercolor and color specifications were an attempt at overkill).
Plus I'd like to understand what's going on.

[ConTeXt  ver: 2006.04.17 23:14  fmt: 2006.4.19]

-Sanjoy

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

* Re: colored, marginal chapter numbers
  2006-04-20 19:26 colored, marginal chapter numbers Sanjoy Mahajan
@ 2006-04-20 19:43 ` Miguel Queiros
  2006-04-20 20:37   ` Sanjoy Mahajan
  2006-04-20 19:54 ` nico
  1 sibling, 1 reply; 5+ messages in thread
From: Miguel Queiros @ 2006-04-20 19:43 UTC (permalink / raw)



[...]

> Is there a recommended way of doing this?  I could put blue into the
> \sectionnumber command, but I'd prefer to specify the color only once
> (the numbercolor and color specifications were an attempt at overkill).
> Plus I'd like to understand what's going on.

I can't test it right now, but did you tried with:

\setupcolors[state=start]
\setupheads[alternative=inmargin]
\setuphead[chapter][color=blue]
\starttext
\chapter{One}
\stoptext

Miguel Queirós


_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: colored, marginal chapter numbers
  2006-04-20 19:26 colored, marginal chapter numbers Sanjoy Mahajan
  2006-04-20 19:43 ` Miguel Queiros
@ 2006-04-20 19:54 ` nico
  2006-04-20 20:38   ` Sanjoy Mahajan
  1 sibling, 1 reply; 5+ messages in thread
From: nico @ 2006-04-20 19:54 UTC (permalink / raw)


On Thu, 20 Apr 2006 15:26:12 -0400, Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>  
wrote:

> I get colored chapter text and numbers with:
>
> \setupcolors[state=start]
> \setuphead[chapter][color=blue]
> \starttext
> \chapter{One}
> \stoptext
>
> But if I drive the numbers into the left margin, they escape the blue
> paintbrush (but the text is still blue):
>
> \def\sectionnumber#1{\inleft{#1}}
> \setupcolors[state=start]
> \setuphead[chapter][numbercolor=blue,color=blue,
> deepnumbercommand=\sectionnumber]
> \starttext
> \chapter{One}
> \stoptext

What about this?
\setuphead[chapter][numbercolor=blue,color=blue,alternative=inmargin]

Regards,
BG

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

* Re: colored, marginal chapter numbers
  2006-04-20 19:43 ` Miguel Queiros
@ 2006-04-20 20:37   ` Sanjoy Mahajan
  0 siblings, 0 replies; 5+ messages in thread
From: Sanjoy Mahajan @ 2006-04-20 20:37 UTC (permalink / raw)


From:    Miguel Queiros <tex@mqueiros.com>

  \setupcolors[state=start]
  \setupheads[alternative=inmargin]
  \setuphead[chapter][color=blue]
  \starttext
  \chapter{One}
  \stoptext

Thanks, that works great.

>> Is there a recommended way of doing this?  

In ConTeXt the answer, I've found, is always yes.  The only problem is
finding it!

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

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

* Re: colored, marginal chapter numbers
  2006-04-20 19:54 ` nico
@ 2006-04-20 20:38   ` Sanjoy Mahajan
  0 siblings, 0 replies; 5+ messages in thread
From: Sanjoy Mahajan @ 2006-04-20 20:38 UTC (permalink / raw)


From:    nico <nicolas.marsgui@libertysurf.fr>
> What about this?
> \setuphead[chapter][numbercolor=blue,color=blue,alternative=inmargin]

Thanks, that also works great.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

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

end of thread, other threads:[~2006-04-20 20:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 19:26 colored, marginal chapter numbers Sanjoy Mahajan
2006-04-20 19:43 ` Miguel Queiros
2006-04-20 20:37   ` Sanjoy Mahajan
2006-04-20 19:54 ` nico
2006-04-20 20:38   ` Sanjoy 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).