<div dir="ltr">No problem.<br><br>It was the cause of other problems for example if you put this code at permeable of your document<br><br>%%%%%%%%%%%%%%%%%%%%%%%<br>\usepackage{fancyhdr}<br>\pagestyle{fancy}<br>\fancyhf{}<br>
\fancyhead[RO,LE]{صفحهٔ \thepage}<br>%%%%%%%%%%%%%%%%%%%%%%%<br clear="all"><br><br>You want that fancyhead to be printed on the right hand-side of odd pages and left hand-side of the even pages, but with the current definitions of raggedright and raggedleft of the bidi.sty, the opposite&nbsp; happens, so to fix this you need to have<br>
<br>%%%%%%%%%%%%%%%%%%%%%%<br>\makeatletter<br>\def\raggedright{%<br>&nbsp; \let\\\@centercr<br>&nbsp; \rightskip\z@skip\rightskip\@flushglue<br>&nbsp; \parindent\z@\parfillskip\z@skip}<br><br>\renewcommand\raggedleft{\@@raggedleft}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>\renewcommand\raggedright{\@@raggedright}<br>\makeatother<br>%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br>You also need to fix \centerline, \rightline and \leftline in bidi.sty as follow:<br><br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
\def\centerline#1{%<br>\if@rl\@@line{\hss\beginR #1 \endR\hss}<br>\else\@@line{\hss#1\hss}\fi}<br><br>\def\leftline#1{%<br>\if@rl\@@line{\beginR #1 \endR\hss}<br>\else\@@line{#1\hss}\fi}<br><br>\def\rightline#1{%<br>\if@rl\@@line{\hss\beginR #1 \endR}<br>
\else\@@line{\hss#1}\fi}<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br><br>Cheers<br>-- <br>``Life is not empty,<br>There is kindness, there is apple and there is faith<br><br>One day will come,<br>and to a mendicant I will endow a jasmine&#39;&#39;<br>
<br>-- Sohrab Sepehri<br>
</div>