[NTG-context] Some problems with framing typed text.
Hans Hagen
pragma at wxs.nl
Tue Aug 10 21:04:50 CEST 2004
Brooks Moses wrote:
> At 11:00 AM 8/10/2004, you wrote:
>
>> Am 10.08.2004 um 19:30 schrieb Brooks Moses:
>>
>>> In the document I'm working on, I'd like to put some typed code bits
>>> in frames, to get an appearance sort of like the code excerpts on
>>> the ConTeXtWiki. However, I've found myself needing to do a couple
>>> of rather ugly hacks to get that to work right, and I'm hoping for
>>> some suggestions on how to avoid that.
>>
>>
>> Did you try something like:
>>
>> \setupbackground[background=screen, frame=on, color=blue]
>> \setuptyping[before=\startbackground, after=\stopbackground]
>>
>> \starttyping
>> bla bla
>> \stoptyping
>
>
> I hadn't, but I have now. (I assume the color=blue was meant to be
> framecolor=blue?) That does seem to work well and avoid most of the
> problems; thanks!
>
> It still doesn't give me a \parskip before the typed text, though --
> try putting a \setupspacing[big] with the above code to see what I
> mean. (That's an easy fix, though; a \vskip\parskip in the before=
> command fixes it.) That seems like a bug somewhere, though -- if I
> comment out the \setuptyping command, the spacing is fine.
The startbackground is not the most robust one (otr based); the \definetextbackgound one is better. The framed solution (earlier post) is probably what you're looking for.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-context
mailing list