bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @macro expansion bug


From: Eli Zaretskii
Subject: Re: @macro expansion bug
Date: Fri, 23 Mar 2001 13:32:09 +0200

> Date: Thu, 22 Mar 2001 15:39:54 +0100 (CET)
> From: Werner LEMBERG <address@hidden>
> 
> thanks a lot for the explanation.  But why on earth is this important
> information not in the texinfo manual?

It is very hard to explain this precisely without dumping lots of
technicalities on a poor user.  And the effect of using macros and
other @-commands in deffn is different for TeX and for makeinfo.  This
is also the reason why the manual never documents which Texinfo
constructs support macros and which do not (even though many do).

In general, users should assume macros inside other @-commands don't
work, unless proven otherwise.  I will try to say something to that
effect in the manual, thanks for pointing this out.

> Even if you don't like @deffn
> and friends (which I can understand), it has to be *exactly*
> documented!

Indeed, I don't like @deffn, but that's not the reason why macros
don't work inside it.  It's the other way around: I don't like them
_because_ I couldn't make macros work in their arguments.  As far as I
know, macros never worked inside @deffn.  (Many other commands also
didn't support macros before Texinfo 4.0, but were fixed during
development of v4.0.)

> The same is true for the fact that e.g. after a plain `['
> in @deffn you have to use @var{} for variables or you get the wrong
> font...

I didn't even know that, until you told it now.  I wonder if Karl 
knew...

In general, @def... directives are highly irregular in their use of
the braces and the magic conversions they perform on their arguments.
Since these conversions are all specially written for this family of
commands, some of the aspects of their behavior are next to impossible
to grasp without experimenting, especially if you use special
characters such as `[' and `{'.

> It took some hours to find a workaround.  Not funny.

I'm really sorry about that.  However, in my experience, that's how 
things are when macros are heavily used in Texinfo.  IMHO, if you can 
suggest new commands that follow the Texinfo syntax and solve whatever 
problems you tried to solve with macros, it'd be easier to add these new 
commands to Texinfo than to fix the messy problems with macros.  (All of 
the non-messy problems with macros are already solved ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]