From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31741 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: character redefinition environment Date: Sun, 05 Nov 2006 18:14:40 +0100 Message-ID: <454E1C00.6040906@wxs.nl> References: <454DFA03.8060801@veribox.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1162746892 32708 80.91.229.2 (5 Nov 2006 17:14:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Nov 2006 17:14:52 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 05 18:14:48 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1Ggla3-00008C-5T for gctc-ntg-context-518@m.gmane.org; Sun, 05 Nov 2006 18:14:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 160021FFED; Sun, 5 Nov 2006 18:14:46 +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 28836-01; Sun, 5 Nov 2006 18:14:39 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D013C1FE77; Sun, 5 Nov 2006 18:14:38 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 06AD91FEBF for ; Sun, 5 Nov 2006 18:14: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 28415-04 for ; Sun, 5 Nov 2006 18:14:36 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id 414BA1FE76 for ; Sun, 5 Nov 2006 18:14:36 +0100 (CET) Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 16819 for multiple; Sun, 05 Nov 2006 18:14:36 +0100 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: plink@veribox.net, mailing list for ConTeXt users In-Reply-To: <454DFA03.8060801@veribox.net> 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.7 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:31741 Archived-At: Enzo Cordes wrote: > Hi list, > > I want to assign Metapost graphics to single letters (in a newly defined > evironment, that take care of these assignments). The purpose is being > able to rapidly build huge tables containing lots of these symbols. > > Everything works fine if I assign these graphics to non-letters, e.g. > "|", but somehow it doesn't work with normal letters. > > Here is what I tried (with a simple Foo instead of Metapost graphics): > > \definesymbol[foosymbol][{\tt Foo}] > \def\startmychars{% > \bgroup\catcode`\|=\active\def|{\symbol[foosymbol]}} > \def\stopmychars{\egroup} > > This works with | as reassigned character without any problems. But, we > want to have normal characters in the table, no punctuation marks, etc. > Does anyone know what to do to reassign a special definition for a > letter e.g. like uppercase B or else? > > I got this error: > (/usr/local/share/texmf/tex/context/base/pdfr-ec.tex) > ! Undefined control sequence. > \startmychars ...up \catcode `\B=\active \defB > {\symbol[foosymbol]} > l.24 \startmychars > > which seems to indicate that B is not recognized as active character in > the "\defB"? > > | is already active, but not b \bgroup \catcode`B=\active \def\start... \egroup otherwise a 'character B' and not an 'active character B' ends up in the definition This may be easier: \def\Whatever {\defineactivecharacter B {[oeps]}} bla bla \start \Whatever B \stop ble bla -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------