On Sun, Nov 01, 2020 at 05:18:24PM +0000, Gavin Smith wrote: > On Sat, Oct 31, 2020 at 03:16:26PM -0700, Per Bothner wrote: > > On 10/31/20 2:26 PM, Gavin Smith wrote: > > > Feel free not to consider it if you find implementing your desired > > > functionality enough, but there has also been discussion of outputting > > > an "anchor" at def items to provide a link that could be copied: > > > > > > https://lists.gnu.org/archive/html/bug-texinfo/2020-09/msg00022.html > > > > > > It would be good if this could be implemented with CSS too. > > > > I'm dubious CSS can add a link, but it can easily be done with JavaScript. > > Or you can have makeinfo create the link. > > You're right, there doesn't seem to any way to do it with CSS. The > ::after and ::before selectors only support adding plain text, no tags. > > I am not sure if an anchor link should be output by default, or even > if there should be an option for it. It could make the experience > worse when browsing the HTML in a text terminal, e.g. with lynx. They > could get in the way of selecting another link with the keyboard. Where > CSS is not available the anchor links would be visible all the time. > > Perhaps anchor links could be generated by Javascript for those who > want to use them. They could also postprocess the output of texi2any.
I've gone and implemented it anyway (in commit b9920b16), because I wanted to see what it would be like. It is for @def* commands only at the moment, not for @anchor or for section headings. Turn it off with the -c PERMALINKS=0 option (variable name subject to change).
