bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New @link command for plain links


From: Gavin Smith
Subject: New @link command for plain links
Date: Tue, 4 Apr 2023 22:12:31 +0100

(switching to bug-texinfo)

> On Sun, Feb 05, 2023 at 01:44:22PM +0100, Andreas Falkenhahn wrote:
> > Hi,
> > 
> > I'm wondering if it's possible to create named links in Texinfo documents. 
> > I want to define the text and the target node for the link. E.g. I want to 
> > define a link which appears as "Click here" in the PDF and when it is 
> > clicked, it jumps to a specified node. Is that possible?
> > 
> > The only way to create links I've found is to use the @xref directive but 
> > this always generates additional pre-defined text so it's not possible to 
> > specify a custom label for the link, e.g.
> > 
> >     @xref{node,,Click here}
> > 
> > appears as
> > 
> >     See Section XX [Click here], page XX, for details.
> > 
> > in the PDF. So it's not possible to just have "Click here" or any other 
> > custom text as the link text. It'll always appear as the whole "See 
> > Section...." shebang in the PDF.
> > 
> > Is it possible to embed custom-named links without that pre-defined "See 
> > Section..." in the PDF in any way?

I've committed a change to texinfo.tex (2023-04-04.21) to implement
a new @link command.  Please try it and see if it is what you want.  It
is experimental and could change.  If this is a success we could implement
it in texi2any as well.

Example usage:

\input texinfo

@node One
@chapter ONE

tralala

@page

@node Two

@tex
\gdef\linkcolor{0.1 0.5 0.05}
@end tex

A(@link{One, text})B

A(@link{One})B

@xrefautomaticsectiontitle on

A(@link{One})B

A(@link{Introduction,,bash})B

A(@link{Introduction,Bash,bash})B


@bye




reply via email to

[Prev in Thread] Current Thread [Next in Thread]