help-texinfo
[Top][All Lists]
Advanced

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

Re: [help-texinfo] pdf links can not understand underscore ("_")


From: Jinsong Zhao
Subject: Re: [help-texinfo] pdf links can not understand underscore ("_")
Date: Mon, 22 Apr 2019 21:19:15 +0800 (CST)


On 2019-04-22 16:24:address@hidden worte:
>On Mon, Apr 22, 2019 at 03:13:58PM +0800, Jinsong Zhao wrote:
>> Hi there,
>>
>> In a manual, I use the following code with XeTeX to create links for
>> cross-reference. If the #1 contains an underscore ("_"), the link
>> generated dose not work.
>
>Note that underscore ('_') is a special character in TeX (and thus
>in LaTeX. Perhaps this is at the root of your problem?
>
>Cheers
>-- tomás

Maybe, but I don't know.

Here is a MWE. On page two, if you click on "not_work",  you will find that you can not jump to page one. But "work" let you back.

Any solution? Thanks.

Best,
Jinsong


\input texinfo

@tex
\gdef\linkcolor{0 .5 0}
\gdef\urlcolor{0 0 .5}
\gdef\mmref#1#2{%
 {\leavevmode%
  \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
        << /S /GoTo /D (#1) >> >>}%
 }%
 \setcolor{\linkcolor}%
 #2%
 \endlink%
}
@end tex

@macro mref {nodename}
@address@hidden
@end macro

@anchor{work}
This is a node that can be reached.
@anchor{not_work}
This is a node that can not be reached.
@page
now we jump back, @mref{work} and @mref{not_work}.
@bye

reply via email to

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