Please consider the attached example. It works as expected if processed with `texi2any`. However, the output of `texi2pdf` is incorrect, producing a bad ToC.
The reason, AFAICS, is that user-defined macros are not immediately
expanded while writing an entry to the `.toc` file. Is there a reason
for it?
Werner
\input texinfo
@macro A
urgh
@end macro
@node Top
@top Top
Top
@contents
@unmacro A
@macro A
foo
@end macro
@node @A{}
@chapter @A{}
@A{}
@page
@unmacro A
@macro A
bar
@end macro
@node @A{}
@chapter @A{}
@A{}
@bye
expand.pdf
Description: Adobe PDF document
