bug-texinfo
[Top][All Lists]
Advanced

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

Re: nested @ignore does not work


From: Patrice Dumas
Subject: Re: nested @ignore does not work
Date: Wed, 28 Dec 2022 15:16:16 +0100

On Tue, Dec 27, 2022 at 12:56:50PM +0100, Patrice Dumas wrote:
> On Sat, Dec 03, 2022 at 01:41:44AM +0000, Gavin Smith wrote:
> > Not a big deal but I noticed that nested @ignore does not work with
> > texi2any, although it does work with texinfo.tex.  For example:
> 
> Indeed, @ignore are implemented like @verbatim.  However, @macro which
> is in the same block commands category can nest.
> 
> > I don't have a strong preference as to whether nested @ignore should
> > work or not but it should be consistent between the two processors.
> > I think we should take whichever is the easiest to implement.
> 
> I'll change texi2any.

I have done it, but I am not so happy with the result.  Indeed, nested
@ignore now appears in the tree, but the tree is quite complicated for a
case of an ignored block.  Maybe it would be better not to have an
explicit element in the tree, but keep count of the opened @ignore
blocks.

It is also not clear to me whether this is right to have nesting by type
of block command.  I am not sure that Texinfo TeX does it like that too.
Indeed, @if* nest together, @ignore nest with @ignore and @r?macro nest
together.  My guess is that in Texinfo TeX all should nest together.

Maybe we should take one step back and think on what nesting we would
want?

For example, if we want to have @ignore nesting to be able to ignore a
long slice of code, it will fail if there is in it

@macro a
@end ignore
@end macro

or

@ifset notset
@end ignore
@end ifset

-- 
Pat



reply via email to

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