On Thu, Jan 30, 2025 at 08:48:22AM +0000, Werner LEMBERG wrote: > Please make *all* heading commands – including `@XXXheading` – control > the default print label of `@xref` in the PDF if > `@xrefautomaticsectiontitle` is active. This would make my suggestion > of an option unnecessary, but I'm not sure whether this can be easily > implemented. > > >> I see 'This is a meaningful anchor label' in both the HTML and Info > >> output, but I get 'A' in the produced PDF. > > > > You get "A, page NNN", where NNN is the page of the anchor, right? So > > why is "A" a problem? The chapter name actually appears in the > > document, whereas the anchor label does not. > > IMHO, the problem is that it is not immediately clear where to look at > that page.
Your initial proposal to make '@set xrefautomaticsectiontitle on' use the anchor text for the reference doesn't make sense, as the purpose of this option is to use text that appears in the resulting document, as Eli says. The problem with changing the output for a cross-reference to anchors is that some manuals may be depending on the existing output, with the anchor names used in HTML output. So I think we should change the output in DVI/PDF instead to match the current HTML output, and use the anchor names in the output text. This would mean that the xrefautomaticsectiontitle setting would not have an effect on cross-references to anchors. > I suggest to add an option that controls whether `@anchor` honors > `@xrefautomaticsectiontitle on`. Actually, it already honoured it for PDF output, but in the opposite way to which you wanted: if xrefautomaticsectiontitle was off, then the anchor name would be used in the output cross-reference. If this causes a problem, we could consider introducing another setting like @xrefautomaticsectiontitle that affects cross-references to anchors only. For such an setting, it might be ok to use the contents of @*heading commands for the reference text as you suggest, although there isn't an immediate need for this if we make the change above. > In the PDF, if I hover with the mouse above an `@xref` to that anchor, > I see 'Articulations and ornamentations', but I want to see > 'Controlling the vertical ordering of scripts', because this is the > heading next to the `@anchor`. That depends on the PDF viewing program being used. This seems like a minor point. It may be related to the "PDF outline" (table of contents), but this should not contain entries for @*heading commands. > [BTW, we would really, really benefit if Texinfo introduced > equivalents to LaTeX's `\part`! Right now, we define > `@subsubsubheading` by simply calling `@subsubheading`.] Can you explain how this differs from @part? Eli wrote: > The unnumbered headings don't appear in the TOC and don't have > numbers, so, unless the body is very short the above will make the > referenced text harder to find. In printed output there is a page number on the cross-reference which the reader would use.