bug-texinfo
[Top][All Lists]
Advanced

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

Re: Whitespace and Macros and Bugs


From: Patrice Dumas
Subject: Re: Whitespace and Macros and Bugs
Date: Sun, 24 Oct 2010 13:08:54 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Oct 20, 2010 at 01:18:21PM -0700, Michael Witten wrote:
> The following Texinfo examples were processed into
> the shown Info output using:
> 
>   makeinfo /path/to/file/containing/example
> 
> where makeinfo has the following version:
> 
>   makeinfo (GNU texinfo) 4.13

texi2html leads to more consistent results.  See the attached texinfo file
and info file result (when called as makeinfo.pl).

texi2dvi has some issues dealing with this texinfo file, beginning with:
  ./example.texi:18: Extra }, or forgotten @endgroup.
  @Example address@hidden address@hidden@egroup 

>     The newlines after the address@hidden' line and before the address@hidden 
> macro' line
>   are ignored, that is, not included in the macro body.  All other
>   whitespace is treated according to the usual Texinfo rules.
> 
> This suggests that it is a bug.

In my opinion, this is more a documentation issue.

> As you can see, the blank lines were copied from the input to the output;

This looks right to me, for all newlines except the last one.

> however, this contradicts the Texinfo manual as quoted earlier:
>   
>     The newlines after the address@hidden' line and before the address@hidden 
> macro' line
>   are ignored, that is, not included in the macro body.  All other
>   whitespace is treated according to the usual Texinfo rules.
> 
> Perhaps the manual should read:
>   
>     The newlines after the address@hidden' line are ingnored (that is, they 
> are
>     not included in the macro body). Similarly, newlines before the
>     address@hidden macro' line are ignored unless they are within an unended
>     environment within the macro body.  All other whitespace is treated
>     according to the usual Texinfo rules.

The rules implemented in the new Parser I am doing (and, unless I am
missing something it is the same as in texi2html) is that the last newline 
of the macro body is removed before expansion.  Then there are 2 cases 
regarding what was on the line prior to macro expansion.  If the macro 
definition has one argument and there are no braces for the macro invokation, 
everything up to the end of line is taken as argument, but the end of
line is kept, otherwise the brackets delimitate the arguments.

-- 
Pat

Attachment: example.texi
Description: TeXInfo document

Attachment: example.info
Description: application/info


reply via email to

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