From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 16 Sep 2018 17:11:43 -0700 From: "Paul E. McKenney" Subject: Re: [PATCH] Enable hyperlink to line label in code snippet Message-ID: <20180917001143.GG652@linux.ibm.com> Reply-To: paulmck@linux.ibm.com References: <2b7297a8-62d2-bcdb-0b41-e3bb1b270a6e@gmail.com> <20180916220212.GD652@linux.ibm.com> <12b16cc2-02cb-b37d-9de1-f90580af6d91@gmail.com> <3283f8e0-da34-6bac-0467-aa1e40955ee2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3283f8e0-da34-6bac-0467-aa1e40955ee2@gmail.com> To: Akira Yokosawa Cc: "Paul E. McKenney" , perfbook@vger.kernel.org List-ID: On Mon, Sep 17, 2018 at 08:01:13AM +0900, Akira Yokosawa wrote: > >From d189669d1f093262b522ab012e04a55da871421a Mon Sep 17 00:00:00 2001 > From: Akira Yokosawa > Date: Mon, 17 Sep 2018 07:57:40 +0900 > Subject: [PATCH] Enable hyperlink to line label in code snippet > > Now you can jump to the exact line by cliking a line number in > the PDF generated by \lnref{} and \ref{} with full label name. > > Signed-off-by: Akira Yokosawa Queued and pushed, thank you very much! Thanx, Paul > --- > perfbook.tex | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/perfbook.tex b/perfbook.tex > index fb35c5a..1dc72c2 100644 > --- a/perfbook.tex > +++ b/perfbook.tex > @@ -241,9 +241,9 @@ > \setcounter{secnumdepth}{3} > %\fvset{fontsize=\scriptsize,numbers=left,numbersep=5pt,xleftmargin=9pt,obeytabs=true,tabsize=2} > \newcommand{\lnlblbase}{} > -\newcommand{\lnlbl}[1]{\label{\lnlblbase:#1}} > +\newcommand{\lnlbl}[1]{\phantomsection\label{\lnlblbase:#1}} > \newcommand{\lnrefbase}{} > -\newcommand{\lnref}[1]{\ref*{\lnrefbase:#1}} > +\newcommand{\lnref}[1]{\ref{\lnrefbase:#1}} > > \newenvironment{linelabel}[1][]{\renewcommand{\lnlblbase}{#1}% > \ignorespaces}{\ignorespacesafterend} > -- > 2.7.4 > >