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

16.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: Line Directives).

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{}
@end macro
@center @twolines{}

In the current makeinfo, this is equivalent to:

@center aaa

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

@center aaa bbb

Next: @alias new=existing, Previous: Invoking Macros, Up: Defining New Texinfo Commands   [Contents][Index]