[XeTeX] Polyglossia, bidi and hyperref

Gildas Hamel gweltaz at ucsc.edu
Sun Sep 26 07:53:16 CEST 2010


Dear xe(la)texers,
I can't seem to find a solution to a problem I encounter when I use polyglossia (for Hebrew) and hyperref. I get an error because bidi has been loaded before hyperref.  Naïvely, I tried to change the order of my packages (polyglossia after hyperref, against the rules I suppose), to no avail. I also tried to find information with texdoc or on the web, also to no avail. I'm posting my example and the console reading.  Any help appreciated.
-- gildas

%!TEX TS-program = xelatex
\documentclass[11pt,article]{memoir}
%\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\setotherlanguage{french}
\setmainfont[Ligatures=TeX,
		Numbers=OldStyle]{Gentium}
\newfontfamily\hebrewfont[Script=Hebrew,Scale=MatchLowercase]{Arial}
\usepackage{hyperref}
%\hypersetup{
%    colorlinks=true,
%    linkcolor=red,
%   citecolor=blue,
%    filecolor=magenta,
%    urlcolor=cyan
%}

\begin{document}
	\title{Qeiyafa}
	\author{G. Hamel}
	\maketitle

\section*{Notes on Qeiyafa}
Notes on Qeiyafa from the article by Puech (2010). 
Here is	the reconstituted text according to Puech, in right to left writing:

\setRL
\begin{verse}
\texthebrew{
1. אל תעשק : ועבד א'ל' : | : 'ב'זה\\
2. שפט (?) ובך אלמ'נ' (?) שלט\\
3. בגר .  ובעלל . קצמ(?) יחד :\\
4.  א'ד'ם ושרם יסד מלך :\\
5. חרם <ששם> עבדם : מדרת .\\
}
\end{verse}

\setLR
His translation:
\begin{french}
	\begin{verse}
	...\emph{Toi, (le/ton) compatriote/nécessiteux( ? )}]\\
	1. n'opprime pas, et sers Di\d{e}\d{u}. : | : L\emph{e/a} spoliait\\
	2. le juge et la veuve pleurait; il avait pouvoir\\
	3. sur l'étranger résidant et sur l'enfant, il \emph{les supprimait} ensemble.\\
	4. Les hommes et \emph{les} chefs/officiers ont établi un roi.\\
	5. Il a marqué <soixante> serviteurs parmi les communautés/habitations/générations.
\end{verse}
\end{french}
\end{document}


Console:

This is XeTeX, Version 3.1415926-2.2-0.9997.4 (TeX Live 2010)
 restricted \write18 enabled.
entering extended mode
(./test_qeiyafa.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, farsi, finnish, french,
 galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic
, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panja
bi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji, lao, lati
n, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portu
guese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedis
h, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2010/texmf-dist/tex/latex/memoir/memoir.cls
Document Class: memoir 2010/09/19 v3.6g configurable book, report, article docu
ment class
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/memoir/mem11.clo)
(/usr/local/texlive/2010/texmf-dist/tex/latex/memoir/mempatch.sty))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/makecmds/makecmds.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/expl3.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3names.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3basics.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3expan.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3tl.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3intexpr.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3quark.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3seq.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3toks.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3int.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3prg.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3clist.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3token.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3prop.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3msg.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3io.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3skip.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3box.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3keyval.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3keys.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3precom.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3xref.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3file.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3fp.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3luatex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/tools/calc.sty))
(/usr/local/texlive/2010/texmf-dist/tex/latex/xpackages/xbase/xparse.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/kastrup/binhex.tex)
(/usr/local/texlive/2010/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/fixltx2e.sty))
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2010/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/xunicode/xunicode.sty)
fontspec.cfg loaded.
(/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf)
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/gloss-hebrew.ldf
(/usr/local/texlive/2010/texmf-dist/tex/latex/bidi/bidi.sty
bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)
 Description: A convenient interface for typesetting bidirectional
 texts in plain TeX and LaTeX. The package includes adaptations for use
 with many other commonly-used packages.
 Copyright © 2009-2010 Vafa Khalighi
 v1.1.4a, <commit 77>, 2010/07/25
 License: LaTeX Project Public License, version 1.3c or higher (your choice)
 Home: http://bitbucket.org/vafa/bidi
 Location on CTAN: /macros/latex/contrib/bidi
(/usr/local/texlive/2010/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/bidi/loadingorder-bidi.def)
(/usr/local/texlive/2010/texmf-dist/tex/latex/bidi/xetex-bidi.def
(/usr/local/texlive/2010/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def)
(/usr/local/texlive/2010/texmf-dist/tex/latex/bidi/memoir-xetex-bidi.def)
(/usr/local/texlive/2010/texmf-dist/tex/latex/bidi/array-xetex-bidi.def)))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/cal-util.def))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/babel-hebrewalph.de
f))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf)
 fontspec Warning: AAT feature 'Numbers=OldStyle' (21,0) not available
(fontspec)  in font 'Gentium'.

 fontspec Warning: AAT feature 'Numbers=OldStyle' (21,0) not available
(fontspec)  in font 'Gentium'.

 fontspec Warning: AAT feature 'Numbers=OldStyle' (21,0) not available
(fontspec)  in font 'Gentium/I'.

 fontspec Warning: AAT feature 'Numbers=OldStyle' (21,0) not available
(fontspec)  in font 'Gentium/BI'.

(/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/etexcmds.sty))
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/pdfescape.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty))
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/hycolor.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/xcolor-patch.sty))
(/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/letltxmacro.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/intcalc.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/local/texlive/2010/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/bitset.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/bigintcalc.sty))
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/atbegshi.sty))
(/usr/local/texlive/2010/texmf-dist/tex/latex/memoir/memhfixc.sty)

Package hyperref Message: Driver (autodetected): hxetex.

(/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(./test_qeiyafa.aux)

./test_qeiyafa.tex:22: Package bidi Error: Oops! you have loaded package hyperr
ef after bidi package. Please load package hyperref before bidi package, and th
en try to run xelatex on your document again.

See the bidi package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.22 \begin{document}
                     
? 
(/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/refcount.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
Redoing nameref's sectioning
Redoing nameref's label
(./test_qeiyafa.out) (./test_qeiyafa.out)
Overfull \hbox (64.65965pt too wide) in paragraph at lines 51--52
[]\EU1/Gentium(0)/m/n/10.95 5. Il a marqué <soixante> serviteurs parmi les com
munautés/habitations/générations. 
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
[1] (./test_qeiyafa.aux) )
Output written on test_qeiyafa.pdf (1 page).
SyncTeX written on test_qeiyafa.synctex.gz
Transcript written on test_qeiyafa.log.



More information about the XeTeX mailing list