# [XeTeX] headers wrong with polyglossia and/or bidi

Gildas Hamel gweltaz at ucsc.edu
Tue Sep 22 09:29:35 CEST 2009

I'm encountering the following problem for a work in which I'm using Greek and Hebrew: the information in the page headers is printed in reverse order. My preamble follows. I also attach to my email an example with about 3 pages of text and the pdf with wrong headers in pages 2-3.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\TeXXeTstate=1
\documentclass[11pt]{book}
%\usepackage{bidi}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\usepackage{fontspec}
\setotherlanguage[variant=ancient]{greek}
\setotherlanguage{hebrew}
\setromanfont[Mapping=tex-text,
Numbers=OldStyle]
{Junicode}
\newfontfamily\hebrewfont[Script=Hebrew,Scale=0.9]{NewJerusalemU}
\newfontfamily\greekfont[Scale=0.96]{GFS Porson Regular}
\begin{document}
\chapter{Cana}
\section{John 2.1--11}
Text with Greek, English, and some Hebrew...
\end{document}

If I remove \setotherlanguage{hebrew}, the headers look fine, but the phrases in Hebrew are of course wrong (same effect with the bidi package).  The solution may be most obvious and simple but I cannot see it and would be grateful for any help.
--Gildas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cana_test.tex
Type: application/x-tex
Size: 11914 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20090922/e0e9bc67/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cana_test.pdf
Type: application/pdf
Size: 80799 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20090922/e0e9bc67/attachment-0001.pdf>