bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spurious diagnostics from texi2dvi -E


From: Gavin Smith
Subject: Re: Spurious diagnostics from texi2dvi -E
Date: Wed, 4 Mar 2015 14:13:24 +0000

On 4 March 2015 at 06:01, Sergey Poznyakoff <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]