From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/9265 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Descriptions/enumerations with a background Date: Mon, 16 Sep 2002 22:05:56 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020916215636.026eb7c0@server-1> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035399600 1808 80.91.224.250 (23 Oct 2002 19:00:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 19:00:00 +0000 (UTC) Cc: "ConTeXt Mailing List" Original-To: "Duncan Hothersall" In-Reply-To: Xref: main.gmane.org gmane.comp.tex.context:9265 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:9265 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 | pragma@wxs.nl 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 -------------------------------------------------------------------------