summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-02-19 23:44:56 +0000
committerKarl Berry <karl@freefriends.org>2009-02-19 23:44:56 +0000
commit67abb70d8ddcd608708a0ae42fe03abf461b11a0 (patch)
tree130ea82165dcd7483b4b7c9c398e9a92094ac8b4
parente16b8e85c829a4c86c8b24241b3d05ca3499535a (diff)
xepersian update (19feb09)
git-svn-id: svn://tug.org/texlive/trunk@12192 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/README26
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdfbin79014 -> 80361 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex6
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdfbin58735 -> 75207 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex6
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdfbin158883 -> 158860 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad1.PNGbin20001 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad2.PNGbin33401 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad3.PNGbin34644 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad4.PNGbin9097 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad5.PNGbin8865 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad6.PNGbin9202 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad7.PNGbin21313 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad8.PNGbin10993 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/notepad9.PNGbin10018 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdfbin192359 -> 192350 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf1.PNGbin9255 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf2.PNGbin7685 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdfbin0 -> 109094 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.pdfbin323435 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.tex662
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex54
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex6
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.pdfbin277204 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdfbin0 -> 263915 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex (renamed from Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.tex)8
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttfbin1072328 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/LateefRegOT.ttfbin224920 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/ScheherazadeRegOT.ttfbin248380 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/elham.ttfbin42822 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/homa.ttfbin48827 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/koodak.ttfbin82155 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/nazli.ttfbin55941 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/nazlib.ttfbin68448 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/roya.ttfbin48375 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/royab.ttfbin48061 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/terafik.ttfbin85137 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/terafikb.ttfbin61643 -> 0 bytes
-rw-r--r--Master/texmf-dist/fonts/truetype/public/xepersian/titr.ttfbin86479 -> 0 bytes
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls40
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty864
42 files changed, 585 insertions, 1089 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/README b/Master/texmf-dist/doc/xelatex/xepersian/README
index 07d7807c65d..c1835cee076 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/README
+++ b/Master/texmf-dist/doc/xelatex/xepersian/README
@@ -1,30 +1,22 @@
-------------------------------
-The XePersian Package v0.163
+The XePersian Package v1
-Updates: Huge Improvements: Almost rewritten all the macros, new functionalities have been added and lots of changes are done, written some new classes and packages.
+Updates: Huge Improvements: Making XePersian independent of bidi.sty and fixing all the known bugs.
XePersian is a package written for XeLaTeX that allows users to typeset
-Persian properly. The current version is 0.163 and it will be
-developed to meet the needs of Persian typesetting properly.
+Persian easily. The current version is 1 which is the first stable version
+of the package 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).
+The XePersian package is independent of any operating system, meaning it
+will work on all operating systems.
-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).
+XePersian is licensed as `Free` (lppl=LaTeX Project Public License).
-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
+There are some excellent 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
@@ -33,4 +25,4 @@ Please report any bugs to the author (vafa.khalighi@students.mq.edu.au).
-------------------------------
Vafa Khalighi
-2009/01/05
+2009/02/20
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdf
index 22929001e7a..735fc3af057 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdf
+++ b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex
index f8cc07f7fa4..247589f38ce 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex
@@ -53,9 +53,9 @@
\section{شروع مبحثی دیگر}
\begin{frame}{ادامهّ عنوان قبلی}
\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{لما}
-این یک لما است
-\end{لما}
+\begin{لم}
+این یک لم است
+\end{لم}
\begin{تعریف}
این یک تعریف است
\end{تعریف}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf
index b88b3240eb3..2e902ef0b65 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf
+++ b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex
index 270b23bbc3c..3208bec8586 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex
@@ -46,9 +46,9 @@
\end{frame}
\begin{frame}{ادامهّ عنوان قبلی}
\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{لما}
-این یک لما است
-\end{لما}
+\begin{لم}
+این یک لم است
+\end{لم}
\begin{تعریف}
این یک تعریف است
\end{تعریف}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf
index 05deac3a84e..f4ae64ad985 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf
+++ b/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad1.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad1.PNG
deleted file mode 100644
index fa4280a0541..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad1.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad2.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad2.PNG
deleted file mode 100644
index 2ca989ee4c6..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad2.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad3.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad3.PNG
deleted file mode 100644
index 4caff0cd76f..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad3.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad4.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad4.PNG
deleted file mode 100644
index 93eee3981c3..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad4.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad5.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad5.PNG
deleted file mode 100644
index 966cbd4c731..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad5.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad6.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad6.PNG
deleted file mode 100644
index 117aa7e25ec..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad6.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad7.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad7.PNG
deleted file mode 100644
index edd4d880f0c..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad7.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad8.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad8.PNG
deleted file mode 100644
index af28f12a113..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad8.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/notepad9.PNG b/Master/texmf-dist/doc/xelatex/xepersian/notepad9.PNG
deleted file mode 100644
index 6d252b5f2bc..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/notepad9.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf
index 756b9b0aac7..afa161f416e 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf
+++ b/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf1.PNG b/Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf1.PNG
deleted file mode 100644
index de1339c964c..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf1.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf2.PNG b/Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf2.PNG
deleted file mode 100644
index ecee69220c3..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/sumatrapdf2.PNG
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdf
new file mode 100644
index 00000000000..96bded8c101
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.pdf b/Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.pdf
deleted file mode 100644
index d732dd86730..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.tex b/Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.tex
deleted file mode 100644
index 34557f35426..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/userguide-persian.tex
+++ /dev/null
@@ -1,662 +0,0 @@
-\documentclass{article}
-\makeatletter
-\renewcommand*\l@section{\@dottedtocline{2}{.5em}{2.3em}}
-\renewcommand*\l@subsection{\@dottedtocline{2}{2.7em}{2.3em}}
-\makeatother
-\addtolength{\textwidth}{5cm}
-\addtolength{\hoffset}{-2.5cm}
-\addtolength{\voffset}{-1cm}
-\addtolength{\textheight}{2.5cm}
-%\usepackage{pdfsync}
-\usepackage{fancyhdr}
-\pagestyle{fancy}
-% with this we ensure that the chapter and section
-% headings are in lowercase.
-% \renewcommand{\chaptermark}[1]{%
-% \markboth{#1}{}}
-\renewcommand{\sectionmark}[1]{%
- \markright{\thesection\ #1}}
-\fancyhf{} % delete current header and footer
-\fancyhead[LO,RE]{\bfseries\thepage}
-%\fancyhead[RO]{\bfseries\rightmark}
-\fancyhead[LE,RO]{\bfseries\rightmark}
-\renewcommand{\headrulewidth}{0.5pt}
-\renewcommand{\footrulewidth}{0pt}
-\addtolength{\headheight}{0.5pt} % space for the rule
-\fancypagestyle{plain}{%
- \fancyhead{} % get rid of headers on plain pages
- \renewcommand{\headrulewidth}{0pt} % and the line
-}
-\usepackage{pstricks}
-\usepackage{animate}
-\usepackage{pstricks-add}
-\usepackage{multido}
-\usepackage{color}
-\definecolor{myblue}{rgb}{0.02,0.04,0.48}
-\definecolor{lightblue}{rgb}{0.61,.8,.8}
-\definecolor{myred}{rgb}{0.65,0.04,0.07}
-\definecolor{lightgray}{gray}{0.6}
-\definecolor{mygreen}{rgb}{0,.43,0}
-\usepackage{fancybox}
-\usepackage{fancyvrb}
-\usepackage{setspace}
-\usepackage{perpage}
-\usepackage{persianpoem}
-\newenvironment{myverb}{\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+\[\]]}{\end{Verbatim}}
-\usepackage{xepersian}
-\settextfont[Scale=1.2]{XB Zar}
-\setdigitfont[Scale=1.2]{XB Zar}
-\setromantextfont[Scale=1.2]{Linux Libertine}
-\defpersianfont\nastaliq[Scale=1.8]{IranNastaliq}
-\defromanfont\linlib[Scale=1.5]{Linux Libertine}
-%\addtolength{\hoffset}{-2cm}
-%\addtolength{\textwidth}{3cm}
-\newcommand{\textblue}[1]{{\addfontfeature{Color=0000FF}#1}}
-\numberwithin{equation}{section}
-\numberwithin{table}{section}
-\onehalfspacing
-\newcommand\femph[1]{«#1»}
-\frenchspacing
-\newcommand\LRcite[1]{\LR{\rmfamily{\cite{#1}}}}
-
-
-\begin{document}
-
-\thispagestyle{empty}
-
-\noindent
-\begin{LTR}
-\begin{pspicture}(0,13.5)(\linewidth,0)
- \psline[linewidth=3mm,linecolor=mygreen](0,13.5)(\linewidth,13.5)
- \rput(\linewidth,13.5)
- {\pspolygon*(-3.6,0)(-1.4,0)(0,-1.4)(0,-3.6)}
- \rput(\linewidth,13.5)
- {\rput{-45}(-1,-1){\Large\textbf{\white \rl{نسخهٔ}}}}
- \rput(\linewidth,13.5)
- {\rput{-45}(-1.5,-1.5){\Large\textbf{\white \rl{۰/۱۶۳}}}}
-
- \rput[l](13,3.7){\textsl{\huge \rl{راهنمای بستهٔ}}}
- \psline[linewidth=3mm,linecolor=myred](0,3)(\linewidth,3)
- \psline[linewidth=3mm,linecolor=myred](0,0)(\linewidth,0)
- \rput[b](0.5\linewidth,5)
- {\includegraphics[height=0.3\textheight]{iran.jpg}}
- \rput[l](0,1.5){\psscaleboxto(\textwidth,2){\rl{زی‌پرشین}}}
-
-\end{pspicture}
-\end{LTR}
-
-\vfill\noindent
-{{\huge \textbf{گروه فارسی‌--لاتک}} \hfill
-{\large\textsl{وفا خلیقی، مهدی امیدعلی، و مصطفی واحدی}}}
-\newpage
-\pagenumbering{harfi}
-\section*{مقدمه}
-\newpage
-\tableofcontents
-\newpage
-\listoftables
-\newpage
-\listoffigures
-\newpage
-\pagenumbering{persian}
-\pagestyle{fancy}
-
-\section{نمونهٔ فایل ورودی}
- یک نمونه فایل ورودی می‌تواند به صورت زیر باشد.
-
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+\(\)]
-+color(myblue)\documentclass{book}
-+color(lightblue)\usepackage{xepersian}
-+color(myred)\settextfont[Scale=1]{XB Zar}
-+color(myred)\setromantextfont[Scale=1]{Junicode}
-+color(myred)\setdigitfont[Scale=1]{XB Zar}
-+color(mygreen)\title{+rl(عنوان نوشتار)}
-+color(mygreen)\author{+rl(نام نویسنده)}
-+color(lightgray)\begin{document}
-\maketitle
-\tableofcontents
-\chapter{+rl(فصل اول)}
-\section{+rl(بخش اول)}
-...
-+color(lightgray)\end{document}
-\end{Verbatim}
-
-همانطور که می‌بینید شکل فایل ورودی هیچ‌گونه تفاوتی با یک فایل استاندارد لاتک ندارد. تنها ممکن است فرمانهای خط سوم، چهارم، و پنجم این فایل نمونه برای شما
-نا آشنا باشند که در قسمتهای بعد به توضیح آنها می‌پردازیم. به طور کلی در استفاده از طبقه‌های استاندارد لاتک به جز فراخوانی بستهٔ \lr{\XePersian} هیچ
-کار اضافه‌ای لازم نیست که انجام دهید. تنها به عنوان یک توصیه، سعی کنید
-
-\centerline{\shadowbox{\nastaliq\textblue{
- این بسته آخرین بسته‌ای باشد که فراخوانی می‌کنید و فرمان‌های خود را بعد از فراخوانی این بسته قرار دهید.}} }
-
-همچنین توجه داشته باشید که
-بسته‌های زیر به طور خودکار فراخوانی می‌شوند و شما نباید آنها را مستقیماً در فایل فراخوانی کنید.
-
-\centerline{\shadowbox{\lr{amsmath, amssymb, amsthm, graphicx.}}}
-
-همچنین بسته \lr{\XePersian} هنوز قابلیت استفاده از طبقهٔ \lr{memoir} را ندارد، ولی در آینده این امکان نیز افزوده خواهد شد.
-\section{فرمانهای بسته}
-در این قسمت تعدادی از فرمانهای مفید را که لازم است بدانید شرح می‌دهیم. در جدول \ref{commands} فرمانهای بسته را مشاهده
-می‌کنید. همچنین در بسته چند نوع شمارنده تعریف شده است که در جدول \ref{counters} مشاهده می‌کنید.
-
-
-
-\begin{table}[!hbp]
-\begin{center}
-\begin{tabular}{|r|l|}
-\hline
- فرمان & شرح\\
- \hline
- \verb+\settextfont[...]{...}+&قلم فارسی متن را مشخص می‌کند.\\
- \hline
- \verb+\setromantextfont[...]{...}+&قلم انگلیسی متن را مشخص می‌کند.\\
- \hline
- \verb+\setdigitfont[...]{...}+&قلم ارقام را در فرمول‌ها مشخص می‌کند.\\
- \hline
- \verb+\defpersianfont\fontname[...]{...}+&یک قلم فارسی را مشخص می‌کند.\\
-\hline
- \verb+\defromanfont\fontname[...]{...}+&یک قلم انگلیسی را مشخص می‌کند.\\
-\hline
-\verb+\footnote{...}+&برای درج یک پانوشت فارسی \\
-\hline
-\verb+\Footnote{...}+&برای درج یک پانوشت انگلیسی \\
-\hline
-\verb+\today+&درج تاریخ جاری خورشیدی\\
-\hline
-\verb+\englishtoday+&درج تاریخ جاری میلادی\\
-\hline
-\verb+\rldblcolumn+&ترتیب ستونها را در یک متن چندستونی از راست‌ به ‌چپ می‌کند (پیش‌فرض)\\
-\hline
-\verb+\lrdblcolumn+&ترتیب ستونها را در یک متن چند‌ستونی از چپ ‌به ‌راست می‌کند \\
-\hline
-\verb+\twocolumnstableofcontents+ & فهرست مطالب را در دو ستون می‌چیند (نیاز به فراخوانی \verb+fmultico+ دارد)\\
-\hline
-\verb+\lr{...}+&یک متن کوتاه انگلیسی را در یک پاراگراف فارسی قرار می‌دهد\\
-\hline
- \verb+\rl{...}+&یک متن کوتاه فارسی را در یک پاراگراف انگلیسی قرار می‌دهد\\
-\hline
-\verb+\begin{LTR}+&شروع محیط چپ‌به‌راست\\
- \verb+\end{LTR}+&پایان محیط چپ‌به‌راست\\
-\hline
-\verb+\begin{RTL}+&شروع محیط راست‌به‌چپ\\
-\verb+\end{RTL}+&پایان محیط راست‌به‌چپ\\
-\hline
-\verb+\begin{roman}+&شروع محیط انگلیسی مجهز به قلم انگلیسی متن\\
- \verb+\end{roman}+&پایان محیط انگلیسی\\
-\hline
-\verb+\begin{persian}+&شروع محیط فارسی مجهز به قلم فارسی متن\\
-\verb+\end{persian}+&پایان محیط فارسی\\
-\hline
-\verb+\Roman+&برای درج کتاب‌نامه‌های انگلیسی\\
-\hline
-\verb+\Persian+&برای درج کتاب‌نامه‌های فارسی\\
-\hline
- \verb+\rmfamily+&قلم انگلیسی را برای حروف‌چینی استفاده می‌کند (پیش‌فرض محیط \verb+roman+)\\
-\hline
-\verb+\farsifont+&قلم فارسی را برای حروف‌چینی استفاده می‌کند (پیش‌فرض محیط \verb+persian+) \\
-\hline
- \verb+\PersianFootNum+&شمارهٔ پانوشت‌های انگلیسی را به صورت فارسی درج می‌کند (پیش‌فرض )\\
-\hline
- \verb+\RomanFootNum+&شمارهٔ پانوشت‌های انگلیسی را به صورت انگلیسی درج می‌کند.\\
-\hline
- \verb+\RomanBibNum+&شمارهٔ مراجع انگلیسی را به صورت انگلیسی درج می‌کند (پیش‌فرض)\\
-\hline
- \verb+\PersianBibNum+&شمارهٔ مراجع انگلیسی را به صورت فارسی درج می‌کند.\\
-\hline
-\end{tabular}
-\end{center}
-\caption{فرمان‌ها}\label{commands}
-\end{table}
-
-\begin{table}[!hbp]
-\begin{center}
-\begin{tabular}{|r|l|}
-\hline
- شمارنده & شرح\\
-\hline
-\verb+arabic+&شمارندهٔ عربی اصلی لاتک برای سازگاری با بسته از نو تعریف شده است. \\
-\hline
- \verb+persian+&همان اثر شمارنده \verb+arabic+ اصلی لاتک را دارد.\\
-\hline
-\verb+adadi+& شمارنده را به صورت یک، دو، سه، \ldots تغییر می‌دهد. \\
-\hline
-\verb+harfi+&شمارنده را به صورت الف\char"200D، ب، پ، \ldots تغییر می‌دهد.\\
-\hline
-\verb+tartibi+&شمارنده را به صورت اول، دوم، سوم، و \ldots تغییر می‌دهد.\\
-\hline
-\end{tabular}
-\end{center}
-\caption{شمارنده‌ها}\label{counters}
-\end{table}
-
-\section{استفاده از قلمهای مختلف}
-بستهٔ \lr{fontspec}، که به صورت خودکار فراخوانی می‌شود، امکان استفاده از قلمهای موجود در سیستم را فراهم می‌کند. برای استفاده از \lr{\XePersian}
-لازم است که حداقل یک قلم اصلی حروف‌چینی متن را مشخص کنید. این کار را با فرمان زیر انجام می‌دهیم:
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+()]
-\settextfont[Scale=+rl(مقیاس)]{+rl(نام قلم)}
-\end{Verbatim}
-به عنوان مثال با فرمان
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\settextfont[Scale=1]{XB Zar}
-\end{Verbatim}
-
-قلم \lr{XB Zar} را با مقیاس بزرگی \lr{1} به عنوان قلم اصلی فارسی معرفی می‌کند. گزینهٔ \verb+Scale=1+ اختیاری است و مشخص می‌کند که قلم با چه سایزی مورد استفاده قرار گیرد. توجه داشته باشید که \lr{XB Zar} عنوان قلمی است که باید روی سیستم شما نصب باشد. اگر سیستم شما ویندوز است قلم مورد استفاده باید در پوشهٔ
-\fbox{\lr{C:$\backslash$windows$\backslash$fonts}}
-موجود باشد. این قلم یکی از قلمهای سری ایکس ساخته شده توسط گروه کاربران فارسی اپل-مکینتاش است که بسیار کامل هستند و توصیه می‌شود از این قلم‌ها استفاده شود. برای دریافت آنها به آدرس زیر مراجعه کنید:
-
-\centerline{\fbox{\texttt{http://wiki.irmug.org/index.php/X\_Series\_2}}}
-برای اینکه قلم نگارش ارقام در فرمول‌ها را مشخص کنید از فرمان زیر استفاده کنید:
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+()]
-\setdigitfont[Scale=+rl(مقیاس)]{+rl(نام قلم)}
-\end{Verbatim}
-و قلم نگارش متن‌های انگلیسی را با فرمان زیر مشخص می‌کنیم:
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+()]
-\setromantextfont[Scale=+rl(مقیاس)]{+rl(نام قلم)}
-\end{Verbatim}
-
-همچنین می‌توانید هر تعداد قلم فارسی دلخواه را معرفی کنید و در نوشتار خود مورد استفاده قرار دهید. فرمان انجام این کارها به صورت زیر است:
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+()]
-\defpersianfont\fontname[Scale=+rl(مقیاس)]{+rl(نام قلم)}
-\defromanfont\fontname[Scale=+rl(مقیاس)]{+rl(نام قلم)}
-\end{Verbatim}
-به عنوان مثال فرمان
-
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
-\end{Verbatim}
-قلم نستعلیق را برای نوشتار معرفی می‌کند و در متن می‌توانید به دو صورت از آن استفاده کنید:
-\begin{itemize}
-\item
-در یک محیط \lr{RTL} به صورت زیر
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+\[\]]
-\begin{RTL}
-\nastaliq
-+rl[نمونه متن با قلم نستعلیق]
-\end{RTL}
-\end{Verbatim}
-
-
-که اثر آن همانند متن زیر است:
-
-\begin{center}\fbox{\Large\nastaliq نمونه متن با قلم نستعلیق}\end{center}
-این روش مناسب نوشتن یک پاراگراف یا بیشتر است.
-\item
-یا به صورت ساده به شکل زیر از قلم تعریف شده استفاده کنید
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+\[\]]
-\nastaliq{+rl[نمونه متن با قلم نستعلیق]}
-\end{Verbatim}
-که اثر این فرمان هم مشابه قبل است. این روش مناسب نوشتن یک متن کوتاه با قلم تعریف شده است.
-
-\end{itemize}
-به روش مشابه می‌توانید هر تعداد قلم انگلیسی دلخواه تعریف کنید و از آنها استفاده کنید. فرمان
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+()]
-\defromanfont\fontname[Scale=+rl(مقیاس)]{+rl(نام قلم)}
-\end{Verbatim}
-
-وظیفهٔ تعریف قلم‌های مختلف انگلیسی را به عهده دارد. به عنوان مثال با فرمان
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\defromanfont\linlib[Scale=1.5]{Linux Libertine}
-\end{Verbatim}
-قلم
-\lr{Linux Libertine} با مقیاس بزرگی \lr{1.5} معرفی می‌شود که می‌توان از آن به صورت زیر استفاده کرد:
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+\[\]]
-\begin{LTR}
-\linlib
-Sample text with Linux Libertine font
-\end{LTR}
-\end{Verbatim}
-
-که اثر آن به شکل زیر است:
-
-
-\begin{LTR}\centerline{\fbox{\linlib
-Sample text with Linux Libertine font
-}}\end{LTR}
-
-\section{گزینه‌های بستهٔ \lr{\XePersian}}
-به دلیل تنوع روش‌های حروف‌چینی پایان‌نامه‌ها و کتاب‌های فارسی، بستهٔ \lr{\XePersian} دارای امکاناتی است که با استفاده از آنها می‌توانید نوشتار خود را به سبک دلخواه طراحی کنید.
-\subsection{پانوشت‌ها}
-از فرمان‌های
-\verb+\footnote+
-\verb+\Footnote+
-برای نوشتن پانوشت‌های فارسی و انگلیسی (به ترتیب) استفاده می‌شود. سبک پیش‌فرض بسته این است که شمارهٔ تمام پانوشت‌ها به صورت فارسی نوشته می‌شود و بسته به اولین پانوشت هر صفحه، خط حائل در سمت مناسب قرار داده می‌شود. اگر می‌خواهید شمارهٔ پانوشت‌های انگلیسی در کل نوشتار به صورت عدد انگلیسی باشد از گزینهٔ
-\verb+RomanFootNum+
-در هنگام فراخوانی بسته به صورت زیر استفاده کنید
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\usepcackage[RomanFootNum]{xepersian}
-\end{Verbatim}
-همچنین در خود نوشتار هر جا که خواستید شمارهٔ پانوشت‌ها فارسی یا انگلیسی باشد از فرمان‌های
-\verb+\PersianFootNum+
-یا
-\verb+\RomanFootNum+
-(به ترتیب) استفاده کنید.
-به عنوان مثال
-این یک پانوشت فارسی است \footnote{شمارهٔ پانوشت فارسی است.} و این هم یک پانوشت انگلیسی است%
-\Footnote{The number of the footnote is persian.}
-که شمارهٔ آن فارسی است. حال فرمان
-\verb+\RomanFootNum+
-را در مستند قرار می‌دهیم.
-\RomanFootNum
-این یک پانوشت انگلیسی است%
-\Footnote{The number of the footnote is roman.}
-که شمارهٔ آن انگلیسی است. برای برگشت به حالت اولیه فرمان
-\verb+\PersianFootNum+
-را در مستند قرار می‌دهیم.
-\PersianFootNum
-و حال این یک پانوشت دیگر انگلیسی است%
-\Footnote{The number of the footnote is persian again.}
-که شمارهٔ آن فارسی شده است.
-\subsection{کتاب‌نامه}
-دو محیط \verb+\Persian+ و \verb+\Roman+ برای درج مراجع فارسی و انگلیسی تعریف شده است. بنابراین برای نوشتن کتاب‌نامهٔ خود به صورت زیر می‌توانید عمل کنید
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\begin{thebibliography}
-\Persian
-\bibitem{hafez}+rl(دیوان حافظ، انتشارات سروش).
-\Roman
-\bibitem{faust} Johann Wolfgang von Goethe, Faust.
-\end{thebibliography}
-\end{Verbatim}
-در این صورت کتاب‌نامهٔ شما به صورت زیر حروف‌چینی می‌شود:
-
-\bigskip
-
-\centerline{\fbox{
-\begin{minipage}[r]{10cm}
-\begin{thebibliography}
-\Persian
-\bibitem{hafez} دیوان حافظ، انتشارات سروش.
-\Roman
-\bibitem{faust} Johann Wolfgang von Goethe, Faust.
-\end{thebibliography}
-\end{minipage}
-}}
-\bigskip
-
-اگر بخواهید شمارهٔ مراجع انگلیسی به صورت عدد فارسی باشد از فرمان \verb+\PersianBibNum+ در مستند خود استفاده کنید در این صورت کتاب‌نامهٔ شما به صورت زیر چیده می‌شود:
-\bigskip
-
-\PersianBibNum
-\centerline{\fbox{
-\begin{minipage}[r]{10cm}
-\begin{thebibliography}
-\Persian
-\bibitem{hafez} دیوان حافظ، انتشارات سروش.
-\Roman
-\bibitem{faust} Johann Wolfgang von Goethe, Faust.
-\end{thebibliography}
-\end{minipage}
-}}
-\bigskip
-\RomanBibNum
-
-به همین ترتیب می‌توانید از فرمان \verb+\RomanBibNum+ استفاده کنید و شمارهٔ مراجع انگلیسی را به صورت عدد انگلیسی درج کنید. این دو فرمان را در هر جای مستند که وارد کنید اثر خود را از آن نقطه به بعد ظاهر می‌کنند ولی اگر می‌خواهید یکی از این دو سبک را در نوشتار خود داشته باشید (که اغلب این‌گونه است) بهتر است از گزینه‌های
-\verb+RomanBibNum+ و یا \verb+PersianBibNum+
-هنگام فراخوانی بستهٔ \lr{\XePersian} استفاده کنید. گزینهٔ
-\verb+RomanBibNum+
-گزینهٔ پیش‌فرض است و بنابراین اگر می‌خواهید کتاب‌نامهٔ شما به فرم دوم چاپ شود از فرمان زیر در سرآغاز فایل خود استفاده کنید:
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\usepackage[PersianBibNum]{xepersian}
-\end{Verbatim}
-
-\subsection*{خلاصه}
-اگر بخواهید مثلاً شمارهٔ پانوشت‌های انگلیسی به صورت انگلیسی باشد و شمارهٔ مراجع انگلیسی به صورت فارسی باشد از فرمان زیر استفاده کنید
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\usepackage[PersianBibNum,RomanFootNum]{xepersian}
-\end{Verbatim}
-\section{حروف‌چینی شعر}
-برای حروف‌چینی شعر باید فرمان زیر را در سرآغاز فایل خود قرار دهید:
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\usepackage{persianpoem}
-\end{Verbatim}
-بعد از این کار به راحتی می‌توانید شعر را حروف‌چینی کنید.
-
-{\nastaliq\doublespacing
-\begin{oldpoem}
-
-هله رفتیم و گرانی ز جمالت بردیم&
-جهت توشهٔ ره ذکر وصالت بردیم\\
-تا که ما را و ترا تذکرهٔ خوش باشد&
-دل خسته بتو دادیم و خیالت بردیم\\
-آن خیال رُخ خوبت که قمر بندهٔ اوست&
-وان خَم ابروی مانند هلالت بردیم\\
-و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست&
-ز شکر خانهٔ مجموع خصالت بردیم\\
-چون کبوتر چو بپریم بتو بازآییم&
-زانکه ما این پَر و بال از پَر و بالت بردیم\\
-هر کجا پرد فرعی، بسوی اصل آید&
-هر چه داریم هم از عزّ و جلالت بردیم\\
-شمس تبریز شنو خدمت ما را زصبا&
-گر شمالست و صبا هم ز شمالت بردیم
-
-\end{oldpoem}
-}
-شعر بالا با کد زیر تولید شده است:
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\begin{oldpoem}
-+rl(هله رفتیم و گرانی ز جمالت بردیم)&
-+rl(جهت توشهٔ ره ذکر وصالت بردیم)\\
-+rl(تا که ما را و ترا تذکرهٔ خوش باشد)&
-+rl(دل خسته بتو دادیم و خیالت بردیم)\\
-+rl(آن خیال رُخ خوبت که قمر بندهٔ اوست)&
-+rl(وان خَم ابروی مانند هلالت بردیم)\\
-+rl(و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست)&
-+rl(ز شکر خانهٔ مجموع خصالت بردیم)\\
-+rl(چون کبوتر چو بپریم بتو بازآییم)&
-+rl(زانکه ما این پَر و بال از پَر و بالت بردیم)\\
-+rl(هر کجا پرد فرعی، بسوی اصل آید)&
-+rl(هر چه داریم هم از عزّ و جلالت بردیم)\\
-+rl(شمس تبریز شنو خدمت ما را زصبا)&
-+rl(گر شمالست و صبا هم ز شمالت بردیم)\\
-\end{oldpoem}
-\end{Verbatim}
-
-
-این محیط دارای حالت ستاره‌دار (\verb+oldpoem*+) نیز می‌باشد که اثر آن به صورت زیر است.
-\begin{oldpoem*}
-هله رفتیم و گرانی ز جمالت بردیم&
-جهت توشهٔ ره ذکر وصالت بردیم\\
-تا که ما را و ترا تذکرهٔ خوش باشد&
-دل خسته بتو دادیم و خیالت بردیم\\
-آن خیال رُخ خوبت که قمر بندهٔ اوست&
-وان خَم ابروی مانند هلالت بردیم\\
-و آن شکرخندهٔ خوبت که شکر تشنهٔ اوست&
-ز شکر خانهٔ مجموع خصالت بردیم\\
-چون کبوتر چو بپریم بتو بازآییم&
-زانکه ما این پَر و بال از پَر و بالت بردیم\\
-هر کجا پرد فرعی، بسوی اصل آید&
-هر چه داریم هم از عزّ و جلالت بردیم\\
-شمس تبریز شنو خدمت ما را زصبا&
-گر شمالست و صبا هم ز شمالت بردیم
-\end{oldpoem*}
-شعر بالا با کد زیر تولید شده است:
-
-\section{حروف‌چینی چند‌ستونی}
-برای حروف‌چینی یک متن در چند ستون از محیط زیر استفاده کنید. حداکثر تعداد ستونها ۵ است.
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-\begin{multicols}{+rl(تعداد ستون‌ها)}
-.....
-\end{multicols}
-\end{Verbatim}
-
-\section{محیط مورد فارسی}
-محیط مورد برای استفاده در فارسی نیز تعریف شده است که در زیر مثال آنرا می‌بنید:
-
-$$
-\rcases{\mbox{مرد}\cr\mbox{زن}}\mbox{آدم}
-$$
-
-طرح بالا با کد زیر نوشته شده است.
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-$$\rcases{\mbox{+rl(مرد)}\cr\mbox{+rl(زن)}}\mbox{+rl(آدم)}$$
-\end{Verbatim}
-
-
-\section{تولید نمایه}
-به همراه این بسته، فایلی ارائه شده است که شما را قادر می‌سازد به راحتی نمایه برای مستندتان فراهم کنید. خود بسته هیچ‌گونه محدودیتی با نمایه‌سازی ندارد،
-ولی نرم‌افزار
-\lr{makeindex} هنگام مرتب کردن فایل نمایه، ترتیب بعضی از حروف را به درستی رعایت نمی‌کند.
-برای رفع این مشکل، استفاده از \lr{xindy} بجای \lr{makeindex} توصیه می‌شود.
-
-اگر از تکلایو ۲۰۰۸ استفاده می‌کنید \lr{xindy} به طور خودکار روی سیستم شما نصب است. کافی است فایل \lr{persian.xdy} را که همراه این بسته
-ارائه شده است در دایرکتوری جاری قرار دهید و فرمانهای زیر را در خط فرمان اجرا کنید:
-
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{blue},framesep=3mm,showspaces=true,commandchars=+()]
-tex2xindy < filename.idx > filename.raw
-xindy -I xindy -M persian.xdy filename.raw
-\end{Verbatim}
-
-\noindent بعد از انجام این کار، نمایهٔ مرتب شدهٔ شما آمادهٔ تزریق به مستند می‌شود.
-
-توجه داشته باشید که اگر می‌خواهید از نمایه استفاده کنید، باید شمارندهٔ صفحه را در حالت \lr{\texttt{persian}} قرار دهید. البته شمارندهٔ صفحه به صورت
-پیش‌فرض در این حالت قرار دارد.
-\section{فرمولهای ریاضی}
-بسته با حروف‌چینی فرمولهای ریاضی هیچ‌گونه مشکلی ندارد و از آنجا که بسته‌های \lr{amsmath,amsthm,} و \lr{amssymb} به طور خودکار فراخوانی می‌شوند،
-اکیداً توصیه می‌شود از فرمانهای کلاف \lr{AMSLatex} استفاده کنید. توجه داشته باشید که محیط \texttt{eqnarray} کلا با بستهٔ \lr{amsmath}
-مشکل دارد و به خصوص شمارهٔ فرمول نوشته شده با این محیط ناپایدار است. به جای این محیط، از محیط \texttt{align} استفاده کنید که
-حروف‌چینی آن از \texttt{eqnarray} بهتر است و شمارهٔ آن نیز بدون مشکل قابل ارجاع است.
-\begin{align}
-a^2+b^2&=\sin x\label{eq1}\\
-2.1a+b&=\cos y\label{eq2}
-\end{align}
-
-فرمولهای بالا با کد زیر تولید شده‌اند.
-
-\begin{roman}
-\begin{verbatim}
-\begin{align}
-a^2+b^2&=\sin x\label{eq1}\\
-1a+b&=\cos y\label{eq2}
-\end{align}
-\end{verbatim}
-\end{roman}
-ارجاع به فرمول \eqref{eq1} به صورت طبیعی امکان‌پذیر است. برای اطلاعات بیشتر به \femph{مقدمه‌ای نه‌چندان کوتاه بر \lr{\LaTeXe}}
-%\footnote{قابل دسترسی از\texttt{http://www.ctan.org}}
-مراجعه کنید.
-\section{تهیهٔ اسلاید با \lr{beamer}}
-امکانات استفاده از طبقهٔ \lr{beamer} در حد مطلوبی برقرار است. برای استفادهٔ بهینه چند محیط جدید تعریف شده‌اند.
-\begin{Verbatim}[frame=single,numbers=left,framerule=1mm,rulecolor=\color{red},fillcolor=\color{yellow},framesep=3mm,showspaces=true,commandchars=+()]
-\begin{+rl(بلوک)}{+rl(عنوان)}
-...
-\end{+rl(بلوک)}
-\end{Verbatim}
-با این فرمان یک بلوک عادی تشکیل می‌شود که جهت آن از راست به چپ است. به جای ''بلوک`` می‌توانید از ''بلوک‌مثال`` یا ''بلوک‌هشدار`` استفاده کنید.
-
-\section{استفاده از \lr{PSTricks}}
-تمامی امکانات استفاده از \lr{PSTricks} در بسته موجود است.
-% \begin{LTR}
-% %-------------------- write timeline file ---------------------%
-% \newwrite\TimeLineFile
-% \immediate\openout\TimeLineFile=sinus.txt
-% \immediate\write\TimeLineFile{::0x0,1}%
-% %remaining frames: overlay filled circle at its current postion
-% \multido{\i=2+1}{90}{%
-% \immediate\write\TimeLineFile{%
-% ::\i % put filled circle on top
-% }}
-% \immediate\closeout\TimeLineFile
-% %------------------- assemble animation -----------------------%
-% \psset{xunit=\pstRadUnit,dashadjust=false}
-% \begin{animateinline}[controls,timeline=sinus.txt,
-% begin={\begin{pspicture}(-0.5,-1.5)(6.6,2)},
-% end={\end{pspicture}}]{24}
-% %---- static material: axes, labels, curve ----%
-% \psaxes[trigLabels,trigLabelBase=3]{->}(0,0)(-2mm,-1.5)(6.5,1.5)[t,-90][$y=\sin(t)$,0]
-% \psplot[xunit=1cm,linestyle=dashed,algebraic]{0}{\psPiTwo}{sin(x)}
-% \newframe
-% \multiframe{91}{n=0+4}{\psset{xunit=1cm,linecolor=blue}
-% \pscustom[xunit=1cm,fillcolor=blue!30,fillstyle=solid,
-% linestyle=none,algebraic,dimen=inner]{%
-% \psplot{0}{\n\space DegtoRad}{sin(x)}
-% \psline(!\n\space DegtoRad 0)
-% }
-% \psplot[xunit=1cm,linestyle=dashed,linecolor=black,
-% algebraic]{0}{\n\space DegtoRad}{sin(x)}
-% \psdot[opacity=0.4,dotsize=3mm](!\n\space dup DegtoRad exch sin)
-% \psline[linestyle=dashed](!\n\space dup DegtoRad exch sin)(!\n\space DegtoRad 0)
-% }
-% \end{animateinline}
-% \end{LTR}
-
-
-
-
-\appendix
-\section{نصب ویرایشگر روی ویندوز}
-برای استفاده از \lr{\XePersian} باید \lr{XeTeX} روی سیستم شما نصب باشد. اگر از \lr{MikTex 2.7} یا بالاتر، و یا از \lr{TeXLive 2008}
-و یا بالاتر استفاده می‌کنید، \lr{XeTeX} به طور خودکار روی سیستم شما نصب شده است. تنها کاری که باید در این صورت انجام دهید نصب و
-تنظیم یک ویرایشگر مناسب برای کار است. لیست کنترل زیر ابزارهای لازم را برای کار با این بسته به شما نشان می‌دهد.
-\begin{enumerate}
-\item توزیع مناسبی از \lr{\TeX} مانند \lr{Texlive}(\lr{2008} یا بالاتر) یا \lr{Miktex} (\lr{2.7} یا بالاتر).
-\item نرم‌افزار مناسب ویرایش متنهای یونیکد (در ویندوز \lr{notepad++}\footnote{قابل دریافت از \LR{\texttt{http://notepad-plus.sourceforge.net/}}} و در لینوکس \lr{gedit}).
-\item نرم‌افزار مناسب نمایش فایلهای پی.دی.اف (در ویندوز توصیه می‌شود از \lr{SumatraPDF}\footnote{قابل دریافت از \lr{\texttt{http://www.parsilatex.org/pdfreader/SumatraPDF.rar}}} به جای آکروبات ریدر استفاده شود).
-\end{enumerate}
-از آنجا که کاربران ایرانی معمولا از ویندوز استفاده می‌کنند و با توجه به اینکه یک ویرایشگر مناسب زندگی را برای کاربر بسیار راحت می‌کند، در ادامه
-روش نصب و تنظیم ویرایشگر مناسب را در ویندوز به طور کامل شرح می‌دهیم. توجه داشته باشید که فرض بر این است یک توزیع مناسب از تک و
-همچنین \lr{SumatraPDF} روی سیستم شما نصب است.
-
-فایل نصب‌کنندهٔ \lr{notepad++} را اجرا کنید ( توجه داشته باشید که جدیدترین نسخه این فایل را از صفحهٔ خانگی این نرم‌افزار دریافت کرده باشید).
-افزونهٔ (\lr{plugin}) \verb+NppExec.dll+ را نیز از صفحهٔ خانگی \lr{notepad++} دریافت کنید و آن را در پوشهٔ
-\begin{roman}\verb|C:\Program Files\Notepad++\plugins|\end{roman}
-قرار دهید.
-سپس به صورتی که در شکلهای زیر نشان داده شده است نرم‌افزار را نصب و تنظیم کنید.
-
-\centerline{\includegraphics[height=5cm]{notepad1.PNG}}
-\centerline{\includegraphics[height=7cm]{notepad2.PNG}}
-\centerline{\includegraphics[height=6cm]{notepad3.PNG}}
-\centerline{\includegraphics[height=5cm]{notepad4.PNG}}
-\centerline{\includegraphics[height=6cm]{notepad5.PNG}}
-\centerline{\includegraphics[height=5cm]{notepad6.PNG}}
-
-متنی که در آخرین مرحله باید وارد کنید و حاصل را با عنوان \lr{xelatex} ذخیره کنید متن زیر است که می‌توانید به راحتی آن را از همین فایل پی.دی.اف
-کپی کنید و در پنجره‌ای که ظاهر شده است بچسبانید(به کوچک و بزرگ بودن حروف و همچنین فاصله بین کلمات دقت کنید):
-
-\setLR
-\small{
-\begin{verbatim}
-NPP_SAVE
-cd $(CURRENT_DIRECTORY)
-xelatex $(NAME_PART)
-\end{verbatim}
-}
-\setRL
-برای استفادهٔ بهینه از این ویرایشگر، بهتر است راهنمای آنرا مطالعه کنید. فقط به عنوان یک مطلب که ممکن است برای شما مفید باشد، هنگام ویرایش متنهای فارسی،
-با فشردن \lr{ALT+CTRL+R} صفحه نمایش از راست به چپ قرار می‌گیرد و بنابراین کار شما راحت‌تر می‌شود. برای برگشتن به حالت چپ‌به‌راست کافی است
-\lr{ALT+CTRL+L} را فشار دهید. بعد از انجام این کارها به راحتی می‌توانید با فشردن کلید \verb+F6+ فایل ورودی خود را پردازش کنید.
-
-برای اینکه بتوانید از داخل ویرایشگر فایل پی.دی.اف خروجی را مشاهده کنید و ویژگی جستجوی معکوس را داشته باشید باید یک نمایشگر پی.دی.اف مناسب را
-نصب و تنظیم کنید. نمایشگر مناسب این کار \lr{SumatraPDF} است که بسیار کم حجم و پرقدرت است. در زیر روش تنظیم ویرایشگر و نمایشگر را با شکل‌هایی
-توضیح داده‌ایم
-
-\centerline{\includegraphics[height=9cm]{sumatrapdf1.PNG}}
-\centerline{\includegraphics[height=5cm]{sumatrapdf2.PNG}}
-\centerline{\includegraphics[height=5cm]{notepad7.PNG}}
-\centerline{\includegraphics[height=5cm]{notepad8.PNG}}
-\centerline{\includegraphics[height=5cm]{notepad9.PNG}}
-
-بعد از انجام این کارها، بعد از اولین بار پردازش فایل، از منوی \lr{Run} گزینهٔ \lr{view} را انتخاب کنید تا فایل پی.دی.اف باز شود. حال بعد از هر بار پردازش،
-فایل پی.دی.اف به طور خودکار آپدیت می‌شود. برای استفاده از خاصیت \lr{Inverse Search} یا جستجوی معکوس باید بستهٔ \lr{pdfsync} را در فایل ورودی خود
-فراخوانی کنید. در این صورت با دو بار کلیک کردن بر یک نقطه از فایل پی.دی.اف به خط متناظر در \lr{notepad++} می‌روید. توجه داشته باشید که نسخه‌ای
-از \lr{SumatraPDF} را نصب کرده باشید که قابلیت جستجوی معکوس را داشته باشد. این نسخه را می‌توانید از آدرس زیر دریافت کنید
-
-\begin{roman}
-\verb+http://parsilatex.org/pdfreader/SumatraPDF.rar+
-\end{roman}
-
-و آن را در پوشهٔ زیر قرار دهید
-
-\begin{roman}
-\verb+C:\Program Files\SumatraPDF+
-\end{roman}
-
-\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex
index 26691aadd10..b7bda8b57b7 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex
@@ -7,7 +7,7 @@ There is a change in the manual. I wrote a new \LaTeX\ class\footnote{The name o
I have rewritten almost all the macros, new functionalities have been added and lots of changes have been done, therefore, I would like to encourage all the users to read this manual very carefully before trying to use the package. \XePersian\ now works with \textsf{article}, \textsf{report}, \textsf{book}, \textsf{amsart}, \textsf{amsbook}, \textsf{refrep}, \textsf{bookest} and \textsf{beamer} classes. Also I have written some new classes: \textsf{xepersian-thesis} (for typesetting Persian thesis), \textsf{xepersian-presentation} (for typesetting plain electronic Persian presentations) and \textsf{xepersian-magazine} (for typesetting Persian magazines, newspapers and other papers).
\File{\textsf{Thanks}}
-Please note that \XePersian\ is not just mine, it belongs to all and it is the result of the hard work of several other people. I would like to thanks \textsf{Jonathan Kew} (the author of \XeTeX) for making such a wonderful \TeX\ system and answering my questions, \textsf{Karl Berry} and \textsf{Jim Hefferon} for all their wonderful encouragements, \textsf{Ross Moore} (my teacher and an abosolute \TeX acker) for helping and guiding me patiently and kindly, \textsf{Will Robertson} (the author of \textsf{fontspec} package) for his excellent \textsf{fontspec} package and also answering my question, \textsf{François Charette} (the author of several \XeLaTeX\ packages, more importantly the \textsf{bidi} package) for his wonderful \textsf{bidi} package which is currently the basis of \XePersian , \textsf{Mostafa Vahedi} for writing the preliminary version of the package and also motivating me to develop the package, \textsf{Mehdi Omidali} for participating in the development of \XePersian , contributiong mapping files, testing the development version of the package, his bug reports, bug fixes and writing the manual in Persian, and eventually I would like to thanks to all the users of \XePersian, firstly for using the package and secondly for their bug reports.
+Please note that \XePersian\ is not just mine, it belongs to all and it is the result of the hard work of several other people. I would like to thanks \textsf{Jonathan Kew} (the author of \XeTeX) for making such a wonderful \TeX\ system and answering my questions, \textsf{Karl Berry} and \textsf{Jim Hefferon} for all their wonderful encouragements, \textsf{Ross Moore} (my teacher and an abosolute \TeX acker) for helping and guiding me patiently and kindly, \textsf{Will Robertson} (the author of \textsf{fontspec} package) for his excellent \textsf{fontspec} package and also answering my question, \textsf{Mostafa Vahedi} for writing the preliminary version of the package and also motivating me to develop the package, \textsf{Mehdi Omidali} for participating in the development of \XePersian , contributiong mapping files, testing the development version of the package, his bug reports, bug fixes and writing the manual in Persian, and eventually I would like to thanks to all the users of \XePersian, firstly for using the package and secondly for their bug reports.
@@ -93,11 +93,19 @@ Inserts Iranian date of today.
Inserts Roman date of today.
-\mitem \rldblcolumn
+\mitem \@RTLtrue
+
+Typesets the main text of the document from right to left (default).
+
+\mitem \@RTLfalse
+
+Typesets the main text of the document from left to right.
+
+\mitem \RTLdblcol
Places columns from right to left in the \emph{twocolumns} documents (default).
-\mitem \lrdblcolumn
+\mitem \LTRdblcol
Places columns from left to right in the \emph{twocolumns} documents.
@@ -105,6 +113,14 @@ Places columns from left to right in the \emph{twocolumns} documents.
Typesets \emph{table of contents} in two columns (needs to load \textsf{fmultico} package at the permeable of the document).
+\mitem \LRE{...}
+
+Places a short text from left to right without affecting the font.
+
+\mitem \RLE{...}
+
+Places a short text from right to left without affecting the font.
+
\mitem \lr{...}
Typesets a short Roman text in a Persian paragraph.
@@ -157,19 +173,13 @@ Typesets the the Roman footnote numbers in Persian (default).
Typesets the Roman footnote numbers in Roman.
-\mitem \RomanBibNum
-
-Typesets the numbers of \n\bibitem\ in Roman (default).
-\mitem \PersianBibNum
-
-Typesets the numbers of \n\bibitem\ in Persian.
\end{description}
\subsection{Using Different Fonts}
To write a minimal document with \XePersian\, you will need to select a font for typesetting the main text. We achieve this by the following command:
\begingroup
\catcode`\<=12
- \Mac \settextfont`[Scale=<integer>]'{<fontname>}
+ \Mac \settextfont`[Scale=<number>]'{<fontname>}
\endgroup
For example with the command:
\begin{LVerb}
@@ -182,18 +192,18 @@ We choose {\UsageFont XB Zar} as the main text font with the Scale of 1.
In addition to selecting the main text font, we also need to choose the fonts for Roman texts and digits in maths formuals. We select the font for Roman texts by the following command:
\begingroup
\catcode`\<=12
- \Mac \setromantextfont`[Scale=<integer>]'{<fontname>}
+ \Mac \setromantextfont`[Scale=<number>]'{<fontname>}
\endgroup
And we select the font for digits in maths formuals by the command:
\begingroup
\catcode`\<=12
- \Mac \setdigitfont`[Scale=<integer>]'{<fontname>}
+ \Mac \setdigitfont`[Scale=<number>]'{<fontname>}
\endgroup
You also can define as many extra Persian and Roman fonts as you wish and use them in your document. This is done in the following syntax:
\begingroup
\catcode`\<=12
- \Mac \defpersianfont\n\fontname`[Scale=<integer>]'{<fontname>}
- \Mac \defromanfont\n\fontname`[Scale=<integer>]'{<fontname>}
+ \Mac \defpersianfont\n\fontname`[Scale=<number>]'{<fontname>}
+ \Mac \defromanfont\n\fontname`[Scale=<number>]'{<fontname>}
\endgroup
For example, the command:
\begin{LVerb}
@@ -235,27 +245,16 @@ If you wish all Roman footnote numbers appear in Roman instead Persian, then you
\Mac \usepackage[RomanFootNum]{xepersian}
In addition to this, two commands: \n\PersianFootNum\ and \n\RomanFootNum\ are provided, as you might have guessed from the name of the commands \n\PersianFootNum\ puts the number of all Roman footnote in Persian and \n\RomanFootNum\ puts the number of all Roman footnotes in Roman.
-\subsubsection{The bibitem Numbers}
-
-\File{OPTION!}
-\XePersian\ will put the numbers of all Roman \n\bibitem\ In Roman by default, but if you wish that all Roman \n\bibitem\ numbers appear in Persian, you can load \XePersian\ with the appropriate option as follow:
- \Mac \usepackage[PersianBibNum]{xepersian}
-In addition to this, two commands: \n\RomanBibNum\ and \n\PersianBibNum\ are provided, the command \n\RomanBibNum\ puts the number of all Roman \n\bibitem\ in Roman and \n\PersianBibNum\ puts the number of all Roman \n\bibitem\ in Persian.
-\File{Summary}
-If you wish to have Roman \n\bibitem\ numbers in Persian and the Roman footnote numbers in Roman, you can load \XePersian\ with the appropriate options as follow:
- \Mac \usepackage[PersianBibNum,RomanFootNum]{xepersian}
\section{The Counters}
The following counters are defined in the package:
\begin{description}
\mitem arabic
-The main {\UsageFont arabic} counter of \LaTeX\ has been redefined for comaptibility with the package.
+The main {\UsageFont arabic} counter of \LaTeX.
-\mitem persian
-Has the effect of the main {\UsageFont arabic} counter of \LaTeX .
\mitem adadi
@@ -299,7 +298,4 @@ To generate index, you will need to place \textsf{persian.xdy} file in the curre
tex2xindy < filename.idx > filename.raw
xindy -I xindy -M persian.xdy filename.raw
\end{LVerb}
-\begin{drivers}
-To generate index, the page counter should be \textsf{persian}\footnote{This is the default counter.}.
-\end{drivers}
\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex
index 8f3e0762e88..71759f34e7e 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex
@@ -105,11 +105,11 @@ You should use \textbf{\PersianTxt{نتیجه}} environment instead \textbf{coro
\end{Ex}
You should use \textbf{\PersianTxt{حقیقت}} environment instead \textbf{fact} environment.
\begin{Ex}
-"\begin{"\textbf{\PersianTxt{لما}}"}"
+"\begin{"\textbf{\PersianTxt{لم}}"}"
\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{لما}}"}"
+"\end{"\textbf{\PersianTxt{لم}}"}"
\end{Ex}
-You should use \textbf{\PersianTxt{لما}} environment instead \textbf{lema} environment.
+You should use \textbf{\PersianTxt{لم}} environment instead \textbf{lema} environment.
\begin{Ex}
"\begin{"\textbf{\PersianTxt{مسئله}}"}"
\ldots\ "<text>" \ldots\
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.pdf b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.pdf
deleted file mode 100644
index 8adc34b6442..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdf b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdf
new file mode 100644
index 00000000000..106b2f1c0ac
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex
index fac6631f853..637bc9bc5c6 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user-english.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex
@@ -1,8 +1,8 @@
\documentclass[11pt]{xepersian-user}
-\setmainfont[Mapping=tex-text]{Junicode}
-\setPersianFont{XB Zar}
-\def\Date{09/01/05}
-\def\Version{0.163}
+\setmainfont[Mapping=tex-text]{Linux Libertine}
+\setPersianFont[Scale=1.5]{Adobe Arabic}
+\def\Date{09/02/20}
+\def\Version{1 (First Stable Version)}
\includeonly{%
xepersian-cove,%
xepersian-esse,%
diff --git a/Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttf b/Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttf
deleted file mode 100644
index 3e2323d414b..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/IranNastaliq.ttf
+++ /dev/null
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
deleted file mode 100644
index e4707bdb220..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/LateefRegOT.ttf
+++ /dev/null
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
deleted file mode 100644
index 8c94738f537..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/ScheherazadeRegOT.ttf
+++ /dev/null
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
deleted file mode 100644
index 75fcddbf6ea..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/elham.ttf
+++ /dev/null
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
deleted file mode 100644
index e188a50f40d..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/homa.ttf
+++ /dev/null
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
deleted file mode 100644
index dbbe3095437..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/koodak.ttf
+++ /dev/null
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
deleted file mode 100644
index 76b9f260b6e..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/nazli.ttf
+++ /dev/null
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
deleted file mode 100644
index 2a8e4856ca0..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/nazlib.ttf
+++ /dev/null
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
deleted file mode 100644
index 5cb6071af6a..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/roya.ttf
+++ /dev/null
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
deleted file mode 100644
index 968202b4bc7..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/royab.ttf
+++ /dev/null
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
deleted file mode 100644
index 89f7acdefd7..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/terafik.ttf
+++ /dev/null
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
deleted file mode 100644
index f805d8b6697..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/terafikb.ttf
+++ /dev/null
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
deleted file mode 100644
index 486f9ba03d9..00000000000
--- a/Master/texmf-dist/fonts/truetype/public/xepersian/titr.ttf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty b/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty
index a479d0537e8..73af315036c 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty
@@ -37,7 +37,7 @@
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{title in head/foot}%
- \usebeamerfont{title in head/foot}\RL{\hspace*{2ex}\insertauthor \hspace*{1ex} (\insertshortinstitute) \hspace*{2ex} \insertdate}
+ \usebeamerfont{title in head/foot}\beginR\hspace*{2ex}\insertauthor \hspace*{1ex} (\insertshortinstitute) \hspace*{2ex} \insertdate\endR
\end{beamercolorbox}}%
}
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls
index 21816c47aa7..e7a1e9889f8 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls
@@ -157,13 +157,13 @@
}
\newcommand{\xepersian@headright}{%
\small\xepersian@edition%
-\hspace*{5pt}\LR{\thepage\ / \pageref{LastPage}}
+\hspace*{5pt}\beginL\thepage\ / \pageref{LastPage}\endL
}
\newcommand{\heading}[3]{%
-\renewcommand{\xepersian@headleft}{\RL{#1}}%
-\renewcommand{\xepersian@headcenter}{\RL{#2}}%
-\renewcommand{\xepersian@headright}{\RL{#3}}%
+\renewcommand{\xepersian@headleft}{\beginR#1\endR}%
+\renewcommand{\xepersian@headcenter}{\beginR#2\endR}%
+\renewcommand{\xepersian@headright}{\beginR#3\endR}%
}
\newcommand{\xepersian@footright}{%
{\footnotesize\lr{\copyright\ \@customwwwTxt{}}---تهیه‌شده توسط \lr{\XePersian}}%
@@ -174,9 +174,9 @@
}
\newcommand{\foot}[3]{%
-\renewcommand{\xepersian@footleft}{\RL{#1}}%
-\renewcommand{\xepersian@footcenter}{\RL{#2}}%
-\renewcommand{\xepersian@footright}{\RL{#3}}%
+\renewcommand{\xepersian@footleft}{\beginR#1\endR}%
+\renewcommand{\xepersian@footcenter}{\beginR#2\endR}%
+\renewcommand{\xepersian@footright}{\beginR#3\endR}%
}
\newcommand{\firstTitleFormat}{\Huge\bfseries\flushright}
\newcommand{\xepersian@firstTitle}[1]{%
@@ -381,9 +381,9 @@ keepaspectratio ]{#1}}}
}
-\def\customlogo#1{\gdef\@customlogo{\RL{#1}}}
-\def\customminilogo#1{\gdef\@customminilogo{\RL{#1}}}
-\def\custommagazinename#1{\gdef\@custommagazinename{\RL{#1}}}
+\def\customlogo#1{\gdef\@customlogo{\beginR#1\endR}}
+\def\customminilogo#1{\gdef\@customminilogo{\beginR#1\endR}}
+\def\custommagazinename#1{\gdef\@custommagazinename{\beginR#1\endR}}
\newcommand{\logo}[0]{
%% Heading %%
\noindent\hrulefill\hspace{10pt}\xepersian@editionLogo\hspace{5pt}\xepersian@www
@@ -401,7 +401,7 @@ keepaspectratio ]{#1}}}
\vspace*{5pt}
}
\newcommand{\mylogo}[1]{
-{\RL{#1}}
+{\beginR#1\endR}
\noindent
\xepersian@editionLogo\hspace{5pt}
@@ -423,12 +423,12 @@ keepaspectratio ]{#1}}}
\newpage
\fancyhead{}
\fancyfoot{}
-\fancyhead[RO,LE]{\RL{\xepersian@headright}}
-\fancyhead[LO,RE]{\RL{\xepersian@headleft}}
- \fancyhead[C]{\RL{\xepersian@headcenter}}
- \fancyfoot[RO,LE]{\RL{\xepersian@footright}}
- \fancyfoot[LO,RE]{\RL{\xepersian@footleft}}
-\fancyfoot[C]{\RL{\xepersian@footcenter}}
+\fancyhead[RO,LE]{\beginR\xepersian@headright\endR}
+\fancyhead[LO,RE]{\beginR\xepersian@headleft\endR}
+ \fancyhead[C]{\beginR\xepersian@headcenter\endR}
+ \fancyfoot[RO,LE]{\beginR\xepersian@footright\endR}
+ \fancyfoot[LO,RE]{\beginR\xepersian@footleft\endR}
+\fancyfoot[C]{\beginR\xepersian@footcenter\endR}
\renewcommand{\headrulewidth}{0.4pt}
\setboolean{xepersian@insidefrontpage}{false}
@@ -559,7 +559,7 @@ keepaspectratio ]{#1}}}
\begin{minipage}{50pt}
\weatherTempFormat
#2\\
-\LR{#3 $\|$ #4 \lr{\weatherUnits{}}}\\
+\beginL#3 $\|$ #4 \lr{\weatherUnits{}}\endL\\
#5
\end{minipage}
}{%else
@@ -579,7 +579,7 @@ weatherblock environment may only appear inside frontpage environment.
\begin{textblock}{32}(2,38)
\vspace*{-15pt}
-\xepersian@weather{\RL{#1}}
+\xepersian@weather{\beginR#1\endR}
\vspace*{5pt}
@@ -674,7 +674,7 @@ indexblock environment may only appear inside frontpage environment.
\newcommand{\xepersian@inexpandedtitle}[1]{
\begin{minipage}{.95\textwidth}
\begin{center}
-\noindent\Large\textbf{\RL{#1}}
+\noindent\Large\textbf{\beginR#1\endR}
\end{center}
\end{minipage}
}
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
index aa56bf6bf59..c74d4a8723b 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
@@ -6,34 +6,192 @@
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{xepersian}[2009/01/05 v0.163
+\ProvidesPackage{xepersian}[2009/02/20 v1
Persian typesetting in XeLaTeX (Author: Vafa Khalighi)]
\AtBeginDocument{\special{pdf: docinfo <<
- /Creator (XePersian v0.163)
+ /Creator (XePersian v1 (Author: Vafa Khalighi))
>>}}
\RequirePackage{graphicx}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{fontspec}
-\RequirePackage{xltxtra}
-\RequirePackage{bidi}
\RequirePackage{etoolbox}
\RequirePackage{xepersian-mathsdigitspec}
\RequirePackage{xunicode}
-
-\@rltrue
-\@rlmaintrue
-\@rl@footnotetrue
-
+\gdef\@latex@error#1#2{%
+ \GenericError{%
+ \space\space\space\@spaces\@spaces\@spaces
+ }{%
+ XePersian Error: #1%
+ }{%
+ Please first produce a similar file without using XePersian package and then compile it with xelatex, if you got the same error, then please study the Persian translation of 'The not so Short Introduction to LaTeX' by MEHDI OMIDALI, otherwise please report the error with a minimal tex file which shows the error to the Author of XePersian.%
+ }{#2}%
+}
+\gdef\@latexbug{%
+ \@latex@error{This may be a XePersian bug}{Please inform the Author of XePersian}}
+\TeXXeTstate=1
+\newif\if@RTL
+\def\XePersian@RTL@everypar{\if@RTL{\setbox\z@\lastbox\beginR\usebox\z@}\fi}
+ \let\o@everypar=\everypar
+ \newtoks\n@everypar
+ \n@everypar\expandafter{\the\o@everypar}
+ \o@everypar{\XePersian@RTL@everypar\the\n@everypar}
+ \let\everypar=\n@everypar
+\@RTLtrue
+\def\list#1#2{%
+ \ifnum \@listdepth >5\relax
+ \@toodeep
+ \else
+ \global\advance\@listdepth\@ne
+ \fi
+ \rightmargin\z@
+ \listparindent\z@
+ \itemindent\z@
+ \csname @list\romannumeral\the\@listdepth\endcsname
+ \def\@itemlabel{#1}%
+ \let\makelabel\@mklab
+ \@nmbrlistfalse
+ #2\relax
+ \@trivlist
+ \parskip\parsep
+ \parindent\listparindent
+ \advance\linewidth -\rightmargin
+ \advance\linewidth -\leftmargin
+ \if@RTL
+ \advance\@totalleftmargin \rightmargin
+ \else
+ \advance\@totalleftmargin \leftmargin
+ \fi
+ \parshape \@ne \@totalleftmargin \linewidth
+ \ignorespaces}
+\def\raggedright{%
+ \let\\\@centercr
+ \leftskip\z@skip\rightskip\@flushglue
+ \parindent\z@\parfillskip\z@skip}
+\let\@@raggedleft=\raggedleft
+\let\@@raggedright=\raggedright
+\renewcommand\raggedleft{\if@RTL\@@raggedright%
+ \else\@@raggedleft\fi}
+\renewcommand\raggedright{\if@RTL\@@raggedleft%
+ \else\@@raggedright\fi}
\def\raggedright{%
\let\\\@centercr
\rightskip\z@skip\rightskip\@flushglue
\parindent\z@\parfillskip\z@skip}
\renewcommand\raggedleft{\@@raggedleft}
\renewcommand\raggedright{\@@raggedright}
+\def\centerline#1{%
+\if@RTL\@@line{\hss\beginR#1\endR\hss}
+\else\@@line{\hss#1\hss}\fi}
+\def\leftline#1{%
+\if@RTL\@@line{\beginR#1\endR\hss}
+\else\@@line{#1\hss}\fi}
+\def\rightline#1{%
+\if@RTL\@@line{\hss\beginR#1\endR}
+\else\@@line{\hss#1}\fi}
+\def\leftmark{\beginR\expandafter\@leftmark\botmark\@empty\@empty\endR}
+\def\rightmark{\beginR\expandafter\@rightmark\firstmark\@empty\@empty\endR}
+\def\underline#1{%
+ \relax
+ \ifmmode\@@underline{#1}%
+ \else
+\if@RTL $\@@underline{\hbox{\beginR#1\endR}}\m@th$\relax
+\else
+$\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
+\newif\if@tabsw
+\global\@tabswfalse
+\def\@tabular{\if@RTL\global\@tabswtrue\fi
+ \leavevmode \hbox \bgroup \if@tabsw\beginR \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}
+\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
+ \vskip \z@ plus .2pt
+ {\hangindent #2\relax
+ \if@RTL \leftskip \else \rightskip \fi
+ \@tocrmarg \parfillskip -\if@RTL \leftskip \else
+ \rightskip \fi
+ \parindent #2\relax\@afterindenttrue
+ \interlinepenalty\@M
+ \leavevmode
+ \@tempdima #3\relax
+ #4\nobreak\leaders
+ \hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
+ mu$}\hfill \nobreak
+ \hbox to\@pnumwidth{\hfil #5}\par}\fi}
+\def\RTL@outputdblcol{\if@firstcolumn
+\global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\box\@outputbox
+ \else \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{%
+ \hbox to\textwidth{%
+ \hbox to\columnwidth{\box\@outputbox \hss}%
+ \hfil \vrule width\columnseprule\hfil
+ \hbox to\columnwidth{\box\@leftcolumn \hss}%
+ }}\@combinedblfloats
+\@outputpage \begingroup \@dblfloatplacement
+\@startdblcolumn
+\@whilesw\if@fcolmade \fi
+{\@outputpage\@startdblcolumn}\endgroup
+ \fi}
+\def\LTR@outputdblcol{\if@firstcolumn
+\global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\box\@outputbox
+ \else \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{\hbox to\textwidth{%
+ \hbox to\columnwidth
+ {\box\@leftcolumn \hss}\hfil
+ \vrule width\columnseprule\hfil
+ \hbox to\columnwidth{\box\@outputbox \hss}}}%
+ \@combinedblfloats
+ \@outputpage \begingroup \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi
+ {\@outputpage\@startdblcolumn}\endgroup
+ \fi}
+\newcommand{\RTLdblcol}{\renewcommand{\@outputdblcol}{\RTL@outputdblcol}}
+\newcommand{\LTRdblcol}{\renewcommand{\@outputdblcol}{\LTR@outputdblcol}}
+\RTLdblcol
+\long\def\@makecaption#1#2{%
+ \vskip 10pt%
+ \setbox\@tempboxa\hbox{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize \if@RTL\beginR\fi#1: #2\par%
+ \else \hbox
+to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil%
+\if@RTL\endR\fi}%
+ \fi}
+\renewenvironment{equation}{%
+ \incr@eqnum
+ \mathdisplay@push
+ \st@rredfalse \global\@eqnswtrue
+ \beginL\mathdisplay{equation}%
+}{%
+ \endmathdisplay{equation}\endL%
+ \mathdisplay@pop
+ \ignorespacesafterend
+}
+\let\@@text=\text
+\def\text#1{\@@text{\beginR#1\endR}}
+\def\tagform@#1{\maketag@@@{)\ignorespaces\text{#1}\unskip\@@italiccorr(}}
+\renewcommand{\eqref}[1]{\beginL\textup{\tagform@{\ref{#1}}}\endL}
\@ifpackageloaded{graphicx}{%
\def\Gin@ii[#1]#2{%
\def\@tempa{[}\def\@tempb{#2}%
@@ -50,55 +208,40 @@
\endgroup
\fi}%
}{}
-
-\def\lr#1{\LR{\rmfamily#1}}
-\def\rl#1{\RL{\persianfont#1}}
-\def\LTR{\bgroup\par\@rlfalse}
-\def\endLTR{\par\egroup}
-\def\RTL{\bgroup\par\@rltrue}
-\def\endRTL{\par\egroup}
-\def\roman{\bgroup\par\@rlfalse\rmfamily}
-\def\endroman{\par\egroup}
-\def\persian{\bgroup\par\@rltrue\persianfont}
-\def\endpersian{\par\egroup}
-\def\Roman{\if@rl\par\@rlfalse\rmfamily\fi}
-\def\Persian{\if@rl\relax\else\par\@rltrue\persianfont\fi}
-
-\def\centerline#1{%
-\if@rl\@@line{\hss\beginR #1 \endR\hss}
-\else\@@line{\hss#1\hss}\fi}
-
-\def\leftline#1{%
-\if@rl\@@line{\beginR #1 \endR\hss}
-\else\@@line{#1\hss}\fi}
-
-\def\rightline#1{%
-\if@rl\@@line{\hss\beginR #1 \endR}
-\else\@@line{\hss#1}\fi}
-
+\@ifpackageloaded{fancyhdr}{%
+\def\@fancyhead#1#2#3#4#5{\beginR#1\endR\hbox to\headwidth{\fancy@reset
+ \@fancyvbox\headheight{\hbox
+ {\rlap{\parbox[b]{\headwidth}{\raggedright\beginR#2\endR}}\hfill
+ \parbox[b]{\headwidth}{\centering\beginR#3\endR}\hfill
+ \llap{\parbox[b]{\headwidth}{\raggedleft\beginR#4\endR}}}\headrule}}\beginR#5\endR}
+\def\@fancyfoot#1#2#3#4#5{\beginR#1\endR\hbox to\headwidth{\fancy@reset
+ \@fancyvbox\footskip{\footrule
+ \hbox{\rlap{\parbox[t]{\headwidth}{\raggedright\beginR#2\endR}}\hfill
+ \parbox[t]{\headwidth}{\centering\beginR#3\endR}\hfill
+ \llap{\parbox[t]{\headwidth}{\raggedleft\beginR#4\endR}}}}}\beginR#5\endR}
+}{}
+\@ifpackageloaded{draftwatermark}{%
+\renewcommand\SetWatermarkText[1]{%
+ \def\sc@wm@text{\if@RTL\beginR\fi#1\if@RTL\endR\fi}}
+}{}
+\newfontscript{Persian}{arab}
+\newfontlanguage{Persian}{ARA}
\newcommand*\settextfont[2][]{%
-\newfontfamily\persianfont[Script=Arabic,Mapping=parsidigits,#1]{#2}
+\newfontfamily\persianfont[Script=Persian,Mapping=parsidigits,#1]{#2}
\let\rmdefault\zf@family
\normalfont
}
\newcommand*\setromantextfont[2][]{%
\newfontfamily\rmfamily[Mapping=tex-text,#1]{#2}
}
-
-
\newcommand*\defpersianfont[1]{%
\@ifnextchar[{\defpersianfont@i#1}{\defpersianfont@i#1[]}}
\def\defpersianfont@i#1[#2]#3{%
- \zf@fontspec{Script=Arabic,Mapping=parsidigits,#2}{#3}%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#2}{#3}%
\edef\@tempa{%
\noexpand\DeclareRobustCommand\noexpand#1
{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
\@tempa}
-
-
-
-
-
\newcommand*\defromanfont[1]{%
\@ifnextchar[{\defromanfont@i#1}{\defromanfont@i#1[]}}
\def\defromanfont@i#1[#2]#3{%
@@ -107,17 +250,27 @@
\noexpand\DeclareRobustCommand\noexpand#1
{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
\@tempa}
-
-
-
-
-
-\def\ps@plain{\ps@empty
- \def\@oddfoot{\hfil\thepage\hfil}%
- \let\@evenfoot\@oddfoot
- \let\@oddhead\@empty\let\@evenhead\@empty
-}
-
+\let\n@xt=\
+\def\LRE{\protect\pLRE}%
+\def\pLRE{\protect\afterassignment\moreLRE \let\n@xt= }
+\def\moreLRE{\bracetext \aftergroup\endL \beginL\@RTLfalse}
+\def\RLE{\protect\pRLE}
+\def\pRLE{\protect\afterassignment\moreRLE \let\n@xt= }
+\def\moreRLE{\bracetext \aftergroup\endR \beginR\@RTLtrue}
+\def\bracetext{\ifcat\n@xt{\else\ifcat\n@xt}\fi
+ \errmessage{Missing left brace has been substituted}\fi \bgroup}
+\def\lr#1{\begingroup\beginL\rmfamily#1\endL\endgroup}
+\def\rl#1{\begingroup\beginR\persianfont#1\endR\endgroup}
+\def\LTR{\bgroup\par\@RTLfalse}
+\def\endLTR{\par\egroup}
+\def\RTL{\bgroup\par\@RTLtrue}
+\def\endRTL{\par\egroup}
+\def\roman{\bgroup\par\@RTLfalse\rmfamily}
+\def\endroman{\par\egroup}
+\def\persian{\bgroup\par\@RTLtrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\Roman{\if@RTL\par\@RTLfalse\rmfamily\fi}
+\def\Persian{\if@RTL\relax\else\par\@RTLtrue\persianfont\fi}
\newif\ifFT@leap \newif\ifFT@kabiseh
\newcount\FT@i \newcount\FT@y \newcount\FT@m \newcount\FT@d
@@ -300,117 +453,71 @@
آبان\or آذر\or
دی\or بهمن\or
اسفند\fi}
-
-
\let\originaltoday=\today
\def\today{\lr{\originaltoday}}
\let\romantoday\today
\def\today{\rl{\ftoday}}
-\def\leftmark{\RL{\expandafter\@leftmark\botmark\@empty\@empty}}
-\def\rightmark{\RL{\expandafter\@rightmark\firstmark\@empty\@empty}}
-
-
\newcommand\twocolumnstableofcontents{%
\begin{multicols}{2}[\section*{\contentsname}]%
\small
\@starttoc{toc}%
\end{multicols}}
-
\def\rcases#1{\left.\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\,\right\}}
-
-
-\def\thefootnote{\arabic{footnote}}
-\def\thefigure{\arabic{figure}}
-\def\thetable{\arabic{table}}
-\def\theequation{\arabic{equation}}
-
-\def\figurename{\@ensure@RL{شکل}}
-\def\tablename{\@ensure@RL{جدول}}
-\def\contentsname{\@ensure@RL{فهرست مطالب}}
-\def\listfigurename{\@ensure@RL{لیست تصاویر}}
-\def\listtablename{\@ensure@RL{لیست جداول}}
-\def\appendixname{\@ensure@RL{پیوست}}
-\def\indexname{\@ensure@RL{نمایه}}
-\def\refname{\@ensure@RL{مراجع}}
-\def\abstractname{\@ensure@RL{چکیده}}
-\def\partname{\@ensure@RL{بخش}}
-\def\datename{\@ensure@RL{تاریخ:}}
-\def\bibname{\@ensure@RL{کتاب‌نامه}}
-\def\chaptername{\@ensure@RL{فصل}}
-\def\ccname{\@ensure@RL{رونوشت}}
-\def\enclname{\@ensure@RL{پیوست}}
-\def\pagename{\@ensure@RL{صفحه}}
-\def\headtoname{\@ensure@RL{به}}
-\def\proofname{\@ensure@RL{اثبات}}
-
-
\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
\special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
\def\XePersian{\leavevmode$\smash{\hbox{X\lower.5ex
\hbox{\kern-.125em\reflect{E}}Persian}}$}
-
-
-
-
-
-\renewenvironment{equation}{%
-\beginL
- \incr@eqnum
- \mathdisplay@push
- \st@rredfalse \global\@eqnswtrue
- \mathdisplay{equation}%
-}{%
- \endmathdisplay{equation}%
- \mathdisplay@pop
- \ignorespacesafterend
-}
-
-
-\newif\if@RomanBibNum
-\def\@@number#1{\ifmmode\else\beginL\fi{\if@RomanBibNum#1\else\persianfont#1\fi}\ifmmode\else\endL\fi}
-\def\RomanBibNum{\@RomanBibNumtrue}
-\def\PersianBibNum{\@RomanBibNumfalse}
-\@RomanBibNumtrue
-\DeclareOption{PersianBibNum}{\@RomanBibNumfalse}
-\def\@number{\protect\@@number}
-\let\@persian=\@arabic
-\let\@@arabic=\@arabic
-\let\@@alph=\@alph
-\let\@@Alph=\@Alph
-\def\@arabic#1{\ifmmode\else\@number{\@@arabic#1}\fi}
-\def\arabicnorl#1{\expandafter\@@arabic\csname c@#1\endcsname}
-\def\make@lr#1{\begingroup
- \toks@=\expandafter{#1}%
- \edef\x{\endgroup
- \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
- \x}
-\def\@character#1{\ifcase#1\or الف\char"200D\or ب\or پ\or ت\or ث\or
+\def\figurename{شکل}
+\def\tablename{جدول}
+\def\contentsname{فهرست مطالب}
+\def\listfigurename{لیست تصاویر}
+\def\listtablename{لیست جداول}
+\def\appendixname{پیوست}
+\def\indexname{نمایه}
+\def\refname{مراجع}
+\def\abstractname{چکیده}
+\def\partname{بخش}
+\def\datename{تاریخ:}
+\def\bibname{کتاب‌نامه}
+\def\chaptername{فصل}
+\def\ccname{رونوشت}
+\def\enclname{پیوست}
+\def\pagename{صفحه}
+\def\headtoname{به}
+\def\proofname{اثبات}
+\def\@harfi#1{\ifcase#1\or الف\char"200D\or ب\or پ\or ت\or ث\or
ج\or چ\or ح\or خ\or د\or ذ\or ر\or ز\or س\or ش\or ص\or ض\or ع\or غ\or
-ف\or ق\or ک\or گ\or ل\or م\or ن\or ه\or و\or ی\fi}
-
-
-\def\@harfi#1{\@character{\@@arabic#1}}
-
-\def\@numeric#1{\ifcase#1 \or یک\or دو\or سه\or چهار\or پنج\or شش\or هفت\or هشت\or نه\or ده\or یازده\or دوازده\or سیزده\or چهارده\or پانزده\or شانزده\or هفده\or هجده\or نوزده\or بیست\fi}
-\def\@adadi#1{\@numeric{\@@arabic#1}}
-
-\def\@@tartibi#1{\ifcase#1 \or اول \or دوم \or سوم \or چهارم \or پنجم \or ششم \or هفتم \or هشتم \or نهم \or دهم \or یازدهم \or دوازدهم \or سیزدهم \or چهاردهم \or پانزدهم \or شانزدهم \or هفدهم \or هجدهم \or نوزدهم \or بیستم\fi}
-\def\@tartibi#1{\@@tartibi{\@@arabic#1}}
-
-
-
-
-
-
-\let\@@text=\text
-\def\text#1{\@@text{\RL{#1}}}
-
-\def\tagform@#1{\maketag@@@{)\ignorespaces\text{#1}\unskip\@@italiccorr(}}
-\renewcommand{\eqref}[1]{\LR{\textup{\tagform@{\ref{#1}}}}}
-
-
+ف\or ق\or ک\or گ\or ل\or م\or ن\or ه\or و\or ی\else\@ctrerr\fi}
+\def\harfi#1{\expandafter\@harfi\csname c@#1\endcsname}
+\def\@adadi#1{\ifcase#1 \or یک\or دو\or سه\or چهار\or پنج\or شش\or هفت\or هشت\or نه\or ده\or یازده\or دوازده\or سیزده\or چهارده\or پانزده\or شانزده\or هفده\or هجده\or نوزده\or بیست\else\@ctrerr\fi}
+\def\adadi#1{\expandafter\@adadi\csname c@#1\endcsname}
+\def\@tartibi#1{\ifcase#1 \or اول \or دوم \or سوم \or چهارم \or پنجم \or ششم \or هفتم \or هشتم \or نهم \or دهم \or یازدهم \or دوازدهم \or سیزدهم \or چهاردهم \or پانزدهم \or شانزدهم \or هفدهم \or هجدهم \or نوزدهم \or بیستم\else\@ctrerr\fi}
+\def\tartibi#1{\expandafter\@tartibi\csname c@#1\endcsname}
+\def\SepMark#1{\gdef\@SepMark{\beginR#1\endR}}
+\SepMark{.}
\@ifclassloaded{article}{%
+\renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty\@secpenalty
+ \addvspace{2.25em \@plus\p@}%
+ \setlength\@tempdima{3em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
+ \nobreak
+ \if@compatibility
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \fi
+ \endgroup
+ \fi}
+\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
+\renewcommand\thesubsubsection{\thesubsection\@SepMark\@arabic\c@subsubsection}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{part}%
@@ -455,37 +562,37 @@
\if@twoside
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\RL{\leftmark}\hfil\thepage}%
- \def\@oddhead{\sl\thepage\hfil\RL{\rightmark}}%
+ \def\@evenhead{\sl\beginR\leftmark\endR\hfil\thepage}%
+ \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}%
\let\@mkboth\markboth
\def\sectionmark##1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\z@
\thesection\quad
\fi
- \RL{##1}}}{}}%
+ \beginR##1\endR}}{}}%
\def\subsectionmark##1{%
\markright {%
\ifnum \c@secnumdepth >\@ne
- \RL{\thesubsection\quad}
+ \beginR\thesubsection\quad\endR
\fi
- \RL{##1}}}}
+ \beginR##1\endR}}}
\else
\def\ps@headings{%
\let\@oddfoot\@empty
- \def\@oddhead{\sl\thepage\hfil\RL{\rightmark}}%
+ \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}%
\let\@mkboth\markboth
\def\sectionmark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
- \RL{\thesection\quad}
+ \beginR\thesection\quad\endR
\fi
- \RL{##1}}}}}
+ \beginR##1\endR}}}}
\fi
\def\ps@myheadings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\thepage\hfil\RL{\leftmark}}%
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\@gobbletwo
\let\sectionmark\@gobble
\let\subsectionmark\@gobble
@@ -501,6 +608,27 @@
\@ifclassloaded{amsart}{%
+\def\@tocline#1#2#3#4#5#6#7{\relax
+ \ifnum #1>\c@tocdepth % then omit
+ \else
+ \par \addpenalty\@secpenalty\addvspace{#2}%
+ \begingroup \hyphenpenalty\@M
+ \@ifempty{#4}{%
+ \@tempdima\csname r@tocindent\number#1\endcsname\relax
+ }{%
+ \@tempdima#4\relax
+ }%
+ \parindent\z@ \if@RTL\rightskip\else\leftskip\fi#3\relax \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima\relax
+ \if@RTL\leftskip\else\rightskip\fi\@pnumwidth plus4em \parfillskip-\@pnumwidth
+ #5\leavevmode\hskip-\@tempdima #6\nobreak\relax
+ \hfil\hbox to\@pnumwidth{\@tocpagenum{#7}}\par
+ \nobreak
+ \endgroup
+ \fi}
+\renewcommand\thesubsection {\thesection\@SepMark\arabic{subsection}}
+\renewcommand\thesubsubsection {\thesubsection \@SepMark\arabic{subsubsection}}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\arabic{paragraph}}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\arabic{subparagraph}}
\def\part{\@startsection{part}{0}%
\z@{\linespacing\@plus\linespacing}{.5\linespacing}%
{\normalfont\bfseries\raggedleft}}
@@ -528,6 +656,33 @@
\@ifclassloaded{report}{%
+\renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\p@}%
+ \setlength\@tempdima{3em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
+ \nobreak
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \endgroup
+ \fi}
+\renewcommand\theequation
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
+\renewcommand \thefigure
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure}
+\renewcommand \thetable
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table}
+\renewcommand \thechapter {\@arabic\c@chapter}
+\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section}
+\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
+\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedleft \normalfont
@@ -570,37 +725,37 @@
\if@twoside
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\thepage\hfil\RL{\leftmark}}%
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
- \RL{\@chapapp\ \thechapter. \ }%
+ \beginR\@chapapp\ \thechapter. \ \endR%
\fi
- \RL{##1}}}{}}%
+ \beginR##1\endR}}{}}%
\def\sectionmark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\z@
- \RL{\thesection. \ }%
+ \beginR\thesection. \ \endR%
\fi
- \RL{##1}}}}}
+ \beginR##1\endR}}}}
\else
\def\ps@headings{%
\let\@oddfoot\@empty
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
- \RL{\@chapapp\ \thechapter. \ }%
+ \beginR\@chapapp\ \thechapter. \ \endR%
\fi
- \RL{##1}}}}}
+ \beginR##1\endR}}}}
\fi
\def\ps@myheadings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\thepage\hfil\RL{\leftmark}}%
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\@gobbletwo
\let\chaptermark\@gobble
\let\sectionmark\@gobble
@@ -619,6 +774,33 @@
\@ifclassloaded{xepersian-thesis}{%
+\renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\p@}%
+ \setlength\@tempdima{3em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
+ \nobreak
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \endgroup
+ \fi}
+\renewcommand\theequation
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
+\renewcommand \thefigure
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure}
+\renewcommand \thetable
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table}
+\renewcommand \thechapter {\@arabic\c@chapter}
+\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section}
+\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
+\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedleft \normalfont
@@ -661,37 +843,37 @@
\if@twoside
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\thepage\hfil\RL{\leftmark}}%
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
- \RL{\@chapapp\ \thechapter. \ }%
+ \beginR\@chapapp\ \thechapter. \ \endR%
\fi
- \RL{##1}}}{}}%
+ \beginR##1\endR}}{}}%
\def\sectionmark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\z@
- \RL{\thesection. \ }%
+ \beginR\thesection. \ \endR%
\fi
- \RL{##1}}}}}
+ \beginR##1\endR}}}}
\else
\def\ps@headings{%
\let\@oddfoot\@empty
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
- \RL{\@chapapp\ \thechapter. \ }%
+ \beginR\@chapapp\ \thechapter. \ \endR%
\fi
- \RL{##1}}}}}
+ \beginR##1\endR}}}}
\fi
\def\ps@myheadings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\thepage\hfil\RL{\leftmark}}%
- \def\@oddhead{\sl\RL{\rightmark}\hfil\thepage}%
+ \def\@evenhead{\sl\thepage\hfil\beginR\leftmark\endR}%
+ \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
\let\@mkboth\@gobbletwo
\let\chaptermark\@gobble
\let\sectionmark\@gobble
@@ -710,6 +892,27 @@
\@ifclassloaded{amsbook}{%
+\def\@tocline#1#2#3#4#5#6#7{\relax
+ \ifnum #1>\c@tocdepth % then omit
+ \else
+ \par \addpenalty\@secpenalty\addvspace{#2}%
+ \begingroup \hyphenpenalty\@M
+ \@ifempty{#4}{%
+ \@tempdima\csname r@tocindent\number#1\endcsname\relax
+ }{%
+ \@tempdima#4\relax
+ }%
+ \parindent\z@ \if@RTL\rightskip\else\leftskip\fi#3\relax \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima\relax
+ \if@RTL\leftskip\else\rightskip\fi\@pnumwidth plus4em \parfillskip-\@pnumwidth
+ #5\leavevmode\hskip-\@tempdima #6\nobreak\relax
+ \hfil\hbox to\@pnumwidth{\@tocpagenum{#7}}\par
+ \nobreak
+ \endgroup
+ \fi}
+\renewcommand\thesubsection {\thesection\@SepMark\arabic{subsection}}
+\renewcommand\thesubsubsection {\thesubsection \@SepMark\arabic{subsubsection}}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\arabic{paragraph}}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\arabic{subparagraph}}
\renewenvironment{thebibliography}[1]{%
\@bibtitlestyle
\normalfont\bibliofont\labelsep .5em\relax
@@ -827,6 +1030,33 @@
\@ifclassloaded{book}{%
+\renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\p@}%
+ \setlength\@tempdima{3em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
+ \nobreak
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \endgroup
+ \fi}
+\renewcommand\theequation
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
+\renewcommand \thefigure
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure}
+\renewcommand \thetable
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table}
+\renewcommand \thechapter {\@arabic\c@chapter}
+\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section}
+\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
+\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedleft \normalfont
@@ -875,7 +1105,7 @@
\renewcommand\mainmatter{%
\cleardoublepage
\@mainmattertrue
- \pagenumbering{persian}}
+ \pagenumbering{arabic}}
\renewcommand\backmatter{%
\if@openright
\cleardoublepage
@@ -887,15 +1117,15 @@
\if@twoside
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\RL{\rightmark}\hfil\thepage}%
- \def\@oddhead{\sl\thepage\hfil\RL{\leftmark}}%
+ \def\@evenhead{\sl\beginR\rightmark\endR\hfil\thepage}%
+ \def\@oddhead{\sl\thepage\hfil\beginR\leftmark\endR}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {\MakeUppercase{%
- \RL{\@chapapp\ \thechapter.\,\,}%
+ \beginR\@chapapp\ \thechapter.\,\,\endR%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
- \RL{##1}
+ \beginR##1\endR
\fi
\fi
}}{}}%
@@ -905,22 +1135,22 @@
}
\def\sectionmark##1{%
\markright {\MakeUppercase{%
- \RL{\thesection}\,
+ \beginR\thesection\endR\,
\ifnum \c@secnumdepth >\z@
- \RL{##1} \ %
+ \beginR##1\endR \ %
\fi
}}}}
\else
\def\ps@headings{%
\let\@oddfoot\@empty
- \def\@oddhead{\sl\thepage\hfil\RL{\rightmark}}%
+ \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markright {\MakeUppercase{%
- \RL{\@chapapp\ \thechapter. } %
+ \beginR\@chapapp\ \thechapter. \endR %
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
- \RL{##1}
+ \beginR##1\endR
\fi
\fi
}}}}
@@ -942,6 +1172,31 @@
\@ifclassloaded{refrep}{%
+\renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\p@}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
+ \nobreak
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \endgroup
+ \fi}
+\renewcommand\theequation
+{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
+\renewcommand\thefigure
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure}
+\renewcommand\thetable%
+ {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table}
+\renewcommand\thesection {\thechapter\@SepMark\@arabic\c@section}
+\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
+\renewcommand\thesubsubsection {\thesubsection \@SepMark\@arabic\c@subsubsection}
+\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}
\renewcommand \thepart {\@tartibi\c@part}
%to make appendix numbering Persian
\renewcommand\appendix{\par
@@ -952,23 +1207,33 @@
}%end appendix
}{}
+\renewcommand{\numberwithin}[3][\arabic]{%
+ \@ifundefined{c@#2}{\@nocounterr{#2}}{%
+ \@ifundefined{c@#3}{\@nocnterr{#3}}{%
+ \@addtoreset{#2}{#3}%
+ \@xp\xdef\csname the#2\endcsname{%
+ \@xp\@nx\csname the#3\endcsname \@SepMark\@nx#1{#2}}}}%
+}
+
+\def\@thmcountersep{\@SepMark}
+
\@ifclassloaded{beamer}{%
\def\familydefault{\rmdefault}
\raggedleft
-\def\LTR{\bgroup\par\raggedright\@rlfalse}
+\def\LTR{\bgroup\par\raggedright\@RTLfalse}
\def\endLTR{\par\egroup}
-\def\RTL{\bgroup\par\raggedleft\@rltrue}
+\def\RTL{\bgroup\par\raggedleft\@RTLtrue}
\def\endRTL{\par\egroup}
-\def\roman{\bgroup\par\raggedright\@rlfalse\rmfamily}
+\def\roman{\bgroup\par\raggedright\@RTLfalse\rmfamily}
\def\endroman{\par\egroup}
-\def\persian{\bgroup\par\raggedleft\@rltrue\persianfont}
+\def\persian{\bgroup\par\raggedleft\@RTLtrue\persianfont}
\def\endpersian{\par\egroup}
\long\def\beamer@@frametitle[#1]#2{%
\beamer@ifempty{#2}{}{%
- \gdef\insertframetitle{\raggedleft\rightskip=2em{\RL{#2}\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%
- \gdef\beamer@frametitle{\RL{#2}}%
- \gdef\beamer@shortframetitle{\RL{#1}}%
+ \gdef\insertframetitle{\raggedleft\rightskip=2em{\beginR#2\endR\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%
+ \gdef\beamer@frametitle{\beginR#2\endR}%
+ \gdef\beamer@shortframetitle{\beginR#1\endR}%
}%
}
\def\@thm#1#2#3{%
@@ -989,7 +1254,7 @@
\expandafter\def\expandafter\inserttheoremnumber\expandafter{ \csname the#2\endcsname}
\fi
\beamer@begintheorem%
-\raggedleft\@rltrue
+\raggedleft\@RTLtrue
}
\ifbeamer@countsect
\newtheorem{قضیه}{\raggedleft قضیه}[section]
@@ -998,7 +1263,7 @@
\fi
\newtheorem{نتیجه}[theorem]{\raggedleft نتیجه}
\newtheorem{حقیقت}[theorem]{\raggedleft حقیقت}
- \newtheorem{لما}[theorem]{\raggedleft لما}
+ \newtheorem{لم}[theorem]{\raggedleft لم}
\newtheorem{مسئله}[theorem]{\raggedleft مسئله}
\newtheorem{پاسخ}[theorem]{\raggedleft پاسخ}
\theoremstyle{definition}
@@ -1011,13 +1276,13 @@
\par
\def\insertproofname{#1\@addpunct{}}%
\pushQED{\qed}
- \usebeamertemplate{proof begin}\@rltrue#2}
+ \usebeamertemplate{proof begin}\@RTLtrue#2}
{\popQED\usebeamertemplate{proof end}}
\newenvironment<>{بلوک}[1]{%
\begin{actionenv}#2%
\def\insertblocktitle{\raggedleft#1}%
\par%
- \usebeamertemplate{block begin}\raggedleft\@rltrue}
+ \usebeamertemplate{block begin}\raggedleft\@RTLtrue}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
@@ -1027,7 +1292,7 @@
\par%
\mode<presentation>{%\usebeamerfont{block}%
\setbeamercolor{local structure}{parent=alerted text}}%
- \usebeamertemplate{block alerted begin}\raggedleft\@rltrue}
+ \usebeamertemplate{block alerted begin}\raggedleft\@RTLtrue}
{\par%
\usebeamertemplate{block alerted end}%
\end{actionenv}}
@@ -1037,10 +1302,23 @@
\par%
\mode<presentation>{%\usebeamerfont{block}%
\setbeamercolor{local structure}{parent=example text}}%
- \usebeamertemplate{block example begin}\raggedleft\@rltrue}
+ \usebeamertemplate{block example begin}\raggedleft\@RTLtrue}
{\par%
\usebeamertemplate{block example end}%
\end{actionenv}}
+\def\@listi{\if@RTL\rightmargin\leftmargini\else\leftmargin\leftmargini\fi
+ \topsep 3\p@ \@plus2\p@ \@minus2.5\p@
+ \parsep 0\p@
+ \itemsep3\p@ \@plus2\p@ \@minus3\p@}
+\let\@listI\@listi
+\def\@listii{\if@RTL\rightmargin\leftmarginii\else\leftmargin\leftmarginii\fi
+ \topsep 2\p@ \@plus1\p@ \@minus2\p@
+ \parsep 0\p@ \@plus\p@
+ \itemsep \parsep}
+\def\@listiii{\if@RTL\rightmargin\leftmarginiii\else\leftmargin\leftmarginiii\fi
+ \topsep 2\p@ \@plus1\p@ \@minus2\p@
+ \parsep 0\p@ \@plus\p@
+ \itemsep \parsep}
\def\beamer@enum@{%
\beamer@computepref\@itemdepth% sets \beameritemnestingprefix
\usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
@@ -1054,7 +1332,7 @@
\usebeamerfont*{enumerate \beameritemnestingprefix item}%
\usebeamercolor[fg]{enumerate \beameritemnestingprefix item}##1}}}}}%
\beamer@cramped%
- \raggedleft\rightskip=2em%
+ \raggedleft%
\beamer@firstlineitemizeunskip%
}
\renewcommand{\itemize}[1][]{%
@@ -1077,7 +1355,7 @@
}
\fi%
\beamer@cramped%
- \raggedleft\rightskip=2em%
+ \raggedleft%
\beamer@firstlineitemizeunskip%
}
\def\@@description{%
@@ -1089,7 +1367,7 @@
\raggedleft\rightskip=6em
\beamer@firstlineitemizeunskip%
}
-\AtBeginDocument{\@rlfalse}
+\AtBeginDocument{\@RTLfalse}
\renewenvironment{beamer@frameslide}{%
\ifbeamer@autobreak\else%
\ifx\beamer@againname\@empty%
@@ -1118,7 +1396,7 @@
\gdef\beamer@framesubtitle{}%
\let\beamer@startcomment=\beamer@startcommentinframe%
% Start slide:
- \beamer@framenotesbegin\@rltrue%
+ \beamer@framenotesbegin\@RTLtrue%
\global\setbox\beamer@framebox=\vbox\bgroup%
\beamer@inframetrue%
\let\frame=\framelatex% inside frames, use LaTeX's \frame command
@@ -1192,20 +1470,20 @@
\beamer@framenotesend%
\box\beamer@framebox}
\long\def\beamer@title[#1]#2{%
- \def\inserttitle{\RL{#2}}%
- \def\beamer@shorttitle{\RL{#1}}%
+ \def\inserttitle{\beginR#2\endR}%
+ \def\beamer@shorttitle{\beginR#1\endR}%
}
\long\def\beamer@subtitle[#1]#2{%
- \def\insertsubtitle{\RL{#2}}%
- \def\beamer@shortsubtitle{\RL{#1}}%
+ \def\insertsubtitle{\beginR#2\endR}%
+ \def\beamer@shortsubtitle{\beginR#1\endR}%
}
\long\def\beamer@date[#1]#2{%
- \def\insertdate{\RL{#2}}%
- \def\beamer@shortdate{\RL{#1}}%
+ \def\insertdate{\beginR#2\endR}%
+ \def\beamer@shortdate{\beginR#1\endR}%
}
\long\def\beamer@author[#1]#2{%
- \def\insertauthor{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}\RL{#2}}%
- \def\beamer@shortauthor{\RL{#1}}%
+ \def\insertauthor{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}\beginR#2\endR}%
+ \def\beamer@shortauthor{\beginR#1\endR}%
\ifbeamer@autopdfinfo%
\def\beamer@andstripped{}%
\beamer@stripands#2 \and\relax
@@ -1213,13 +1491,13 @@
\fi%
}
\long\def\beamer@institute[#1]#2{%
- \def\beamer@temp{\RL{#2}}%
+ \def\beamer@temp{\beginR#2\endR}%
\ifx\beamer@temp\@empty
\def\insertinstitute{}
\else
- \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}\RL{#2}}%
+ \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}\beginR#2\endR}%
\fi
- \def\beamer@shortinstitute{\RL{#1}}}
+ \def\beamer@shortinstitute{\beginR#1\endR}}
\renewenvironment{thebibliography}[1]
{%\leavevmode\unskip%
\list{\@biblabel{\@arabic\c@enumiv}}%
@@ -1241,9 +1519,9 @@
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\ifhmode\unskip\fi\endlist}
-\long\def\beamer@@@section#1{\beamer@section[\RL{#1}]{#1}}
-\def\beamer@@@subsection#1{\beamer@subsection[\RL{#1}]{#1}}
-\def\beamer@@@subsubsection#1{\beamer@subsubsection[\RL{#1}]{#1}}
+\long\def\beamer@@@section#1{\beamer@section[\beginR#1\endR]{#1}}
+\def\beamer@@@subsection#1{\beamer@subsection[\beginR#1\endR]{#1}}
+\def\beamer@@@subsubsection#1{\beamer@subsubsection[\beginR#1\endR]{#1}}
\long\def\beamer@subsectionintoc#1#2#3#4#5#6{%
\ifnum\c@tocdepth>1%
\ifnum#5=\beamer@showpartnumber%
@@ -1257,7 +1535,7 @@
\advance\beamer@tempcount by\beamer@sectionadjust%
\edef\inserttocsectionnumber{\the\beamer@tempcount}%
\def\inserttocsubsectionnumber{#2}%
- \def\inserttocsubsection{\rightskip=1.5em\hyperlink{Navigation#4}{\RL{#3}\hfill}}%
+ \def\inserttocsubsection{\rightskip=1.5em\hyperlink{Navigation#4}{\beginR#3\endR\hfill}}%
\beamer@tocifnothide{\ifnum\c@section=#1\beamer@toc@oss\else\beamer@toc@ooss\fi}%
{%
\def\beamer@breakhere{\\}%
@@ -1284,7 +1562,7 @@
\edef\inserttocsectionnumber{\the\beamer@tempcount}%
\def\inserttocsubsectionnumber{#3}%
\def\inserttocsubsubsectionnumber{#4}%
- \def\inserttocsubsubsection{\rightskip=3em\hyperlink{Navigation#5}{\RL{#7}\hfill}}%
+ \def\inserttocsubsubsection{\rightskip=3em\hyperlink{Navigation#5}{\beginR#7\endR\hfill}}%
\beamer@tocifnothide{\ifnum\c@section=#2\beamer@toc@oss\else\beamer@toc@ooss\fi}%
{%
\def\beamer@breakhere{\\}%
@@ -1297,120 +1575,20 @@
\beamer@todo%
\fi\fi%
}
-}{}
-
-
-
-
-
-
-
-
-\def\rl@outputdblcolumn{%
- \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}
-
-\def\lr@outputdblcolumn{%
- \if@firstcolumn
- \global \@firstcolumnfalse
- \global \setbox\@leftcolumn \box\@outputbox
+\long\def\beamer@makecaption#1#2{%
+ \def\insertcaptionname{\csname#1name\endcsname}%
+ \def\insertcaptionnumber{\csname the#1\endcsname}%
+ \def\insertcaption{#2}%
+ \nobreak\vskip\abovecaptionskip\nobreak
+ \sbox\@tempboxa{\usebeamertemplate**{caption}}%
+ \ifdim \wd\@tempboxa >\hsize
+ \usebeamertemplate**{caption}\par
\else
- \global \@firstcolumntrue
- \setbox\@outputbox \vbox {%
- \hb@xt@\textwidth {%
- \hb@xt@\columnwidth {%
- \box\@leftcolumn \hss}%
- \hfil
- {\normalcolor\vrule \@width\columnseprule}%
- \hfil
- \hb@xt@\columnwidth {%
- \box\@outputbox \hss}%
- }%
- }%
- \@combinedblfloats
- \@outputpage
- \begingroup
- \@dblfloatplacement
- \@startdblcolumn
- \@whilesw\if@fcolmade \fi
- {\@outputpage
- \@startdblcolumn}%
- \endgroup
+ \global \@minipagefalse
+ \hb@xt@\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}%
\fi
-}
-\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl@outputdblcolumn}}
-\newcommand{\lrdblcolumn}{\renewcommand{\@outputdblcol}{\lr@outputdblcolumn}}
-%set the default direction of the twocolumn texts to Right-to-Left
-\rldblcolumn
-
-
-
-
-
-\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}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ \nobreak\vskip\belowcaptionskip\nobreak}
+}{}
\providecommand*{\xpg@warning}[1]{%
\PackageWarning{XePersian}%
@@ -1437,7 +1615,7 @@
}
\def\abjad@zero{}
\def\abj@num@i#1{%
- \ifcase#1\or ا\or ب\or ج\char"200D\or د%
+ \ifcase#1\or الف\or ب\or ج\or د%
\or ه\char"200D\or و\or ز\or ح\or ط\fi
\ifnum#1=\z@\abjad@zero\fi}
\def\abj@num@ii#1{%
@@ -1460,14 +1638,6 @@
-\def\underline#1{%
- \relax
- \ifmmode\@@@underline{#1}%
- \else
-\if@rl $\@@@underline{\hbox{\RL{#1}}}\m@th$\relax
-\else
-$\@@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1589,7 +1759,7 @@ $\@@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\bgroup
\footnotemarkLR%
\renewcommand{\thefootnote}{\if@RomanFootNum\rmfamily{\@arabic\c@footnote}\else\@arabic\c@footnote\fi}%
-\@rl@footnotefalse\footnotetext{\rmfamily#1}%
+\@RTLfalse\footnotetext{\rmfamily#1}%
\egroup
}
\@RomanFootNumfalse