[Latte] words and variables
Daniel Mahler
mahler@cyc.com
Tue, 20 Mar 2001 10:47:27 -0600
The problem is that I want the name of the refernce, without the "\"
to appear in the output of the template
Something like
{\template \T}
{\T 1}
=> T1
Except for that my problems are solved.
One application of this is to automatically generate
tag functions for XML DTDs
by instantiating a definition template.
{\element \img \src}
should generate the definition
{\def {\img \=src}
{... img ... src }}
thanks
D
Bart Schaefer writes:
> On Mon, 19 Mar 2001, Daniel Mahler wrote:
>
> > What I have in mind is something like
> >
> > {\template T}
> >
> > {\T 1}
> >
> > or, alternatively,
> >
> > {\template \T}
> >
> > {\T 1}
>
> That second one is the way to do it. Here's a template to create functions
> that take two arguments and reverse them:
>
> {\def \template
> {\macro {\fn}
> {\`{\def {\,\fn \one \two} {\two \one}}}}}
>
> Use it like this:
>
> {\template \swap}
> {\swap first second}
>
> Obviously you have something more complicated in mind.
>
> _______________________________________________
> Latte mailing list - Latte@lists.zanshin.com
> http://www.zanshin.com/mailman/listinfo/latte