texinfo-devel
[Top][All Lists]
Advanced

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

Re: white space at the beginning of lines in macro body ignored!


From: Patrice Dumas
Subject: Re: white space at the beginning of lines in macro body ignored!
Date: Sat, 18 Aug 2012 01:16:04 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Fri, Aug 17, 2012 at 09:56:01PM +0000, Karl Berry wrote:
> 
>     This is not true for texi2any.  Should I make this true?  I believe it
>     is very wrong, and I hope no manual use that 'feature'!
> 
> It is true in TeX.  This is another one of those "low level" parsing
> things in TeX that is infeasible to change.

Ok.

>  Therefore, for consistency,
> it seems like it would be better to remove beginning-of-line whitespace
> in macro definitions in texi2any too?

But it leads to having many things that cannot be done with @macro, such
as a leading space on the first line, and manual indenting for @example
and @menu.  Also, and maybe more importantly, it may lead to user
feeling that this is the correct behaviour.

> In all the manuals I've seen, people don't use bol whitespace in their
> macros, so I doubt it makes any practical difference.  I don't know what
> C makeinfo did.

It does as said in the manual, stripping leading whitespaces.

> I completely agree it is wrong in principle ...

I think that it is important not to let user rely on that 'feature', so
my proposal would be not to ignore those leading whitespaces.  What we
could do, however is to warn if there are such leading whitespaces.  And
also provide with a customization variable to remove leading whitespaces
without warning, if it is set, but do not set it in the default case.

On the other hand, one could also consider that it is only one of many 
discrepancies between TeX and makeinfo @macro implementations, and let
it be documented in the manual.

In general, I really dislike 'crippling' an implementation for the sake 
of the other one, it is especially the case here.

Do you have a preference?

(Whatever we come to for defaults and warnings, I'll implement stripping
leading whitespaces anyway, and associate it with a customization variable, 
with the following proposal for the name:
  IGNORE_LEADING_SPACE_IN_MACRO_BODY
)

-- 
Pat



reply via email to

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