From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24546 Path: news.gmane.org!not-for-mail From: Radhelorn Newsgroups: gmane.comp.tex.context Subject: Re: About \defineshortcut Date: Wed, 21 Dec 2005 10:53:34 +0300 Message-ID: <43A909FE.6020501@mail.ru> References: <43A1E0C1.7060307@mail.ru> <43A312FB.3080705@elvenkind.com> <43A879A9.7080109@mail.ru> <43A88599.9020800@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135151715 19087 80.91.229.2 (21 Dec 2005 07:55:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2005 07:55:15 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 21 08:55:15 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EoynB-0001Wv-49 for gctc-ntg-context-518@m.gmane.org; Wed, 21 Dec 2005 08:53:45 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2C00F12877; Wed, 21 Dec 2005 08:53:44 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21239-02-3; Wed, 21 Dec 2005 08:53:39 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7C43A1286A; Wed, 21 Dec 2005 08:53:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4FB6A1286A for ; Wed, 21 Dec 2005 08:53:38 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21239-02-2 for ; Wed, 21 Dec 2005 08:53:36 +0100 (CET) Original-Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by ronja.ntg.nl (Postfix) with ESMTP id 7A0F812863 for ; Wed, 21 Dec 2005 08:53:36 +0100 (CET) Original-Received: from [217.106.91.40] (port=12207 helo=[172.16.6.103]) by mx3.mail.ru with psmtp id 1Eoyn0-000I6m-00 for ntg-context@ntg.nl; Wed, 21 Dec 2005 10:53:35 +0300 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43A88599.9020800@wxs.nl> X-Virus-Scanned: 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: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24546 Archived-At: Hans Hagen wrote: > Radhelorn wrote: >> I think that \defineshortcut commands are most useful inside some >> environment (start/stop pair). So it is possible to have such >> environment that restores back all catcode changes (or other variable >> changes) made inside it (like local variables in some programming >> laguages)? This can have many other uses. >> > i have no idea why you use shortcuts (i implemented it as a gimmick -) Well I was reading sources and stumbled over these commands. I am using shortcuts to typeset programming examples in non standard languages and pseudo-code. > > grouping is doable with: > > \starttext > > \startsetups whatever > \defineshortcut [b] [style=bold] > \defineshortcut [e] [style=slanted] > \stopsetups > > \definestartstop[whatever][commands=\setups{whatever}] > > \input tufte > > oeps or > > \startwhatever > oeps or > \stopwhatever > > oeps or > > \input tufte > > \stoptext > Many thanks! I've looked this indeed! It is a pity that such useful command (setups) remains undocumented. As far as I understand inside setups can be any commands and environment changes are fully restored after their execution. Right? And \setups command can replace any single command (in arguments and such). If this is OK, then I will try to collect some more examples and post them on the WIKI later this week. -- Radhelorn