[XeTeX] poemtitle in Memoir and Polyglossia

Gildas Hamel gweltaz at ucsc.edu
Tue May 18 03:51:49 CEST 2010


I just noticed the following problem in my use of memoir and polyglossia. What should I do differently? If I have the following document, I get the poem title right, both in Hebrew and English:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[article]{memoir}                                                                                                                                                                                                                      
\usepackage{polyglossia}                                         
\setotherlanguage{english}    
\setmainlanguage{hebrew}                                                                          
\newfontfamily\hebrewfont[Script=Hebrew]{Arial}
\begin{document}
\poemtitle{אמן}                                     
\begin{verse}
ראיתי ברחוב, בערב קיץ, \\
ראיתי אשה שכתבה מלים \\
\vspace{2ex}
אלים בשמים משתנים, אלים מתחלפים, \\
התפלות נשארות לעד. \\
\end{verse}
\begin{english}
\poemtitle{Amen}
\begin{verse}
One summer evening, I saw in the street,\\
I saw a woman who wrote words\\
...\\
Heavenly gods change, gods alternate,\\
The prayers endure forever.
\end{verse}
\end{english}
\end{document}  


But if I reverse English and Hebrew, as follows, I get the poem title to show correctly only in English, not in Hebrew:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[article]{memoir}                                                                                                                                                                                                                  
\usepackage{polyglossia}                                         
\setmainlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{Arial}
\begin{document}
\begin{hebrew}
\poemtitle{אמן}                                     
\begin{verse}
ראיתי ברחוב, בערב קיץ, \\
ראיתי אשה שכתבה מלים \\
\vspace{2ex}
אלים בשמים משתנים, אלים מתחלפים, \\
התפלות נשארות לעד. \\
\end{verse}
\end{hebrew}
\poemtitle{Amen}
\begin{verse}
One summer evening, I saw in the street,\\
I saw a woman who wrote words\\
...\\
Heavenly gods change, gods alternate,\\
The prayers endure forever.
\end{verse}
\end{document}

I attached pdf renditions in both cases. Thanks for any pointer.
-- gildas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amihai01.pdf
Type: application/pdf
Size: 26991 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20100517/7b133a78/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amihai02.pdf
Type: application/pdf
Size: 18701 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20100517/7b133a78/attachment-0003.pdf>


More information about the XeTeX mailing list