From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24531 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: About \defineshortcut Date: Tue, 20 Dec 2005 23:28:41 +0100 Message-ID: <43A88599.9020800@wxs.nl> References: <43A1E0C1.7060307@mail.ru> <43A312FB.3080705@elvenkind.com> <43A879A9.7080109@mail.ru> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135117856 2033 80.91.229.2 (20 Dec 2005 22:30:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2005 22:30:56 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 20 23:30:49 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 1EopyU-0007qY-7n for gctc-ntg-context-518@m.gmane.org; Tue, 20 Dec 2005 23:28:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7022F1286C; Tue, 20 Dec 2005 23:28:49 +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 13728-10; Tue, 20 Dec 2005 23:28:45 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9F10412861; Tue, 20 Dec 2005 23:28:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A329812861 for ; Tue, 20 Dec 2005 23:28:43 +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 13796-01 for ; Tue, 20 Dec 2005 23:28:42 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id 9B74412851 for ; Tue, 20 Dec 2005 23:28:42 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 8553 for ; Tue, 20 Dec 2005 23:36:01 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43A879A9.7080109@mail.ru> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 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:24531 Archived-At: Radhelorn wrote: > Taco Hoekwater wrote: > >>> For example after command: >>> >>> \defineshortcut [//] [] [style=\em] >> >> >>> I can get slash only by \textslash (which is expected) and it breaks >>> things like: >>> >>> \typefile {some/dir/file} >>> >>> So how to revert to previous meaning of '/'? It is possible to do it >>> only temporarily? >> >> >> Explicit \start a /b/ c \stop style grouping is normally best, but >> a shortcut is just an active character with a closing defimiter, >> so this will work for you special case: >> >> \catcode`\/=\other >> \typefile {some/dir/file} >> \catcode`\/=\active >> > > I've experimented with various macros to undefine/temporarily disable > shortcuts and found that most convenient variant is to insert this > catcode changing into \typefile command. Why not to do this for every > command, that accepts path parameters? This slows process down too much? > > But this is just an afterthought. > > 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 -) 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 Hans