On 4 March 2015 at 06:01, Sergey Poznyakoff <[email protected]> wrote: >> >> Does it work as you expect except for these warnings? If so, we could >> figure some way to just turn off the warnings. > > Yes, as far as I can tell, it does produce the expected output anyway. > After experimenting with it I came to the attached patch. It > temporarily comments out the @ifnottex conditional so that makeinfo sees > the @top node and restores it after preprocessing, so that the node does > not appear in the output. This way no diagnostics is issued when run on > my and Gavin's test files. Trying it on GNU Pies docs works as well.
I found a way to break this patch by defining a macro within @iftex: \input texinfo @c -*-texinfo-*- @setfilename t.info @settitle Test @iftex @macro Message In tex @end macro @end iftex @ifnottex @macro Message In not tex @end macro @end ifnottex @ifnottex @node Top @top Top This is the top node. @end ifnottex @menu * Preface:: @end menu @node Preface @chapter Preface @Message word word @bye Running util/texi2dvi -E t.texi, I get an error -:13: warning: macro `Message' previously defined -:6: warning: here is the previous definition of `Message' The t.dvi file shows the "In not tex" message. Without the patch, I get the "menu before top node" error, but the produced t.dvi shows "If tex" as desired.
