On Mon, Dec 29, 2025 at 12:33 PM Gavin Smith <[email protected]>
wrote:
> On Mon, Dec 29, 2025 at 08:19:37AM -0800, Raymond Toy wrote:
> > In the Maxima manual, there's this macro:
> >
> > |@macro mxref {nodename, text} @code{@ref{\nodename\, \text\}} @end
> macro |
> >
> > A typical usage is |@mxref{expintrep-gamma-incomplete,
> gamma_incomplete}|.
> > This works fine in html and info which shows |gamma_incomplete|.
> However, in
> > the pdf output, it shows |expintrep-gamma-incomplete|.
> >
> > This is with a self-built git version of texinfo that reports the
> version as
> > 7.2.90 for makeinfo.
> >
> > ​
>
> (You can see how the plain text version of your email misses line breaks
> from code samples).
>
Sorry about that. I'll try to do a better with email.
>
> I expect you need to use an extra comma in the definition:
>
> @ref{\nodename\,, \text\}
>
> The five arguments for @ref are shown here:
>
> @ref{NODE-NAME, ONLINE-LABEL, PRINTED-LABEL,
> MANUAL-NAME, PRINTED-MANUAL-TITLE}.
>
> (from the Texinfo manual).
>
> You can see that the second argument is the "online" label which is not
> used for the PDF output.
>
I confess, I only looked at the manual for the 2-arg form of xref and
didn't make the distinction between online labels and printed labels
mentioned in the 3-arg form. Maybe the manual should mention the 3-arg
form for printed labels.
However, I tried again with your suggested 3-arg form with the 2nd arg
missing. This still doesn't work for me.
Oh. It's the macro. When I replace @mxref (3-arg version) with @ref,
everything works out. The printed manual has the right label and it's
clickable. In the info version, @ref also works, but @mxref has the
correct label, but it's not a link that you can click.
>
> > ...often, you will leave out the second argument when you use
> > the long version of ‘@xref’. In this case, the third argument, the
> > topic description, will be used as the cross-reference name in online
> > formats. For example,
> >
> > @xref{Electrical Effects, , Thunder and Lightning,
> > weather, An Introduction to Meteorology}.
> >
> > produces
> >
> > *Note Thunder and Lightning: (weather)Electrical Effects.
> >
> > in Info and
> >
> > See section "Thunder and Lightning" in ‘An Introduction to
> > Meteorology’.
> >
> > in a printed manual.
>
>
>
>
--
Ray