From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13613 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML command synonyms Date: Tue, 30 Sep 2003 10:04:11 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5.2.0.9.1.20030930100004.02851350@server-1> References: <5.2.0.9.1.20030927121550.01b54f30@server-1> <000f01c38364$947c05b0$0500a8c0@best> <20030925191353.GB603@scaprea> <5.2.0.9.1.20030927121550.01b54f30@server-1> <20030929183039.GA610@scaprea> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1064909643 10745 80.91.224.253 (30 Sep 2003 08:14:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2003 08:14:03 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Tue Sep 30 10:14:01 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A4Fdx-0004BG-00 for ; Tue, 30 Sep 2003 10:14:01 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 2773810B23; Tue, 30 Sep 2003 10:13:56 +0200 (MEST) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id C05F410B23 for ; Tue, 30 Sep 2003 10:07:55 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id h8U87pR23312 for ; Tue, 30 Sep 2003 10:07:51 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 2DA871A520; Tue, 30 Sep 2003 10:07:48 +0200 (CEST) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id E0374184F8 for ; Tue, 30 Sep 2003 08:07:45 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Original-To: ntg-context@ntg.nl In-Reply-To: <20030929183039.GA610@scaprea> Original-References: <5.2.0.9.1.20030927121550.01b54f30@server-1> <000f01c38364$947c05b0$0500a8c0@best> <20030925191353.GB603@scaprea> <5.2.0.9.1.20030927121550.01b54f30@server-1> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:13613 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13613 At 20:30 29/09/2003 +0200, you wrote: >On Sat, Sep 27, 2003 at 12:18:21PM +0200, Hans Hagen wrote: > > At 07:41 27/09/2003 +0200, you wrote: > > > > >From: "Simon Pepping" > > > > > >> >P: How to define 'SSSS' as a synonym of 'subsubsubsubsection' without > > >wrtiting > > >> >P: the same code twice? > > >> > > >> From DocbookInContext: > > >> > > >> %D A \type{\let} for XML environments > > >> \def\letXMLenvironment#1#2% > > >> {\letvaluevalue{\@@XMLelement:#1/}{\@@XMLelement:#2/}% > > >> \letvaluevalue{\@@XMLelement:#1}{\@@XMLelement:#2}% > > >> \letvaluevalue{\@@XMLelement:/#1}{\@@XMLelement:/#2}}% > > > > > > > \letcsnamecsname\csname\@@XMLelement:#1\endcsname\csname\@@XMLelement:#2\endcsname > > > > etc, but before you enter that track, what exactly do you want? > >I use it in the same way as let, but for XML environments. For >example, > >store the current value >\letXMLenvironment{origindexterm}{indexterm}% >redefine XML environment indexterm, >do some work, >restore the old value >\letXMLenvironment{indexterm}{origindexterm}} in that case: \expandafter\pushmacro\csname...\endcsname \expandafter\popmacro\csname ...\endcsname is nicer since it works nested as well wo maybe we should have: \pushXMLmeaning \popXMLmeaning \def\pushXMLmeaning#1% {\@EA\pushmacro\csname\@@XMLelement:#1/\endcsname \@EA\pushmacro\csname\@@XMLelement:#1\endcsname \@EA\pushmacro\csname\@@XMLelement:/#1\endcsname} \def\popXMLmeaning#1% {\@EA\popmacro\csname\@@XMLelement:#1/\endcsname \@EA\popmacro\csname\@@XMLelement:#1\endcsname \@EA\popmacro\csname\@@XMLelement:/#1\endcsname} Does that suit your needs? 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 ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------