[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: user defined macro as @table argument
From: |
Patrice Dumas |
Subject: |
Re: user defined macro as @table argument |
Date: |
Sat, 8 Sep 2012 12:39:12 +0200 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Fri, Sep 07, 2012 at 10:51:46PM +0000, Karl Berry wrote:
> Hi Patrice,
>
> @macro keyword{kw}
> ...
> @table @keyword
>
> Vincent should use m4 :).
In that case, user defined @-commands work also nicely, too bad ;-).
> The only thing I would say that might be helpful is if texi2any could
> notice if the @table argument is in fact defined as a macro and give an
> error (not just a warning) at that point. If it's straightforward to
> do, would make things a lot clearer for the user than doing the
> expansion.
I am a bit reluctant here, as there may be valid cases of using user
defined @-commands in that context. For example, to substitute the
argument of the @table in a context complex enough that @alias
does not work. Even a warning would seem dubious to me. Vincent advice
was to give a message to the user too, though.
I can try a warning, but I would have preferred if there was a notion of
'pedantic' warnings since it seems like that to me.
> But I guess maybe the macro expansion has already happened
> before the code for @table is even being executed, so it wouldn't be so
> easy?
Even though I don't know how hard it would be, I think that it could be
possible, as the expansion of macros and the parsing happen in one pass,
so the context of the Parser is available to macro expansion code.
> I'll see about giving the error in TeX and saying something about this
> in the documentation, in any case.
Ok.
--
Pat