summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-12 18:14:02 +0000
committerKarl Berry <karl@freefriends.org>2008-07-12 18:14:02 +0000
commit037cf3d536e0f1fa1cccb00e1f26e8279abceb40 (patch)
tree16cf8df937bb5cca317457bf957d2aa881f0e4a1 /Master/texmf-dist
parent571a59707cdc614327b51de4a2494eddf9410042 (diff)
new xelatex package xepersian
git-svn-id: svn://tug.org/texlive/trunk@9484 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/README36
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-example.pdfbin0 -> 20948 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-example.tex15
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/user-guide.pdfbin0 -> 73902 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/user-guide.tex317
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttfbin0 -> 1072328 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/LateefRegOT.ttfbin0 -> 224920 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/ScheherazadeRegOT.ttfbin0 -> 248380 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/elham.ttfbin0 -> 42822 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/homa.ttfbin0 -> 48827 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/koodak.ttfbin0 -> 82155 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/nazli.ttfbin0 -> 55941 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/nazlib.ttfbin0 -> 68448 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/roya.ttfbin0 -> 48375 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/royab.ttfbin0 -> 48061 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/terafik.ttfbin0 -> 85137 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/terafikb.ttfbin0 -> 61643 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/titr.ttfbin0 -> 86479 bytes
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty220
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty523
20 files changed, 1111 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/README b/Master/texmf-dist/doc/xelatex/xepersian/README
new file mode 100644
index 00000000000..56ccf51faf0
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/README
@@ -0,0 +1,36 @@
+-------------------------------
+The XePersian Package v0.16
+
+Updates: some bug fixes, redefined XePersian logo.
+
+XePersian is a package written for XeLaTeX that allows users to typeset
+Persian/Arabic properly. The current version is 0.16 and it will be
+developed to meet the needs of Persian typesetting properly.
+
+In order to use XePersian without getting any problem, the users are
+encouraged to install the True Tupe Fonts which come with XePersian package.
+ These fonts are in `True_Type_Fonts' folder.
+
+The XePersian package is independent of any operating sytem, meaning it
+will work on all operating systems.
+
+XePersian (not including the fonts) is licensed as `Free` (lppl=LaTeX Project Public License).
+
+Nazli, Titr, Roya, Homa, Elham, Koodak, and Terafik fonts are produced by Farsiweb Project.
+These fonts are freely available (under the GNU General Public License, Please refer to http://www.farsiweb.ir/wiki/Products/PersianFonts).
+
+Lateef and Scheherazade fonts are produced by SIL organisation and its license is
+` SIL Open Font License' (please refer to http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=ArabicFonts_Download).
+
+The Iran Nastaliq font is produced by Hamoonsoft and is freely available.
+
+There are some other good fonts made by IRMUG (Iranian Mac User Group) which you can download
+from http://wiki.irmug.org/index.php/X_Series_2#Download_fonts and
+http://wiki.irmug.org/index.php/XWZar
+
+
+Please report any bugs to the author (vafa.khalighi@students.mq.edu.au).
+
+-------------------------------
+Vafa Khalighi
+2008/07/11
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-example.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-example.pdf
new file mode 100644
index 00000000000..2e38b68825d
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/beamer-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-example.tex b/Master/texmf-dist/doc/xelatex/xepersian/beamer-example.tex
new file mode 100644
index 00000000000..2c2863ce61a
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/beamer-example.tex
@@ -0,0 +1,15 @@
+\documentclass[hyperref=xetex]{beamer}
+\usepackage{xepersian}
+\title{نمونه اسلاید}
+\author{وفا خلیقی}
+\begin{document}
+\maths
+\begin{farsi}
+\frame{\maketitle}
+\section{مقدمه}
+\begin{frame}
+
+این یک نمونه اسلاید است که توسط \eng{\XePersian} درست شده است.
+\end{frame}
+\end{farsi}
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/user-guide.pdf b/Master/texmf-dist/doc/xelatex/xepersian/user-guide.pdf
new file mode 100644
index 00000000000..91a1c7c1d37
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/user-guide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/user-guide.tex b/Master/texmf-dist/doc/xelatex/xepersian/user-guide.tex
new file mode 100644
index 00000000000..8437a7557a7
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/user-guide.tex
@@ -0,0 +1,317 @@
+\documentclass{report}
+\usepackage{xepersian}
+\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
+\pagestyle{headings}
+\title{حروف‌چینی فارسی در \eng{\XePersian}\\[0.2cm]نسخهٔ ۰/۱۶}
+\author{وفا خلیقی\thanks{پست الکترونیک:~\eng{vafa.khalighi@students.mq.edu.au}}}
+\begin{document}
+\maths
+\begin{farsi}
+\maketitle
+\tableofcontents
+\chapter{مقدمه}
+به حروف‌چینی فارسی ‪ ‬با ‪\eng{\XePersian} ‬خوش آمدید. هدف \eng{\XePersian} ارائه یک بستهٔ کاملاً کامل و پایدار برای حروف‌چینی است. لطفاً به خاطر داشته باشید که \eng{\XePersian} هنوز در حالت آزمایش است و این نسخهٔ ۰/۱۶ از آن است. من سعی کرده‌ام، می‌کنم و خواهم کرد تا تمام امکانات حروف‌چینی فارسی را در \eng{\XePersian} جمع کنم. اما این خود نیاز به آزمایش و امتحان دارد تا اشکالات پیدا و رفع شود.
+
+لطفاً قبل از استفاده از \eng{\XePersian} این سند را بدقت بخوانید تا با دستورات و امکانات \eng{\XePersian} آشنا شوید.
+
+همچنین اگر اشکالی، پیشنهادی و یا سؤالی دارید، می‌توانید آن را به نویسندهٔ \eng{\XePersian} گزارش دهید تا مؤلف \eng{\XePersian} بتواند نسخهٔ بعدی کاملتری را ارائه دهد.
+
+دوست دارم از ته قلبم از آقای \eng{Jonathan Kew } برای پشتیبانی‌ها و اعتمادشان به من تشکر کنم.
+
+در اینجا نیز دوست دارم از مسئولان پروژه‌های تک‌پارسی و فارسی‌تک تشکر و قدردانی کنم به این خاطر که نوشتن \eng{\XePersian} ممکن نبود مگر با مطالعهٔ کدهای این دو پروژه. همچنین تعدادی از امکانات فارسی‌تک و تک‌پارسی در بسته گنجانده شده است.
+
+در پایان نیز دوست دارم صمیمانه از دوستان خوب و نازنینم در وبلاگ فارسی‌لاتک، آقایان مصطفی واحدی، مهدی امیدعلی، مرتضی خدادادیان، وحید قاسمیان و بسیاری از دوستان دیگر تشکر کنم. بدون نظرات و پشتیبانی‌های این دوستان، من نمی‌توانستم انگیزهٔ لازم را در انجام این کار پیدا کنم.
+\chapter{فلسفه و دستورات \eng{\XePersian}}
+فلسفهٔ \eng{\XePersian} این است که یک استفاده کنندهٔ معمولی باید قادر باشد به راحتی به حروف‌چینی فارسی بپردازد. در حال حاضر \eng{\XePersian} با کلاسهای \eng{article, amsart, amsbook, report, book, bookest, refrep} و \eng{beamer} به زیبایی و آسانی کار می‌کند. در هر نسخه از \eng{\XePersian} تلاش بر این است تا حداقل سه کلاس دیگر نیز به آن اضافه شود. همچنین در هر نسخه بسته‌های زیادی نیز به \eng{\XePersian} اضافه خواهند شد تا کاربران آزادی کامل در حروف‌چینی فارسی داشته باشند.
+\section{فونتهای فارسی}
+تعدادی فونتهای فارسی مناسب با \eng{\XePersian} عرضه می‌شوند. این فونتها در پوشهٔ \eng{True Type Fonts} قرار دارند. لطفاً قبل از انجام هر کاری این فونتها را روی سیستم خود نصب کنید.
+\section{اسکلت یک متن فارسی ساده در \eng{\XePersian}}
+\subsection{طبقات \eng{article} و \eng{amsart}}
+\setLR
+\verb|\documentclass{article}|\\
+\verb|\usepackage{xepersian}|\\
+\verb|\title{|\textfarsi{عنوان مطلب}\verb|}|\\
+\verb|\author{|\textfarsi{نام نویسنده}\verb|}|\\
+\verb|\begin{document}|\\
+\verb|\begin{farsi}|\\
+\verb|\maketitle|\\
+\verb|\tableofcontents|\\
+\verb|\section{|\textfarsi{یک قسمت}\verb|}|
+
+$\vdots$
+
+\verb|\subsection{|\textfarsi{یک زیر قسمت}\verb|}|
+
+$\vdots$
+
+\verb|\subsubsection{|\textfarsi{یک زیر زیر قسمت}\verb|}|
+
+$\vdots$
+
+\verb|\end{farsi}|\\
+\verb|\end{document}|
+\setRL
+\newpage
+\subsection{طبقهٔ \eng{beamer}}
+\setLR
+\verb|\documentclass[hyperref=xetex]{beamer}|\\
+\verb|\usepackage{xepersian}|\\
+\verb|\title{|\textfarsi{عنوان مطلب}\verb|}|\\
+\verb|\author{|\textfarsi{نام نویسنده}\verb|}|\\
+\verb|\begin{document}|\\
+\verb|\begin{farsi}|\\
+\verb|\frame{\maketitle}|\\
+\verb|\section{|\textfarsi{یک قسمت}\verb|}|\\
+\verb|\frametitle{|\textfarsi{مطلب}\verb|}|\\
+\verb|\framesubtitle{|\textfarsi{زیر مطلب}\verb|}|
+
+$\vdots$
+
+\verb|\end{frame}|
+
+$\vdots$
+
+\verb|\end{farsi}|\\
+\verb|\end{document}|
+\setRL
+\subsection{سایر طبقات}
+\setLR
+\verb|\documentclass{book}|\\
+\verb|\usepackage{xepersian}|\\
+\verb|\title{|\textfarsi{عنوان مطلب}\verb|}|\\
+\verb|\author{|\textfarsi{نام نویسنده}\verb|}|\\
+\verb|\begin{document}|\\
+\verb|\begin{farsi}|\\
+\verb|\maketitle|\\
+\verb|\tableofcontents|\\
+\verb|\chapter{|\textfarsi{یک فصل}\verb|}|
+
+$\vdots$
+
+\verb|\section{|\textfarsi{یک قسمت}\verb|}|
+
+$\vdots$
+
+\verb|\subsection{|\textfarsi{یک زیر قسمت}\verb|}|
+
+$\vdots$
+
+\verb|\subsubsection{|\textfarsi{یک زیر زیر قسمت}\verb|}|
+
+$\vdots$
+
+\verb|\end{farsi}|\\
+\verb|\end{document}|
+\setRL
+\newpage
+\section{نکات}
+\begin{itemize}
+\item \eng{\XePersian}
+فونت نازلی را برای فونت فارسی به عنوان پیش‌فرض استفاده می‌کند لذا باید این فونت را روی سیستم خود نصب کرده باشید. اگر می‌خواهید از فونت دیگری به عنوان فونت فارسی استفاده کنید، می‌توانید دستور زیر را در پیش‌درآمد فایل خود قرار دهید:
+
+\setLR
+\verb|\newfontinstance\farsifont[Script=Arabic,Scale=1.2,Mapping=farsidigits]{name of your font}|
+\setRL
+\item
+همچنین باید فونت ایران نستعلیق را روی سیستم خود نصب کرده باشید زیرا این فونت در نماد \eng{\XePersian} به کار رفته است.
+\item \eng{\XePersian}
+فونت شهرزاد را برای فونت عربی به عنوان پیش‌فرض استفاده می‌کند لذا باید این فونت را روی سیتم خود نصب کرده باشید. اگر می‌خواهید از فونت دیگری به عنوان فونت عربی استفاده کنید، می‌توانید دستور زیرا را در پیش‌درآمد فایل خود قرار دهید:
+
+\setLR
+\verb|\newfontinstance\arabicfont[Script=Arabic,Scale=1.2]{name of your font}|
+\setRL
+
+\item
+اگر می‌خواهید پاراگرافی انگلیسی بنویسید باید آن پاراگراف را بعد از دستور \verb|\end{farsi}| بنویسید و اگر دوباره خواستید فارسی بنویسید می‌توانید از محیط زیر استفاده کنید:
+
+\setLR
+\verb|\begin{farsi}|
+
+$\vdots$
+
+\verb|\end{farsi}|
+\setRL
+
+\item
+اگر می‌خواهید پاراگرافی عربی بنویسید، می‌توانید از محیط زیر استفاده کنید:
+
+\setLR
+\verb|\begin{arab}|
+
+$\vdots$
+
+\verb|\end{arab}|
+\setRL
+
+\item \eng{\XePersian}
+بصورت پیش‌فرض بسته‌های \eng{amsmath, amssymb, amsthm} و دیگر بسته‌های مربوط را فراخوانی می‌کند لذا شما نباید این بسته‌ها را دوباره در پیش‌درآمد فایل خود فراخوانی کنید.
+\item \eng{\XePersian}
+بصورت خودکار بستهٔ \eng{graphicx} را فراخوانی می‌کند لذا شما نباید این بسته را در پیش‌درآمد فایل خود فراخوانی کنید.
+
+\end{itemize}
+\newpage
+\section{دستورات کلیدی }
+\verb|\XePersian|:
+برای قرار دادن نماد \eng{\XePersian}. البته اگر در محیط فارسی هستید باید از شکل
+\verb|\eng{\XePersian}|
+این دستور استفاده کنید.
+
+\vspace{0.5cm}
+
+\verb|\fars{}|:
+برای قرار دادن کلمه/کلمات و یا جمله‌ای فارسی زمانی که در محیط فارسی نیستیم. کلمه/کلمات و یا جمله فارسی درون \verb|{}| قرار می‌گیرد.
+
+\vspace{0.5cm}
+
+\verb|\eng{}|:
+برای قرار دادن کلمه/کلمات و یا جمله‌ای انگلیسی زمانی که در محیط فارسی و یا عربی هستیم. کلمه/کلمات و یا جلمه انگلیسی درون \verb|{}| قرار می‌گیرد.
+
+\vspace{0.5cm}
+
+\verb|\arabt{}|:
+برای قرار دادن کلمه/کلمات و یا جمله‌ای عربی زمانی که در محیط عربی نیستیم. کلمه/کلمات و یا جمله عربی درون \verb|{}| قرار می‌گیرد.
+
+
+
+\vspace{0.5cm}
+
+\verb|\footnote{}|:
+برای قرار دادن زیرنویس فارسی. متن فارسی را درون \verb|{}| قرار می‌دهیم.
+
+\vspace{0.5cm}
+
+\verb|\Footnote{}|:
+برای قرار دادن زیرنویس انگلیسی. متن انگلیسی را درون \verb|{}| قرار می‌دهیم.
+
+
+
+\newpage
+\chapter{امکانات حروف‌چینی فارسی }
+\section{حروف‌چینی شعر}
+حروف‌چینی شعر از فارسی‌تک به \eng{\XePersian} اضافه شده است. در اینجا لازم می‌دانم از آقای بهداد اسفهبد که مؤلف اصلی آن هستند تشکر کنم.
+
+\vspace{0.5cm}
+
+لطفاً به خاطر داشته باشید که برای حروف‌چینی شعر نیازی به قراردادن بسته‌ای خاص ندارید؛ \eng{\XePersian} این کار را بصورت خودکار انجام می‌دهد.
+\subsection{حروف‌چینی شعر سنتی}
+حروف‌چینی شعر سنتی در محیطی به نام \eng{oldpoem} انجام می‌گیرد. این محیط دو حالت دارد:
+\subsubsection{حالت معمولی}
+\begin{oldpoem}
+هله رفتیم و گرانی ز جمالت بردیم&
+جهت توشهٔ ره ذکر وصالت بردیم\\
+تا که ما را و ترا تذکرهٔ خوش باشد&
+دل خسته بتو دادیم و خیالت بردیم\\
+آن خیال رُخ خوبت که قمر بندهٔ اوست&
+وان خَم ابروی مانند هلالت بردیم\\
+و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست&
+ز شکر خانهٔ مجموع خصالت بردیم\\
+چون کبوتر چو بپریم بتو بازآییم&
+زانکه ما این پَر و بال از پَر و بالت بردیم\\
+هر کجا پرد فرعی، بسوی اصل آید&
+هر چه داریم هم از عزّ و جلالت بردیم\\
+شمس تبریز شنو خدمت ما را زصبا&
+گر شمالست و صبا هم ز شمالت بردیم
+
+\end{oldpoem}
+شعر بالا با کد زیر تولید شده است:
+
+\setLR
+\verb|\documentclass{article}|\\
+\verb|\usepackage{xepersian}|\\
+\verb|\begin{document}|\\
+\verb|\begin{oldpoem}|\\
+\textfarsi{هله رفتیم و گرانی ز جمالت بردیم}\verb|&|\\
+\textfarsi{جهت توشهٔ ره ذکر وصالت بردیم}\verb|\\|\\
+\textfarsi{تا که ما را و ترا تذکرهٔ خوش باشد}\verb|&|\\
+\textfarsi{دل خسته بتو دادیم و خیالت بردیم}\verb|\\|\\
+\textfarsi{آن خیال رُخ خوبت که قمر بندهٔ اوست}\verb|&|\\
+\textfarsi{وان خَم ابروی مانند هلالت بردیم}\verb|\\|\\
+\textfarsi{و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست}\verb|&|\\
+\textfarsi{ز شکر خانهٔ مجموع خصالت بردیم}\verb|\\|\\
+\textfarsi{چون کبوتر چو بپریم بتو بازآییم}\verb|&|\\
+\textfarsi{زانکه ما این پَر و بال از پَر و بالت بردیم}\verb|\\|\\
+\textfarsi{هر کجا پرد فرعی، بسوی اصل آید}\verb|&|\\
+\textfarsi{هر چه داریم هم از عزّ و جلالت بردیم}\verb|\\|\\
+\textfarsi{شمس تبریز شنو خدمت ما را زصبا}\verb|&|\\
+\textfarsi{گر شمالست و صبا هم ز شمالت بردیم}\\
+\verb|\end{oldpoem}|\\
+\verb|\end{document}|
+\setRL
+\subsubsection{حالت ستاره‌دار}
+\begin{oldpoem*}
+هله رفتیم و گرانی ز جمالت بردیم&
+جهت توشهٔ ره ذکر وصالت بردیم\\
+تا که ما را و ترا تذکرهٔ خوش باشد&
+دل خسته بتو دادیم و خیالت بردیم\\
+آن خیال رُخ خوبت که قمر بندهٔ اوست&
+وان خَم ابروی مانند هلالت بردیم\\
+و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست&
+ز شکر خانهٔ مجموع خصالت بردیم\\
+چون کبوتر چو بپریم بتو بازآییم&
+زانکه ما این پَر و بال از پَر و بالت بردیم\\
+هر کجا پرد فرعی، بسوی اصل آید&
+هر چه داریم هم از عزّ و جلالت بردیم\\
+شمس تبریز شنو خدمت ما را زصبا&
+گر شمالست و صبا هم ز شمالت بردیم
+
+\end{oldpoem*}
+شعر بالا با کد زیر تولید شده است:
+
+\setLR
+\verb|\documentclass{article}|\\
+\verb|\usepackage{xepersian}|\\
+\verb|\begin{document}|\\
+\verb|\begin{oldpoem*}|\\
+\textfarsi{هله رفتیم و گرانی ز جمالت بردیم}\verb|&|\\
+\textfarsi{جهت توشهٔ ره ذکر وصالت بردیم}\verb|\\|\\
+\textfarsi{تا که ما را و ترا تذکرهٔ خوش باشد}\verb|&|\\
+\textfarsi{دل خسته بتو دادیم و خیالت بردیم}\verb|\\|\\
+\textfarsi{آن خیال رُخ خوبت که قمر بندهٔ اوست}\verb|&|\\
+\textfarsi{وان خَم ابروی مانند هلالت بردیم}\verb|\\|\\
+\textfarsi{و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست}\verb|&|\\
+\textfarsi{ز شکر خانهٔ مجموع خصالت بردیم}\verb|\\|\\
+\textfarsi{چون کبوتر چو بپریم بتو بازآییم}\verb|&|\\
+\textfarsi{زانکه ما این پَر و بال از پَر و بالت بردیم}\verb|\\|\\
+\textfarsi{هر کجا پرد فرعی، بسوی اصل آید}\verb|&|\\
+\textfarsi{هر چه داریم هم از عزّ و جلالت بردیم}\verb|\\|\\
+\textfarsi{شمس تبریز شنو خدمت ما را زصبا}\verb|&|\\
+\textfarsi{گر شمالست و صبا هم ز شمالت بردیم}\\
+\verb|\end{oldpoem*}|\\
+\verb|\end{document}|
+\setRL
+\subsection{حروف‌چینی شعر نو}
+حروف‌چینی شعر نو نیز در محیطی به نام \eng{newpoem} امکان پذیر است. این محیط دارای دو حالت معمولی و ستاره‌دار می‌باشد.
+\section{تهیه اسلاید}
+به آسانی می‌توانید اسلایدهای زیبایی را با کلاس \eng{beamer} در \eng{\XePersian} درست کنید. مثالی نیز در پوشهٔ \eng{doc} موجود می‌باشد. در نسخه‌های بعدی تلاش خواهد شد تا کلاسها و بسته‌های مختلف و متنوع دیگری را برای تهیه اسلاید در \eng{\XePersian} فراهم آورد.
+\section{نوشتهٔ سرصفحه}
+برای فعال کردن نوشتهٔ سر صفحه سه راه وجود دارد:
+\begin{itemize}
+\item
+در پیش‌درآمد فایل خود دستور \verb|\pagestyle{headings}| را قرار دهید.
+\item
+در پیش‌درآمد فایل خود دستور \verb|\pagestyle{myheadings}| را قرار دهید و سپس \eng{\texttt{myheadings}} را تعریف کنید.
+\item
+از بستهٔ \eng{\texttt{fancyhdr}} استفاده کنید که کاملاً با \eng{\XePersian} سازگار است.
+\end{itemize}
+\section{قرار دادن عکس}
+قرار دادن عکس نیز به آسانی امکان پذیر است. هر چند که می‌توانید از دستورات
+\eng{\XeTeX}
+ استفاده کنید اما دستور
+\verb|\includegraphics|
+ پیشنهاد می‌شود.
+\section{جدول}
+به آسانی می‌توانید جدول خود را در
+\eng{\XePersian}
+ تولید کنید.
+\section{حروف‌چینی یک متن در چند ستون}
+می‌توانید تا ۵ ستون داشته باشید. برای حروف‌چینی یک متن در چند ستون از محیط زیر استفاده می‌کنیم:
+
+\setLR
+\verb|\begin{multicols}{number of columns}|
+
+$\vdots$
+
+\verb|\end{multicols}|
+\setRL
+\end{farsi}
+\end{document}
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttf
new file mode 100644
index 00000000000..3e2323d414b
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/LateefRegOT.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/LateefRegOT.ttf
new file mode 100644
index 00000000000..e4707bdb220
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/LateefRegOT.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/ScheherazadeRegOT.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/ScheherazadeRegOT.ttf
new file mode 100644
index 00000000000..8c94738f537
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/ScheherazadeRegOT.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/elham.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/elham.ttf
new file mode 100644
index 00000000000..75fcddbf6ea
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/elham.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/homa.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/homa.ttf
new file mode 100644
index 00000000000..e188a50f40d
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/homa.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/koodak.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/koodak.ttf
new file mode 100644
index 00000000000..dbbe3095437
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/koodak.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/nazli.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/nazli.ttf
new file mode 100644
index 00000000000..76b9f260b6e
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/nazli.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/nazlib.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/nazlib.ttf
new file mode 100644
index 00000000000..2a8e4856ca0
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/nazlib.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/roya.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/roya.ttf
new file mode 100644
index 00000000000..5cb6071af6a
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/roya.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/royab.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/royab.ttf
new file mode 100644
index 00000000000..968202b4bc7
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/royab.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/terafik.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/terafik.ttf
new file mode 100644
index 00000000000..89f7acdefd7
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/terafik.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/terafikb.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/terafikb.ttf
new file mode 100644
index 00000000000..f805d8b6697
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/terafikb.ttf
Binary files differ
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/titr.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/titr.ttf
new file mode 100644
index 00000000000..486f9ba03d9
--- /dev/null
+++ b/Master/texmf-dist/fonts/truetype/public/xepersian/titr.ttf
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty b/Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty
new file mode 100644
index 00000000000..8aed77da7b5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty
@@ -0,0 +1,220 @@
+%%
+%% This is file `poem.sty',
+%% Copyright(C) 2002, 2004 Behdad Esfahbod <behdad@farsitex.org>
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% TODO: Add some penalties and whistles to newpoem
+%%
+\ifx\fmtname{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{persianpoem}%
+ [2004/09/27 Environments for Setting Persian Poetry]
+\else
+ \typeout{2004/09/27 Environments for Setting Persian Poetry}
+\fi
+
+\def\poemcolsepskip{.1\versewidth plus .1\versewidth minus .05\versewidth}
+\def\poemmarginskip{1em plus 1fil minus 1em}
+\def\poemextrabaselineskip{0\baselineskip}
+\def\poemskip{\medskip}
+\def\poemblocksep{\quad$\Box$}
+
+%% oldpoem environment
+
+\newdimen\versewidth
+
+\def\poem@verse#1{%
+ \ifdim\wd#1>\new@poem@width
+ \xdef\new@poem@width{\the\wd#1}%
+ \ifdim\new@poem@width>\poem@width
+ \xdef\poem@width{\new@poem@width}%
+ \global\let\poem@needrun\relax
+ \fi
+ \fi
+ \hbox to\poem@width{\unhbox#1}%
+}
+\def\poem@linebegin{\vadjust{}\hskip\@flushglue\hskip\poemmarginskip\relax}
+\def\poem@lineend{\nobreak\hskip\poemmarginskip\hskip\@flushglue\vadjust{}}
+\def\poem@lineversesep{%
+ \nobreak
+ \hskip\z@ plus 1filll%
+ \penalty600%
+ \hskip\poemcolsepskip
+ \hskip\z@ plus -2filll%
+ \vadjust{}%
+ \nobreak
+ \hskip\z@ plus 1filll%
+}
+
+\def\poem@lineparsebegin{%
+ \halign\bgroup
+ \global\setbox\verse@i=\hbox{\ignorespaces##\unskip}&&
+ \global\setbox\verse@ii=\hbox{\ignorespaces##\unskip}
+ \cr
+}
+\def\poem@lineparseend{%
+ \crcr\egroup
+ \vskip-\baselineskip
+}
+\def\oldpoem@cr{%
+ \cr\poem@line
+}
+
+\newbox\verse@i
+\newbox\verse@ii
+\newif\ifpoem@started
+
+\def\poem@line{%
+ \poem@lineparseend
+%
+ \ifdim\wd\verse@i>\z@\global\poem@startedtrue\fi
+ \ifdim\wd\verse@ii>\z@\global\poem@startedtrue\fi
+ \ifpoem@started
+ \ifdim\wd\verse@ii>\z@\else
+ \nopagebreak[3]
+ \fi
+ \leavevmode
+ \poem@linebegin
+ \poem@verse\verse@i
+ \ifdim\wd\verse@ii>\z@
+ \poem@lineversesep
+ \poem@verse\verse@ii
+ \fi
+ \poem@lineend
+ \nopagebreak
+ \endgraf
+ \vskip\poemextrabaselineskip
+ \fi
+%
+ \poem@lineparsebegin
+}
+\def\@oldpoem{%
+ \stepcounter{poem@no}
+ \ifnum\max@poem@no<\number\c@poem@no%
+ \xdef\poem@width{\z@}%
+ \else
+ \xdef\poem@width{\poem@prop{poem@width}}%
+ \fi
+ \xdef\new@poem@width{\z@}%
+ \global\versewidth=\poem@width
+ \poemskip\leavevmode\par
+ \begingroup
+ \tabskip=\z@
+ \parskip=\z@
+ \parindent=\z@
+ \parfillskip=\z@
+ \rightskip=\z@
+ \leftskip=\z@
+ \widowpenalty=10000% No break between verses of the same line.
+ \clubpenalty=10000% Same as above. Not really needed.
+ \def\newblock{\hfil\poemblocksep\hfil\null}%
+ \def\par{\oldpoem@cr}% Redefine \par for possible \obeylines
+ \def\\{\global\poem@startedtrue\oldpoem@cr}%
+ \global\poem@startedfalse
+ \csname poem@obeylines\endcsname
+ \let\poem@obeylines\relax
+ \poem@lineparsebegin
+}
+\def\@endoldpoem{%
+ \cr
+ \ifdim\wd\verse@i>\z@\poem@line\else\ifdim\wd\verse@ii>\z@\poem@line\else
+ \noalign{%
+ \skip0=\poemextrabaselineskip
+ \vskip-\skip0
+ \vskip-\baselineskip
+ }%
+ \fi\fi
+ \poem@lineparseend
+ \endgroup
+ \par
+ \vskip\baselineskip
+ \poemskip
+ \ifdim\new@poem@width<\poem@width
+ \global\let\poem@needrun\relax
+ \fi
+ \poem@write@aux{poem@width@\romannumeral\c@poem@no}{\new@poem@width}%
+ \ifx\AtEndDocument\undefined\poem@finish\fi
+}
+\newenvironment{oldpoem}{\@oldpoem}{\@endoldpoem}
+
+\expandafter\def\csname oldpoem*\endcsname{\let\poem@obeylines=\obeylines\oldpoem}
+\expandafter\def\csname endoldpoem*\endcsname{\endoldpoem}
+
+
+\def\poem@finish{%
+ \poem@write@aux{max@poem@no}{\number\c@poem@no}%
+ \ifx\poem@needrun\relax
+ \@@warning{Unjustified poetry. Rerun to get poems right}%
+ \global\let\poem@needrun\undefined
+ \fi
+}
+\ifx\AtEndDocument\undefined\else\AtEndDocument\poem@finish\fi
+
+\newcounter{poem@no}\setcounter{poem@no}{\z@}
+\ifx\max@poem@no\undefined
+ \def\max@poem@no{0}%
+\fi
+
+\newcommand{\poem@prop}[1]{\@nameuse{#1@\romannumeral\c@poem@no}}
+
+\newcommand{\poem@write@aux}[2]{%
+ \def\@x{\immediate\write\@auxout{\global\noexpand\@namedef{#1}{#2}}}%
+ \@x
+}
+
+%% newpoem environment
+
+\def\@newpoem{%
+ \par
+ \begingroup
+ \parskip=\z@
+ \parindent=\z@
+ \def\[{\@settab\@tabplus\ignorespaces}%
+ \def\]{\@tabminus\ignorespaces}%
+ \def\newblock{\poemblocksep}%
+ \let\newpoem@tabcr\@tabcr
+ \def\par{% Redefine \par for possible \obeylines
+ \ifpoem@started\else
+ \ifdim\wd\@curline>\z@\global\poem@startedtrue\else
+ \@stopfield
+ \ifdim\wd\@curfield>\z@\global\poem@startedtrue\fi
+ \@contfield
+ \fi
+ \fi
+ \ifpoem@started\newpoem@tabcr\fi}%
+ \def\@tabcr{\global\poem@startedtrue\newpoem@tabcr}%
+ \global\poem@startedfalse
+ \csname poem@obeylines\endcsname
+ \let\poem@obeylines\relax
+ \begin{tabbing}%
+}
+\def\@endnewpoem{%
+ \global\poem@startedfalse
+ \ifdim\wd\@curline>\z@\global\poem@startedtrue\else
+ \@stopfield
+ \ifdim\wd\@curfield>\z@\global\poem@startedtrue\fi
+ \@contfield
+ \fi
+ \ifpoem@started\else\let\@stopline\@stopfield\fi
+ \end{tabbing}%
+ \endgroup
+ \par
+}
+
+\newenvironment{newpoem}{\@newpoem}{\@endnewpoem}
+
+\expandafter\def\csname newpoem*\endcsname{\let\poem@obeylines=\obeylines\newpoem}
+\expandafter\def\csname endnewpoem*\endcsname{\endnewpoem}
+
+
+\endinput
+%%
+%% End of file `poem.sty'.
+
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
new file mode 100644
index 00000000000..d647998cfc9
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
@@ -0,0 +1,523 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian}[2008/07/11 v0.16
+ Typesetting Persian with XeTeX]
+\RequirePackage{amssymb}
+\RequirePackage{graphicx}
+\RequirePackage{fontspec}
+\RequirePackage{amsmath,amsthm}
+\RequirePackage{xunicode,bidi}
+\RequirePackage{arabxetex}
+\RequirePackage{xltxtra}
+\RequirePackage{persianpoem,fmultico}
+\RequirePackage{xcolor}
+\newfontinstance\farsifont[Script=Arabic,Scale=1.2,Mapping=farsidigits]{Nazli}
+\newfontinstance\arabicfont[Script=Arabic,Scale=1.2]{Scheherazade}
+\newfontinstance\logofont[Script=Arabic,Scale=1.2]{IranNastaliq}
+\makeatletter
+\renewcommand{\thepage}{\textfarsi{\the\c@page}}
+\renewcommand{\thepart}{\textfarsi{\the\c@part}}
+%
+\renewcommand{\thefootnote}{\textfarsi{\arabic{footnote}}}
+\renewcommand{\thefigure}{\textfarsi{\arabic{figure}}}
+\renewcommand{\thetable}{\textfarsi{\arabic{table}}}
+\renewcommand{\theequation}{\textfarsi{\arabic{equation}}}
+%
+\renewcommand{\figurename}{\textfarsi{شکل}}
+\renewcommand{\tablename}{\textfarsi{جدول}}
+\renewcommand{\contentsname}{\textfarsi{فهرست مطالب}}%
+\renewcommand{\listfigurename}{\textfarsi{لیست تصاویر}}%
+\renewcommand{\listtablename}{\textfarsi{لیست جداول}}%
+\renewcommand{\appendixname}{\textfarsi{پیوست}}%
+\renewcommand{\indexname}{\textfarsi{نمایه}}%
+\@ifclassloaded{article}{%
+\renewcommand{\thesection}{\textfarsi{\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\refname}{\textfarsi{مراجع}}%
+\renewcommand{\abstractname}{\textfarsi{چکیده}}%
+\RequirePackage{makeidx}
+\RequirePackage{robustindex}
+\makeindex
+}{}
+\@ifclassloaded{amsart}{%
+\renewcommand{\thesection}{\textfarsi{\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\refname}{\textfarsi{مراجع}}%
+\renewcommand{\abstractname}{\textfarsi{چکیده}}%
+\RequirePackage{robustindex}
+\makeindex
+}{}
+\@ifclassloaded{report}{%
+\renewcommand{\thechapter}{\textfarsi{\the\c@chapter}}
+\renewcommand{\thesection}{\textfarsi{\the\c@chapter.\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%
+\renewcommand{\abstractname}{\textfarsi{چکیده}}%
+\renewcommand{\chaptername}{\textfarsi{فصل}}%
+\renewcommand{\partname}{\textfarsi{بخش}}%
+\RequirePackage{makeidx}
+\RequirePackage{robustindex}
+\makeindex
+}{}
+\@ifclassloaded{amsbook}{%
+\renewcommand{\thechapter}{\textfarsi{\the\c@chapter}}
+\renewcommand{\thesection}{\textfarsi{\the\c@chapter.\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%
+\renewcommand{\chaptername}{\textfarsi{فصل}}%
+\renewcommand{\partname}{\textfarsi{بخش}}%
+\RequirePackage{robustindex}
+\makeindex
+}{}
+\@ifclassloaded{bookest}{%
+\NoHyper
+\renewcommand{\thechapter}{\textfarsi{\the\c@chapter}}
+\renewcommand{\thesection}{\textfarsi{\the\c@chapter.\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%
+\renewcommand{\chaptername}{\textfarsi{فصل}}%
+\renewcommand{\partname}{\textfarsi{بخش}}%
+\RequirePackage{makeidx}
+\RequirePackage{robustindex}
+\makeindex
+}{}
+\@ifclassloaded{book}{%
+\renewcommand{\thechapter}{\textfarsi{\the\c@chapter}}
+\renewcommand{\thesection}{\textfarsi{\the\c@chapter.\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%
+\renewcommand{\chaptername}{\textfarsi{فصل}}%
+\renewcommand{\partname}{\textfarsi{بخش}}%
+\RequirePackage{makeidx}
+\RequirePackage{robustindex}
+\makeindex
+}{}
+\@ifclassloaded{refrep}{%
+\renewcommand{\thechapter}{\textfarsi{\the\c@chapter}}
+\renewcommand{\thesection}{\textfarsi{\the\c@chapter.\the\c@section}}
+\renewcommand{\thesubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection}}
+\renewcommand{\thesubsubsection}{\textfarsi{\the\c@chapter.\the\c@section.\the\c@subsection.\the\c@subsubsection}}
+\renewcommand{\bibname}{\textfarsi{کتاب‌نامه}}%
+\renewcommand{\chaptername}{\textfarsi{فصل}}%
+\renewcommand{\partname}{\textfarsi{بخش}}%
+\RequirePackage{makeidx}
+\RequirePackage{robustindex}
+\makeindex
+}{}
+%\renewcommand{\prefacename}{\textfarsi{پیشگفتار}}%
+
+
+%To convert the MILADI date to SHAMSI date, taken from farsitex
+\newif\ifFT@leap \newif\ifFT@kabiseh
+\newcount\FT@i \newcount\FT@y \newcount\FT@m \newcount\FT@d
+\newcount\FT@latini \newcount\FT@farsii
+\newcount\FT@latinii \newcount\FT@farsiii
+\newcount\FT@latiniii \newcount\FT@farsiiii
+\newcount\FT@latiniv \newcount\FT@farsiiv
+\newcount\FT@latinv \newcount\FT@farsiv
+\newcount\FT@latinvi \newcount\FT@farsivi
+\newcount\FT@latinvii \newcount\FT@farsivii
+\newcount\FT@latinviii \newcount\FT@farsiviii
+\newcount\FT@latinix \newcount\FT@farsiix
+\newcount\FT@latinx \newcount\FT@farsix
+\newcount\FT@latinxi \newcount\FT@farsixi
+\newcount\FT@latinxii \newcount\FT@farsixii
+ \newcount\FT@farsixiii
+
+\newcount\FT@temp
+\newcount\FT@temptwo
+\newcount\FT@tempthree
+\newcount\FT@yModHundred
+\newcount\FT@thirtytwo
+\newcount\FT@dn
+\newcount\FT@sn
+\newcount\FT@mminusone
+
+\def\ftoday{%
+\FT@y=\year \FT@m=\month \FT@d=\day
+%
+\FT@temp=\FT@y
+\divide\FT@temp by 100\relax
+\multiply\FT@temp by 100\relax
+\FT@yModHundred=\FT@y
+\advance\FT@yModHundred by -\FT@temp\relax
+%
+\ifodd\FT@yModHundred
+ \FT@leapfalse
+\else
+ \FT@temp=\FT@yModHundred
+ \divide\FT@temp by 2\relax
+ \ifodd\FT@temp\FT@leapfalse
+ \else
+ \ifnum\FT@yModHundred=0%
+ \FT@temp=\FT@y
+ \divide\FT@temp by 400\relax
+ \multiply\FT@temp by 400\relax
+ \ifnum\FT@y=\FT@temp\FT@leaptrue\else\FT@leapfalse\fi
+ \else\FT@leaptrue
+ \fi
+ \fi
+\fi
+%
+\FT@latini=31\relax
+\ifFT@leap
+ \FT@latinii = 29\relax
+\else
+ \FT@latinii = 28\relax
+\fi
+\FT@latiniii = 31\relax
+\FT@latiniv = 30\relax
+\FT@latinv = 31\relax
+\FT@latinvi = 30\relax
+\FT@latinvii = 31\relax
+\FT@latinviii = 31\relax
+\FT@latinix = 30\relax
+\FT@latinx = 31\relax
+\FT@latinxi = 30\relax
+\FT@latinxii = 31\relax
+%
+\FT@thirtytwo=32\relax
+%
+\FT@temp=\FT@y
+\advance\FT@temp by -17\relax
+\FT@temptwo=\FT@temp
+\divide\FT@temptwo by 33\relax
+\multiply\FT@temptwo by 33\relax
+\advance\FT@temp by -\FT@temptwo
+\ifnum\FT@temp=\FT@thirtytwo\FT@kabisehfalse
+\else
+ \FT@temptwo=\FT@temp
+ \divide\FT@temptwo by 4\relax
+ \multiply\FT@temptwo by 4\relax
+ \advance\FT@temp by -\FT@temptwo
+ \ifnum\FT@temp=\z@\FT@kabisehtrue\else\FT@kabisehfalse\fi
+\fi
+%
+% --BE
+% In fact farsii is equal to the Leap years from a fixed year to the last
+% year minus the Kabise years from a fixed year to the last year plus a const.
+%
+\FT@tempthree=\FT@y % Number of Leap years
+\advance\FT@tempthree by -1
+\FT@temp=\FT@tempthree % T := (MY-1) div 4
+\divide\FT@temp by 4\relax
+\FT@temptwo=\FT@tempthree % T := T - ((MY-1) div 100)
+\divide\FT@temptwo by 100\relax
+\advance\FT@temp by -\FT@temptwo
+\FT@temptwo=\FT@tempthree % T := T + ((MY-1) div 400)
+\divide\FT@temptwo by 400\relax
+\advance\FT@temp by \FT@temptwo
+\advance\FT@tempthree by -611 % Number of Kabise years
+\FT@temptwo=\FT@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\FT@temptwo by 33\relax
+\multiply\FT@temptwo by 8\relax
+\advance\FT@temp by -\FT@temptwo
+\FT@temptwo=\FT@tempthree %
+\divide\FT@temptwo by 33\relax
+\multiply\FT@temptwo by 33\relax
+\advance\FT@tempthree by -\FT@temptwo
+\ifnum\FT@tempthree=32\advance\FT@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\FT@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\FT@temp by -\FT@tempthree
+\advance\FT@temp by -137 % T := T - 137 Adjust the value
+\FT@farsii=31
+\advance\FT@farsii by -\FT@temp % now 31 - T is the farsii
+%
+\FT@farsiii = 30\relax
+\ifFT@kabiseh
+ \FT@farsiiii = 30\relax
+\else
+ \FT@farsiiii = 29\relax
+\fi
+\FT@farsiiv = 31\relax
+\FT@farsiv = 31\relax
+\FT@farsivi = 31\relax
+\FT@farsivii = 31\relax
+\FT@farsiviii= 31\relax
+\FT@farsiix = 31\relax
+\FT@farsix = 30\relax
+\FT@farsixi = 30\relax
+\FT@farsixii = 30\relax
+\FT@farsixiii= 30\relax
+%
+\FT@dn= 0\relax
+\FT@sn= 0\relax
+\FT@mminusone=\FT@m
+\advance\FT@mminusone by -1\relax
+%
+\FT@i=0\relax
+\ifnum\FT@i < \FT@mminusone
+\loop
+\advance \FT@i by 1\relax
+\advance\FT@dn by \csname FT@latin\romannumeral\the\FT@i\endcsname
+\ifnum\FT@i<\FT@mminusone \repeat
+\fi
+\advance \FT@dn by \FT@d
+%
+\FT@i=1\relax
+\FT@sn = \FT@farsii
+\ifnum \FT@sn<\FT@dn
+\loop
+\advance \FT@i by 1\relax
+\advance\FT@sn by \csname FT@farsi\romannumeral\the\FT@i\endcsname
+\ifnum \FT@sn<\FT@dn \repeat
+\fi
+\ifnum \FT@i < 4
+ \FT@m = 9 \advance\FT@m by \FT@i
+ \advance \FT@y by -622\relax
+\else
+ \FT@m = \FT@i \advance \FT@m by -3\relax
+ \advance \FT@y by -621\relax
+\fi
+\advance\FT@sn by -\csname FT@farsi\romannumeral\the\FT@i%
+\endcsname
+\ifnum\FT@i = 1
+ \FT@d = \FT@dn \advance \FT@d by 30 \advance\FT@d by -\FT@farsii
+\else
+ \FT@d = \FT@dn \advance \FT@d by -\FT@sn
+\fi
+\beginL\number\FT@d\endL\space%
+%Changedc from here YJ
+\farsimonth{\FT@m}\space\beginL\number\FT@y\endL%
+}
+% added \farsimonth YJ
+\def\farsimonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or
+خرداد\or تیر\or
+مرداد\or
+شهریور\or مهر\or
+آبان\or آذر\or
+دی\or بهمن\or
+اسفند\fi}
+
+%The figure or table caption
+\newsavebox\@Arabitempboxa
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@Arabitempboxa{\beginR #1: #2\endR}%
+ \ifdim \wd\@Arabitempboxa >\hsize
+ \beginR #1: #2\endR\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+\makeatother
+\makeatletter
+%The correct the right footnorerule so it does not overlap the texts
+\def\r@fn{%
+ \hbox to \columnwidth
+ {\beginR \vbox{\kern -3\p@
+ \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
+\def\footnoterule{\r@fn}
+\makeatother
+
+
+%a command to put a footnote from left to right
+%while in a right to left context
+\newcommand{\Footnote}[1]{%
+\bgroup% To make the scope of the change local
+\footnotemark%
+\renewcommand{\thefootnote}{\arabic{footnote}}%
+\unsetRL%
+\footnotetext{#1}%
+\egroup
+}
+
+%we have to swap the following two characters
+%when we are in a Right-to-Left environment
+\makeatletter
+\catcode"00AB=\active%left double quote
+\catcode"00BB=\active%right double quote
+\def«{\if@rl\char"00BB\else\char"00AB\fi{}}
+\def»{\if@rl\char"00AB\else\char"00BB\fi{}}
+\makeatother
+
+%For Right-to-Left two column command, I guess taken from rlbabel
+\makeatletter
+\let\@old@outputdblcol\@outputdblcol
+\newcommand{\rl@outputdblcol}{%
+ \if@firstcolumn
+ \global \@firstcolumnfalse
+ \global \setbox\@leftcolumn \box\@outputbox
+ \else
+ \global \@firstcolumntrue
+ \setbox\@outputbox \vbox {\hb@xt@\textwidth {%
+ \hskip\columnwidth%
+ \hfil\vrule\@width\columnseprule\hfil
+ \hb@xt@\columnwidth {%
+ \box\@leftcolumn \hss}%
+ \hb@xt@\columnwidth {%
+ \hskip-\textwidth%
+ \box\@outputbox \hss}%
+ \hskip\columnsep%
+ \hskip\columnwidth}}%
+ \@combinedblfloats
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi
+ {\@outputpage
+ \@startdblcolumn}%
+ \endgroup
+ \fi}
+\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl@outputdblcol}}
+\newcommand{\lrdblcolumn}{\renewcommand{\@outputdblcol}{\@old@outputdblcol}}
+%set the default direction of the twocolumn texts to Right-to-Left
+\rldblcolumn
+\makeatother
+
+
+% define the XePersian logo
+\newcommand{\XePersian}{\leavevmode$\smash{\hbox{\XeTeX\lower.2ex
+ \hbox{\kern0em \color[rgb]{0,.6,0}\logofont پارسی}}}$}
+
+\newcommand{\eng}[1]{\textroman{ #1}}
+\newcommand{\fars}[1]{\textfarsi{#1}}
+\newcommand{\arabt}[1]{\textarabic{#1}}
+
+\makeatletter
+\let\@utitle=\title
+\def\title#1{\@utitle{\textfarsi{#1}}}
+\let\@uthor=\author
+\def\author#1{\@uthor{\textfarsi{#1}}}
+\let\@ufootnote=\footnote
+\def\footnote#1{\@ufootnote{\textfarsi{#1}}}
+\let\@uthanks=\thanks
+\def\thanks#1{\@uthanks{\textfarsi{#1}}}
+\def\today{\textfarsi{\ftoday}}
+\let\@urightmark=\rightmark
+\def\rightmark{\textfarsi{\@urightmark}}
+\let\@uleftmark=\leftmark
+\def\leftmark{\textfarsi{\@uleftmark}}
+\let\normalfont=\farsifont
+\let\@uframetitle=\frametitle
+\def\frametitle#1{\@uframetitle{\centerline{\textfarsi{#1}}}}
+\let\@uframesubtitle=\framesubtitle
+\def\framesubtitle#1{\@uframesubtitle{\centerline{\textfarsi{#1}}}}
+\let\@usubtitle=\subtitle
+\def\subtitle#1{\@usubtitle{\textfarsi{#1}}}
+\let\@uinstitute=\institute
+\def\institute#1{\@uinstitute{\textfarsi{#1}}}
+\let\@ucaption=\caption
+\def\caption#1{\@ucaption{\textfarsi{#1}}}
+\makeatother
+\makeatletter
+%To fix tabular problem in bidi. Taken from farsitex
+\newif\if@tabsw
+\global\@tabswfalse
+\def\@tabular{\if@rl\global\@tabswtrue\fi
+ \leavevmode \hbox \bgroup \if@tabsw\beginR\normalfont \fi
+ $\let\@acol\@tabacol
+ \let\@classz\@tabclassz
+ \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
+\def\endtabular{\crcr\egroup\if@tabsw\egroup\endR\egroup\fi
+ \egroup $\if@tabsw\endR\fi \egroup
+ \global\@tabswfalse}
+\expandafter \let \csname endtabular*\endcsname = \endtabular
+
+\def\@array[#1]#2{\setbox\@arstrutbox=\hbox{\vrule
+ height\arraystretch \ht\strutbox
+ depth\arraystretch \dp\strutbox
+ width\z@}\@mkpream{#2}\edef\@preamble{%
+\halign \noexpand\@halignto
+\bgroup \tabskip\z@ \@arstrut \@preamble \tabskip\z@ \cr}%
+\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
+\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
+\bgroup \let\par\relax
+\let\@sharp##\let\protect\relax \lineskip\z@\baselineskip\z@
+\if@tabsw\hbox\bgroup\beginR\vbox\bgroup\fi
+\@preamble}
+
+%taken from rlbabel.ldf
+\newif\if@rl
+\AtBeginDocument{% Here we set the main document direction
+ \newif\if@rlmain%
+ \if@rl% e.g: if the options to babel were [english,hebrew]
+ \@rlmaintrue%
+ \else% e.g: if the options to babel were [hebrew,english]
+ \@rlmainfalse%
+ \fi%
+}
+
+%To fix eqref problem taken from amsmath
+\let\@@text=\text
+\def\text#1{\@@text{\RL{#1}}}
+
+\def\tagform@#1{\maketag@@@{)\ignorespaces\text{#1}\unskip\@@italiccorr(}}
+\renewcommand{\eqref}[1]{(\ref{#1})}
+
+%To fix equation numbers. taken from amsmath
+{\renewenvironment{equation}{%
+ \unsetRL
+ \incr@eqnum
+ \mathdisplay@push
+ \st@rredfalse \global\@eqnswtrue
+ \mathdisplay{equation}%
+\setRL
+}{%
+\unsetRL
+ \endmathdisplay{equation}%
+ \mathdisplay@pop
+ \ignorespacesafterend
+\setRL
+}}
+\makeatother
+%to make the digits in math formula persian
+\font\tenrgm="Nazli" at 12pt
+\font\sevrgm="Nazli" at 10pt
+\font\fivrgm="Nazli" at 7pt
+\newfam\fardig
+\textfont\fardig=\tenrgm
+\scriptfont\fardig=\sevrgm
+\scriptscriptfont\fardig=\fivrgm
+\def\maths{
+ \XeTeXmathcode`0="7 \fardig "06F0%
+ \XeTeXmathcode`1="7 \fardig "06F1%
+ \XeTeXmathcode`2="7 \fardig "06F2%
+ \XeTeXmathcode`3="7 \fardig "06F3%
+ \XeTeXmathcode`4="7 \fardig "06F4%
+ \XeTeXmathcode`5="7 \fardig "06F5%
+ \XeTeXmathcode`6="7 \fardig "06F6%
+ \XeTeXmathcode`7="7 \fardig "06F7%
+ \XeTeXmathcode`8="7 \fardig "06F8%
+ \XeTeXmathcode`9="7 \fardig "06F9%
+ \XeTeXmathcode`.="7 \fardig "066B%decimal point
+}
+\XeTeXmathcode`٫="7 \fardig "066B%decimal point
+\XeTeXmathcode`۰="7 \fardig "06F0%
+\XeTeXmathcode`۱="7 \fardig "06F1%
+\XeTeXmathcode`۲="7 \fardig "06F2%
+\XeTeXmathcode`۳="7 \fardig "06F3%
+\XeTeXmathcode`۴="7 \fardig "06F4%
+\XeTeXmathcode`۵="7 \fardig "06F5%
+\XeTeXmathcode`۶="7 \fardig "06F6%
+\XeTeXmathcode`۷="7 \fardig "06F7%
+\XeTeXmathcode`۸="7 \fardig "06F8%
+\XeTeXmathcode`۹="7 \fardig "06F9%
+%to resolve a problem we encounter when using power
+%or index in math formula
+\makeatletter\def\arabtex@codes{}\makeatother
+\AtBeginDocument{\maths}
+
+
+
+\endinput
+
+
+
+
+
+
+
+
+
+
+
+