On Tue, Nov 22, 2022 at 09:56:42PM +0000, Gavin Smith wrote:
> Interesting to see the Scribe document - I don't think I've seen one
> before.
>
> I think that @deffn and @defvrx etc. could be mixed, although
> the @def* commands have long been an area where changes could be
> made to be more general. See the TODO file in the git repository.
> If we had some way of explicitly specifying the index that a @def*
> command would use, then this would solve this problem.
I've commited a change for an experimental feature to allow this. This
is in texinfo.tex version 2022-12-15.20 (in git).
I tried this out with my translated Scribe document for one entry. The entry looks like
@defun {check-region-query-size} {region}
@defunx {Hemlock Variable} {Region Query Size} @val{30}@useindex{vr}
description
@end defun
Other than having to use defunx for a variable, this works. Region Query Size shows up in the vr index as expected. And check-region-query-size is still in the fn index, as expected.
It's a bit annoying that I have to use defunx for a variable, but the output looks nice, except that Region Query Size is marked as a Function as shown below.
At least for my use case, @useindex helps, but other parts don't work out right because the pdf output still says Function instead of Variable.
Allowing defvarx after defun would work the best for my use case.
I wouldn't worry about this though. I have a reasonable workaround that is good enough for me. Thanks for looking into it though! I appreciate all of the work put into texinfo.