[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Symbol expansion in body Parameter
From: |
Ludovic Courtès |
Subject: |
Re: Symbol expansion in body Parameter |
Date: |
Tue, 19 Aug 2008 09:38:57 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hi,
Volker Renneberg <address@hidden> writes:
> def @CiteRemoveYear
> body @Body
> {
> def @Filter { sed
> "'s/\\(.*\\)[0-9]\\{4\\}[a-z]\\{0,1\\}/\\1/g'" @FilterIn > @FilterOut
> }
> # def @Filter { cat @FilterIn >> testoutputfile }
> @Body
> }
>
> The following application
> @CiteRemoveYear { Haase et al. 2007f }
> produces the correct output
> Haase et al.
>
> However, applications of the following format
> @CiteRemoveYear address@hidden&&haase2004 @Open address@hidden
> do not work. Some debugging (see above commented line in the @Filer
> definition) showed that the body argument to @CiteRemoveYear is not
> begin expanded. This means, the string "@Reference&&haase2004 @Open
> address@hidden" is being sent to sed and not the actual @Label content.
According to the Expert's Guide, Section 2.4, it's the right parameter
of address@hidden' that gets filtered, not its body:
The presence within @Sort of a definition of a symbol called @Filter
tells Lout that the right parameter of @Sort is to be filtered before
inclusion.
I haven't tried it, though.
Hope this helps,
Ludovic.