Next: , Previous: , Up: Defining New Texinfo Commands   [Contents][Index]


17.3 Macro Details and Caveats

By design, macro expansion does not happen in the following contexts in makeinfo:

Unfortunately, TeX may do some expansion in these situations, possibly yielding errors.

Also, quite a few macro-related constructs cause problems with TeX; some of the caveats are listed below. Thus, if you get macro-related errors when producing the printed version of a manual, you might try expanding the macros with makeinfo by invoking texi2dvi with the ‘-E’ option (see Format with texi2dvi). Or, more reliably, eschew Texinfo macros altogether and use a language designed for macro processing, such as M4 (see External Macro Processors).

The makeinfo implementation also has the following limitations (by design):

In the makeinfo implementation before Texinfo 5.0, ends of lines from expansion of a @macro definition did not end an @-command line-delimited argument (@chapter, @center, etc.). This is no longer the case. For example:

@macro twolines{}
aaa
bbb
@end macro
@center @twolines{}

In the current makeinfo, this is equivalent to:

@center aaa
bbb

with just ‘aaa’ as the argument to @center. In the earlier implementation, it would have been parsed as this:

@center aaa bbb

Next: , Previous: , Up: Defining New Texinfo Commands   [Contents][Index]