At 08:22 AM 9/10/2002 +0100, Duncan Hothersall wrote:
>Hello all,
>
>I have been trying to set up an enumeration to have a background screen.
>Having completely failed, I ended up putting a \startbackground ...
>\stopbackground pair inside the \startsubactivity ... \stopsubactivity, but
>this does strange things with page breaks, presumbly because it is
>interfering with the glue between the enumeration title and the body of it.
>
>Can anyone help me with a \defineenumeration or \setupenumeration parameter
>that will make the background go grey? Here's what I have up top:
>
>\defineenumeration[activity]
>         [text=Activity,
>         before={\blank[2*big]},
>         after={\blank[2*big]}]
>
>\setupenumerations[activity]
>         [headstyle=\ss\tfa]
>
>\setupbackground
>         [background=screen,
>         corner=round,
>         offset=6pt]
>
>Here's what I currently do, which doesn't work well:
>
>\startsubactivity
>\startbackground
>This text sometimes jumps over a page break even when there is lots of space
>on the page.
>
>It can have more than one paragraph in it.
>\stopbackground
>\stopsubactivity

hm, probably it's better to move the background commands out of the 
subactivity

>And here's what I'd like to do:
>
>\startsubactivity
>This text behaves well and has a grey box behind it.
>
>It can have more than one paragraph in it too.
>\stopsubactivity
>
>Any pointers as to what to put at the top to make the bottom happen would be
>gratefully received.

The good news is:

\definetextbackground
   [activitybg]
   [location=paragraph,
    before={\blank[2*big]},
    after={\blank[2*big]}]

\defineenumeration
   [activity]
   [text=Activity,
    before=\startactivitybg,
    after=\stopactivitybg,
    headstyle=\ss\tfa]

\starttext

\startactivity
This text behaves well and has a grey box behind it. \par
It can have more than one paragraph in it too.       \par
It can have more than one paragraph in it too.       \par
\stopactivity

\stoptext

However, it will fail in your version due to a grouping mix up 
(before/after need to next properly); it's just a few lines that need to be 
swapped; i will post a new beta version.

[this new backgrounder is still under construction but will stabalize the 
next couple of month]

[a few more settings are needed to get the rounding and an offset, more on 
that later]

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

Reply via email to