1

This MWE shows two problems I am encountering with footnotes when using polyglossia (mainlanguage Arabic, otherlanguage English).

Notice how the punctuation in the footnote reverses position next to the numbers; and notice also the font size is based on the Arabic font sizes, not the English font environment within which the footnotes occur. The first problem (punctuation) I think must be a bug. The second might be deliberate, but I don't know.

The output is like this. Imgur

\documentclass{article}
\usepackage{polyglossia}

\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, Scale = 3]{Times New Roman}
\newfontfamily\englishfont[Script=Latin]{Times New Roman}
\begin{document}
\begin{english}
This is  a   sentence with a footnote. \LTRfootnote{\textenglish{English 1; 2, 3:  
This has the correct font size and the correct punctuation}} 


This is  a  second sentence with a footnote. \LTRfootnote{English 1; 2, 3:  
The punctuation has been mixed and the font size is based on the scaled-up Arabic  3 size} 

\end{english}
\end{document}
1

This issue can be illustrated with the following minimal example:

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\arabicfont[Script=Arabic]{Times New Roman}
\newfontfamily\englishfont[Script=Latin]{Times New Roman}
\begin{document}
\englishfont
English 1; 2, 3:  
The punctuation has been mixed and the font size is based on the scaled-up Arabic  3 size

\bigskip
\arabicfont
English 1; 2, 3:  
The punctuation has been mixed and the font size is based on the scaled-up Arabic  3 size
\end{document}

When the font contains Script=Arabic, the XeTeX engine will perform some unicode bidi. At the engine level, it is not a bug but a feature.

The bidi package only provides the \LTRfootnote command and does not set any font so it is polyglossia bug that fails to set proper font for \LTRfootnote. I do not know how font set-up works in poly... but you can do this:

\documentclass{article}
\usepackage{polyglossia}

\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, Scale = 3]{Times New Roman}
\newfontfamily\englishfont[Script=Latin]{Times New Roman}

\makeatletter
\renewcommand\@makefntext[1]{%
    \parindent 1em%
    \noindent
    \hb@xt@1.8em{\hss\@makefnmark}\englishfont#1}
\makeatother
\begin{document}
\begin{english}
This is  a   sentence with a footnote. \LTRfootnote{\textenglish{English 1; 2, 3:  
This has the correct font size and the correct punctuation}} 


This is  a  second sentence with a footnote. \LTRfootnote{English 1; 2, 3:  
The punctuation has been mixed and the font size is based on the scaled-up Arabic  3 size} 

\end{english}
\end{document}

Be aware that this is not a perfect solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.