[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customizing @var?
From: |
Patrice Dumas |
Subject: |
Re: Customizing @var? |
Date: |
Sat, 24 Sep 2022 11:07:08 +0200 |
On Tue, Sep 20, 2022 at 04:31:08PM -0700, Raymond Toy wrote:
> Is it possible to customize what @var does (for info files) without
> redefining @var?
> Maxima redefines @var to
>
> @macro var {expr}
> <\expr\>
> @end macro
This is not recommended, and could even be forbidden, in my opinion, to
redefine existing Texinfo @-commands.
> This breaks things like
>
> @table @var
>
> So I'm curious if there's some way to customize @var without defining it.
There is @definfoenclose, but it is deprecated. I just tested that it
leads to a warning, but otherwise formats the output as you expected,
I think.
As a side note, this is documented:
The '@table' command works with other commands besides those
explicitly mentioned here. However, you can only use predefined Texinfo
commands that take an argument in braces. You cannot reliably use a new
command defined with '@macro', although an '@alias' (for a suitable
predefined command) is acceptable.
It does not seems to me to be a good thing to accept @-commands defined
by @macro as @table argument, for two reasons
* it would not be possible to know if the command should be expanded
immediatly like macro defined command usually are, or be expanded later
* the use of commands in argument to @table to format table @item is
done during conversion, and not during parsing, at wihch time
@-commands defined by @macro have all been expanded.
--
Pat
Re: Customizing @var?, Patrice Dumas, 2022/09/24