On Fri, Feb 10, 2023 at 01:35:17PM +0000, Gavin Smith wrote: > With the patch below, the following input outputs as you would expect. > > \input texinfo > > @defblock > @deflinex Functionoid bar (args) > @deflinex Monoid bar2 (args, nineyy) > hello > > @end defblock > > @bye > > I expect that once this is in texi2any, any @?index lines in > the @defblock should be handled along with recent/ongoing changes > for copiable anchor links for definition commands. > > User-defined definition commands could be limited to macros that use > @deflinex (or similar line commands that we will introduce). There > will be no definitions on the @defblock line itself. Thus we can avoid > or delay the question of allowing users to define their own block commands > with a corresponding "@end" line. > > I'll post more once this work is more complete.
I've commited changes to texinfo.tex to introduce @defblock, @deflinex and @deftypelinex. @deflinex is like @deffnx and @deftypelinex is like @deftypefnx. The names of these could change, for example to remove the 'x' at the end of the commands, if we decide this would be better. I believe this covers usage for @defvr, @deftypevr, @deftp. I have gone off the idea of using @macro for this. I am thinking a more limited command would be better, as mentioned in an earlier message @newdef defbuiltin = typed, tt, Built-in Function, fn or similar. This would cover the basics and be easy to use and understand. The example here would translate a @defbuiltin line to a @deftypelinex line within a @defblock. It does not cover any of the "object-oriented" commands like @defop, which are hardly used AFAICT. Generalising these would require feedback from users. (The groff manual says which package macros come from in the index and packages and object classes are both namespaces so could be treated together.) There's also the "tagging" proposal: https://lists.gnu.org/archive/html/help-texinfo/2021-12/msg00009.html https://lists.gnu.org/archive/html/bug-texinfo/2022-08/msg00106.html This can be delayed until after Texinfo 7.1 and would also need more discussion with potential users.
