[Top][All Lists]

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

Re: macro expansion in makeinfo

From: Vladimir Volovich
Subject: Re: macro expansion in makeinfo
Date: Thu, 25 Apr 2002 23:24:58 +0400
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (sparc-sun-solaris2.8)

"EZ" == Eli Zaretskii writes:

 EZ> It's a temporary limitation, but one that isn't likely to be
 EZ> lifted without a thorough rewrite of makeinfo.  Until such a
 EZ> rewrite is under way, I'd recommend to refrain from using macros
 EZ> inside @def...  In fact, I'd recommend to stay away of
 EZ> @def... themselves, unless you really need them and cannot settle
 EZ> for @table instead.  (Karl will probably recommend to stay away
 EZ> of macros instead. ;-)

it's not me who was using this - i tried to make PDF from autoconf
manual (autoconf.texi) using texi2pdf, and without the hack i used to
expand macros in @defmac, it did not work. :)

 >> Is the reason they are not supported in difficulties of
 >> implementation?

 EZ> Yes.  All the @def... commands are implemented as a gross hack
 >> so i wonder why makeinfo does not expand macros everywhere?

 EZ> Two main reasons:

 EZ>   - makeinfo is a one-pass translator, so 3 passes like what you
 EZ> did above is not something it can do without a total rewrite;

 EZ>   - Texinfo macros are not simple text substitutions, they
 EZ> support recursion, semi-intelligent whitespace canonicalization,
 EZ> etc. (think what would have happened to your trick with Perl if
 EZ> @defmac was itself hidden inside some macro or @alias).

so as you write that "All the @def... commands are implemented as a
gross hack" - why not make macros expand everywhere (including @defmac
- as they do outside @defmac) - maybe that will be a hack, but that
will work in most cases.


reply via email to

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