Yes, those refs in @section lines are admittedly a bit of a hack, though it would be nice from the pure orthogonality point of view if they didn't have to be ruled out. But it sounds like supporting them robustly might be quite a hairy mess to implement, of questionable value, and perhaps not worthwhile for such a marginal case even given that the restriction would otherwise have to be documented (if only by pointing to a more general principle about not having links where they don't belong).
In my hack, the links reappear in the section titles that are in the document body, which on the surface seems a bit absurd (go to self??) though in a typical PDF reader's continuous scrolling mode, they have the pleasant side-effect of being a one-click way to bring the section to the top of the window. I am already working with a patched texinfo.tex, so I would be happy to be a guinea pig (and likely early adopter) for your proposed table-of-contents feature if you want one. Thanks, dB On Mon, Nov 21, 2022 at 1:56 PM Gavin Smith <[email protected]> wrote: > On Mon, Nov 21, 2022 at 01:42:20PM -0800, David Bacon wrote: > > But I like such constructs! I have one in every one of the 249 @section > > commands in the document I originally submitted with the bug report. > They > > are there so that the Table of Contents in the PDF has a nice link from > the > > name of the operator or function to the right place in the document (not > > just to the page number, which is a tiny adventitious thing off to the > > right from the point of view of someone who is reading the PDF document > > online, and then only takes you to the top of the right page). They're > not > > really "self"-references, just references to the corresponding nodes, and > > until quite recently, I'm sure I was able to use them. Why would you > want > > to forbid them? Is there a fundamental semantic problem with them, or > just > > an implementation inconvenience? > > > > Thanks again, > > > > dB > > Cross-reference commands don't belong in section titles. What you are > saying about the Table of Contents seems like a good feature to have, > but I would much rather fix this by changing texinfo.tex to link > the section titles, rather than trying to make sense of @ref nested > inside @section. The code in texinfo.tex is somewhat tortuous but > adding this feature still seems easier than the alternative. I'll > work on this when I find the time. >
