* problem with vardefs
@ 2000-12-07 14:41 Denis B. Roegel
2000-12-07 15:12 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Denis B. Roegel @ 2000-12-07 14:41 UTC (permalink / raw)
Cc: Denis B. Roegel
How am I supposed to write a vardef with `@#' in context?
For instance, the following
\startuseMPgraphic{annot}
vardef annot@#(suffix n)% noeud
(expr l)% étiquette
(expr a)% angle
=
label@#(l,n.c+(cosd a,sind a)*labdist);
enddef;
\stopuseMPgraphic
produces the error:
! Illegal parameter number in definition of \MP:annot.
<to be read again>
(
<argument> vardef annot@##(
suffix n)(expr l)(expr a)= label@##(l,n.c+(cosd ...
\dostartuseMPgraphic ...leuseMPgraphic {#1}{#2}{#3
}}
l.54 \stopuseMPgraphic
Thanks,
Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: problem with vardefs
2000-12-07 14:41 problem with vardefs Denis B. Roegel
@ 2000-12-07 15:12 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2000-12-07 15:12 UTC (permalink / raw)
Cc: ntg-context, Denis B. Roegel
At 03:41 PM 12/7/00 +0100, Denis B. Roegel wrote:
>How am I supposed to write a vardef with `@#' in context?
>For instance, the following
>
>\startuseMPgraphic{annot}
> vardef annot@#(suffix n)% noeud
> (expr l)% étiquette
> (expr a)% angle
> =
> label@#(l,n.c+(cosd a,sind a)*labdist);
> enddef;
>\stopuseMPgraphic
>
>produces the error:
>
>! Illegal parameter number in definition of \MP:annot.
><to be read again>
> (
><argument> vardef annot@##(
> suffix n)(expr l)(expr a)=
label@##(l,n.c+(cosd ...
>
>\dostartuseMPgraphic ...leuseMPgraphic {#1}{#2}{#3
> }}
>l.54 \stopuseMPgraphic
# symbols are always nasty for tex since there are some low level hard
coded things going on which makes it nearly impossible to catch them,
\appendtoks \let\#\hashletter \to \everyMPgraphic
\startuseMPgraphic{annot}
vardef annot@\#(suffix n)% noeud
(expr l)% tiquette
(expr a)% angle
=
label@\#(l,n.c+(cosd a,sind a)*labdist);
enddef;
\stopuseMPgraphic
Mea Culpa,
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-07 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-07 14:41 problem with vardefs Denis B. Roegel
2000-12-07 15:12 ` Hans Hagen
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).