[XeTeX] RTL hyperlink problems

Ulrike Fischer news3 at nililand.de
Fri Aug 20 12:36:36 CEST 2010


Am Wed, 18 Aug 2010 23:06:02 +0300 schrieb Ron Aaron:

> Using xetex I found that the 'hyperref' package did not product
> attractive links in PDF, so I had to write my own PDF link code:

I don't see why you need your own code. The following links looks
identical for me:

\documentclass{article}
\usepackage[urlcolor=blue,colorlinks]{hyperref}


\def\hr#1#2{%
\special{pdf:bann <</Subtype/Link/BS
	<</Type/Border/W 0.0 /S/S>>
	/A << /S/URI/URI (#1)>> >>}
\special{pdf: bc [ 0 0 1 ]}{\bgroup #2 \egroup}\special{pdf: ec}
\special{pdf:eann}}


\begin{document}


\href{mailto:ron at ronware.org}{my email
address}

\hr{mailto:ron at ronware.org}{my email
address}
\end{document}


> This works fine; however, if a hyperlink is in an RTL paragraph,
> and the link is broken at the end of the line, then some very
> ugly effects show up: the entire line on which the link started,
> as well as the entire line on which it ends, show up as a
> hyperlink. 

bidi contains some code to adjust hyperref for RTL. But is says
explicitly in the manual that it only work for links in one line. 

\documentclass{article}
\usepackage{hyperref}
\usepackage{bidi}


\begin{document}
\begin{RTL} This is an example bit of text.  Here is
\href{mailto:ron at ronware.org}{my email
address}
 if you care to send me a note or
\end{RTL}
\end{document}





-- 
Ulrike Fischer 



More information about the XeTeX mailing list