From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16115 Path: main.gmane.org!not-for-mail From: Brooks Moses Newsgroups: gmane.comp.tex.context Subject: Re: defining a frame with embedded typing Date: Tue, 17 Aug 2004 12:47:17 -0700 Sender: ntg-context-bounces@ntg.nl Message-ID: <20040817124717.A20268@droplet.stanford.edu> References: <763134360.20040817181831@klankschap.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092772059 20681 80.91.224.253 (17 Aug 2004 19:47:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2004 19:47:39 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 17 21:47:29 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bx9vd-0000VB-00 for ; Tue, 17 Aug 2004 21:47:29 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 15AFA12783; Tue, 17 Aug 2004 21:47:29 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24695-02; Tue, 17 Aug 2004 21:47:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 414DD1277B; Tue, 17 Aug 2004 21:47:28 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E0DED1277B for ; Tue, 17 Aug 2004 21:47:26 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24540-06 for ; Tue, 17 Aug 2004 21:47:26 +0200 (CEST) Original-Received: from smtp3.Stanford.EDU (unknown [171.67.16.138]) by ronja.ntg.nl (Postfix) with ESMTP id 0E5131277A for ; Tue, 17 Aug 2004 21:47:25 +0200 (CEST) Original-Received: from htgl-p6-moses.stanford.edu (htgl-p6-moses.Stanford.EDU [171.64.119.90]) by smtp3.Stanford.EDU (8.12.11/8.12.11) with ESMTP id i7HJlIaE008932; Tue, 17 Aug 2004 12:47:18 -0700 Original-Received: (from brooks@localhost) by htgl-p6-moses.stanford.edu (8.9.3/8.9.3) id MAA20272; Tue, 17 Aug 2004 12:47:17 -0700 Original-To: mailing list for ConTeXt users Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <763134360.20040817181831@klankschap.nl>; from vm@klankschap.nl on Tue, Aug 17, 2004 at 06:18:31PM +0200 X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16115 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16115 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