Re: [help-texinfo] Porting macro-heavy makeinfo 4 to makeinfo 5

2014-04-15 Thread Karl Berry
Hi Scott,

@macro cncp {concept}
@cindex \concept\
\concept\
@end macro

I'm really sorry, but I just don't know the answer (without researching
it from scratch, anyway).  I don't understand Texinfo macros and
newlines.  All I can say is that in principle we didn't intend to
decrease functionality.

Patrice, can you help?

Sorry,
Karl



Re: [help-texinfo] Porting macro-heavy makeinfo 4 to makeinfo 5

2014-04-22 Thread Patrice Dumas
On Fri, Apr 11, 2014 at 10:28:51AM -0600, Scott Pakin wrote:
> I'm trying to rebuild a large, complex, Texinfo file I wrote back in
> the Texinfo 4 days, and I'm getting zillions of error messages from
> Texinfo 5's makeinfo.  I can use some help updating my document to
> work with the latest makeinfo.
> 
> My .texi file is extremely macro-heavy, and the Texinfo 5-introduced
> limitation that most commands appear only at the beginning of a line
> seems to be the document's main bugaboo.  How am I now supposed to
> write inlinable macros that depend upon non-inlinable commands?  

I am not sure I understand the problem correctly.  But a @c suppress 
more or less an end of line, maybe that could help...

> To
> make that question more concrete, how would one port the following
> Texinfo 4 constructs to Texinfo 5?
> 
> @macro cncp {concept}
> @cindex \concept\
> \concept\
> @end macro
> 
> @macro foo
> @cncp{Foo}
> @end macro
> 
> @macro bar
> @cncp{Bar}
> @end macro
> 
> ...
> 
> Some things are foolish (@foo{}), and some things are barred
> (@bar{}).  Regardless of how @foo{} or @bar{} you are, you should
> look for the following:
> 
> @table @cncp
> @item baz
> Found in bazaars
> 
> @item quux
> In the vicinity of Equuleus
> 
> @item corge
> The most incorrigible
> @end table

See two proposals attached.  I have switched the @cindex and the 
text in the @cncp macro definition in one of the proposals, to allow
to have the text of the macro invokation appear first on the @item
line.  It is not really the same as what you want, still, as you have
to repeat the macro invokation on each @table @item line.

In the second case, the original order is kept, but then another macro
is required for @item lines...


One thing that is really gone is the delayed expansion of user defined
macro on a @table line.  Now user defined macros are expanded in the
flow of the texinfo code.

Is it ok?


Note: surprisingly, these exampls work in texi2dvi too...

-- 
Pat


pb_macro.texi
Description: TeXInfo document


pb_other_macro.texi
Description: TeXInfo document


Re: [help-texinfo] Porting macro-heavy makeinfo 4 to makeinfo 5

2014-04-24 Thread Scott Pakin
On 04/22/2014 02:00 PM, Patrice Dumas wrote:
> See two proposals attached.  I have switched the @cindex and the 
> text in the @cncp macro definition in one of the proposals, to allow
> to have the text of the macro invokation appear first on the @item
> line.  It is not really the same as what you want, still, as you have
> to repeat the macro invokation on each @table @item line.
> 
> In the second case, the original order is kept, but then another macro
> is required for @item lines...
> 
> 
> One thing that is really gone is the delayed expansion of user defined
> macro on a @table line.  Now user defined macros are expanded in the
> flow of the texinfo code.

Thanks!  That was very helpful.  Now I'm down to just under 1000 error
messages remaining to cope with.  (It seems that certain nestings of
user-defined macros no longer work, and I'm trying to work around
that.)

-- Scott