[XeTeX] bidi package abilities and lshort in Persian

Vafa Khalighi vafa at users.berlios.de
Sun Jul 19 06:33:08 CEST 2009

Thanks for this.

Actually There was a version of the document where Mehdi used hyperref and
things looked ok in it. I hope to find that document and send it to you. But
I am pretty sure when you compiled this document, you observed lots of
warning in your log file. Now let's do a small and simple test with the

\documentclass{article}
\usepackage{hyperref}
\usepackage{bidi}
\begin{document}
\setRTL
\end{document}

after running xelatex you see some warnings in the terminals like:

** WARNING ** Tried to end an annotation without starting one!
** WARNING ** Interpreting special command eann (pdf:) failed.
** WARNING ** >> at page="1" position="(402.372, 657.235)" (in PDF)
** WARNING ** >> xxx "pdf:eann"
** WARNING ** Unbalanced bann and eann found.
)

and if you look at the PDF file, you see that you have got the wrong result
and "this is" is observed as the href instead "google". But this is not a
big deal because perhaps you could fix it as follow:

\documentclass{article}
\usepackage{hyperref}
\usepackage{bidi}
\begin{document}
\setRTL
can use its search engine.
\end{document}

Now when you run xelatex on it, you see no warning in the terminal and the

\documentclass{article}
\usepackage{hyperref}
\usepackage{bidi}
\begin{document}
\setRTL
This is google and it is a search engine and it is a search
engine\endR}\endL{} and you can use its search engine.
\end{document}

when you compile it with xelatex, you see no warning in the terminal but you
see that in the PDF output, the whole texts is coloured. (This is what I was
getting at).

So yes, we could fix hyperref in bidi partially but unfortunately it is not
possible to fix it fully. and in your attached document, you used
why your TOC almost look ok. But if you were to not use this option, you
would see the unpleasant result. Agaian, yes we can use hyperref with bidi
partially but not fully and this partially does not satisfy everyone. So I
think we at least need to have some primitives in XeTeX like (\beginspecial
and \endspecial) that allows us to fix these issues. The isuue of color is
of the same kind. So if \beginspecial and \endspecial is implemented in
XeTeX, then we can get  hyperref and color to work fully with bidi in XeTeX.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20090719/358cdba8/attachment.html>