| > From: Akim Demaille <[EMAIL PROTECTED]>
| > Date: 11 Nov 2001 13:41:29 +0100
| > 
| > /tmp % cat sample.texi
| > @macro ovar{varname}
| > @r{[}@var{\varname\}@r{]}
| > @end macro
| > 
| > @table @asis
| > @item @ovar{toto}
| > Description of @ovar{toto}.
| > @end table
| 
| Is this a real-life example? 

Stripped down version.

| Because if it is, you will be much
| better of with this:
| 
|   @table @asis
|   @item [@var{toto}]

It is much more pleasant to use a macro which a more symbolique
content.  In the Autoconf documentation we use @ovar for optional
vars, and @dvar for optional vars with a default value.  It keeps it
more uniform, and the few saved characters are often waht keeps us
with the single line of input mandated by @defmac and friends.

| or with this:
| 
|   @macro vitem{line}
|   @item @r{[}@var{\line\}@r{]}
|   @end macro
| 
|   @table @asis
|   @vitem toto

This is precisely the original script I had (except that I used braces
to invoke @vitem, but I doubt this matters unfavorably to me), which
doesn't work with TeX (\def\texinfoversion{2001-07-25.07}), hence I
tried to use makeinfo -E with various variations, as in the mail I
sent.


| > /tmp % makeinfo -E - --commands sample.texi
| > 
| > @table @asis
| > @item @ovar{toto}
| > Description of @r{[}@var{toto}@r{]}.
| > @end table
| > 
| > @bye
| > 
| > 
| > (I tried with --commands to see if it had an influence, but it does
| > not).
| 
| The --commands-in-node-names switch only makes a difference if @
| commands are used in node names (like the full name of the switch
| suggests ;-).

:)

I know, but I wanted to show I had tried hard to make it work, to save
you any additional message about a feature of --commands I was not
aware of, or that I would have missed in the doc :)

| > I suspect this is not meant :(
| 
| Actually, I'm afraid it is :-(  Macros in @item cannot be easily
| supported because of the complications of @ftable and @vtable (it's a
| long story).  Since the work-arounds are usually easy (see above),
| I'm not sure it's worth the hassle to support macros in @item.
| 
| We probably should document this, though...

:(  Too bad.  Thanks for explaining.

_______________________________________________
Bug-texinfo mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-texinfo

Reply via email to