> There is the same problem with macro
> redefinition, although less likely to occur in real documents, when a
> macro is defined within the Top node. Test file below.

Yes, of course.  The sed expression remains error-prone anyway.  As
another example, it suffices to add an extra space between '@end'
and 'ifnottex' to break it.  Naturally, it would be preferable to
avoid using the sed magic altogether.

> I would like to explore forgoing the use of sed to process @ifnottex
> etc., and using the --iftex option to makeinfo. Can someone explain
> what "Unfortunately makeinfo --iftex --no-ifinfo doesn't work well
> enough (yet), makeinfo can't parse the TeX commands, so work around
> with sed." means - what TeX commands can't makeinfo parse?

I wondered about that too.  Perhaps a proper combination of --ifX and
--no-ifX options will do the job?

> I found another option to makeinfo that could be used to expand the
> macros: "-c DUMP_TEXI=1 --macro-expand=-" - this avoids generating
> Info output that is discarded, and reduces the amount of error
> messages related to document structuring.

Nice idea.

Regards,
Sergey

Reply via email to