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.

 \settextfont[Scale=1.2]{B Nazanin}
 \defpersianfont\titr[Scale=1]{B Titr}
 \defpersianfont\traffic[Scale=1]{B Traffic}

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

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


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.
<recently read> \c@zabspage 

l.19     \end{document}


Added \usepcakge{footnote} but the problem persists.

  • 1
    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
    – Gigili
    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.
    – Gigili
    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.
    – Alenanno
    Aug 27 '16 at 18:52
  • @Alenanno: Done!
    – Gigili
    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:


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.
    – Gigili
    Aug 29 '16 at 15:21

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.