help-texinfo
[Top][All Lists]
Advanced

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

Re: Generalising @def*


From: Gavin Smith
Subject: Re: Generalising @def*
Date: Fri, 10 Feb 2023 16:25:07 +0000

On Fri, Feb 10, 2023 at 04:24:00PM +0100, Patrice Dumas wrote:
> I have understood that the use can use any index command, simply by
> adding it before the @deflinex, but I did not understand where the user
> definition comes in?
> 
> > \input texinfo
> > 
> > @defblock
> > @deflinex Functionoid bar (args)
> > @deflinex Monoid bar2 (args, nineyy)
> > hello
> > 
> > @end defblock
> > 
> > @bye 
> > 

The idea was that the user could define a macro to output a @deflinex
command as well as an index command.  For example,

    @defcodeindex mc

    @macro defMac{name, args}
    @mcindex \name\
    @deflinex Macroid \name\ \args\
    @end macro

    @defblock
    @defMac{macro1, (arg1@comma{} arg2)}
    @defMac{macrob, (arg4@comma{} arg5)}
    Description of @code{macro1} and @code{macrob}
    @end defblock

    @heading Macro Index

    @printindex mc

This is still not that good, though, as being able to write

    @defMac macro1 (arg1, arg2)

instead would be much better.

Maybe there could be a special-purpose macro facility for defining
new definition commands that would allow the command to be invoked
without braces.



reply via email to

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