[Top][All Lists]

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

Re: CVS Texinfo fails to build the Autoconf manual (from git)

From: Patrice Dumas
Subject: Re: CVS Texinfo fails to build the Autoconf manual (from git)
Date: Wed, 18 Jul 2012 20:24:13 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Tue, Jul 17, 2012 at 08:51:18PM +0300, Eli Zaretskii wrote:
> Yes, AFAIR using the comment is a common trick to prevent a newline
> from being emitted after the macro.

I had a look at the manual, and I can see that touched upon in
'Macro Details and Caveats':

   * It is (usually) best to avoid comments inside macro definitions,
     but see the next item.

   * In general, the interaction of newlines in the macro definitions
     and invocations depends on the precise commands and context,
     despite the previous statements.  You may be able to work around
     some problems with judicious use of '@c'.  Suppose you define a
     macro that is intended to always be used on a line by itself:

          @macro linemac
          @cindex whatever @c
          @end macro

     Without the '@c', there will be an unwanted blank line between the
     '@cindex whatever' and the 'bar' (one newline comes from the macro
     definition, one from after the invocation), causing a paragraph

     On the other hand, you wouldn't want the '@c' if the macro was
     sometimes invoked in the middle of a line (the text after the
     invocation would be treated as a comment).

As the macro invocation is on a line, in the example of the autoconf
manual, it should (in my opinion) be covered by the very last paragraph,
although I guess the autoconf manual writers may disagree with me.

However, more generally, the preceding paragraph worries me 
as it seems to me that it is not in line in makeinfo in C (and in 
texi2any) as there are no blank lines added neither by the definition 
nor the invocation of the macro.

As a side note, there is also another item, still in limitations 
of @macros in TeX that says

   * Macro arguments cannot cross lines.

which means that the autoconf macro invocation should not be valid in TeX,
because of the @ followed by a newline that leads to the second argument
being on the next line.

I must say that I am a bit puzzled as to how to be compatible with what
makeinfo in C does with user defined macros and all the TeX related @macro
limitations and how they should be taken into account in texi2any. 
That's not something new, I remember discussions (maybe on that list?)
that lead me rather hopeless to have a clear specification of how @macro
should be implemented.  Being backward compatible with makeinfo in C 
or texinfo.tex is something to try, but I think that it does not lead
to a specification, as it seems to me that those implementations are 
not consistent with one another, not even consistent internally (as I 
show for makeinfo with the difference with -E and with an output in 
the other mail) and have bugs or unwritten limitations.


reply via email to

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