<div>I am afraid there is no guide for typesetting just persian in XeTeX. but I can explain everything to you here.</div>
<div>Ok, the version of XeTeX which is in TeXlive2007 is 0.996, from my experience it is better to compile the 0.997 version for typesetting Persian alternatively you can uninstall TeXlive2007 and use MiKTeX2.7, this only applies if you are a windows fan.</div>

<div>&nbsp;</div>
<div>ok, then you need to download a TeX editor, the best from my experience is TeXmaker, you can get it from</div>
<div><a href="http://www.xm1math.net/texmaker/download.html">http://www.xm1math.net/texmaker/download.html</a></div>
<div>&nbsp;</div>
<div>after installing it and making sure you have a version of TeX system and a pdf reader installed on your computer, we are going to do the first step which is setting the editor.</div>
<div>1- click on options, then click on Configure TeXmaker and then just open the folder that corresponds to pdflatex command and go to your binary directory and choose xelatex. then open the folder that corresponds to your pdf reader and choose your favourite pdf reader. then go to Quick bulid and choose PDFlatex+view pdf. then click on editor and choose utf8 for Editor Font Encoding. now click ok.</div>

<div>&nbsp;</div>
<div>Ok make a folder anywhere that you like and then open TeXmaker and put these commands in:</div>
<div>%%%%%%%%%%%%%%%</div>
<div>\makeatletter 
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thepage}{\textfarsi{\the\c@page}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thesection}{\textfarsi{\the\c@section}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thesubsection}{\textfarsi{\the\c@section\textroman{-}\the\c@subsection}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thepart}{\textfarsi{\the\c@part}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thefootnote}{\textfarsi{\arabic{footnote}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thefigure}{\textfarsi{\arabic{figure}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thetable}{\textfarsi{\arabic{table}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\theequation}{\textfarsi{\arabic{equation}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\figurename}{\textfarsi{شکل}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\tablename}{\textfarsi{جدول}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\contentsname}{\textfarsi{فهرست مطالب}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\listfigurename}{\textfarsi{لیست تصاویر}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\listtablename}{\textfarsi{لیست جداول}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\appendixname}{\textfarsi{پیوست}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\indexname}{\textfarsi{نمایه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@ifclassloaded{article}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\refname}{\textfarsi{مراجع}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\abstractname}{\textfarsi{چکیده}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@ifclassloaded{report}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\abstractname}{\textfarsi{چکیده}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\chaptername}{\textfarsi{فصل}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\partname}{\textfarsi{بخش}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@ifclassloaded{book}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\chaptername}{\textfarsi{فصل}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\partname}{\textfarsi{بخش}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%\renewcommand{\prefacename}{\textfarsi{پیشگفتار}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%To convert the MILADI date to SHAMSI date</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\InputIfFileExists{ftoday.sty}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\message{Loading the definitions for the Jalali calendar}}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\errhelp{I can&#39;t find the ftoday.sty file for the Jalali calendar}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\errmessage{Since I do not know what the Jalali calendar is^^J</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">I can&#39;t typeset the Farsi date.^^J</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">I stop here, while you get a suitable ftoday.sty file}\@@end</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%The figure or table caption</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newsavebox\@Arabitempboxa</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\long\def\@makecaption#1#2{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\vskip\abovecaptionskip</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\sbox\@Arabitempboxa{\beginR #1: #2\endR}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifdim \wd\@Arabitempboxa &gt;\hsize</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\beginR #1: #2\endR\par</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\global \@minipagefalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\vskip\belowcaptionskip}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%The footnote-rule from right to left, taken from farsitex</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\def\r@fn{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hbox to \columnwidth</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">{\beginR \vbox{\kern -3\p@</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\def\footnoterule{\r@fn}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%For Right-to-Left two column command, I guess taken from rlbabel </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\let\@old@outputdblcol\@outputdblcol</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcommand{\rl@outputdblcol}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\if@firstcolumn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\global \@firstcolumnfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\global \setbox\@leftcolumn \box\@outputbox</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\global \@firstcolumntrue</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\setbox\@outputbox \vbox {\hb@xt@\textwidth {%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hskip\columnwidth%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hfil\vrule\@width\columnseprule\hfil</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hb@xt@\columnwidth {%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\box\@leftcolumn \hss}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hb@xt@\columnwidth {%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hskip-\textwidth%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\box\@outputbox \hss}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hskip\columnsep%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\hskip\columnwidth}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@combinedblfloats</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@outputpage</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\begingroup</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@dblfloatplacement</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@startdblcolumn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@whilesw\if@fcolmade \fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">{\@outputpage</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\@startdblcolumn}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\endgroup</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl@outputdblcol}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcommand{\lrdblcolumn}{\renewcommand{\@outputdblcol}{\@old@outputdblcol}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%set the default direction of the twocolumn texts to Right-to-Left</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\rldblcolumn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%to make the digits in math formula persian</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\font\tenrgm=&quot;Nazli&quot; at 12pt</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\font\sevrgm=&quot;Nazli&quot; at 10pt</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\font\fivrgm=&quot;Nazli&quot; at 7pt</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newfam\fardig</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\textfont\fardig=\tenrgm</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\scriptfont\fardig=\sevrgm</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\scriptscriptfont\fardig=\fivrgm</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\def\mathfnumber{</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`0=&quot;7 &quot;4 &quot;06F0%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`1=&quot;7 &quot;4 &quot;06F1%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`2=&quot;7 &quot;4 &quot;06F2%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`3=&quot;7 &quot;4 &quot;06F3%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`4=&quot;7 &quot;4 &quot;06F4%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`5=&quot;7 &quot;4 &quot;06F5%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`6=&quot;7 &quot;4 &quot;06F6%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`7=&quot;7 &quot;4 &quot;06F7%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`8=&quot;7 &quot;4 &quot;06F8%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`9=&quot;7 &quot;4 &quot;06F9%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`.=&quot;7 &quot;4 &quot;066B%decimal point</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`٫=&quot;7 &quot;4 &quot;066B%decimal point</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۰=&quot;7 &quot;4 &quot;06F0%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۱=&quot;7 &quot;4 &quot;06F1%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۲=&quot;7 &quot;4 &quot;06F2%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۳=&quot;7 &quot;4 &quot;06F3%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۴=&quot;7 &quot;4 &quot;06F4%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۵=&quot;7 &quot;4 &quot;06F5%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۶=&quot;7 &quot;4 &quot;06F6%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۷=&quot;7 &quot;4 &quot;06F7%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۸=&quot;7 &quot;4 &quot;06F8%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\XeTeXmathcode`۹=&quot;7 &quot;4 &quot;06F9%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%to resolve a problem we encounter when using power</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%or index in math formula</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\makeatletter\def\arabtex@codes{}\makeatother</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%a command to put a footnote from left to right</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%while in a right to left context</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcommand{\lrfootnote}[1]{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\bgroup% To make the scope of the change local</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\footnotemark%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand{\thefootnote}{\arabic{footnote}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\unsetRL%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\footnotetext{#1}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\egroup</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\makeatother</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">and then save it as farsixetex.tex to your folder.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">thn open another widow in TeXmaker and copy these commands</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%%%%%%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newif\ifFT@leap \newif\ifFT@kabiseh</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@i \newcount\FT@y \newcount\FT@m \newcount\FT@d</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latini \newcount\FT@farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinii \newcount\FT@farsiii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latiniii \newcount\FT@farsiiii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latiniv \newcount\FT@farsiiv</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinv \newcount\FT@farsiv</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinvi \newcount\FT@farsivi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinvii \newcount\FT@farsivii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinviii \newcount\FT@farsiviii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinix \newcount\FT@farsiix</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinx \newcount\FT@farsix</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinxi \newcount\FT@farsixi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@latinxii \newcount\FT@farsixii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@farsixiii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@temp</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@tempthree</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@yModHundred</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@thirtytwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@dn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@sn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newcount\FT@mminusone</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\def\ftoday{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@y=\year \FT@m=\month \FT@d=\day</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temp=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temp by 100\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\multiply\FT@temp by 100\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@yModHundred=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@yModHundred by -\FT@temp\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifodd\FT@yModHundred</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@leapfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temp=\FT@yModHundred</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temp by 2\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifodd\FT@temp\FT@leapfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@yModHundred=0%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temp=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temp by 400\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\multiply\FT@temp by 400\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@y=\FT@temp\FT@leaptrue\else\FT@leapfalse\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else\FT@leaptrue</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latini=31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifFT@leap</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinii = 29\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinii = 28\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latiniii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latiniv = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinv = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinvi = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinvii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinviii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinix = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinx = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinxi = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@latinxii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@thirtytwo=32\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temp=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -17\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temptwo=\FT@temp</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\multiply\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@temp=\FT@thirtytwo\FT@kabisehfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temptwo=\FT@temp</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temptwo by 4\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\multiply\FT@temptwo by 4\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@temp=\z@\FT@kabisehtrue\else\FT@kabisehfalse\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">% --BE</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">% In fact farsii is equal to the Leap years from a fixed year to the last</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">% year minus the Kabise years from a fixed year to the last year plus a const.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@tempthree=\FT@y % Number of Leap years</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@tempthree by -1</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temp=\FT@tempthree % T := (MY-1) div 4</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temp by 4\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temptwo=\FT@tempthree % T := T - ((MY-1) div 100)</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temptwo by 100\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temptwo=\FT@tempthree % T := T + ((MY-1) div 400)</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temptwo by 400\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by \FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@tempthree by -611 % Number of Kabise years</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temptwo=\FT@tempthree % T := T - ((SY+10) div 33) * 8</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\multiply\FT@temptwo by 8\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@temptwo=\FT@tempthree %</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\multiply\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@tempthree by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@tempthree=32\advance\FT@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\divide\FT@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -\FT@tempthree</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@temp by -137 % T := T - 137 Adjust the value</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsii=31</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@farsii by -\FT@temp % now 31 - T is the farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiii = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifFT@kabiseh</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiiii = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiiii = 29\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiiv = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiv = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsivi = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsivii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiviii= 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsiix = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsix = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsixi = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsixii = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@farsixiii= 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@dn= 0\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@sn= 0\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@mminusone=\FT@m</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@mminusone by -1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@i=0\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@i &lt; \FT@mminusone</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\loop</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance \FT@i by 1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@dn by \csname FT@latin\romannumeral\the\FT@i\endcsname</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@i&lt;\FT@mminusone \repeat</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance \FT@dn by \FT@d</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@i=1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@sn = \FT@farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum \FT@sn&lt;\FT@dn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\loop</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance \FT@i by 1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@sn by \csname FT@farsi\romannumeral\the\FT@i\endcsname</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum \FT@sn&lt;\FT@dn \repeat</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum \FT@i &lt; 4</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@m = 9 \advance\FT@m by \FT@i</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance \FT@y by -622\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@m = \FT@i \advance \FT@m by -3\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance \FT@y by -621\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\advance\FT@sn by -\csname FT@farsi\romannumeral\the\FT@i%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\endcsname</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\ifnum\FT@i = 1</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@d = \FT@dn \advance \FT@d by 30 \advance\FT@d by -\FT@farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\FT@d = \FT@dn \advance \FT@d by -\FT@sn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\beginL\number\FT@d\endL\space%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%Changedc from here YJ</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\farsimonth{\FT@m}\space\beginL\number\FT@y\endL%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">% added \farsimonth YJ</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\def\farsimonth#1{\ifcase#1\or فروردین\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">اردیبهشت\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">خرداد\or تیر\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">مرداد\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">شهریور\or مهر\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">آبان\or آذر\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">دی\or بهمن\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">اسفند\fi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\endinput</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%%%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">and save it as ftoday.sty</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">then open another window in TeXmaker and copy these commands</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\documentclass{article}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\usepackage{fontspec}\usepackage{xunicode}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\usepackage{arabxetex}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\usepackage{setspace}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\usepackage{makeidx}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\makeindex</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\usepackage{fancyhdr}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\pagestyle{fancy}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fancyhead{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fancyfoot[RE,LO]{\small\farsifont\beginR صفحهٔ \thepage\endR}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fancyfoot[LE,RO]{\small\farsifont\beginR آهنگ عشق ۱۶۴ بدیع\endR}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\fancyfoot[C]{\small\farsifont\beginR شمارهٔ ۱۶۱\endR}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand\headrulewidth{0pt}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\renewcommand\footrulewidth{0.4pt}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\setromanfont[Mapping=tex-text]{Times New Roman}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newfontinstance\farsifont[Script=Arabic,Scale=1.2,WordSpace=1]{Roya}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\newfontinstance\arabicfont[Script=Arabic,Scale=1.2,WordSpace=1]{Roya}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\input{farsixetex.tex}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\def\theenumii{\abjad{\arabic{enumii}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%comment the following line at the end</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%this is to be used only for the index to work correctly</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%\makeatletter\renewcommand{\thepage}{\the\c@page}\makeatother</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\onehalfspacing<br clear="all">\begin{document}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\mathfnumber</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\begin{farsi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%your Farsi inputs</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\end{farsi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\end{document}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">ok whatever you want to write in Farsi should be between \begin{farsi} and \end{farsi}, if you want to write a an english word inside that environment use \textroman{word} and for arabic use \textarab{العربی} and you also can have \begin{arab} and \end{arab}. for making a section you gotta use something like</p>

<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">\section{\farsifont این یک قسمت است} inside The Farsi environment.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">&nbsp;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 0">Before doing anything you also should install farsiweb projects, they come with my linux distribution.<br>-- <br>PSTricks<br><a href="http://pstricks.wordpress.com/">http://pstricks.wordpress.com/</a> </p>
</div>