[XeTeX] XeLaTeX and Arabic text in Footnotes

Nathan Camillo Sidoli sidoli at aoni.waseda.jp
Wed May 12 05:02:11 CEST 2010


Hello All,

I am having a bit of a problem with Arabic text in footnotes. For some 
reason certain characters such as ^ _ etc, are being read as operators 
that call for a math environment, even though they are written within a 
\textarab environment.

This problem can be "solved" by using the package bigfoot, however, for 
my current project, I need to use ednotes, which is incompatible with 
bigfoot.

I have created a minimal file, but it is a little involved, because I 
want to show a few things.

First of all, within the critical notes of enotes, there is no problem. 
When I try to include the same text, however, in a footnote in the 
standard, English text (say the introduction, translation, etc), the 
Arabic text will not compile.

If anyone has any suggestions, I would be grateful.

Below is a minimal file,

Best,

Nathan


\documentclass[12pt,a4paper,twoside]{memoir}

\usepackage{fontspec}
% We set the Latin font.
\setromanfont[Mapping=tex-text]{Junicode}
\usepackage[novoc,fdf2noalif]{arabxetex}
\newfontinstance\arabicfont[Script=Arabic,Scale=1.2,WordSpace=2]{Scheherazade}

%\usepackage{manyfoot}
\usepackage[Bpara,modulo,right,addpageno,perpage,para*]{ednotes}% relies 
on manyfoot and lineno % Bpara,modulo,right,perpage,para*

% For some reason, \textroman was not working out-of-the-box...
\newcommand{\textroman}[1]{\LR{\rmfamily #1}}

\begin{document}

There is some edited Arabic text which contains a note showing that 
there is no problem here:

\begin{arab}
\resetlinenumber\pagewiselinenumbers

w-l-ykn
\Anote{\textarab{ay.d"aN}}{\textarab{al-^skl}  \textroman{\textbf{A}}.}}
 \aemph{b\,j-} a.s.gr mn \aemph{b\,A}. aqwl inn \aemph{a\,.h} a`.zm mn 
\aemph{.t\,k-}.
 \end{arab}
 
 \newpage
 Later on, there is some English text with footnotes, some of which have 
some Arabic text in them:
 
 Ladidada...We will have a footnote that contains the word 
\textarab{al-^skl} it is the \^ \ in the asci input of \textarab{^s} 
that causes the problem. It is being read as an operator in an uncalled 
math environment.\footnote{
 al-^skl.}
 }
 
 See the error message:
 
 \begin{verbatim}
! Missing $ inserted.
<inserted text>
                $
l.31  al-^skl.}
              
?
! Extra }, or forgotten $.
\@footnotetext ...1\else \rmfamily #1\fi \strut }}
                                                  
\bidi at footnotetext@after \...
l.31  al-^skl.}
              
?
! Missing $ inserted.
<inserted text>
                $
l.31  al-^skl.}
              
?
! Missing } inserted.
<inserted text>
                }
l.31  al-^skl.}
              
?
! Too many }'s.
l.32  }
 \end{verbatim}

 
 \end{document}


More information about the XeTeX mailing list