# problem with footnote in xepersian : “ Undefined control sequence \small By me\footnote”

I have problem in using xepersian package. When I use footnote, it come with the error Undefined control sequence \end but without xepersian it works properly.

I use MiKTeX 2.9

here is the code

    \documentclass[]{article}
\usepackage{graphicx}
\usepackage{xepersian}
\begin{document}
\begin{center}

\includegraphics{../Pictures/tehran}

\huge This is My First work!

\small By me\footnote{dfgdtjk}
\end{center}
\end{document}


and here is the error

    Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \small By me\footnote{dfgdtjk}
Undefined control sequence \end{document}
Overfull \hbox (0.99916pt too wide) in paragraph
Overfull \hbox (172.67282pt too wide) in paragraph

-
I think we will need to see more of the log file here: for me, the only issue is that I don't have the graphic you use (which I get round using \usepackage[demo]{graphicx}). – Joseph Wright May 3 '13 at 7:40
Welcome to TeX-SX! You may have a look at our starter page for a quick intro if you wish to familiarize yourself with our format. – Claudio Fiandrino May 3 '13 at 7:50
Unfortunately I can not reproduce your problem. Using version 12.8 of xepersian with TeXLive 2013 pretest, I get no error. – Persian TeX Group May 3 '13 at 7:52
@PersianTeXGroup Miktex has still version v12.7 and I get a lot of error messages that \Umathcode is undefined. In TeXlive 2012 (which has an older version) there is no problem. – Ulrike Fischer May 3 '13 at 8:22
@UlrikeFischer: It is because MiKTeX ships an old XeTeX binary. – Persian TeX Group May 3 '13 at 8:27

The example seems to work when I add \let\Umathcode\XeTeXmathcode \let\Umathchardef\XeTeXmathchardef. Perhaps the package should make a suitable test to avoid to break with older engines.