Problem with using footnotes in xepersian

I have a quite long document that I compile with no errors.(I got rid of most of warnings but a few of them relating to defined fonts remained!) As I try to add footnotes to my documents, it gives some warnings/errors that I found no information about it online. I am sure the problem is caused by adding footnotes.

 \documentclass[a4paper,12pt]{report}
\usepackage{xepersian}
\usepackage{pifont}
\settextfont[Scale=1.2]{B Nazanin}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\titr[Scale=1]{B Titr}
\defpersianfont\traffic[Scale=1]{B Traffic}
\deflatinfont\calibri{Calibri}
\begin{document}

\chapter{}
\section{نمونه‌برداری فشرده}

نمونه‌برداری مشاهده \footnote{\lr{\calibri{dimension reduction}}} می‌باشد فشرده یک زمینه‌ی تحقیقاتی به سرعت در حال توسعه است که توجه بسیاری را در رشته‌های مهندسی برق، ریاضیات کاربردی، آمار و علوم کامپیوتر به خود جلب کرده است.

\end{document}


What consule output displays:

LaTeX Font Warning: Font shape EU1/BNazanin(0)/bx/n' undefined
(Font)              using EU1/BNazanin(0)/m/n' instead on input line 14.

LaTeX Warning: Reference footdir@1' on page 1 undefined on input line 17.

LaTeX Warning: Reference footdir@2' on page 1 undefined on input line 17.

! You can't use \relax' after \the.

l.19     \end{document}

?


Added \usepcakge{footnote} but the problem persists.

• Well if you are certain that footnotes are the problem then you should be able to shorten your document considerably. Aug 27 '16 at 18:24
• Yeah, I was thinking of doing that. Will do it in a minute or so @UlrikeFischer Aug 27 '16 at 18:26
• @UlrikeFischer: I am not sure if what I removed won't cause errors if someone tries to run it but I made the MWE much shorter anyway. Aug 27 '16 at 18:33
• It's still very long: are all packages needed? Delete the unnecessary ones. Is the title formatting relevant? I think they're not. :P And so on. Also, delete the space between one package and the other. Aug 27 '16 at 18:52
• @Alenanno: Done! Aug 27 '16 at 19:04

The problem is due to the new version of zref-abspage, which breaks the bidi package. Try \usepackage[extrafootnotefeatures]{xepersian} instead of \usepackage{xepersian} and it should not give you the error anymore.

BTW, for left-ro-right footnotes, you can use \LTRfootnote. Like this:

\LTRfootnote{dimension reduction}


Also you can use \setlatintextfont to set latin font for your whole document. Like this:

\setlatintextfont{Calibri}


This means that this font will be used whenever you use \lr` or other commands that change the environment to latin (left-to-right).

• Thank you very much, I was in need of a solution like this. Aug 29 '16 at 15:21