defining a frame with embedded typing
how would i define a frame with the typing environment embedded. the way i thought to solve it does *not* work (of course) \def\startTTinput% {\startframedtext[width=\makeupwidth,background=screen,backgroundscreen=.8] \starttyping } \def\stopTTinput% {\stoptyping\stopframedtext} or do i have to look for a solution in a different direction? thanks! % f
On Tue, 17 Aug 2004 18:18:31 +0200
Floris van Manen
how would i define a frame with the typing environment embedded. the way i thought to solve it does *not* work (of course) .. or do i have to look for a solution in a different direction?
Yes, use \definetyping instead. Here is an example: \definetyping [TTinput] [before={\startframedtext[width=\makeupwidth,background=screen,backgroundscreen=.8]}, after={\stopframedtext}] \starttext \startTTinput test \stopTTinput \stoptext Greetings, Taco
that was the missing link. thanks! % f
On Tue, Aug 17, 2004 at 06:18:31PM +0200, Floris van Manen wrote:
how would i define a frame with the typing environment embedded.
the way i thought to solve it does *not* work (of course)
\def\startTTinput% {\startframedtext[width=\makeupwidth,background=screen,backgroundscreen=.8] \starttyping }
\def\stopTTinput% {\stoptyping\stopframedtext}
Taco already showed the solution to this (use before= and after= commands in a \definetyping or \setuptyping command), but it might be useful to also explain why the above doesn't work. It doesn't work, because \starttyping, like most verbatim environments, scans through the following text until it gets to the appropriate end text. It doesn't expand tokens while doing this; in particular, \stopTTinput never gets expanded, and so the sequence "\stoptyping" never shows up to end the input. Incidentally, there's also a bit more answer to how to do framed typing environments in some answers to one of my questions a couple of weeks ago; you might find it useful to look in the archives for that. - Brooks
Floris van Manen wrote:
how would i define a frame with the typing environment embedded.
the way i thought to solve it does *not* work (of course)
\def\startTTinput% {\startframedtext[width=\makeupwidth,background=screen,backgroundscreen=.8] \starttyping }
\def\stopTTinput% {\stoptyping\stopframedtext}
or do i have to look for a solution in a different direction?
i posted a solution a few days ago, must be in the archives 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 -----------------------------------------------------------------
participants (4)
-
Brooks Moses
-
Floris van Manen
-
Hans Hagen
-
Taco Hoekwater