[XeTeX] cross references and hyperref

Pablo Rodríguez oinos at web.de
Mon Aug 20 18:33:32 CEST 2007


Tobias Schlemmer wrote:
> Hi,
> 
> Peter Dyballa schrieb:
>> Am 17.08.2007 um 21:06 schrieb Pablo Rodríguez:
>> Why aren't you or your friend using \hypertarget and \hyperlink? For  
>> me these *ref's used belong to plain LaTeX ...
>>
>> 	check this reference: \hyperlink{refer}{\pageref{refer}} (and this  
>> one: \hyperlink{refer}{\ref{refer}}).
>> 	\cleardoublepage
>> 	\hypertarget{refer}{\label{refer}This is the reference.}
> 
> I didn't test it, but as far as I know hyperref redefines \label, \ref
> and \pageref to make hyperlinks too. So your suggestion will double link
> generation. This can lead to different problems.

Thanks for the replies, Peter and Tobias.

\label, \ref and \pageref work fine with hyperref, but, as Heiko
Oberdiek explained to me, \label itself doesn't set any anchor, so the
last anchor will be used (in this case, the one generated by \section).

The way to avoid this is to write \phantomsection before the \label that
will contain the \pageref.

I hope it helps,


Pablo



More information about the XeTeX mailing list