From: Hans Hagen <pragma@wxs.nl>
Subject: Re: XML command synonyms
Date: Tue, 30 Sep 2003 10:04:11 +0200 [thread overview]
Message-ID: <5.2.0.9.1.20030930100004.02851350@server-1> (raw)
In-Reply-To: <20030929183039.GA610@scaprea>
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" <spepping@scaprea.hobby.nl>
> > >
> > >> >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
-------------------------------------------------------------------------
next prev parent reply other threads:[~2003-09-30 8:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-25 12:57 Pawel Jackowski na Onet
2003-09-25 14:41 ` Willi Egger
2003-09-25 15:18 ` Willi Egger
2003-09-25 19:13 ` Simon Pepping
2003-09-27 5:41 ` Pawel Jackowski na Onet
2003-09-27 10:18 ` Hans Hagen
2003-09-27 22:28 ` Pawel Jackowski na Onet
2003-09-29 18:30 ` Simon Pepping
2003-09-30 8:04 ` Hans Hagen [this message]
2003-09-30 19:06 ` pushmacro Simon Pepping
2003-09-30 19:47 XML command synonyms Pawel Jackowski na Onet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.2.0.9.1.20030930100004.02851350@server-1 \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).