From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4785 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Environments and shortcuts Date: Mon, 04 Jun 2001 12:14:15 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20010604121415.009daa00@server-1> References: <12813505972.20010602144504@bigfoot.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035395425 28720 80.91.224.250 (23 Oct 2002 17:50:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:50:25 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Giuseppe Bilotta In-Reply-To: <12813505972.20010602144504@bigfoot.com> Xref: main.gmane.org gmane.comp.tex.context:4785 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4785 At 02:45 PM 6/2/01 +0200, Giuseppe Bilotta wrote: >Hello, > >I know I should not be using shortcuts (they are not "official"), >but they're so usefull ... ok, here's the problem. > >If I define a shortcut in an environment file, like > >\startenvironment novel > >\defineshortcut[color=red] > >\stopenvironment > >and the use \environment novel, the shortcut definition does not >work (all other definitions do, though). What might the problem >be? since < > are used in macros (\ifnum etc) they are pushed popped when loading critical files which means that after loading the env, the < has it's old meaning. So, you need to add \catcode`\<=\active to the main file (\def\enableshortcuts{\catcode...} \enableshortcuts) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------