bug-texinfo
[Top][All Lists]
Advanced

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

Re: @defblock and @defline in texi2any


From: Patrice Dumas
Subject: Re: @defblock and @defline in texi2any
Date: Thu, 2 Mar 2023 23:38:23 +0100

On Thu, Mar 02, 2023 at 08:33:54PM +0000, Gavin Smith wrote:
> > This is also most likely a difficulty in what you propose.  For example
> > for
> > 
> > @linemacro defbuiltin symbol rest
> > @byindex \symbol\
> > @defline Builtin \symbol\ \rest\
> > @end linemacro
> > 
> > For @byindex, \symbol\ should not be in braces.  But on the @defline
> > line it may need to.  Therefore a call like
> > 
> > @defbuiltin {My, symbol} and, rest
> > 
> > would lead to
> > @byindex My, symbol
> > @defline Builtin My, symbol and, rest
> > which is ok for @byindex, but not for @defline.  If the call is like
> > 
> > @defbuiltin {{My, symbol}} and, rest
> > 
> > It would lead to
> > @byindex {My, symbol}
> > @defline Builtin {My, symbol} and, rest
> > which is ok for @defline but not for @byindex.
> > 
> > So, it is not clear that all the situations are handled.
> 
> This is a good point; however, there is another possibilty which is
> to put extra braces in the macro definition:
> 
>     @linemacro defbuiltin symbol rest
>     @byindex \symbol\
>     @defline Builtin {\symbol\} \rest\
>     @end linemacro

This more or less means that there would always be braces to protect
arguments before the rest of the line when used in macros.

> This would depend on whether double braces would work as an argument
> to @defline.

I do not think so, unless I am missing something, in the call

  @defbuiltin {My Symbol} rest

The {} around 'My Symbol' would be removed before substitution.

> Another possibility is to use @asis:
> 
>     @defbuiltin  {@asis{My, symbol}} and, rest
> 
> Most of the time, though, there would not be spaces in the first argument
> for @defline.

But commas would be even rarer.

-- 
Pat



reply via email to

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