[About changing indices for @defXXX commands]

> As for adding this feature, what syntax would you suggest for that?
> There's a problem with @defXXX in that their syntax is against the
> normal Texinfo rules, so adding something is not easy.  But given
> the right syntax, the change in the internals should be simple.

What about

  @defcodeindex ma
  @associateindex defmac ma

at the beginning of the file?  This makes @defmac emitting index
entries for the `ma' index.

> >   . As you may know, some gtroff escape commands have a strange
> >     syntax to delimit parameters, e.g.
> > 
> >       \n(xx
> >       \w'string'
> > 
> >     It would be a great help if I could directly use this syntax,
> >     but currently I have to use something like
> > 
> >      \n xx
> >      \w string
> > 
> >     which is confusing.
> 
> >     I would like to control the formatting in a @deffn command (or
> >     whatever it is called).  How can I do this?
> 
> Please describe in more detail what would you like to control,
> exactly.

Sorry for being imprecise.  If I e.g. say

  @deffn Escape \w string

I would like to see the following line in the info file:

  - Escape: \w'STRING'

Maybe a new request @deffndelim could be added:

  @deffn <category> <name> <delim1> <arg1> <delim2> <arg2> ...

example:

  @deffn Escape \w ' string '

BTW, I couldn't find a remark in texinfo info file that some character
s like `(' and `[' are handled specially in the @defXXX commands --
you have to deduce that from the examples.  I'm missing the info that
everything after those characters is printed in tt, and that you have
explicitly use e.g. @var{} to override it.

> Doesn't the following work (I didn't try)?
> 
>       @deffn @t{\#} ...

Yes, but doing this always is tedious.

What about a new command

  @defnamestyle @t

(with the default set to @b) to handle that in a general way?

> >   . Is it possible to have footnotes at a smaller size than the
> >     main text?
> 
> You mean, in the printed copy?  It does work that way for me.

Oops! Yes, in 4.0 it is...

> >   . Apparently it is not possible to have, say,
> > 
> >       @ref{Invoking @code{groff}}
> 
> Did you try to invoke makeinfo with the --commands-in-node-names
> switch?  If you did and it didn't work, please post the details
> (small test file, error messages, etc.).

I haven't used it, and I agree that it is not a good solution since it
affects sorting order.

> >     Question: Is it possible to extend the @node command with an
> >     additional optional parameter to specify a representation of
> >     the crossref value?  Some like this (in ad-hoc syntax):
> > 
> >       @node Invoking groff [Invoking @code{groff}]
> 
> You should be able to achieve this with a @anchor, if you put it
> directly after the @node line.  @anchor doesn't suffer from the
> problem with @-commands (I think; again, I didn't check this right
> now).

Hmm, tedious...

> >     @ref could be then used as usual: @ref{Invoking groff}, but
> >     the printed version would typeset the word `groff' in the
> >     @code font.
> 
> Part of the reason for discouraging use of @-commands in node names
> (and disallowing them altogether in rare cases) is that they make a
> mess in sorting out cross-references.  So your suggestion doesn't
> solve the real problem behind this.

Please explain in more detail.  I can't see a problem if you provide
two arguments; the first is the node name used for sorting also, and
the second is the representation for printing.  Of course, this must
not be abused, but with texinfo commands this is rather difficult...

> but perhaps the syntax should be simply something like this:
> 
>     @findex{@strong, foo}
> 
> This would allow to have the pages italicized etc., not only
> emphasized.

This sounds excellent.  I don't care about the exact syntax...

> >     Consequently, the @defXXX macros
> >     should use
> 
> By default?  I'm not sure: this would revoke the author's control on
> where does the main reference point.

Well, then we need another set of @defXXX macros (maybe @DefXXX) which
either don't emit an index entry at all -- this might be a good idea
anyway and would partially solve my indexing problem at the cost of
some additional work -- or which would use your proposed
@findex{@strong, foo} command.


    Werner

Reply via email to