texinfo-devel
[Top][All Lists]
Advanced

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

Re: texi2any --pdf and parsing


From: Patrice Dumas
Subject: Re: texi2any --pdf and parsing
Date: Tue, 14 Oct 2014 22:33:53 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Tue, Oct 14, 2014 at 06:29:18PM +0000, Karl Berry wrote:
> Hi Patrice,
> 
> It seems (from using --debug) that running texi2any --dvi foo.texi ends
> up parsing all of foo.texi, and then ignoring any results and just
> exec-ing texi2dvi.  Thus:
> 
> Do you recall why?
> I tried to look through our old archives, but couldn't find a discussion
> about it.
> 
> Perhaps it was specifically so the user would get makeinfo's error
> messages on the input file, but that doesn't make a lot of sense to me.
> (If the user wants makeinfo's error messages, they should generate one
> of the usual formats.)

Indeed, it was the idea, getting makeinfo errors.  I think that we talked 
about that, but maybe I just had this idea myself.  Also --macro-expand
is taken into account, which I think is a valid reason for parsing the
tree, although it could be possible to do the parsing only if
--macro-expand is specified.

> Or maybe it was so that if various conf variables are set, to generate
> sort element counts or other such special things, their actions would
> take effect?  

No, most of those in any case only modify the tree, so would not be
really relevant.  And the counting part is not executed if calling
texi2dvi.

> Looking at texi2any.pl, I surmise that just moving up the exec block
> (currently the last thing in the file) to inside the first time
> $call_texi2dvi is tested would work (it did in some simple cases
> anyway).

The 'missing file argument' error should be used too.  Then I believe
the block should only be skipped if --macro-expand is not specified.

> With valid Texinfo input, it doesn't matter.  But when people play games
> because they know too much about texinfo.tex, as auctex does, the result
> is errors from texi2any even though texi2dvi is happy.  And I know that
> quite a few manuals do play around at the TeX level, so ...

I thought that it was a good idea to have the parser give error messages
on the document when called as texi2any/makeinfo, people really wanting
to call texi2dvi only can do that explicitly.  But if it causes issues,
this could also be skippedd if --macro-expand is not specified.

-- 
Pat



reply via email to

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