<div>Dear Everyone </div>
<div>&nbsp;</div>
<div>thanks for your help. your code does not run successfully and gives me these messages. would you please tell me what is the problem.</div>
<div>&nbsp;</div>
<div>LOG FILE : 
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">This is XeTeX, Version 3.141592-2.2-0.997 (MiKTeX 2.7) (preloaded format=xelatex 2008.4.26) 27 APR 2008 21:39</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">entering extended mode</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">**first.tex</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">(first.tex</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">LaTeX2e &lt;2005/12/01&gt;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Babel &lt;v3.8h&gt; and hyphenation patterns for english, dumylang, nohyphenation, ge</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">rman, ngerman, french, loaded.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \thepage undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.3 \renewcommand{\thepage}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{\the\c@page}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \thesection undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.4 \renewcommand{\thesection}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{\the\c@section}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \thesubsection undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.5 \renewcommand{\thesubsection}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{\the\c@section\textroman{-}\the...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \thepart undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.6 \renewcommand{\thepart}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{\the\c@part}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \thefigure undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.9 \renewcommand{\thefigure}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{\arabic{figure}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \thetable undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.10 \renewcommand{\thetable}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{\arabic{table}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \figurename undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.13 \renewcommand{\figurename}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{Ø´Ú&copy;Ù„}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \tablename undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.14 \renewcommand{\tablename}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{جدول}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \contentsname undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.15 \renewcommand{\contentsname}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{فهرست Ù…طالب}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \listfigurename undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.16 \renewcommand{\listfigurename}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{لیست ØªØµØ§ÙˆÛŒØ±}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \listtablename undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.17 \renewcommand{\listtablename}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{لیست Ø¬Ø¯Ø§ÙˆÙ„}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \appendixname undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.18 \renewcommand{\appendixname}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{پیوست}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! LaTeX Error: \indexname undefined.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Type H &lt;return&gt; for immediate help.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">...</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.19 \renewcommand{\indexname}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">{\textfarsi{نمایه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Try typing &lt;return&gt; to proceed.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">If that doesn&#39;t work, type X &lt;return&gt; to quit.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">! Since I do not know what the Jalali calendar is</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">I can&#39;t typeset the Farsi date.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">I stop here, while you get a suitable ftoday.sty file.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">\reserved@a ...you get a suitable ftoday.sty file}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">\@@end</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">l.43 }</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">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">)</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Here is how much of TeX&#39;s memory you used:</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">32 strings out of 30504</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">304 string characters out of 1191403</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">44876 words of memory out of 1500000</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">3241 multiletter control sequences out of 110000</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">3640 words of font info for 14 fonts, out of 1200000 for 2000</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">14 hyphenation exceptions out of 8191</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">7i,0n,5p,113b,14s stack positions out of 5000i,500n,10000p,200000b,5000s</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">No pages of output.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">&nbsp;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">&nbsp;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">Thanks,<br><br></p></div>
<div class="gmail_quote">2008/4/24 VAFA KHALIGHI &lt;<a href="mailto:vafa.khalighi@students.mq.edu.au">vafa.khalighi@students.mq.edu.au</a>&gt;:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<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" target="_blank">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">\renewcommand{\thepage}{\textfarsi{\the\c@page}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thesection}{\textfarsi{\the\c@section}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thesubsection}{\textfarsi{\the\c@section\textroman{-}\the\c@subsection}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thepart}{\textfarsi{\the\c@part}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thefootnote}{\textfarsi{\arabic{footnote}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thefigure}{\textfarsi{\arabic{figure}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thetable}{\textfarsi{\arabic{table}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\theequation}{\textfarsi{\arabic{equation}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\figurename}{\textfarsi{شکل}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\tablename}{\textfarsi{جدول}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\contentsname}{\textfarsi{فهرست مطالب}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\listfigurename}{\textfarsi{لیست تصاویر}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\listtablename}{\textfarsi{لیست جداول}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\appendixname}{\textfarsi{پیوست}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\indexname}{\textfarsi{نمایه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@ifclassloaded{article}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\refname}{\textfarsi{مراجع}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\abstractname}{\textfarsi{چکیده}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@ifclassloaded{report}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\abstractname}{\textfarsi{چکیده}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\chaptername}{\textfarsi{فصل}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\partname}{\textfarsi{بخش}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@ifclassloaded{book}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\chaptername}{\textfarsi{فصل}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\partname}{\textfarsi{بخش}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%\renewcommand{\prefacename}{\textfarsi{پیشگفتار}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%To convert the MILADI date to SHAMSI date</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\InputIfFileExists{ftoday.sty}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\message{Loading the definitions for the Jalali calendar}}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\errhelp{I can&#39;t find the ftoday.sty file for the Jalali calendar}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\errmessage{Since I do not know what the Jalali calendar is^^J</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">I can&#39;t typeset the Farsi date.^^J</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">I stop here, while you get a suitable ftoday.sty file}\@@end</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%The figure or table caption</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newsavebox\@Arabitempboxa</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\long\def\@makecaption#1#2{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\vskip\abovecaptionskip</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\sbox\@Arabitempboxa{\beginR #1: #2\endR}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifdim \wd\@Arabitempboxa &gt;\hsize</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\beginR #1: #2\endR\par</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\global \@minipagefalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\vskip\belowcaptionskip}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%The footnote-rule from right to left, taken from farsitex</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\def\r@fn{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hbox to \columnwidth</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">{\beginR \vbox{\kern -3\p@</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\def\footnoterule{\r@fn}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%For Right-to-Left two column command, I guess taken from rlbabel </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\let\@old@outputdblcol\@outputdblcol</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcommand{\rl@outputdblcol}{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\if@firstcolumn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\global \@firstcolumnfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\global \setbox\@leftcolumn \box\@outputbox</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\global \@firstcolumntrue</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\setbox\@outputbox \vbox {\hb@xt@\textwidth {%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hskip\columnwidth%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hfil\vrule\@width\columnseprule\hfil</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hb@xt@\columnwidth {%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\box\@leftcolumn \hss}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hb@xt@\columnwidth {%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hskip-\textwidth%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\box\@outputbox \hss}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hskip\columnsep%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\hskip\columnwidth}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@combinedblfloats</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@outputpage</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\begingroup</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@dblfloatplacement</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@startdblcolumn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@whilesw\if@fcolmade \fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">{\@outputpage</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\@startdblcolumn}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\endgroup</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl@outputdblcol}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcommand{\lrdblcolumn}{\renewcommand{\@outputdblcol}{\@old@outputdblcol}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%set the default direction of the twocolumn texts to Right-to-Left</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\rldblcolumn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%to make the digits in math formula persian</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\font\tenrgm=&quot;Nazli&quot; at 12pt</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\font\sevrgm=&quot;Nazli&quot; at 10pt</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\font\fivrgm=&quot;Nazli&quot; at 7pt</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newfam\fardig</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\textfont\fardig=\tenrgm</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\scriptfont\fardig=\sevrgm</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\scriptscriptfont\fardig=\fivrgm</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\def\mathfnumber{</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`0=&quot;7 &quot;4 &quot;06F0%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`1=&quot;7 &quot;4 &quot;06F1%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`2=&quot;7 &quot;4 &quot;06F2%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`3=&quot;7 &quot;4 &quot;06F3%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`4=&quot;7 &quot;4 &quot;06F4%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`5=&quot;7 &quot;4 &quot;06F5%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`6=&quot;7 &quot;4 &quot;06F6%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`7=&quot;7 &quot;4 &quot;06F7%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`8=&quot;7 &quot;4 &quot;06F8%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`9=&quot;7 &quot;4 &quot;06F9%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`.=&quot;7 &quot;4 &quot;066B%decimal point</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`٫=&quot;7 &quot;4 &quot;066B%decimal point</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۰=&quot;7 &quot;4 &quot;06F0%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۱=&quot;7 &quot;4 &quot;06F1%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۲=&quot;7 &quot;4 &quot;06F2%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۳=&quot;7 &quot;4 &quot;06F3%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۴=&quot;7 &quot;4 &quot;06F4%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۵=&quot;7 &quot;4 &quot;06F5%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۶=&quot;7 &quot;4 &quot;06F6%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۷=&quot;7 &quot;4 &quot;06F7%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۸=&quot;7 &quot;4 &quot;06F8%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\XeTeXmathcode`۹=&quot;7 &quot;4 &quot;06F9%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%to resolve a problem we encounter when using power</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%or index in math formula</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\makeatletter\def\arabtex@codes{}\makeatother</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%a command to put a footnote from left to right</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%while in a right to left context</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcommand{\lrfootnote}[1]{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\bgroup% To make the scope of the change local</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\footnotemark%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand{\thefootnote}{\arabic{footnote}}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\unsetRL%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\footnotetext{#1}%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\egroup</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\makeatother</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">and then save it as farsixetex.tex to your folder.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">thn open another widow in TeXmaker and copy these commands</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%%%%%%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newif\ifFT@leap \newif\ifFT@kabiseh</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@i \newcount\FT@y \newcount\FT@m \newcount\FT@d</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latini \newcount\FT@farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinii \newcount\FT@farsiii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latiniii \newcount\FT@farsiiii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latiniv \newcount\FT@farsiiv</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinv \newcount\FT@farsiv</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinvi \newcount\FT@farsivi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinvii \newcount\FT@farsivii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinviii \newcount\FT@farsiviii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinix \newcount\FT@farsiix</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinx \newcount\FT@farsix</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinxi \newcount\FT@farsixi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@latinxii \newcount\FT@farsixii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@farsixiii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@temp</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@tempthree</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@yModHundred</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@thirtytwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@dn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@sn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newcount\FT@mminusone</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\def\ftoday{%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@y=\year \FT@m=\month \FT@d=\day</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temp=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temp by 100\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\multiply\FT@temp by 100\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@yModHundred=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@yModHundred by -\FT@temp\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifodd\FT@yModHundred</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@leapfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temp=\FT@yModHundred</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temp by 2\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifodd\FT@temp\FT@leapfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@yModHundred=0%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temp=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temp by 400\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\multiply\FT@temp by 400\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@y=\FT@temp\FT@leaptrue\else\FT@leapfalse\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else\FT@leaptrue</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latini=31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifFT@leap</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinii = 29\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinii = 28\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latiniii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latiniv = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinv = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinvi = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinvii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinviii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinix = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinx = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinxi = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@latinxii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@thirtytwo=32\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temp=\FT@y</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -17\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temptwo=\FT@temp</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\multiply\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@temp=\FT@thirtytwo\FT@kabisehfalse</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temptwo=\FT@temp</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temptwo by 4\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\multiply\FT@temptwo by 4\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@temp=\z@\FT@kabisehtrue\else\FT@kabisehfalse\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">% --BE</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">% In fact farsii is equal to the Leap years from a fixed year to the last</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">% year minus the Kabise years from a fixed year to the last year plus a const.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@tempthree=\FT@y % Number of Leap years</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@tempthree by -1</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temp=\FT@tempthree % T := (MY-1) div 4</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temp by 4\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temptwo=\FT@tempthree % T := T - ((MY-1) div 100)</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temptwo by 100\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temptwo=\FT@tempthree % T := T + ((MY-1) div 400)</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temptwo by 400\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by \FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@tempthree by -611 % Number of Kabise years</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temptwo=\FT@tempthree % T := T - ((SY+10) div 33) * 8</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\multiply\FT@temptwo by 8\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@temptwo=\FT@tempthree %</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\divide\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\multiply\FT@temptwo by 33\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@tempthree by -\FT@temptwo</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\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">\divide\FT@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -\FT@tempthree</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@temp by -137 % T := T - 137 Adjust the value</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsii=31</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@farsii by -\FT@temp % now 31 - T is the farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiii = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifFT@kabiseh</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiiii = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiiii = 29\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiiv = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiv = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsivi = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsivii = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiviii= 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsiix = 31\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsix = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsixi = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsixii = 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@farsixiii= 30\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@dn= 0\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@sn= 0\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@mminusone=\FT@m</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@mminusone by -1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@i=0\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@i &lt; \FT@mminusone</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\loop</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance \FT@i by 1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@dn by \csname FT@latin\romannumeral\the\FT@i\endcsname</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@i&lt;\FT@mminusone \repeat</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance \FT@dn by \FT@d</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@i=1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@sn = \FT@farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum \FT@sn&lt;\FT@dn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\loop</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance \FT@i by 1\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@sn by \csname FT@farsi\romannumeral\the\FT@i\endcsname</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum \FT@sn&lt;\FT@dn \repeat</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum \FT@i &lt; 4</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@m = 9 \advance\FT@m by \FT@i</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance \FT@y by -622\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@m = \FT@i \advance \FT@m by -3\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance \FT@y by -621\relax</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\advance\FT@sn by -\csname FT@farsi\romannumeral\the\FT@i%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\endcsname</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\ifnum\FT@i = 1</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@d = \FT@dn \advance \FT@d by 30 \advance\FT@d by -\FT@farsii</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\else</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\FT@d = \FT@dn \advance \FT@d by -\FT@sn</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fi</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\beginL\number\FT@d\endL\space%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%Changedc from here YJ</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\farsimonth{\FT@m}\space\beginL\number\FT@y\endL%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">% added \farsimonth YJ</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\def\farsimonth#1{\ifcase#1\or فروردین\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">اردیبهشت\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">خرداد\or تیر\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">مرداد\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">شهریور\or مهر\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">آبان\or آذر\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">دی\or بهمن\or </p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">اسفند\fi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\endinput</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%%%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">and save it as ftoday.sty</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">then open another window in TeXmaker and copy these commands</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\documentclass{article}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\usepackage{fontspec}\usepackage{xunicode}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\usepackage{arabxetex}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\usepackage{setspace}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\usepackage{makeidx}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\makeindex</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\usepackage{fancyhdr}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\pagestyle{fancy}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fancyhead{}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fancyfoot[RE,LO]{\small\farsifont\beginR صفحهٔ \thepage\endR}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fancyfoot[LE,RO]{\small\farsifont\beginR آهنگ عشق ۱۶۴ بدیع\endR}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\fancyfoot[C]{\small\farsifont\beginR شمارهٔ ۱۶۱\endR}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand\headrulewidth{0pt}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\renewcommand\footrulewidth{0.4pt}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\setromanfont[Mapping=tex-text]{Times New Roman}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newfontinstance\farsifont[Script=Arabic,Scale=1.2,WordSpace=1]{Roya}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\newfontinstance\arabicfont[Script=Arabic,Scale=1.2,WordSpace=1]{Roya}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\input{farsixetex.tex}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\def\theenumii{\abjad{\arabic{enumii}}}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%comment the following line at the end</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%this is to be used only for the index to work correctly</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%\makeatletter\renewcommand{\thepage}{\the\c@page}\makeatother</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\onehalfspacing<br clear="all">\begin{document}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\mathfnumber</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\begin{farsi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%your Farsi inputs</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\end{farsi}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">\end{document}</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">%%%%%%%%%%%%</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">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">\section{\farsifont این یک قسمت است} inside The Farsi environment.</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">&nbsp;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px">Before doing anything you also should install farsiweb projects, they come with my linux distribution.<br><font color="#888888">-- <br>PSTricks<br><a href="http://pstricks.wordpress.com/" target="_blank">http://pstricks.wordpress.com/</a> </font></p>
</div><br>_______________________________________________<br>XeTeX mailing list<br><a href="mailto:postmaster@tug.org">postmaster@tug.org</a><br><a href="http://tug.org/mailman/listinfo/xetex" target="_blank">http://tug.org/mailman/listinfo/xetex</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Amir Jahanshahi<br>------------------------------------------------------<br>Research Assistant <br>Thin Film, and nanoelectronics lab <br>School of Electrical and Computer Engineering, <br>
Faculty of Engineering, University of Tehran, <br>North-Kargar Ave., Tehran, Iran. <br>Tel: 98(21) 61114345 <br>Email: <a href="mailto:A.Jahanshahi@ece.ut.ac.ir">A.Jahanshahi@ece.ut.ac.ir</a><br>Homepage: <a href="http://khorshid.ut.ac.ir/~A.Jahanshahi">http://khorshid.ut.ac.ir/~A.Jahanshahi</a><br>