Re: [help-texinfo] Using @ref with two arguments
On Mon, Jul 22, 2019 at 08:25:09PM +0300, Eli Zaretskii wrote: > > Date: Mon, 22 Jul 2019 16:49:50 +0200 > > From: Patrice Dumas > > Cc: help-texinfo gnu > > > > in general I would suggest not using an @*ref command with a non > > empty second argument. > > I don't understand why. FWIW, I use it quite a lot, and find it very > useful. I may be wrong, but it seems to me that if the node name is to be replaced, in general the replacement text could be the same for the printed manual and the online manual, which would mean an empty second argument and a third argument. It obviously depends on the use and the person. -- Pat
Re: [help-texinfo] Using @ref with two arguments
> From: "Christopher Dimech" > Cc: "Patrice Dumas" , help-texinfo@gnu.org > Date: Mon, 22 Jul 2019 19:30:55 +0200 > > In what context do you use the second argument and what does it do > exactly? As Patrice said it does nothing for pdf. My understanding > is that one uses it for display purposes and not for directing to > a node or an anchor. It is useful in on-line formats, such as Info, when you want the hyper-link displayed to the user say something other than the node name. See the example in the "Two Arguments" node of the Texinfo manual: it shows the results in the Info and PDF formats.
Re: [help-texinfo] Using @ref with two arguments
In what context do you use the second argument and what does it do exactly? As Patrice said it does nothing for pdf. My understanding is that one uses it for display purposes and not for directing to a node or an anchor. > Sent: Monday, July 22, 2019 at 5:25 PM > From: "Eli Zaretskii" > To: "Patrice Dumas" > Cc: dim...@gmx.com, help-texinfo@gnu.org > Subject: Re: [help-texinfo] Using @ref with two arguments > > > Date: Mon, 22 Jul 2019 16:49:50 +0200 > > From: Patrice Dumas > > Cc: help-texinfo gnu > > > > in general I would suggest not using an @*ref command with a non > > empty second argument. > > I don't understand why. FWIW, I use it quite a lot, and find it very > useful. >
Re: [help-texinfo] Using @ref with two arguments
> Date: Mon, 22 Jul 2019 16:49:50 +0200 > From: Patrice Dumas > Cc: help-texinfo gnu > > in general I would suggest not using an @*ref command with a non > empty second argument. I don't understand why. FWIW, I use it quite a lot, and find it very useful.
Re: [help-texinfo] Using @ref with two arguments
On Sat, Jul 20, 2019 at 05:06:26AM +0200, Christopher Dimech wrote: > > > I am getting quite confused on why would need @ref with two arguments. > > Could not find an example when using two arguments is useful when using > texi2pdf. It is not surprising, the second argument is only used in other formats than TeX/pdf. And in general I would suggest not using an @*ref command with a non empty second argument. > Then > > @ref{ccby--oth--rights} > This prints Section 1.1.2 [ccby--oth--rights] > > @ref{ccby--scope, ccby--oth--rights} > This prints Section 1.1 [ccby--scope] > > Is there a way to print the following > Section 1.1.2 [d] > but the reference gets you at the anchor point rather > than to Section 1.1.2? I am not knowledgeable at all in pdf output, but my feeling would be that the cross references pointed to the anchor location in any case, irrespective of the number of argument of the @*ref command linking internally. > > I am using texi2pdf. > > > > The sectioning is as follows > > @node free-lic > @chapter Free License > > @node ccby--scope > @section Scope > > @node ccby--lic--grant > @subsection License Grant > > @node ccby--oth--rights > @subsection Other Rights > > @enumerate a > @item Text > @item Text > @item Text > > @anchor{ccby--pattm--rights} > @item Text > @end enumerate >
[help-texinfo] Using @ref with two arguments
I am getting quite confused on why would need @ref with two arguments. Could not find an example when using two arguments is useful when using texi2pdf. Then @ref{ccby--oth--rights} This prints Section 1.1.2 [ccby--oth--rights] @ref{ccby--scope, ccby--oth--rights} This prints Section 1.1 [ccby--scope] Is there a way to print the following Section 1.1.2 [d] but the reference gets you at the anchor point rather than to Section 1.1.2? I am using texi2pdf. The sectioning is as follows @node free-lic @chapter Free License @node ccby--scope @section Scope @node ccby--lic--grant @subsection License Grant @node ccby--oth--rights @subsection Other Rights @enumerate a @item Text @item Text @item Text @anchor{ccby--pattm--rights} @item Text @end enumerate