ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Numbering in a frame with a new environment
@ 2014-04-27 11:28 Fabrice Couvreur
  2014-04-27 12:26 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Couvreur @ 2014-04-27 11:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 473 bytes --]

Hello,
How to make the numbering is in the frame and red ?

\defineenumeration
  [ac]
  [text={
         \inframed[frame=off,
         width=fit,
         align={right},
         background=color,
         backgroundcolor=lightgray]{Activité}},
         headstyle={\bf\feature[+][f:smallcaps]},
         width=fit,
         stopper={.},
         alternative=left,
   ]
\starttext
\startac
Tirage dans une urne
\stopac
\stoptext

thank you,
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 1159 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 3+ messages in thread

* Re: Numbering in a frame with a new environment
  2014-04-27 11:28 Numbering in a frame with a new environment Fabrice Couvreur
@ 2014-04-27 12:26 ` Wolfgang Schuster
  2014-04-28  9:19   ` Fabrice
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2014-04-27 12:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1371 bytes --]


Am 27.04.2014 um 13:28 schrieb Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hello, 
> How to make the numbering is in the frame and red ? 
> 
> \defineenumeration
>   [ac]
>   [text={
>          \inframed[frame=off,
>          width=fit,
>          align={right},
>          background=color,
>          backgroundcolor=lightgray]{Activité}},
>          headstyle={\bf\feature[+][f:smallcaps]},
>          width=fit,
>          stopper={.},
>          alternative=left,
>    ]
> \starttext
> \startac
> Tirage dans une urne
> \stopac
> \stoptext

\defineframed
  [ACFRAME]
  [frame=off,
   width=fit,
   align=flushleft,
   location=low,
   background=color,
   backgroundcolor=lightgray]

\defineenumeration
  [ac]
  [text={Activité},
   headstyle={\bf\feature[+][f:smallcaps]},
   headcommand=\ACFRAME,
   numberconversionset=ACCONVERSION,
   width=fit,
   stopper={.},
   alternative=left]

\defineprocessor[ACPROCESSOR][color=red]

\defineconversionset[ACCONVERSION][][ACPROCESSOR->n]

\setupbodyfont[pagella]

\starttext
\startac
Tirage dans une urne
\stopac
\stoptext


When you want the period after the number in red too remove the stopper setting from \defineenumeration and change the processor definition to

    \defineprocessor[ACPROCESSOR][color=red,command=\groupedcommand{}{.}]

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2920 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 3+ messages in thread

* Re: Numbering in a frame with a new environment
  2014-04-27 12:26 ` Wolfgang Schuster
@ 2014-04-28  9:19   ` Fabrice
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice @ 2014-04-28  9:19 UTC (permalink / raw)
  To: ntg-context

Hi Wolfgang,
As usual, the result is what I wanted to do.
But before asking this question, I tried to find documentation on the 
counters with ConTeXt, and I found nothing.
Fabrice
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2014-04-28  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-27 11:28 Numbering in a frame with a new environment Fabrice Couvreur
2014-04-27 12:26 ` Wolfgang Schuster
2014-04-28  9:19   ` Fabrice

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