[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 12 questions for FIXMEs
From: |
Patrice Dumas |
Subject: |
Re: 12 questions for FIXMEs |
Date: |
Fri, 11 Nov 2011 13:42:53 +0100 |
User-agent: |
Mutt/1.4.2.2i |
On Sun, Nov 06, 2011 at 12:12:55AM +0000, Karl Berry wrote:
>
> 3. For raw commands, like @verbatim, @macro body, @ignore, @html...
> right now the regexp to find them is
>
> /^(.*?)address@hidden([a-zA-Z][\w-]*)/
>
> Should it be stricter, like
> begin only at line beginning?
>
> Yes, match @end only at ^. I just tried
> @example
> foo
> @end example
> with texinfo.tex, and got two lines of output (the second one blank).
The question is not for @-commands like @example, in such an @-command
the @end may appear on the line, but there will be a warning (or an error)
if @end is not at the beginning of the line.
The question is for @-commands in which @-commands are not taken into
account, like @verbatim, @macro body, @ignore, @html.
Testing a bit texi2dvi, I see mixed results.
@html
in html
HHHH @end html
breaks texi2dvi, but not
@ignore
in ignore
@end ignore
Similarly the following works:
@ignore
in ig2
@end ignore
And also with @html.
@tex and @iftex are even more forgiving, as the following works:
@tex
aaaaa
jjj @end tex
@iftex
in iftex
ggg @end iftex
However it breaks texi2dvi with @verbatim:
@verbatim
in v
@end verbatim
leads to
./space_before_end_verbatim.texi:7: Missing } inserted.
My tests also show that it is not possible to have multiple
spaces before end for @verbatim
@verbatim
in v
@end verbatim
leads to
Runaway argument?
in address@hidden address@hidden
! File ended while scanning use of @doverbatim.
> 4. Should something that remains after an @end ifhtml and similar
> command on the like be ignored? Or should there be an error
> message? I think that a @comment is valid, so not doing anything
> and keeping what is on the line as is now and putting a comment in
> the code may be enough.
>
> Right, @c (and whitespace) is ok there. Anything else is not ok. Both
> texinfo.tex and C makeinfo give errors, e.g., with the input
> @end example foo
> C makeinfo reports:
> endspace.tex:15: Superfluous argument to @end example: foo
The question, here too is mostly for @if* and @end if*, especially when
ignored. And for texi2dvi, I find that what follows @ifhtml is indeed
ignored, the following do not lead to an error:
@ifhtml
kkk
@end ifhtml jjj
hhh
However for
@iftex
aaaaa
jjj
@end iftex ggg
there is an error:
./iftex_follow.texi:8: This command can appear only in environment @iftex
ggg,
not out of any environment.
@badenverr ...temp , not @inenvironment @thisenv }
@checkenv address@hidden @thisenv @temp @else @badenverr
@fi
@\end ...pandafter @checkenv @csname address@hidden
@csname address@hidden @end...
l.8 @end iftex ggg
Not the most easy to understand, but still...
I think that currently I will try to give a correct error message when the
block command is not ignored, also an error message if an ignored @end is
followed by text, but not when followed by an @-command since it may be a
valid construct.
--
Pat
Re: 12 questions for FIXMEs, Karl Berry, 2011/11/07