summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-17 00:56:22 +0000
committerKarl Berry <karl@freefriends.org>2009-07-17 00:56:22 +0000
commit6daa627c7cb7dfd9e78504d4641c87a0d4248724 (patch)
tree1faf58108bb4e75b78b027c2fa0421e1e464b20f
parent5371eca0a5672238a07a473483cdd4a7eeb4a31f (diff)
xepersian 1.0.1 (14jul09)
git-svn-id: svn://tug.org/texlive/trunk@14287 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/bibtex/bst/xepersian/acm-fa.bst1357
-rw-r--r--Master/texmf-dist/bibtex/bst/xepersian/ieeetr-fa.bst1178
-rw-r--r--Master/texmf-dist/bibtex/bst/xepersian/plain-fa.bst1304
-rw-r--r--Master/texmf-dist/bibtex/bst/xepersian/unsrt-fa.bst1146
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/MyReferences.bib113
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/README28
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/README.txt23
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/README.txt.xepersian23
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/acm-fa-output.tex17
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/acm-fa.bst1357
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/algorithm-xepersian.def32
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/algorithmic-xepersian.def31
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/amsart-xepersian.def34
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/amsbook-xepersian.def37
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/article-xepersian.def34
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/backref-xepersian.def30
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Goettingen.pdfbin74715 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Hannover.pdfbin73900 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Marburg.pdfbin74832 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Montpellier.pdfbin65717 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-PaloAlto.pdfbin85630 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Pittsburgh.pdfbin62420 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Szeged.pdfbin74689 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-malmoe.pdfbin60592 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-singapore.pdfbin59597 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-warsaw.pdfbin73799 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdfbin80361 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex88
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdfbin75207 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex82
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/bibtex-example.tex27
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/bidibeamer-xepersian.def45
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/bidimemoir-xepersian.def40
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/bidimoderncv-xepersian.def30
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/book-xepersian.def44
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/bookest-xepersian.def36
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/commands-ltx.def841
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/commands-xepersian.def30
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/enumerate-xepersian.def45
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/environments-ltx.def91
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/environments-xepersian.def30
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/MyReferences.bib113
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/acm-fa-output.tex17
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/bibtex-example.tex27
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/ieeetr-fa-output.tex19
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/plain-fa-output.tex19
-rwxr-xr-xMaster/texmf-dist/doc/xelatex/xepersian/examples/logo.pdfbin0 -> 10761 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/magazine-sample.tex171
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/test-correction.tex39
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/test-empty-form.tex43
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/test-question-only.tex39
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/test-solution-form.tex43
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/examples/thesis-sample.tex62
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/extbook-xepersian.def44
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/farsitex2xepersian/ftxe-0.11.py1045
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/footnote-bidi-xepersian.def113
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/ftun-0.1.py430
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/ftxe-0.11.py1045
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/gradient1.pngbin187782 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/gradient2.pngbin195782 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa-output.tex19
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa.bst1178
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/iran.jpgbin14797 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/kashida-xepersian.def70
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/listings-xepersian.def31
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/localise-xepersian.def53
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdfbin158860 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.tex81
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/minitoc-xepersian.def38
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/misccommandsenvironments-ltx.def31
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/parsidigits.map46
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/parsidigits.tecbin0 -> 666 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/plain-fa-output.tex19
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/plain-fa.bst1304
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdfbin192350 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.tex53
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/rapport3-xepersian.def35
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/refrep-xepersian.def36
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/report-xepersian.def36
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/scrartcl-xepersian.def64
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/scrbook-xepersian.def69
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/scrreprt-xepersian.def65
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/test-correction.tex39
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/test-empty-form.tex43
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/test-question-only.tex39
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/test-solution-form.tex43
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdfbin109094 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.tex36
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/tocloft-xepersian.def39
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/txt2maths.map48
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/txt2maths.tecbin0 -> 698 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/unsrt-fa.bst1146
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-cove.tex56
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex301
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.cls898
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.tex262
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-mathsdigitspec.sty106
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-multiplechoice.sty164
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-persiancal.sty197
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex200
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis-xepersian.def36
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.cls174
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.tex54
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdfbin263915 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex22
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian.dtx9100
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian.sty284
-rwxr-xr-xMaster/texmf-dist/doc/xelatex/xepersian/xindy/persian.xdy118
-rw-r--r--Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.map36
-rw-r--r--Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.tecbin666 -> 666 bytes
-rw-r--r--Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.map48
-rw-r--r--Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.tecbin0 -> 698 bytes
-rw-r--r--Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx9100
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/algorithm-xepersian.def32
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/algorithmic-xepersian.def31
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/amsart-xepersian.def34
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/amsbook-xepersian.def37
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/article-xepersian.def34
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def30
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty123
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/bidibeamer-xepersian.def45
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/bidimemoir-xepersian.def40
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/bidimoderncv-xepersian.def30
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/book-xepersian.def44
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/bookest-xepersian.def36
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/commands-ltx.def841
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def30
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/enumerate-xepersian.def45
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/environments-ltx.def91
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def30
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/extbook-xepersian.def44
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/footnote-bidi-xepersian.def113
-rwxr-xr-xMaster/texmf-dist/tex/xelatex/xepersian/img/ireland.jpgbin0 -> 18304 bytes
-rwxr-xr-xMaster/texmf-dist/tex/xelatex/xepersian/img/weather/clouds.jpgbin0 -> 13088 bytes
-rwxr-xr-xMaster/texmf-dist/tex/xelatex/xepersian/img/weather/rain.jpgbin0 -> 14616 bytes
-rwxr-xr-xMaster/texmf-dist/tex/xelatex/xepersian/img/weather/sun.jpgbin0 -> 10896 bytes
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def70
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/listings-xepersian.def31
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/localise-xepersian.def53
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/minitoc-xepersian.def38
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/misccommandsenvironments-ltx.def31
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty217
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/rapport3-xepersian.def35
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/refrep-xepersian.def36
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/report-xepersian.def36
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def64
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def69
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/scrreprt-xepersian.def65
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/tocloft-xepersian.def39
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls35
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty121
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty164
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-persiancal.sty197
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-presentation.cls86
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis-xepersian.def36
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis.cls850
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-user.cls799
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty1887
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds2
159 files changed, 38491 insertions, 5439 deletions
diff --git a/Master/texmf-dist/bibtex/bst/xepersian/acm-fa.bst b/Master/texmf-dist/bibtex/bst/xepersian/acm-fa.bst
new file mode 100644
index 00000000000..e5fc7153bdf
--- /dev/null
+++ b/Master/texmf-dist/bibtex/bst/xepersian/acm-fa.bst
@@ -0,0 +1,1357 @@
+%%
+%% This is file `acm-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `acm-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "acm-fa", Persian (farsi) version of acm.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%% NOTE: Its output for English references may has a bit difference with acm.bst, for pure English texts please use acm.bst
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright of acm.bst
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- acm-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. thesis" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasizeic}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{ " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+{ "," bbl.etal * * }
+{ "," bbl.and * * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.innames}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ {s nameptr "{ff}{vv~}{ll}{, jj}" format.name$ 't :=}
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+{ bbl.etal * }
+{ bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names scapify}
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names scapify
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.innames
+ editor num.names$ #1 >
+{ ", " * bbl.editors *}
+{ ", " * bbl.editor *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+'skip$
+{ " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages n.dashify }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pp.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.vol.num.date}
+{ journal empty$
+ { "empty journal in " cite$ * warning$
+ ""
+ }
+ { journal
+ volume empty$
+'skip$
+{ " " * volume * }
+ if$
+ number empty$
+'emphasizeic
+{ emphasize ", " * number * }
+ if$
+ year empty$
+{ "empty year in " cite$ * warning$ }
+{ " (" * format.date * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pp.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pp.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ {bbl.in booktitle emphasize *
+ editor empty$
+'skip$
+{ ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.proc.date}
+{ duplicate$ empty$
+ { pop$ "" }
+ { year empty$
+{ "empty year in " cite$ * warning$
+ address empty$
+ 'emphasize
+ { emphasizeic
+ " (" * address * ")" *
+ }
+ if$
+}
+{ emphasizeic
+ " (" *
+ address empty$
+ 'skip$
+ { address * ", " * }
+ if$
+ format.date *
+ ")" *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.proc.date}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle format.proc.date * }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.journal.vol.num.date output
+ format.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pp.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.proc.date "booktitle" output.check
+ format.ineditors output
+ format.bvolume output
+ format.number.series output
+ organization output
+ publisher output
+}
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pp.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization scapify output }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ author empty$
+{ address new.block.checka }
+ { organization address new.block.checkb
+ organization output
+ }
+ if$
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization scapify output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title format.proc.date "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Program. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `acm-fa.bst'.
diff --git a/Master/texmf-dist/bibtex/bst/xepersian/ieeetr-fa.bst b/Master/texmf-dist/bibtex/bst/xepersian/ieeetr-fa.bst
new file mode 100644
index 00000000000..6c49f4db12e
--- /dev/null
+++ b/Master/texmf-dist/bibtex/bst/xepersian/ieeetr-fa.bst
@@ -0,0 +1,1178 @@
+%%
+%% This is file `ieeetr-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `ieeetr-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "ieeetr-fa", Persian (farsi) version of ieeetr.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+after.quoted.block after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- ieeetr-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.quote =
+{ " " * write$ }
+{ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+'write$
+{ output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+{ after.quoted.block 'output.state := }
+{ after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { %s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+{ " {\em" * bbl.etal * "}" * }
+{ bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+{ fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+}
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+{ fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+}
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume *
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+{ bbl.pages pages n.dashify * }
+{ bbl.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume * }%M.Amintoosi "vol.~"
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.number number * }%M.Amintoosi "no.~"
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+{ type "t" change.case$ }
+{ type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+{ "" }
+{ address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " {\em" * bbl.etal * "}" * }
+ { #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em" bbl.etal * "}" * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in "{\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.volume output
+ month empty$
+{ format.number output }
+'skip$
+ if$
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+{ format.title.p output.nonnull }
+{ format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+{ format.title.p output.nonnull }
+{ format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications ACM"}
+
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM J. Computing"}
+
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+
+MACRO {tods} {"ACM Trans. Database Systems"}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `ieeetr-fa.bst'.
diff --git a/Master/texmf-dist/bibtex/bst/xepersian/plain-fa.bst b/Master/texmf-dist/bibtex/bst/xepersian/plain-fa.bst
new file mode 100644
index 00000000000..10ab3f0fbfe
--- /dev/null
+++ b/Master/texmf-dist/bibtex/bst/xepersian/plain-fa.bst
@@ -0,0 +1,1304 @@
+%%
+%% This is file `plain-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `plain-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.2" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `plain-fa.bst'.
diff --git a/Master/texmf-dist/bibtex/bst/xepersian/unsrt-fa.bst b/Master/texmf-dist/bibtex/bst/xepersian/unsrt-fa.bst
new file mode 100644
index 00000000000..1097d437d5a
--- /dev/null
+++ b/Master/texmf-dist/bibtex/bst/xepersian/unsrt-fa.bst
@@ -0,0 +1,1146 @@
+%%
+%% This is file `unsrt-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `unsrt-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "usrt-fa", Persian (farsi) version of unsrt.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+%%%%%%%%%%% History:
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.22" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- unsrt-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " eds." 'bbl.editors :=
+ " ed." 'bbl.editor :=
+ " ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff}{vv~}{ll}{, jj}
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+}
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+{ pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by unsrt-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `unsrt-fa.bst'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/MyReferences.bib b/Master/texmf-dist/doc/xelatex/xepersian/MyReferences.bib
new file mode 100644
index 00000000000..77dd27e8cc8
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/MyReferences.bib
@@ -0,0 +1,113 @@
+@article{Baker02limits,
+ author = {Baker,, Simon and Kanade,, Takeo},
+ title = {Limits on Super-Resolution and How to Break Them},
+ journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
+ volume = {24},
+ number = {9},
+ year = {2002},
+ issn = {0162-8828},
+ pages = {1167--1183},
+ publisher = {IEEE Computer Society},
+ address = {Washington, DC, USA}
+ }
+
+@CONFERENCE{Amintoosi87using,
+ AUTHOR = {\noopsort{امین‌طوسی,محمود}{امین‌طوسی,محمود} and others},
+ TITLE = {استفاده از تجزیه ماتریس در وضوح برتر},
+ BOOKTITLE = {پنجمین کنفرانس بینائی ماشین},
+ YEAR = {1387},
+ ORGANIZATION = {دانشگاه تبریز},
+ ADDRESS = {تبریز، ایران},
+ PAGES = {172-178},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{پورموسی۸۸ارشد,
+ AUTHOR = {\noopsort{بپورموسی, امیرمسعود}{پورموسی, امیرمسعود}},
+ TITLE = {یک موضوع فیزیک},
+ SCHOOL = {دانشکده فیزیک، دانشگاه صنعتی‌شریف},
+ YEAR = {۱۳۸۸},
+ MONTH = {مرداد},
+ NOTE = {(در حال انجام)},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{Khalighi07MscThesis,
+ AUTHOR = {Vafa Khalighi},
+ TITLE = {Category Theory},
+ SCHOOL = {Sydny Univ.},
+ YEAR = {2007},
+ MONTH = {April}
+}
+
+@PHDTHESIS{امیدعلی82دکترا,
+ AUTHOR = {\noopsort{امیدعلی, مهدی}{امیدعلی, مهدی}},
+ TITLE = {تابع هیلبرت},
+ SCHOOL = {دانشکده ریاضی، دانشگاه امیرکبیر},
+ YEAR = {1382},
+ MONTH = {تیر},
+ LANGUAGE = {Persian}
+}
+
+@MISC{خلیقی۸۷زی‌پرشین,
+ AUTHOR = {\noopsort{خلیقی,وفا}{خلیقی,وفا} and امیدعلی, مهدی and واحدی,مصطفی.},
+ TITLE = {زی‌پرشین (\lr{\XePersian}): بسته فارسی برای حروف‌چینی در \lr{\LaTeX2e}},
+ HOWPUBLISHED = {\lr{http://developer.berlios.de/projects/xepersian}},
+ YEAR = {۱۳۸۷},
+ LANGUAGE = {Persian}
+ }
+
+@BOOK{استالینگ۸۰کتاب,
+ AUTHOR = {\noopsort{استالینگ, ویلیام}{استالینگ, ویلیام}},
+ EDITOR = {برنجکوب, محمود},
+ translator = { صدیقی‌ مشکنانی, محسن and پدرام,حسین },
+ TITLE = {اصول طراحی و ویژگیهای داخلی سیستم‌های عامل},
+ PUBLISHER = {نشر شیخ بهایی},
+ YEAR = {۱۳۸۰},
+ ADDRESS = {اصفهان},
+ edition = {سوم},
+ MONTH = {بهار},
+ LANGUAGE = {Persian}
+}
+
+@ARTICLE{واحدی87,
+ AUTHOR = {\noopsort{واحدی, مصطفی}{واحدی, مصطفی}},
+ TITLE = {موضوعی جدید در هندسه محاسباتی},
+ JOURNAL = {مجله فارسی نمونه},
+ VOLUME = {1},
+ YEAR = {1387},
+ NUMBER = {2},
+ MONTH = {آبان},
+ PAGES = {22-30},
+ LANGUAGE = {Persian}
+}
+
+@CONFERENCE{Amintoosi09regional,
+ author = {Mahmood Amintoosi and Mahmood Fathy and Nasser Mozayani},
+ title = {Regional Varying Image Super-Resolution},
+ booktitle = {(CSO 2009) The 2009 IEEE International Joint Conference on Computational Sciences and Optimization},
+ year = {2009},
+ month = {24-26 April},
+ organization = {City University},
+ address = {Sanya, Hainan, China},
+ pages = {101-105}
+}
+
+@PHDTHESIS{Farsiu05thesis,
+ AUTHOR = {Sina Farsiu},
+ TITLE = {A Fast and Robust Framework for Image Fusion and Enhancement},
+ SCHOOL = {Electrical Engineeting},
+ YEAR = {2005},
+ ADDRESS = {UC Santa Cruz},
+ MONTH = {December}
+}
+
+@BOOK{Gonzalez02book,
+ AUTHOR = {Gonzalez,, Rafael C. and Woods,, Richard E.},
+ TITLE = {Digital Image Processing},
+ PUBLISHER = {Prentice-Hall, Inc.},
+ YEAR = {2006},
+ ISBN = {013168728X},
+ EDITION = {3rd},
+ ADDRESS = {Upper Saddle River, NJ, USA},
+}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/README b/Master/texmf-dist/doc/xelatex/xepersian/README
deleted file mode 100644
index c1835cee076..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/README
+++ /dev/null
@@ -1,28 +0,0 @@
--------------------------------
-The XePersian Package v1
-
-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 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.
-
-
-
-The XePersian package is independent of any operating system, meaning it
-will work on all operating systems.
-
-XePersian is licensed as `Free` (lppl=LaTeX Project Public License).
-
-
-
-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
-
-
-Please report any bugs to the author (vafa.khalighi@students.mq.edu.au).
-
--------------------------------
-Vafa Khalighi
-2009/02/20
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/README.txt b/Master/texmf-dist/doc/xelatex/xepersian/README.txt
new file mode 100644
index 00000000000..948b15af140
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/README.txt
@@ -0,0 +1,23 @@
+_________________
+The XePersian package
+v1.0.1
+
+XePersian is a package written for XeLaTeX that allows users to typeset
+Persian easily. The current version is 1.0.1 and it will be developed to
+ meet the needs of Persian typesetting properly.
+
+The XePersian package is independent of any operating system, meaning it
+will work on all operating systems.
+
+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
+
+This version fixes all known bugs and adds heaps of new things.
+
+______________
+Vafa Khalighi
+vafa@users.berlios.de
+
+Copyright 2008-2009
+Distributed under the LaTeX Project Public License
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/README.txt.xepersian b/Master/texmf-dist/doc/xelatex/xepersian/README.txt.xepersian
new file mode 100644
index 00000000000..948b15af140
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/README.txt.xepersian
@@ -0,0 +1,23 @@
+_________________
+The XePersian package
+v1.0.1
+
+XePersian is a package written for XeLaTeX that allows users to typeset
+Persian easily. The current version is 1.0.1 and it will be developed to
+ meet the needs of Persian typesetting properly.
+
+The XePersian package is independent of any operating system, meaning it
+will work on all operating systems.
+
+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
+
+This version fixes all known bugs and adds heaps of new things.
+
+______________
+Vafa Khalighi
+vafa@users.berlios.de
+
+Copyright 2008-2009
+Distributed under the LaTeX Project Public License
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/acm-fa-output.tex b/Master/texmf-dist/doc/xelatex/xepersian/acm-fa-output.tex
new file mode 100644
index 00000000000..c0e153d6fb4
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/acm-fa-output.tex
@@ -0,0 +1,17 @@
+\documentclass[11pt,a4paper]{article}
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{acm-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+\nocite{*}
+\bibliographystyle{acm-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/acm-fa.bst b/Master/texmf-dist/doc/xelatex/xepersian/acm-fa.bst
new file mode 100644
index 00000000000..e5fc7153bdf
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/acm-fa.bst
@@ -0,0 +1,1357 @@
+%%
+%% This is file `acm-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `acm-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "acm-fa", Persian (farsi) version of acm.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%% NOTE: Its output for English references may has a bit difference with acm.bst, for pure English texts please use acm.bst
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright of acm.bst
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- acm-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. thesis" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasizeic}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{ " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+{ "," bbl.etal * * }
+{ "," bbl.and * * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.innames}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ {s nameptr "{ff}{vv~}{ll}{, jj}" format.name$ 't :=}
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+{ bbl.etal * }
+{ bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names scapify}
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names scapify
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.innames
+ editor num.names$ #1 >
+{ ", " * bbl.editors *}
+{ ", " * bbl.editor *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+'skip$
+{ " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages n.dashify }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pp.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.vol.num.date}
+{ journal empty$
+ { "empty journal in " cite$ * warning$
+ ""
+ }
+ { journal
+ volume empty$
+'skip$
+{ " " * volume * }
+ if$
+ number empty$
+'emphasizeic
+{ emphasize ", " * number * }
+ if$
+ year empty$
+{ "empty year in " cite$ * warning$ }
+{ " (" * format.date * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pp.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pp.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ {bbl.in booktitle emphasize *
+ editor empty$
+'skip$
+{ ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.proc.date}
+{ duplicate$ empty$
+ { pop$ "" }
+ { year empty$
+{ "empty year in " cite$ * warning$
+ address empty$
+ 'emphasize
+ { emphasizeic
+ " (" * address * ")" *
+ }
+ if$
+}
+{ emphasizeic
+ " (" *
+ address empty$
+ 'skip$
+ { address * ", " * }
+ if$
+ format.date *
+ ")" *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.proc.date}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle format.proc.date * }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.journal.vol.num.date output
+ format.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pp.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.proc.date "booktitle" output.check
+ format.ineditors output
+ format.bvolume output
+ format.number.series output
+ organization output
+ publisher output
+}
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pp.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization scapify output }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ author empty$
+{ address new.block.checka }
+ { organization address new.block.checkb
+ organization output
+ }
+ if$
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization scapify output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title format.proc.date "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Program. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `acm-fa.bst'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/algorithm-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/algorithm-xepersian.def
new file mode 100644
index 00000000000..f1bcebdd26d
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/algorithm-xepersian.def
@@ -0,0 +1,32 @@
+%%
+%% This is file `algorithm-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `algorithm-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\ALG@name{\if@RTL الگوریتم\else Algorithm\fi}
+\def\ALGS@name{الگوریتم‌ها}
+\def\listalgorithmname{\if@RTL لیست \ALGS@name\else List of \ALG@name s\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `algorithm-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/algorithmic-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/algorithmic-xepersian.def
new file mode 100644
index 00000000000..3a73b6afd02
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/algorithmic-xepersian.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `algorithmic-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `algorithmic-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\algorithmicrequire{\if@RTL\textbf{ورودی:}\else\textbf{Require:}\fi}
+\def\algorithmicensure{\if@RTL\textbf{خروجی:}\else\textbf{Ensure:}\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `algorithmic-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/amsart-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/amsart-xepersian.def
new file mode 100644
index 00000000000..9c741464de5
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/amsart-xepersian.def
@@ -0,0 +1,34 @@
+%%
+%% This is file `amsart-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `amsart-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `amsart-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/amsbook-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/amsbook-xepersian.def
new file mode 100644
index 00000000000..04376bfd4f8
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/amsbook-xepersian.def
@@ -0,0 +1,37 @@
+%%
+%% This is file `amsbook-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `amsbook-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\frontmatter{\cleardoublepage\pagenumbering{harfi}}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `amsbook-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/article-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/article-xepersian.def
new file mode 100644
index 00000000000..afc406ba099
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/article-xepersian.def
@@ -0,0 +1,34 @@
+%%
+%% This is file `article-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `article-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `article-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/backref-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/backref-xepersian.def
new file mode 100644
index 00000000000..1b7b9c5a011
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/backref-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `backref-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `backref-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\backrefpagesname{\if@RTL صفحات\else pages\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `backref-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Goettingen.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Goettingen.pdf
deleted file mode 100644
index 4f7645fbbbb..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Goettingen.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Hannover.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Hannover.pdf
deleted file mode 100644
index 0867fef3ab0..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Hannover.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Marburg.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Marburg.pdf
deleted file mode 100644
index 66ea58fa08d..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Marburg.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Montpellier.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Montpellier.pdf
deleted file mode 100644
index 1fc478cf951..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Montpellier.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-PaloAlto.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-PaloAlto.pdf
deleted file mode 100644
index 6c05f4697dc..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-PaloAlto.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Pittsburgh.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Pittsburgh.pdf
deleted file mode 100644
index f20c315696a..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Pittsburgh.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Szeged.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Szeged.pdf
deleted file mode 100644
index 4f46519ac37..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-Szeged.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-malmoe.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-malmoe.pdf
deleted file mode 100644
index ed56a8d3cab..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-malmoe.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-singapore.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-singapore.pdf
deleted file mode 100644
index b9d27f7541b..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-singapore.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-warsaw.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-warsaw.pdf
deleted file mode 100644
index 53992b095c9..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-warsaw.pdf
+++ /dev/null
Binary files differ
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
deleted file mode 100644
index 735fc3af057..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.pdf
+++ /dev/null
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
deleted file mode 100644
index 247589f38ce..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample-xepersian-JLTree.tex
+++ /dev/null
@@ -1,88 +0,0 @@
-\documentclass{beamer}
-\usetheme{xepersian-JLTree}
-\usepackage{xepersian}
-\settextfont[Scale=1]{XB Zar}
-\setromantextfont[Scale=1]{Linux Libertine}
-\AtBeginDocument{\setdigitfont[Scale=1]{XB Zar}}
-\title{عنوان اسلاید}
-\subtitle{این یک زیرعنوان است}
-\author{وفا خلیقی}
-\institute{دانشگاه تهران}
-\AtBeginSubsection[]
-{
- \begin{frame}<beamer>
- \frametitle{فهرست مطالب}
- \tableofcontents[currentsection]
- \end{frame}
-}
-\begin{document}
-\begin{frame}
-\titlepage
-\end{frame}
-\section{کتاب‌نامه}
-\begin{frame}{کتاب‌نامه}
-[۱] دیوان حافظ
-\end{frame}
-\section{قضیه‌های ریاضی}
-\begin{frame}{این یک عنوان است}
-\framesubtitle{این زیرعنوان است}
-\begin{مثال}
-در این مثال به برسی توابعی خواهیم پرداخت که برای ما قابل استفاده هستند:
-\begin{equation}
-(x-y)^2=x^2-2xy+y^2
-\end{equation}
-\end{مثال}
-\begin{پاسخ}
-این یک پاسخ است
-\end{پاسخ}
-
-\end{frame}
-\section{ادامه عنوان قبلی}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{قضیه}
-این یک قضیه است.
-\end{قضیه}
-\begin{اثبات}
-این یک اثبات است
-\end{اثبات}
-\begin{نتیجه}
-این یک نتیجه است
-\end{نتیجه}
-\end{frame}
-\section{شروع مبحثی دیگر}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{لم}
-این یک لم است
-\end{لم}
-\begin{تعریف}
-این یک تعریف است
-\end{تعریف}
-\begin{تعریفها}
-این محیط مخصوص بیشتر از یک تعریف است
-\end{تعریفها}
-\end{frame}
-\section{نتیجه‌گیری نهائی}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{بلوک}{محیط بلوک}
-این محیط بلوک است
-\end{بلوک}
-\begin{بلوک‌مثال}{محیط بلوک مثال}
-این محیط بلوک مثال است
-\end{بلوک‌مثال}
-\begin{بلوک‌هشدار}{محیط بلوک هشدار}
-این محیط بلوک هشدار است.
-\end{بلوک‌هشدار}
-\end{frame}
-\section{مقداری متن معمولی}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-این هم مقداری متن معمولی می‌نویسم تا بتوانم به خط بعدی بروم و ببینم که آیا واقعاً \lr{beamer} دست از لجاجت برمی‌دارد یا نه
-\begin{roman}
-This is an English paragraph that I am writing here to see what happens after this, will I get a new bug or I am lucky enough?
-\end{roman}
-این دوباره متنی است فارسی که من آن را می‌نویسم و هنوز در حال آزمایش هستم تا بتوانم به خط بعدی بروم و نتیجه را مشاهده کنم.
-\end{frame}
-\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf
deleted file mode 100644
index 2e902ef0b65..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.pdf
+++ /dev/null
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
deleted file mode 100644
index 3208bec8586..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/beamer-sample.tex
+++ /dev/null
@@ -1,82 +0,0 @@
-\documentclass{beamer}
-\usetheme{Warsaw}
-\usepackage{xepersian}
-\settextfont[Scale=1]{XB Zar}
-\setromantextfont[Scale=1]{Linux Libertine}
-\AtBeginDocument{\setdigitfont[Scale=1]{XB Zar}}
-\title{عنوان اسلاید}
-\subtitle{این یک زیرعنوان است}
-\author{وفا خلیقی}
-\institute{دانشگاه تهران}
-\begin{document}
-\begin{frame}
-\titlepage
-\end{frame}
-
-
-\begin{frame}{این یک عنوان است}
-\framesubtitle{این زیرعنوان است}
-\begin{مثال}
-در این مثال به برسی توابعی خواهیم پرداخت که برای ما قابل استفاده هستند:
-\begin{equation}
-(x-y)^2=x^2-2xy+y^2
-\end{equation}
-\end{مثال}
-\begin{پاسخ}
-این یک پاسخ است
-\end{پاسخ}
-\begin{مسئله}
-این یک مسئله است.
-\end{مسئله}
-\end{frame}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{قضیه}
-این یک قضیه است.
-\end{قضیه}
-\begin{اثبات}
-این یک اثبات است
-\end{اثبات}
-\begin{نتیجه}
-این یک نتیجه است
-\end{نتیجه}
-\begin{حقیقت}
-این یک حقیقت است
-\end{حقیقت}
-\end{frame}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{لم}
-این یک لم است
-\end{لم}
-\begin{تعریف}
-این یک تعریف است
-\end{تعریف}
-\begin{تعریفها}
-این محیط مخصوص بیشتر از یک تعریف است
-\end{تعریفها}
-\begin{مثالها}
-این محیط مخصوص بیشتر از یک مثال است.
-\end{مثالها}
-\end{frame}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-\begin{بلوک}{محیط بلوک}
-این محیط بلوک است
-\end{بلوک}
-\begin{بلوک‌مثال}{محیط بلوک مثال}
-این محیط بلوک مثال است
-\end{بلوک‌مثال}
-\begin{بلوک‌هشدار}{محیط بلوک هشدار}
-این محیط بلوک هشدار است.
-\end{بلوک‌هشدار}
-\end{frame}
-\begin{frame}{ادامهّ عنوان قبلی}
-\framesubtitle{ادامهٔ زیرعنوان قبلی}
-این هم مقداری متن معمولی می‌نویسم تا بتوانم به خط بعدی بروم و ببینم که آیا واقعاً \lr{beamer} دست از لجاجت برمی‌دارد یا نه
-\begin{roman}
-This is an English paragraph that I am writing here to see what happens after this, will I get a new bug or I am lucky enough?
-\end{roman}
-این دوباره متنی است فارسی که من آن را می‌نویسم و هنوز در حال آزمایش هستم تا بتوانم به خط بعدی بروم و نتیجه را مشاهده کنم.
-\end{frame}
-\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/bibtex-example.tex b/Master/texmf-dist/doc/xelatex/xepersian/bibtex-example.tex
new file mode 100644
index 00000000000..6536265479b
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/bibtex-example.tex
@@ -0,0 +1,27 @@
+\documentclass[11pt,a4paper]{article}
+
+
+\usepackage{verbatim}
+\usepackage{backref}
+\def\backrefpagesname{}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Times New latin}
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با استیل فارسی \lr{unsrt-fa} برای \lr{BibTeX} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+مرجع \cite{امیدعلی82دکترا} یک نمونه پروژه دکترا و مرجع\cite{واحدی87} یک نمونه مقاله مجله فارسی است.
+مرجع \cite{Baker02limits} یک نمونه مقاله انگلیسی است که در بین مراجع فارسی قرار گرفته است، مرجع \cite{Amintoosi87using} یک نمونه مقاله کنفرانس فارسی و
+مرجع \cite{استالینگ۸۰کتاب} یک نمونه کتاب فارسی با ذکر مترجمان و ویراستاران فارسی است. مرجع \cite{Khalighi07MscThesis} یک نمونه پروژه کارشناسی ارشد انگلیسی و
+\cite{خلیقی۸۷زی‌پرشین} هم یک نمونه متفرقه می‌باشند.
+
+{\small
+\bibliographystyle{unsrt-fa}%{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/bidibeamer-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/bidibeamer-xepersian.def
new file mode 100644
index 00000000000..c556ccd3347
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/bidibeamer-xepersian.def
@@ -0,0 +1,45 @@
+%%
+%% This is file `bidibeamer-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bidibeamer-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\familydefault{\rmdefault}
+\def\latin{\bgroup\LatinAlphs\par\raggedright\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\raggedleft\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\biditheoremname{قضیه}
+\def\bidicorollaryname{نتیجه}
+\def\bidifactname{حقیقت}
+\def\bidilemmaname{لم}
+\def\bidiproblemname{مسئله}
+\def\bidisolutionname{پاسخ}
+\def\bididefinitionname{تعریف}
+\def\bididefinitionsname{تعریف‌ها}
+\def\bidiexamplename{مثال}
+\def\bidiexamplesname{مثال‌ها}
+\def\bidiproofname{اثبات}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidibeamer-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/bidimemoir-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/bidimemoir-xepersian.def
new file mode 100644
index 00000000000..289686745a8
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/bidimemoir-xepersian.def
@@ -0,0 +1,40 @@
+%%
+%% This is file `bidimemoir-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bidimemoir-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand{\@memfront}{%
+ \@smemfront\pagenumbering{harfi}}
+\renewcommand{\setthesection}{\thechapter\@SepMark\harfi{section}}
+\renewcommand*{\thebook}{\@tartibi\c@book}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand{\appendix}{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \anappendixtrue}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidimemoir-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/bidimoderncv-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/bidimoderncv-xepersian.def
new file mode 100644
index 00000000000..38e65837ca3
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/bidimoderncv-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `bidimoderncv-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bidimoderncv-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\refname{تألیفات}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidimoderncv-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/book-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/book-xepersian.def
new file mode 100644
index 00000000000..b555567e5ac
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/book-xepersian.def
@@ -0,0 +1,44 @@
+%%
+%% This is file `book-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `book-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `book-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/bookest-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/bookest-xepersian.def
new file mode 100644
index 00000000000..ff5a679666f
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/bookest-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `bookest-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bookest-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bookest-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/commands-ltx.def b/Master/texmf-dist/doc/xelatex/xepersian/commands-ltx.def
new file mode 100644
index 00000000000..2b3bf59a5e4
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/commands-ltx.def
@@ -0,0 +1,841 @@
+%%
+%% This is file `commands-ltx.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `commands-ltx.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\eqcommand[]{\abovedisplayshortskip}
+\eqcommand[]{\abovedisplayskip}
+\eqcommand[]{\abstractname}
+\eqcommand[]{\acute}
+\eqcommand[]{\addcontentsline}
+\eqcommand[]{\address}
+\eqcommand[]{\addtocontents}
+\eqcommand[]{\addtocounter}
+\eqcommand[]{\addtolength}
+\eqcommand[]{\addvspace}
+\eqcommand[]{\aleph}
+\eqcommand[]{\allowdisplaybreaks}
+\eqcommand[]{\Alph}
+\eqcommand[]{\alph}
+\eqcommand[]{\alpha}
+\eqcommand[]{\alsoname}
+\eqcommand[]{\amalg}
+\eqcommand[]{\and}
+\eqcommand[]{\angle}
+\eqcommand[]{\appendixname}
+\eqcommand[]{\approx}
+\eqcommand[]{\arabic}
+\eqcommand[]{\arccos}
+\eqcommand[]{\arcsin}
+\eqcommand[]{\arctan}
+\eqcommand[]{\arg}
+\eqcommand[]{\arraycolsep}
+\eqcommand[]{\arrayrulewidth}
+\eqcommand[]{\arraystretch}
+\eqcommand[]{\ast}
+\eqcommand[]{\asymp}
+\eqcommand[]{\AtBeginDocument}
+\eqcommand[]{\AtEndDocument}
+\eqcommand[]{\AtEndOfClass}
+\eqcommand[]{\AtEndOfPackage}
+\eqcommand[]{\author}
+\eqcommand[]{\backmatter}
+\eqcommand[]{\backslash}
+\eqcommand[]{\bar}
+\eqcommand[]{\baselineskip}
+\eqcommand[]{\baselinestretch}
+\eqcommand[]{\begin}
+\eqcommand[]{\belowdisplayshortskip}
+\eqcommand[]{\belowdisplayskip}
+\eqcommand[]{\beta}
+\eqcommand[]{\bfdefault}
+\eqcommand[]{\bfseries}
+\eqcommand[]{\bibitem}
+\eqcommand[]{\bibliography}
+\eqcommand[]{\bibliographystyle}
+\eqcommand[]{\bibname}
+\eqcommand[]{\big}
+\eqcommand[]{\Big}
+\eqcommand[]{\bigcap}
+\eqcommand[]{\bigcirc}
+\eqcommand[]{\bigcup}
+\eqcommand[]{\bigg}
+\eqcommand[]{\Bigg}
+\eqcommand[]{\bigodot}
+\eqcommand[]{\bigoplus}
+\eqcommand[]{\bigotimes}
+\eqcommand[]{\bigskip}
+\eqcommand[]{\bigskipamount}
+\eqcommand[]{\bigsqcup}
+\eqcommand[]{\bigtriangledown}
+\eqcommand[]{\bigtriangleup}
+\eqcommand[]{\biguplus}
+\eqcommand[]{\bigvee}
+\eqcommand[]{\bigwedge}
+\eqcommand[]{\binom}
+\eqcommand[]{\bmod}
+\eqcommand[]{\boldmath}
+\eqcommand[]{\boldsymbol}
+\eqcommand[]{\bot}
+\eqcommand[]{\botfigrule}
+\eqcommand[]{\bottomfraction}
+\eqcommand[]{\bowtie}
+\eqcommand[]{\Box}
+\eqcommand[]{\boxed}
+\eqcommand[]{\breve}
+\eqcommand[]{\bullet}
+\eqcommand[]{\cap}
+\eqcommand[]{\caption}
+\eqcommand[]{\cc}
+\eqcommand[]{\ccname}
+\eqcommand[]{\cdot}
+\eqcommand[]{\cdots}
+\eqcommand[]{\centering}
+\eqcommand[]{\centerline}
+\eqcommand[]{\cfrac}
+\eqcommand[]{\chapter}
+\eqcommand[]{\chapter*}
+\eqcommand[]{\chaptername}
+\eqcommand[]{\check}
+\eqcommand[]{\CheckCommand}
+\eqcommand[]{\chi}
+\eqcommand[]{\circ}
+\eqcommand[]{\circle}
+\eqcommand[]{\circle*}
+\eqcommand[]{\cite}
+\eqcommand[]{\citep}
+\eqcommand[]{\citet}
+\eqcommand[]{\ClassError}
+\eqcommand[]{\ClassInfo}
+\eqcommand[]{\ClassWarning}
+\eqcommand[]{\ClassWarningNoLine}
+\eqcommand[]{\cleardoublepage}
+\eqcommand[]{\clearpage}
+\eqcommand[]{\cline}
+\eqcommand[]{\closing}
+\eqcommand[]{\clubsuit}
+\eqcommand[]{\color}
+\eqcommand[]{\colorbox}
+\eqcommand[]{\columnsep}
+\eqcommand[]{\columnseprule}
+\eqcommand[]{\cong}
+\eqcommand[]{\contentsline}
+\eqcommand[]{\contentsname}
+\eqcommand[]{\coprod}
+\eqcommand[]{\copyright}
+\eqcommand[]{\cos}
+\eqcommand[]{\cosh}
+\eqcommand[]{\cot}
+\eqcommand[]{\coth}
+\eqcommand[]{\csc}
+\eqcommand[]{\cup}
+\eqcommand[]{\CurrentOption}
+\eqcommand[]{\dag}
+\eqcommand[]{\dagger}
+\eqcommand[]{\dashbox}
+\eqcommand[]{\dashv}
+\eqcommand[]{\date}
+\eqcommand[]{\dbinom}
+\eqcommand[]{\dblfigrule}
+\eqcommand[]{\dblfloatpagefraction}
+\eqcommand[]{\dblfloatsep}
+\eqcommand[]{\dbltextfloatsep}
+\eqcommand[]{\dbltopfraction}
+\eqcommand[]{\ddag}
+\eqcommand[]{\ddagger}
+\eqcommand[]{\dddot}
+\eqcommand[]{\ddddot}
+\eqcommand[]{\ddot}
+\eqcommand[]{\ddots}
+\eqcommand[]{\DeclareGraphicsExtensions}
+\eqcommand[]{\DeclareGraphicsRule}
+\eqcommand[]{\DeclareOption}
+\eqcommand[]{\DeclareOption*}
+\eqcommand[]{\DeclareRobustCommand}
+\eqcommand[]{\DeclareRobustCommand*}
+\eqcommand[]{\definecolor}
+\eqcommand[]{\deg}
+\eqcommand[]{\DeleteShortVerb}
+\eqcommand[]{\Delta}
+\eqcommand[]{\delta}
+\eqcommand[]{\depth}
+\eqcommand[]{\det}
+\eqcommand[]{\dfrac}
+\eqcommand[]{\Diamond}
+\eqcommand[]{\diamond}
+\eqcommand[]{\diamondsuit}
+\eqcommand[]{\dim}
+\eqcommand[]{\discretionary}
+\eqcommand[]{\displaybreak}
+\eqcommand[]{\displaystyle}
+\eqcommand[]{\div}
+\eqcommand[]{\documentclass}
+\eqcommand[]{\dot}
+\eqcommand[]{\doteq}
+\eqcommand[]{\dotfill}
+\eqcommand[]{\dots}
+\eqcommand[]{\dotsb}
+\eqcommand[]{\dotsc}
+\eqcommand[]{\dotsi}
+\eqcommand[]{\dotsm}
+\eqcommand[]{\doublebox}
+\eqcommand[]{\doublerulesep}
+\eqcommand[]{\Downarrow}
+\eqcommand[]{\downarrow}
+\eqcommand[]{\ell}
+\eqcommand[]{\em}
+\eqcommand[]{\emph}
+\eqcommand[]{\emptyset}
+\eqcommand[]{\encl}
+\eqcommand[]{\enclname}
+\eqcommand[]{\end}
+\eqcommand[]{\endfirsthead}
+\eqcommand[]{\endfoot}
+\eqcommand[]{\endhead}
+\eqcommand[]{\endlastfoot}
+\eqcommand[]{\enlargethispage}
+\eqcommand[]{\enlargethispage*}
+\eqcommand[]{\ensuremath}
+\eqcommand[]{\epsilon}
+\eqcommand[]{\eqref}
+\eqcommand[]{\equiv}
+\eqcommand[]{\eta}
+\eqcommand[]{\euro}
+\eqcommand[]{\EUR}
+\eqcommand[]{\evensidemargin}
+\eqcommand[]{\ExecuteOptions}
+\eqcommand[]{\exists}
+\eqcommand[]{\exp}
+\eqcommand[]{\extracolsep}
+\eqcommand[]{\fancypage}
+\eqcommand[]{\fbox}
+\eqcommand[]{\fboxrule}
+\eqcommand[]{\fboxsep}
+\eqcommand[]{\fcolorbox}
+\eqcommand[]{\figurename}
+\eqcommand[]{\fill}
+\eqcommand[]{\flat}
+\eqcommand[]{\floatpagefraction}
+\eqcommand[]{\floatsep}
+\eqcommand[]{\flushbottom}
+\eqcommand[]{\fnsymbol}
+\eqcommand[]{\fontfamily}
+\eqcommand[]{\fontseries}
+\eqcommand[]{\fontshape}
+\eqcommand[]{\fontsize}
+\eqcommand[]{\LTRfootnote}
+\eqcommand[]{\footnote}
+\eqcommand[]{\footnotemark}
+\eqcommand[]{\footnoterule}
+\eqcommand[]{\footnotesep}
+\eqcommand[]{\footnotesize}
+\eqcommand[]{\footnotetext}
+\eqcommand[]{\footskip}
+\eqcommand[]{\forall}
+\eqcommand[]{\frac}
+\eqcommand[]{\frame}
+\eqcommand[]{\framebox}
+\eqcommand[]{\frenchspacing}
+\eqcommand[]{\frontmatter}
+\eqcommand[]{\frown}
+\eqcommand[]{\fussy}
+\eqcommand[]{\Gamma}
+\eqcommand[]{\gamma}
+\eqcommand[]{\gcd}
+\eqcommand[]{\ge}
+\eqcommand[]{\genfrac}
+\eqcommand[]{\geq}
+\eqcommand[]{\gets}
+\eqcommand[]{\gg}
+\eqcommand[]{\glossary}
+\eqcommand[]{\glossaryentry}
+\eqcommand[]{\graphpaper}
+\eqcommand[]{\grave}
+\eqcommand[]{\guillemotleft}
+\eqcommand[]{\guillemotright}
+\eqcommand[]{\guilsinglleft}
+\eqcommand[]{\guilsinglright}
+\eqcommand[]{\hat}
+\eqcommand[]{\hbar}
+\eqcommand[]{\headheight}
+\eqcommand[]{\headsep}
+\eqcommand[]{\headtoname}
+\eqcommand[]{\heartsuit}
+\eqcommand[]{\height}
+\eqcommand[]{\hfill}
+\eqcommand[]{\hline}
+\eqcommand[]{\hoffset}
+\eqcommand[]{\hom}
+\eqcommand[]{\hookleftarrow}
+\eqcommand[]{\hookrightarrow}
+\eqcommand[]{\hrulefill}
+\eqcommand[]{\hspace}
+\eqcommand[]{\hspace*}
+\eqcommand[]{\huge}
+\eqcommand[]{\Huge}
+\eqcommand[]{\hyperlink}
+\eqcommand[]{\hypersetup}
+\eqcommand[]{\hypertarget}
+\eqcommand[]{\hyphenation}
+\eqcommand[]{\idotsint}
+\eqcommand[]{\iff}
+\eqcommand[]{\IfFileExists}
+\eqcommand[]{\ifthenelse}
+\eqcommand[]{\Im}
+\eqcommand[]{\imath}
+\eqcommand[]{\in}
+\eqcommand[]{\include}
+\eqcommand[]{\includegraphics}
+\eqcommand[]{\includegraphics*}
+\eqcommand[]{\includeonly}
+\eqcommand[]{\indent}
+\eqcommand[]{\index}
+\eqcommand[]{\indexentry}
+\eqcommand[]{\indexname}
+\eqcommand[]{\indexspace}
+\eqcommand[]{\inf}
+\eqcommand[]{\infty}
+\eqcommand[]{\input}
+\eqcommand[]{\InputIfFileExists}
+\eqcommand[]{\int}
+\eqcommand[]{\iint}
+\eqcommand[]{\iiint}
+\eqcommand[]{\iiiint}
+\eqcommand[]{\intertext}
+\eqcommand[]{\intertextsep}
+\eqcommand[]{\invisible}
+\eqcommand[]{\iota}
+\eqcommand[]{\itdefault}
+\eqcommand[]{\item}
+\eqcommand[]{\itemindent}
+\eqcommand[]{\itemsep}
+\eqcommand[]{\itshape}
+\eqcommand[]{\jmath}
+\eqcommand[]{\join}
+\eqcommand[]{\jot}
+\eqcommand[]{\kappa}
+\eqcommand[]{\ker}
+\eqcommand[]{\kill}
+\eqcommand[]{\label}
+\eqcommand[]{\labelenumi}
+\eqcommand[]{\labelenumii}
+\eqcommand[]{\labelenumiii}
+\eqcommand[]{\labelenumiv}
+\eqcommand[]{\labelitemi}
+\eqcommand[]{\labelitemii}
+\eqcommand[]{\labelitemiii}
+\eqcommand[]{\labelitemiv}
+\eqcommand[]{\labelsep}
+\eqcommand[]{\labelwidth}
+\eqcommand[]{\Lambda}
+\eqcommand[]{\lambda}
+\eqcommand[]{\langle}
+\eqcommand[]{\language}
+\eqcommand[]{\large}
+\eqcommand[]{\Large}
+\eqcommand[]{\LARGE}
+\eqcommand[]{\LaTeX}
+\eqcommand[]{\LaTeXe}
+\eqcommand[]{\lceil}
+\eqcommand[]{\ldots}
+\eqcommand[]{\le}
+\eqcommand[]{\leadsto}
+\eqcommand[]{\left}
+\eqcommand[]{\Leftarrow}
+\eqcommand[]{\leftarrow}
+\eqcommand[]{\lefteqn}
+\eqcommand[]{\leftharpoondown}
+\eqcommand[]{\leftharpoonup}
+\eqcommand[]{\leftmargin}
+\eqcommand[]{\Leftrightarrow}
+\eqcommand[]{\leftrightarrow}
+\eqcommand[]{\leftroot}
+\eqcommand[]{\leq}
+\eqcommand[]{\lfloor}
+\eqcommand[]{\lg}
+\eqcommand[]{\lhd}
+\eqcommand[]{\lim}
+\eqcommand[]{\liminf}
+\eqcommand[]{\limits}
+\eqcommand[]{\limsup}
+\eqcommand[]{\line}
+\eqcommand[]{\linebreak}
+\eqcommand[]{\linethickness}
+\eqcommand[]{\linewidth}
+\eqcommand[]{\listfigurename}
+\eqcommand[]{\listfiles}
+\eqcommand[]{\listoffigures}
+\eqcommand[]{\listoftables}
+\eqcommand[]{\listparindent}
+\eqcommand[]{\listtablename}
+\eqcommand[]{\ll}
+\eqcommand[]{\ln}
+\eqcommand[]{\LoadClass}
+\eqcommand[]{\LoadClassWithOptions}
+\eqcommand[]{\location}
+\eqcommand[]{\log}
+\eqcommand[]{\Longleftarrow}
+\eqcommand[]{\longleftarrow}
+\eqcommand[]{\Longleftrightarrow}
+\eqcommand[]{\longleftrightarrow}
+\eqcommand[]{\longmapsto}
+\eqcommand[]{\Longrightarrow}
+\eqcommand[]{\longrightarrow}
+\eqcommand[]{\lvert}
+\eqcommand[]{\lVert}
+\eqcommand[]{\mainmatter}
+\eqcommand[]{\makebox}
+\eqcommand[]{\makeglossary}
+\eqcommand[]{\makeindex}
+\eqcommand[]{\makelabel}
+\eqcommand[]{\makelabels}
+\eqcommand[]{\MakeLowercase}
+\eqcommand[]{\MakeShortVerb}
+\eqcommand[]{\maketitle}
+\eqcommand[]{\MakeUppercase}
+\eqcommand[]{\mapsto}
+\eqcommand[]{\marginpar}
+\eqcommand[]{\marginparpush}
+\eqcommand[]{\marginparsep}
+\eqcommand[]{\marginparwidth}
+\eqcommand[]{\markboth}
+\eqcommand[]{\markright}
+\eqcommand[]{\mathbf}
+\eqcommand[]{\mathcal}
+\eqcommand[]{\mathindent}
+\eqcommand[]{\mathit}
+\eqcommand[]{\mathnormal}
+\eqcommand[]{\mathring}
+\eqcommand[]{\mathrm}
+\eqcommand[]{\mathsf}
+\eqcommand[]{\mathtt}
+\eqcommand[]{\max}
+\eqcommand[]{\mbox}
+\eqcommand[]{\mddefault}
+\eqcommand[]{\mdseries}
+\eqcommand[]{\medskip}
+\eqcommand[]{\medskipamount}
+\eqcommand[]{\medspace}
+\eqcommand[]{\MessageBreak}
+\eqcommand[]{\mho}
+\eqcommand[]{\mid}
+\eqcommand[]{\min}
+\eqcommand[]{\mod}
+\eqcommand[]{\models}
+\eqcommand[]{\mp}
+\eqcommand[]{\mspace}
+\eqcommand[]{\mu}
+\eqcommand[]{\multicolumn}
+\eqcommand[]{\multiput}
+\eqcommand[]{\multlinegap}
+\eqcommand[]{\nabla}
+\eqcommand[]{\name}
+\eqcommand[]{\natural}
+\eqcommand[]{\nearrow}
+\eqcommand[]{\NeedsTeXFormat}
+\eqcommand[]{\neg}
+\eqcommand[]{\negmedspace}
+\eqcommand[]{\negthickspace}
+\eqcommand[]{\negthinspace}
+\eqcommand[]{\neq}
+\eqcommand[]{\newboolean}
+\eqcommand[]{\newcommand}
+\eqcommand[]{\newcommand*}
+\eqcommand[]{\newcounter}
+\eqcommand[]{\newenvironment}
+\eqcommand[]{\newenvironment*}
+\eqcommand[]{\newfont}
+\eqcommand[]{\newlength}
+\eqcommand[]{\newline}
+\eqcommand[]{\newpage}
+\eqcommand[]{\newsavebox}
+\eqcommand[]{\newtheorem}
+\eqcommand[]{\ni}
+\eqcommand[]{\nocite}
+\eqcommand[]{\nofiles}
+\eqcommand[]{\noindent}
+\eqcommand[]{\nolimits}
+\eqcommand[]{\nolinebreak}
+\eqcommand[]{\nonfrenchspacing}
+\eqcommand[]{\nonumber}
+\eqcommand[]{\nopagebreak}
+\eqcommand[]{\normalcolor}
+\eqcommand[]{\normalfont}
+\eqcommand[]{\normalmarginpar}
+\eqcommand[]{\normalsize}
+\eqcommand[]{\not}
+\eqcommand[]{\notag}
+\eqcommand[]{\notin}
+\eqcommand[]{\nu}
+\eqcommand[]{\numberwithin}
+\eqcommand[]{\nwarrow}
+\eqcommand[]{\oddsidemargin}
+\eqcommand[]{\odot}
+\eqcommand[]{\oint}
+\eqcommand[]{\Omega}
+\eqcommand[]{\omega}
+\eqcommand[]{\ominus}
+\eqcommand[]{\onecolumn}
+\eqcommand[]{\onlynotes}
+\eqcommand[]{\onlyslides}
+\eqcommand[]{\opening}
+\eqcommand[]{\oplus}
+\eqcommand[]{\OptionNotUsed}
+\eqcommand[]{\oslash}
+\eqcommand[]{\otimes}
+\eqcommand[]{\oval}
+\eqcommand[]{\ovalbox}
+\eqcommand[]{\Ovalbox}
+\eqcommand[]{\overbrace}
+\eqcommand[]{\overleftarrow}
+\eqcommand[]{\overleftrightarrow}
+\eqcommand[]{\overline}
+\eqcommand[]{\overrightarrow}
+\eqcommand[]{\overset}
+\eqcommand[]{\PackageError}
+\eqcommand[]{\PackageInfo}
+\eqcommand[]{\PackageWarning}
+\eqcommand[]{\PackageWarningNoLine}
+\eqcommand[]{\pagebreak}
+\eqcommand[]{\pagecolor}
+\eqcommand[]{\pagename}
+\eqcommand[]{\pagenumbering}
+\eqcommand[]{\pageref}
+\eqcommand[]{\pagestyle}
+\eqcommand[]{\paperheight}
+\eqcommand[]{\paperwidth}
+\eqcommand[]{\par}
+\eqcommand[]{\paragraph}
+\eqcommand[]{\paragraph*}
+\eqcommand[]{\parallel}
+\eqcommand[]{\parbox}
+\eqcommand[]{\parindent}
+\eqcommand[]{\parsep}
+\eqcommand[]{\parskip}
+\eqcommand[]{\part}
+\eqcommand[]{\part*}
+\eqcommand[]{\partial}
+\eqcommand[]{\partname}
+\eqcommand[]{\partopsep}
+\eqcommand[]{\PassOptionToClass}
+\eqcommand[]{\PassOptionToPackage}
+\eqcommand[]{\path}
+\eqcommand[]{\prep}
+\eqcommand[]{\Phi}
+\eqcommand[]{\phi}
+\eqcommand[]{\Pi}
+\eqcommand[]{\pi}
+\eqcommand[]{\pm}
+\eqcommand[]{\pmb}
+\eqcommand[]{\pmod}
+\eqcommand[]{\pod}
+\eqcommand[]{\poptabs}
+\eqcommand[]{\pounds}
+\eqcommand[]{\Pr}
+\eqcommand[]{\prec}
+\eqcommand[]{\preceq}
+\eqcommand[]{\prime}
+\eqcommand[]{\printindex}
+\eqcommand[]{\ProcessOptions}
+\eqcommand[]{\ProcessOptions*}
+\eqcommand[]{\prod}
+\eqcommand[]{\propto}
+\eqcommand[]{\protect}
+\eqcommand[]{\providecommand}
+\eqcommand[]{\providecommand*}
+\eqcommand[]{\ProvidesClass}
+\eqcommand[]{\ProvidesFile}
+\eqcommand[]{\ProvidesPackage}
+\eqcommand[]{\ps}
+\eqcommand[]{\Psi}
+\eqcommand[]{\psi}
+\eqcommand[]{\pushtabs}
+\eqcommand[]{\put}
+\eqcommand[]{\qbezier}
+\eqcommand[]{\qquad}
+\eqcommand[]{\quad}
+\eqcommand[]{\raggedbottom}
+\eqcommand[]{\raggedleft}
+\eqcommand[]{\raggedright}
+\eqcommand[]{\raisebox}
+\eqcommand[]{\raisetag}
+\eqcommand[]{\rangle}
+\eqcommand[]{\rceil}
+\eqcommand[]{\Re}
+\eqcommand[]{\ref}
+\eqcommand[]{\reflectbox}
+\eqcommand[]{\refname}
+\eqcommand[]{\refstepcounter}
+\eqcommand[]{\renewcommand}
+\eqcommand[]{\renewcommand*}
+\eqcommand[]{\renewenvironment}
+\eqcommand[]{\renewenvironment*}
+\eqcommand[]{\RequirePackage}
+\eqcommand[]{\RequirePackageWithOptions}
+\eqcommand[]{\resizebox}
+\eqcommand[]{\resizebox*}
+\eqcommand[]{\reversemarginpar}
+\eqcommand[]{\rfloor}
+\eqcommand[]{\rhd}
+\eqcommand[]{\rho}
+\eqcommand[]{\right}
+\eqcommand[]{\Rightarrow}
+\eqcommand[]{\rightarrow}
+\eqcommand[]{\rightharpoondown}
+\eqcommand[]{\rightharpoonup}
+\eqcommand[]{\rightleftharpoons}
+\eqcommand[]{\rightmargin}
+\eqcommand[]{\rmdefault}
+\eqcommand[]{\rmfamily}
+\eqcommand[]{\Roman}
+\eqcommand[]{\roman}
+\eqcommand[]{\rotatebox}
+\eqcommand[]{\rule}
+\eqcommand[]{\rvert}
+\eqcommand[]{\rVert}
+\eqcommand[]{\savebox}
+\eqcommand[]{\sbox}
+\eqcommand[]{\scalebox}
+\eqcommand[]{\scdefault}
+\eqcommand[]{\scriptscriptstyle}
+\eqcommand[]{\scriptsize}
+\eqcommand[]{\scripstyle}
+\eqcommand[]{\scshape}
+\eqcommand[]{\searrow}
+\eqcommand[]{\sec}
+\eqcommand[]{\section}
+\eqcommand[]{\section*}
+\eqcommand[]{\see}
+\eqcommand[]{\seealso}
+\eqcommand[]{\seename}
+\eqcommand[]{\selectfont}
+\eqcommand[]{\setboolean}
+\eqcommand[]{\setcounter}
+\eqcommand[]{\setlength}
+\eqcommand[]{\setminus}
+\eqcommand[]{\settodepth}
+\eqcommand[]{\settoheight}
+\eqcommand[]{\settowidth}
+\eqcommand[]{\sfdefault}
+\eqcommand[]{\sffamily}
+\eqcommand[]{\shadowbox}
+\eqcommand[]{\sharp}
+\eqcommand[]{\shortstack}
+\eqcommand[]{\sideset}
+\eqcommand[]{\Sigma}
+\eqcommand[]{\sigma}
+\eqcommand[]{\signature}
+\eqcommand[]{\sim}
+\eqcommand[]{\simeq}
+\eqcommand[]{\sin}
+\eqcommand[]{\sinh}
+\eqcommand[]{\sldefault}
+\eqcommand[]{\sloppy}
+\eqcommand[]{\slshape}
+\eqcommand[]{\small}
+\eqcommand[]{\smallskip}
+\eqcommand[]{\smallskipamount}
+\eqcommand[]{\smash}
+\eqcommand[]{\smile}
+\eqcommand[]{\spadesuit}
+\eqcommand[]{\sqcap}
+\eqcommand[]{\sqcup}
+\eqcommand[]{\sqrt}
+\eqcommand[]{\sqsubset}
+\eqcommand[]{\sqsubseteq}
+\eqcommand[]{\sqsupset}
+\eqcommand[]{\sqsupseteq}
+\eqcommand[]{\stackrel}
+\eqcommand[]{\star}
+\eqcommand[]{\stepcounter}
+\eqcommand[]{\stretch}
+\eqcommand[]{\subitem}
+\eqcommand[]{\subparagraph}
+\eqcommand[]{\subparagraph*}
+\eqcommand[]{\subsection}
+\eqcommand[]{\subsection*}
+\eqcommand[]{\substack}
+\eqcommand[]{\subsubitem}
+\eqcommand[]{\subsubsection}
+\eqcommand[]{\subsubsection*}
+\eqcommand[]{\subset}
+\eqcommand[]{\subseteq}
+\eqcommand[]{\succ}
+\eqcommand[]{\succeq}
+\eqcommand[]{\sum}
+\eqcommand[]{\sup}
+\eqcommand[]{\supressfloats}
+\eqcommand[]{\supset}
+\eqcommand[]{\supseteq}
+\eqcommand[]{\surd}
+\eqcommand[]{\swarrow}
+\eqcommand[]{\tabbingsep}
+\eqcommand[]{\tabcolsep}
+\eqcommand[]{\tableofcontents}
+\eqcommand[]{\tablename}
+\eqcommand[]{\tabularnewline}
+\eqcommand[]{\tag}
+\eqcommand[]{\tan}
+\eqcommand[]{\tanh}
+\eqcommand[]{\tau}
+\eqcommand[]{\tbinom}
+\eqcommand[]{\telephone}
+\eqcommand[]{\TeX}
+\eqcommand[]{\text}
+\eqcommand[]{\textbullet}
+\eqcommand[]{\textemdash}
+\eqcommand[]{\textendash}
+\eqcommand[]{\textexclamdown}
+\eqcommand[]{\textperiodcentered}
+\eqcommand[]{\textquestiondown}
+\eqcommand[]{\textquotedblleft}
+\eqcommand[]{\textquotedblright}
+\eqcommand[]{\textquoteleft}
+\eqcommand[]{\textquoteright}
+\eqcommand[]{\textvisiblespace}
+\eqcommand[]{\textasciicircum}
+\eqcommand[]{\textasciitilde}
+\eqcommand[]{\textbackslash}
+\eqcommand[]{\textbar}
+\eqcommand[]{\textgreater}
+\eqcommand[]{\textless}
+\eqcommand[]{\textbf}
+\eqcommand[]{\textcircled}
+\eqcommand[]{\textcolor}
+\eqcommand[]{\textcompwordmark}
+\eqcommand[]{\textfloatsep}
+\eqcommand[]{\textfraction}
+\eqcommand[]{\textheight}
+\eqcommand[]{\textit}
+\eqcommand[]{\textmd}
+\eqcommand[]{\textnormal}
+\eqcommand[]{\textregistered}
+\eqcommand[]{\textrm}
+\eqcommand[]{\textsc}
+\eqcommand[]{\textsf}
+\eqcommand[]{\textsl}
+\eqcommand[]{\textstyle}
+\eqcommand[]{\textsuperscript}
+\eqcommand[]{\texttrademark}
+\eqcommand[]{\texttt}
+\eqcommand[]{\textup}
+\eqcommand[]{\textwidth}
+\eqcommand[]{\tfrac}
+\eqcommand[]{\thanks}
+\eqcommand[]{\Theta}
+\eqcommand[]{\theta}
+\eqcommand[]{\thicklines}
+\eqcommand[]{\thickspace}
+\eqcommand[]{\thinlines}
+\eqcommand[]{\thinspace}
+\eqcommand[]{\thisfancypage}
+\eqcommand[]{\thispagestyle}
+\eqcommand[]{\tilde}
+\eqcommand[]{\tiny}
+\eqcommand[]{\times}
+\eqcommand[]{\title}
+\eqcommand[]{\to}
+\eqcommand[]{\today}
+\eqcommand[]{\top}
+\eqcommand[]{\topfigrule}
+\eqcommand[]{\topfraction}
+\eqcommand[]{\topmargin}
+\eqcommand[]{\topsep}
+\eqcommand[]{\topskip}
+\eqcommand[]{\totalheight}
+\eqcommand[]{\triangle}
+\eqcommand[]{\triangleleft}
+\eqcommand[]{\triangleright}
+\eqcommand[]{\ttdefault}
+\eqcommand[]{\ttfamily}
+\eqcommand[]{\twocolumn}
+\eqcommand[]{\typein}
+\eqcommand[]{\typeout}
+\eqcommand[]{\unboldmath}
+\eqcommand[]{\underbrace}
+\eqcommand[]{\underleftarrow}
+\eqcommand[]{\underleftrightarrow}
+\eqcommand[]{\underline}
+\eqcommand[]{\underrightarrow}
+\eqcommand[]{\underset}
+\eqcommand[]{\unitlength}
+\eqcommand[]{\unlhd}
+\eqcommand[]{\unrhd}
+\eqcommand[]{\Uparrow}
+\eqcommand[]{\uparrow}
+\eqcommand[]{\updefault}
+\eqcommand[]{\Updownarrow}
+\eqcommand[]{\updownarrow}
+\eqcommand[]{\uplus}
+\eqcommand[]{\upshape}
+\eqcommand[]{\Upsilon}
+\eqcommand[]{\upsilon}
+\eqcommand[]{\uproot}
+\eqcommand[]{\url}
+\eqcommand[]{\urlstyle}
+\eqcommand[]{\usebox}
+\eqcommand[]{\usecounter}
+\eqcommand[]{\usefont}
+\eqcommand[]{\usepackage}
+\eqcommand[]{\value}
+\eqcommand[]{\varepsilon}
+\eqcommand[]{\varinjlim}
+\eqcommand[]{\varliminf}
+\eqcommand[]{\varlimsup}
+\eqcommand[]{\varphi}
+\eqcommand[]{\varpi}
+\eqcommand[]{\varprojlim}
+\eqcommand[]{\varrho}
+\eqcommand[]{\varsigma}
+\eqcommand[]{\vartheta}
+\eqcommand[]{\vdash}
+\eqcommand[]{\vdots}
+\eqcommand[]{\vec}
+\eqcommand[]{\vector}
+\eqcommand[]{\vee}
+\eqcommand[]{\verb}
+\eqcommand[]{\verb*}
+\eqcommand[]{\vfill}
+\eqcommand[]{\visible}
+\eqcommand[]{\vline}
+\eqcommand[]{\voffset}
+\eqcommand[]{\vpageref}
+\eqcommand[]{\vref}
+\eqcommand[]{\vspace}
+\eqcommand[]{\vspace*}
+\eqcommand[]{\wedge}
+\eqcommand[]{\whiledo}
+\eqcommand[]{\widehat}
+\eqcommand[]{\widetilde}
+\eqcommand[]{\width}
+\eqcommand[]{\wp}
+\eqcommand[]{\wr}
+\eqcommand[]{\Xi}
+\eqcommand[]{\xi}
+\eqcommand[]{\xleftarrow}
+\eqcommand[]{\xrightarrow}
+\eqcommand[]{\zeta}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `commands-ltx.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/commands-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/commands-xepersian.def
new file mode 100644
index 00000000000..62b7995cba6
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/commands-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `commands-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `commands-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `commands-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/enumerate-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/enumerate-xepersian.def
new file mode 100644
index 00000000000..6f1998fd675
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/enumerate-xepersian.def
@@ -0,0 +1,45 @@
+%%
+%% This is file `enumerate-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `enumerate-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\@enloop@{%
+ \ifx ا\@entemp \def\@tempa{\@enLabel\harfi }\else
+ \ifx ی\@entemp \def\@tempa{\@enLabel\adadi }\else
+ \ifx ت\@entemp \def\@tempa{\@enLabel\tartibi }\else
+ \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else
+ \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else
+ \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else
+ \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else
+ \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else
+ \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else
+ \ifx \bgroup\@entemp \let\@tempa\@enGroup \else
+ \ifx \@enum@\@entemp \let\@tempa\@gobble \else
+ \let\@tempa\@enOther
+ \@enhook
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \@tempa}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `enumerate-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/environments-ltx.def b/Master/texmf-dist/doc/xelatex/xepersian/environments-ltx.def
new file mode 100644
index 00000000000..996ce5b3047
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/environments-ltx.def
@@ -0,0 +1,91 @@
+%%
+%% This is file `environments-ltx.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `environments-ltx.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\eqenvironment[]{abstract}
+\eqenvironment[]{align}
+\eqenvironment[]{alignat}
+\eqenvironment[]{aligned}
+\eqenvironment[]{appendix}
+\eqenvironment[]{array}
+\eqenvironment[]{center}
+\eqenvironment[]{alltt}
+\eqenvironment[]{bmatrix}
+\eqenvironment[]{Bmatrix}
+\eqenvironment[]{cases}
+\eqenvironment[]{description}
+\eqenvironment[]{displaymath}
+\eqenvironment[]{enumerate}
+\eqenvironment[]{eqnarray}
+\eqenvironment[]{eqnarray*}
+\eqenvironment[]{equation}
+\eqenvironment[]{equation*}
+\eqenvironment[]{falign}
+\eqenvironment[]{figure}
+\eqenvironment[]{figure*}
+\eqenvironment[]{filecontents}
+\eqenvironment[]{filecontents*}
+\eqenvironment[]{flushleft}
+\eqenvironment[]{flushright}
+\eqenvironment[]{gather}
+\eqenvironment[]{gathered}
+\eqenvironment[]{itemize}
+\eqenvironment[]{letter}
+\eqenvironment[]{list}
+\eqenvironment[]{longtable}
+\eqenvironment[]{lrbox}
+\eqenvironment[]{math}
+\eqenvironment[]{matrix}
+\eqenvironment[]{minipage}
+\eqenvironment[]{multicols}
+\eqenvironment[]{multline}
+\eqenvironment[]{note}
+\eqenvironment[]{overlay}
+\eqenvironment[]{picture}
+\eqenvironment[]{pmatrix}
+\eqenvironment[]{quotation}
+\eqenvironment[]{quote}
+\eqenvironment[]{slide}
+\eqenvironment[]{sloppypar}
+\eqenvironment[]{split}
+\eqenvironment[]{subarray}
+\eqenvironment[]{subequations}
+\eqenvironment[]{tabbing}
+\eqenvironment[]{table}
+\eqenvironment[]{table*}
+\eqenvironment[]{tabular}
+\eqenvironment[]{tabular*}
+\eqenvironment[]{thebibliography}
+\eqenvironment[]{theindex}
+\eqenvironment[]{titlepage}
+\eqenvironment[]{trivlist}
+\eqenvironment[]{verbatim}
+\eqenvironment[]{verbatim*}
+\eqenvironment[]{verse}
+\eqenvironment[]{vmatrix}
+\eqenvironment[]{Vmatrix}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `environments-ltx.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/environments-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/environments-xepersian.def
new file mode 100644
index 00000000000..86e1256ccc4
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/environments-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `environments-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `environments-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `environments-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/MyReferences.bib b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/MyReferences.bib
new file mode 100644
index 00000000000..77dd27e8cc8
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/MyReferences.bib
@@ -0,0 +1,113 @@
+@article{Baker02limits,
+ author = {Baker,, Simon and Kanade,, Takeo},
+ title = {Limits on Super-Resolution and How to Break Them},
+ journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
+ volume = {24},
+ number = {9},
+ year = {2002},
+ issn = {0162-8828},
+ pages = {1167--1183},
+ publisher = {IEEE Computer Society},
+ address = {Washington, DC, USA}
+ }
+
+@CONFERENCE{Amintoosi87using,
+ AUTHOR = {\noopsort{امین‌طوسی,محمود}{امین‌طوسی,محمود} and others},
+ TITLE = {استفاده از تجزیه ماتریس در وضوح برتر},
+ BOOKTITLE = {پنجمین کنفرانس بینائی ماشین},
+ YEAR = {1387},
+ ORGANIZATION = {دانشگاه تبریز},
+ ADDRESS = {تبریز، ایران},
+ PAGES = {172-178},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{پورموسی۸۸ارشد,
+ AUTHOR = {\noopsort{بپورموسی, امیرمسعود}{پورموسی, امیرمسعود}},
+ TITLE = {یک موضوع فیزیک},
+ SCHOOL = {دانشکده فیزیک، دانشگاه صنعتی‌شریف},
+ YEAR = {۱۳۸۸},
+ MONTH = {مرداد},
+ NOTE = {(در حال انجام)},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{Khalighi07MscThesis,
+ AUTHOR = {Vafa Khalighi},
+ TITLE = {Category Theory},
+ SCHOOL = {Sydny Univ.},
+ YEAR = {2007},
+ MONTH = {April}
+}
+
+@PHDTHESIS{امیدعلی82دکترا,
+ AUTHOR = {\noopsort{امیدعلی, مهدی}{امیدعلی, مهدی}},
+ TITLE = {تابع هیلبرت},
+ SCHOOL = {دانشکده ریاضی، دانشگاه امیرکبیر},
+ YEAR = {1382},
+ MONTH = {تیر},
+ LANGUAGE = {Persian}
+}
+
+@MISC{خلیقی۸۷زی‌پرشین,
+ AUTHOR = {\noopsort{خلیقی,وفا}{خلیقی,وفا} and امیدعلی, مهدی and واحدی,مصطفی.},
+ TITLE = {زی‌پرشین (\lr{\XePersian}): بسته فارسی برای حروف‌چینی در \lr{\LaTeX2e}},
+ HOWPUBLISHED = {\lr{http://developer.berlios.de/projects/xepersian}},
+ YEAR = {۱۳۸۷},
+ LANGUAGE = {Persian}
+ }
+
+@BOOK{استالینگ۸۰کتاب,
+ AUTHOR = {\noopsort{استالینگ, ویلیام}{استالینگ, ویلیام}},
+ EDITOR = {برنجکوب, محمود},
+ translator = { صدیقی‌ مشکنانی, محسن and پدرام,حسین },
+ TITLE = {اصول طراحی و ویژگیهای داخلی سیستم‌های عامل},
+ PUBLISHER = {نشر شیخ بهایی},
+ YEAR = {۱۳۸۰},
+ ADDRESS = {اصفهان},
+ edition = {سوم},
+ MONTH = {بهار},
+ LANGUAGE = {Persian}
+}
+
+@ARTICLE{واحدی87,
+ AUTHOR = {\noopsort{واحدی, مصطفی}{واحدی, مصطفی}},
+ TITLE = {موضوعی جدید در هندسه محاسباتی},
+ JOURNAL = {مجله فارسی نمونه},
+ VOLUME = {1},
+ YEAR = {1387},
+ NUMBER = {2},
+ MONTH = {آبان},
+ PAGES = {22-30},
+ LANGUAGE = {Persian}
+}
+
+@CONFERENCE{Amintoosi09regional,
+ author = {Mahmood Amintoosi and Mahmood Fathy and Nasser Mozayani},
+ title = {Regional Varying Image Super-Resolution},
+ booktitle = {(CSO 2009) The 2009 IEEE International Joint Conference on Computational Sciences and Optimization},
+ year = {2009},
+ month = {24-26 April},
+ organization = {City University},
+ address = {Sanya, Hainan, China},
+ pages = {101-105}
+}
+
+@PHDTHESIS{Farsiu05thesis,
+ AUTHOR = {Sina Farsiu},
+ TITLE = {A Fast and Robust Framework for Image Fusion and Enhancement},
+ SCHOOL = {Electrical Engineeting},
+ YEAR = {2005},
+ ADDRESS = {UC Santa Cruz},
+ MONTH = {December}
+}
+
+@BOOK{Gonzalez02book,
+ AUTHOR = {Gonzalez,, Rafael C. and Woods,, Richard E.},
+ TITLE = {Digital Image Processing},
+ PUBLISHER = {Prentice-Hall, Inc.},
+ YEAR = {2006},
+ ISBN = {013168728X},
+ EDITION = {3rd},
+ ADDRESS = {Upper Saddle River, NJ, USA},
+}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/acm-fa-output.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/acm-fa-output.tex
new file mode 100644
index 00000000000..c0e153d6fb4
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/acm-fa-output.tex
@@ -0,0 +1,17 @@
+\documentclass[11pt,a4paper]{article}
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{acm-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+\nocite{*}
+\bibliographystyle{acm-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/bibtex-example.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/bibtex-example.tex
new file mode 100644
index 00000000000..6536265479b
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/bibtex-example.tex
@@ -0,0 +1,27 @@
+\documentclass[11pt,a4paper]{article}
+
+
+\usepackage{verbatim}
+\usepackage{backref}
+\def\backrefpagesname{}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Times New latin}
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با استیل فارسی \lr{unsrt-fa} برای \lr{BibTeX} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+مرجع \cite{امیدعلی82دکترا} یک نمونه پروژه دکترا و مرجع\cite{واحدی87} یک نمونه مقاله مجله فارسی است.
+مرجع \cite{Baker02limits} یک نمونه مقاله انگلیسی است که در بین مراجع فارسی قرار گرفته است، مرجع \cite{Amintoosi87using} یک نمونه مقاله کنفرانس فارسی و
+مرجع \cite{استالینگ۸۰کتاب} یک نمونه کتاب فارسی با ذکر مترجمان و ویراستاران فارسی است. مرجع \cite{Khalighi07MscThesis} یک نمونه پروژه کارشناسی ارشد انگلیسی و
+\cite{خلیقی۸۷زی‌پرشین} هم یک نمونه متفرقه می‌باشند.
+
+{\small
+\bibliographystyle{unsrt-fa}%{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/ieeetr-fa-output.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/ieeetr-fa-output.tex
new file mode 100644
index 00000000000..b1b02051cf0
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/ieeetr-fa-output.tex
@@ -0,0 +1,19 @@
+\documentclass[11pt,a4paper]{article}
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{ieeetr-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/plain-fa-output.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/plain-fa-output.tex
new file mode 100644
index 00000000000..72345bfd1d3
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/bibtex/plain-fa-output.tex
@@ -0,0 +1,19 @@
+\documentclass[11pt,a4paper]{article}
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{XB Zar}
+
+\title{نمونه خروجی با سبک فارسی \lr{plain-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences1}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/logo.pdf b/Master/texmf-dist/doc/xelatex/xepersian/examples/logo.pdf
new file mode 100755
index 00000000000..1363dc199a9
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/logo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/magazine-sample.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/magazine-sample.tex
new file mode 100644
index 00000000000..9badb482be7
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/magazine-sample.tex
@@ -0,0 +1,171 @@
+\documentclass[12pt,twoside]{xepersian-magazine}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\usepackage{xunicode}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Junicode}
+\setdigitfont{XB Zar}
+\pagestyle{fancy}
+\title{مجلهٔ زی‌پرشین}
+\author{وفا خلیقی}
+\edition{جلد اول}
+\customlogo{مجلهٔ زی‌پرشین}
+\customminilogo{مجلهٔ زی‌پرشین}
+\custommagazinename{مجلهٔ زی‌پرشین}
+\customwwwTxt{http://developer.berlios.de/projects/xepersian}
+\begin{document}
+\begin{frontpage}
+\firstimage{img/ireland.jpg}{این زیرنویس تصویر اصلی در صفحهٔ اول است.}
+\firstarticle{این تیتر مقالهٔ اول است.}
+{خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+{۱۲:۳۴}
+\secondarticle{این هم سر تیتر مقالهٔ دوم است.}%
+{این هم زیر تیتر مقالهٔ دوم است که آن را در اینجا می‌نویسیم.}%
+{خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+{قسمت الف}%
+{۱۰:۲۳}
+
+\thirdarticle{این سرتیتر مقالهٔ سوم است.}%
+{این هم زیرتیتر مقالهٔ سوم است که ما آن را در اینجا قرار می‌دهیم.}%
+{خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد. و همانطور که می‌بینید من مطلبی برای گفتن ندارم فقط متن علکی می‌نویسم تا کمی صفحه را پر کرده باشم. اما در قسمتهای بعدی مقداری از سهراب سپهری خواهم نوشت.}%
+
+{قسمت ب}%
+{۱۰:۰۲}
+
+\begin{indexblock}{نمایه (فهرست مطالب) اصلی}
+\indexitem{۱- مقاله اول}{1}
+
+\indexitem{۲- مقاله دوم}{3}
+
+\indexitem{۳- مقاله سوم}{3}
+
+\indexitem{۴- مقاله چهارم}{5}
+\end{indexblock}
+
+\begin{weatherblock}{وضع آب و هوا}
+\weatheritem{img/weather/rain.jpg}{امروز}{13}{9}{}
+\weatheritem{img/weather/sun.jpg}{فردا}{15}{1}{}
+\weatheritem{img/weather/clouds.jpg}{جمعه}{12}{6}{}
+\end{weatherblock}
+
+\begin{authorblock}
+\textbf{ویرایشگران}
+
+وفا خلیقی، مهدی امیدعلی و مصطفی واحدی
+
+\texttt{vafa@users.berlios.de\\[5pt]
+http://developer.berlios.de/projects/xepersian}\\
+\end{authorblock}
+\end{frontpage}
+\newsection{قسمت الف}
+\begin{article}{2}
+{این تیتر این مقاله است.}
+{این هم زیرتیتر این مقاله هست.}
+{قسمت الف}
+{1}
+\authorandplace{نام نویسنده}{مکان}
+
+\noindent\timestamp{۸:۲۵}
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+\footnote{این یک زیرنویس فارسی است.}\LTRfootnote{This is an English footnote.}
+\begin{equation}
+(a+b)^3=a^3+3a^2b+3ab^2+b^3\label{eq-1}
+\end{equation}
+این معادلهٔ \eqref{eq-1} است.
+\columntitle{lines}{این را برای مهم یا نشان دادن حرفی مهم در این مجله انجام می‌دهیم.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\begin{article}{2}
+{این تیتر این مقاله است.}
+{این هم زیرتیتر این مقاله هست.}
+{قسمت الف}
+{1}
+\authorandplace{نام نویسنده}{مکان}
+
+\noindent\timestamp{08:25}
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+\LTRfootnote{This is an English footnote.}\footnote{این یک زیرنویس فارسی است.}
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+\expandedtitle{doublebox}{این هم مطلی است مهم یا چیزی که از خلاصهٔ این مقاله ما متوجه شده‌ایم و این برای ما و خوانندگان خیلی مهم است.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\newsection{قسمت ب}
+
+\begin{article}{2}
+{این یک تیتر کوتاه است.وفا خلیقی}
+{این هم مثل همیشه زیرتیتر است که ما آن را در اینجا قرار می‌دهیم.}
+{قسمت ب}
+{3}
+
+\authorandplace{نام نویسنده}{مکان}
+
+\noindent\timestamp{08:25} et ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+\expandedtitle{lines}{این هم دوباره مطلب مهمی است که ما آن را از لابلای این مقاله برای خواننده درست کرده‌ایم.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\begin{editorial}{1}{این یک مثال از مقاله‌ای از طرف ویرایشگر است.}{نام و نام خانوادگی}{4}
+يژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{editorial}
+
+\articlesep
+
+\begin{shortarticle}{4}{محیط مقالهٔ کوتاه}{محیط مقالهٔ کوتاه داخل مجلهٔ زی‌پرشین}{5}
+\shortarticleitem{این یک تیتر کوتاه است}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\end{shortarticle}
+
+\articlesep
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/test-correction.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-correction.tex
new file mode 100644
index 00000000000..9c542954ed6
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-correction.tex
@@ -0,0 +1,39 @@
+\documentclass{article}
+\usepackage[correction]{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/test-empty-form.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-empty-form.tex
new file mode 100644
index 00000000000..37a891b40fb
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-empty-form.tex
@@ -0,0 +1,43 @@
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+\bigskip
+
+\begin{center}
+\makeform
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/test-question-only.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-question-only.tex
new file mode 100644
index 00000000000..b3f84d4c9bf
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-question-only.tex
@@ -0,0 +1,39 @@
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/test-solution-form.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-solution-form.tex
new file mode 100644
index 00000000000..2492d6be6c1
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/test-solution-form.tex
@@ -0,0 +1,43 @@
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\bigskip
+\begin{center}
+\makemask
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/examples/thesis-sample.tex b/Master/texmf-dist/doc/xelatex/xepersian/examples/thesis-sample.tex
new file mode 100644
index 00000000000..1c9dd05c490
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/examples/thesis-sample.tex
@@ -0,0 +1,62 @@
+\documentclass[a4paper,11pt]{xepersian-thesis}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{XB Zar}
+
+\begin{document}
+\title{اعداد مرکب}
+\author{وفا خلیقی}
+\degree{کارشناسی ریاضیات محض}
+\supervisor{محمد قدسی}
+\department{ریاضی}
+\university{تهران}
+\city{تهران}
+\thesisdate{\today}
+\maketitle
+\begin{acknowledgementpage}
+در اینجا دوست دارم از همه تشکر کنم
+\end{acknowledgementpage}
+\begin{abstractpage}
+اینجا هم باید مطلبی نوشت...
+\keywords{ریاضی محض، هندسه و توپولوژی}
+\end{abstractpage}
+\tableofcontents
+\listoftables
+\chapter{مجموعه اعداد}
+در اینجا لازم می‌دانم تا نگاهی روی مجموعهٔ اعداد اندازیم تا متوجه خصلت‌های آن شویم
+\begin{equation}
+(a+b)^2=a^2+2ab+b^3
+\end{equation}
+\newpage
+این صفحهٔ جدید است که ما در این صفحه به نوشتن مقالات دیگری مشغول هستیم.
+\section{مقدمه}
+
+\newpage
+این هم یک صفحهٔ جدید دیگر
+\chapter{دوم}
+\chapter{سوم}
+\appendix
+\chapter{اول}
+\chapter{دوم}
+\chapter{سوم}
+\bibliographystyle{unsrt}
+\begin{thebibliography}{99}
+\end{thebibliography}
+\begin{latin}
+\latintitle{Pure Mathematics}
+\latinauthor{Vafa Khalighi}
+\latindegree{Bachelor of Pure Mathematics}
+\latinthesisdate{\latintoday}
+\latinsupervisor{Mohammad Ghodsi}
+\latindepartment{Computer Science}
+\latinuniversity{Iran University of Science \& Technology}
+\latincity{Tehran}
+\begin{latinabstract}
+\noindent This is our abstract written in English and This thesis is written very very very carefully so that we can keep an eye on the beauty of typesetting.
+\latinkeywords{Mathematics, topology, geometry and category theory.}
+\end{latinabstract}
+\makelatintitle
+\end{latin}
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/extbook-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/extbook-xepersian.def
new file mode 100644
index 00000000000..298e9fe9186
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/extbook-xepersian.def
@@ -0,0 +1,44 @@
+%%
+%% This is file `extbook-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `extbook-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `extbook-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/farsitex2xepersian/ftxe-0.11.py b/Master/texmf-dist/doc/xelatex/xepersian/farsitex2xepersian/ftxe-0.11.py
new file mode 100644
index 00000000000..eb01b1de984
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/farsitex2xepersian/ftxe-0.11.py
@@ -0,0 +1,1045 @@
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses>
+
+##################################################
+# Author: Mostafa Vahedi #
+# Date: 06 July 2009 #
+# Version: 0-11 #
+# Application: FarsiTeX to XePersian converter #
+##################################################
+
+import codecs
+
+import sys
+import os
+
+ft_numerical = [
+chr(0xB9), # Arabic Thoushads Seperator
+chr(0xBC) # ARABIC DECIMAL SEPARATOR
+]
+
+
+ft_vowels = [
+chr(0xB0), # ARABIC FATHA
+chr(0xB1), # ARABIC KASRA
+chr(0xB2), # ARABIC DAMMA
+chr(0xB3), # ARABIC FATHATAN
+chr(0xB4), # ARABIC SHADDA
+chr(0xBA), # ARABIC LETTER SUPERSCRIPT ALEF
+chr(0xBB), # ARABIC HAMZA ABOVE
+chr(0xC4) # ARABIC SUKUN
+]
+
+ft_non_joiners = [
+chr(0x8F) # ARABIC LETTER HAMZA
+]
+
+ft_bidi_joiners_initial = [
+chr(0xE4), # ARABIC LETTER AIN, initial form
+chr(0xE8), # ARABIC LETTER GHAIN, initial form
+chr(0xFB) # ARABIC LETTER HEH, initial form
+]
+
+ft_bidi_joiners_medial = [
+chr(0xE3), # ARABIC LETTER AIN, medial form
+chr(0xE7), # ARABIC LETTER GHAIN, medial form
+chr(0xFA) # ARABIC LETTER HEH, medial form
+]
+
+ft_bidi_joiners_final = [
+chr(0xE2), # ARABIC LETTER AIN, final form
+chr(0xE6), # ARABIC LETTER GHAIN, final form
+chr(0xFC) # ARABIC LETTER FARSI YEH, final form
+]
+
+ft_bidi_joiners_isolated = [
+chr(0xE1), # ARABIC LETTER AIN, isolated form
+chr(0xE5), # ARABIC LETTER GHAIN, isolated form
+chr(0xFD) # ARABIC LETTER FARSI YEH, isolated form
+]
+
+ft_bidi_joiners_initial_medial = [
+chr(0x8B), # ARABIC TATWEEL
+chr(0x8E), # ARABIC LETTER YEH WITH HAMZA ABOVE, initial-medial form
+chr(0x93), # ARABIC LETTER BEH, initial-medial form
+chr(0x95), # ARABIC LETTER PEH, initial-medial form
+chr(0x97), # ARABIC LETTER TEH, initial-medial form
+chr(0x99), # ARABIC LETTER THEH, initial-medial form
+chr(0x9B), # ARABIC LETTER JEEM, initial-medial form
+chr(0x9D), # ARABIC LETTER TCHEH, initial-medial form
+chr(0x9F), # ARABIC LETTER HAH, initial-medial form
+chr(0xA1), # ARABIC LETTER KHAH, initial-medial form
+chr(0xA8), # ARABIC LETTER SEEN, initial-medial form
+chr(0xAA), # ARABIC LETTER SHEEN, initial-medial form
+chr(0xAC), # ARABIC LETTER SAD, initial-medial form
+chr(0xAE), # ARABIC LETTER DAD, initial-medial form
+chr(0xAF), # ARABIC LETTER TAH, initial-medial form
+chr(0xE0), # ARABIC LETTER ZAH, initial-medial form
+chr(0xEA), # ARABIC LETTER FEH, initial-medial form
+chr(0xEC), # ARABIC LETTER QAF, initial-medial form
+chr(0xEE), # ARABIC LETTER KEHEH, initial-medial form
+chr(0xF0), # ARABIC LETTER GAF, initial-medial form
+chr(0xF3), # ARABIC LETTER LAM, initial-medial form
+chr(0xF5), # ARABIC LETTER MEEM, initial-medial form
+chr(0xF7), # ARABIC LETTER NOON, initial-medial form
+chr(0xFE) # ARABIC LETTER FARSI YEH, initial-medial form
+]
+
+ft_bidi_joiners_final_isolated = [
+chr(0x92), # ARABIC LETTER BEH, final-isolated form
+chr(0x94), # ARABIC LETTER PEH, final-isolated form
+chr(0x96), # ARABIC LETTER TEH, final-isolated form
+chr(0x98), # ARABIC LETTER THEH, final-isolated form
+chr(0x9A), # ARABIC LETTER JEEM, final-isolated form
+chr(0x9C), # ARABIC LETTER TCHEH, final-isolated form
+chr(0x9E), # ARABIC LETTER HAH, final-isolated form
+chr(0xA0), # ARABIC LETTER KHAH, final-isolated form
+chr(0xA7), # ARABIC LETTER SEEN, final-isolated form
+chr(0xA9), # ARABIC LETTER SHEEN, final-isolated form
+chr(0xAB), # ARABIC LETTER SAD, final-isolated form
+chr(0xAD), # ARABIC LETTER DAD, final-isolated form
+chr(0xC1), # ARABIC LETTER TAH, final-isolated form
+chr(0xC2), # ARABIC LETTER ZAH, final-isolated form
+chr(0xE9), # ARABIC LETTER FEH, final-isolated form
+chr(0xEB), # ARABIC LETTER QAF, final-isolated form
+chr(0xED), # ARABIC LETTER KEHEH, final-isolated form
+chr(0xEF), # ARABIC LETTER GAF, final-isolated form
+chr(0xF1), # ARABIC LETTER LAM, final-isolated form
+chr(0xF4), # ARABIC LETTER MEEM, final-isolated form
+chr(0xF6), # ARABIC LETTER NOON, final-isolated form
+chr(0xF9) # ARABIC LETTER HEH, final-isolated form
+]
+
+ft_right_joiners_final = [
+chr(0x91) # ARABIC LETTER ALEF, final form
+]
+
+ft_right_joiners_isolated = [
+chr(0x8D), # ARABIC LETTER ALEF WITH MADDA ABOVE, isolated form
+chr(0x90) # ARABIC LETTER ALEF, isolated form
+]
+
+ft_right_joiners_final_isolated = [
+chr(0xA2), # ARABIC LETTER DAL
+chr(0xA3), # ARABIC LETTER THAL
+chr(0xA4), # ARABIC LETTER REH
+chr(0xA5), # ARABIC LETTER ZAIN
+chr(0xA6), # ARABIC LETTER JEH
+chr(0xBF), # ARABIC LETTER TEH MARBUTAH
+chr(0xF2), # ARABIC LIGATURE LAM WITH ALEF
+chr(0xF8) # ARABIC LETTER WAW
+]
+
+
+table_FT_UN = {
+chr(0x80) : [u'\u06F0'], # EXTENDED ARABIC-INDIC DIGIT ZERO
+chr(0x81) : [u'\u06F1'], # EXTENDED ARABIC-INDIC DIGIT ONE
+chr(0x82) : [u'\u06F2'], # EXTENDED ARABIC-INDIC DIGIT TWO
+chr(0x83) : [u'\u06F3'], # EXTENDED ARABIC-INDIC DIGIT THREE
+chr(0x84) : [u'\u06F4'], # EXTENDED ARABIC-INDIC DIGIT FOUR
+chr(0x85) : [u'\u06F5'], # EXTENDED ARABIC-INDIC DIGIT FIVE
+chr(0x86) : [u'\u06F6'], # EXTENDED ARABIC-INDIC DIGIT SIX
+chr(0x87) : [u'\u06F7'], # EXTENDED ARABIC-INDIC DIGIT SEVEN
+chr(0x88) : [u'\u06F8'], # EXTENDED ARABIC-INDIC DIGIT EIGHT
+chr(0x89) : [u'\u06F9'], # EXTENDED ARABIC-INDIC DIGIT NINE
+chr(0x8A) : [u'\u060C'], # ARABIC COMMA
+chr(0x8B) : [u'\u0640'], # ARABIC TATWEEL
+chr(0x8C) : [u'\u061F'], # ARABIC QUESTION MARK
+chr(0x8D) : [u'\u0622'], # ARABIC LETTER ALEF WITH MADDA ABOVE, isolated form
+chr(0x8E) : [u'\u0626'], # ARABIC LETTER YEH WITH HAMZA ABOVE, initial-medial form
+chr(0x8F) : [u'\u0621'], # ARABIC LETTER HAMZA
+chr(0x90) : [u'\u0627'], # ARABIC LETTER ALEF, isolated form
+chr(0x91) : [u'\u0627'], # ARABIC LETTER ALEF, final form
+chr(0x92) : [u'\u0628'], # ARABIC LETTER BEH, final-isolated form
+chr(0x93) : [u'\u0628'], # ARABIC LETTER BEH, initial-medial form
+chr(0x94) : [u'\u067E'], # ARABIC LETTER PEH, final-isolated form
+chr(0x95) : [u'\u067E'], # ARABIC LETTER PEH, initial-medial form
+chr(0x96) : [u'\u062A'], # ARABIC LETTER TEH, final-isolated form
+chr(0x97) : [u'\u062A'], # ARABIC LETTER TEH, initial-medial form
+chr(0x98) : [u'\u062B'], # ARABIC LETTER THEH, final-isolated form
+chr(0x99) : [u'\u062B'], # ARABIC LETTER THEH, initial-medial form
+chr(0x9A) : [u'\u062C'], # ARABIC LETTER JEEM, final-isolated form
+chr(0x9B) : [u'\u062C'], # ARABIC LETTER JEEM, initial-medial form
+chr(0x9C) : [u'\u0686'], # ARABIC LETTER TCHEH, final-isolated form
+chr(0x9D) : [u'\u0686'], # ARABIC LETTER TCHEH, initial-medial form
+chr(0x9E) : [u'\u062D'], # ARABIC LETTER HAH, final-isolated form
+chr(0x9F) : [u'\u062D'], # ARABIC LETTER HAH, initial-medial form
+chr(0xA0) : [u'\u062E'], # ARABIC LETTER KHAH, final-isolated form
+chr(0xA1) : [u'\u062E'], # ARABIC LETTER KHAH, initial-medial form
+chr(0xA2) : [u'\u062F'], # ARABIC LETTER DAL
+chr(0xA3) : [u'\u0630'], # ARABIC LETTER THAL
+chr(0xA4) : [u'\u0631'], # ARABIC LETTER REH
+chr(0xA5) : [u'\u0632'], # ARABIC LETTER ZAIN
+chr(0xA6) : [u'\u0698'], # ARABIC LETTER JEH
+chr(0xA7) : [u'\u0633'], # ARABIC LETTER SEEN, final-isolated form
+chr(0xA8) : [u'\u0633'], # ARABIC LETTER SEEN, initial-medial form
+chr(0xA9) : [u'\u0634'], # ARABIC LETTER SHEEN, final-isolated form
+chr(0xAA) : [u'\u0634'], # ARABIC LETTER SHEEN, initial-medial form
+chr(0xAB) : [u'\u0635'], # ARABIC LETTER SAD, final-isolated form
+chr(0xAC) : [u'\u0635'], # ARABIC LETTER SAD, initial-medial form
+chr(0xAD) : [u'\u0636'], # ARABIC LETTER DAD, final-isolated form
+chr(0xAE) : [u'\u0636'], # ARABIC LETTER DAD, initial-medial form
+chr(0xAF) : [u'\u0637'], # ARABIC LETTER TAH, initial-medial form
+chr(0xB0) : [u'\u064E'], # ARABIC FATHA
+chr(0xB1) : [u'\u0650'], # ARABIC KASRA
+chr(0xB2) : [u'\u064F'], # ARABIC DAMMA
+chr(0xB3) : [u'\u064B'], # ARABIC FATHATAN
+chr(0xB4) : [u'\u0651'], # ARABIC SHADDA
+chr(0xB5) : [u'\u0023'], # * #
+chr(0xB6) : [u'\u0024'], # * $
+chr(0xB7) : [u'\u0025'], # * %
+chr(0xB8) : [u'\u0026'], # * &
+chr(0xB9) : [u'\u066C'], # Arabic Thoushads Seperator
+chr(0xBA) : [u'\u0670'], # ARABIC LETTER SUPERSCRIPT ALEF
+chr(0xBB) : [u'\u0654'], # ARABIC HAMZA ABOVE
+chr(0xBC) : [u'\u066B'], # ARABIC DECIMAL SEPARATOR
+chr(0xBD) : [u'\u0029'], # * RIGHT PARENTHESIS
+chr(0xBE) : [u'\u0028'], # * LEFT PARENTHESIS
+chr(0xBF) : [u'\u0629'], # ARABIC LETTER TEH MARBUTAH
+chr(0xC0) : [u'\u00BB'], # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+chr(0xC1) : [u'\u0637'], # ARABIC LETTER TAH, final-isolated form
+chr(0xC2) : [u'\u0638'], # ARABIC LETTER ZAH, final-isolated form
+chr(0xC3) : [u'\u00AB'], # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+chr(0xC4) : [u'\u0652'], # ARABIC SUKUN
+chr(0xC5) : [u'\u002D'], # * -
+chr(0xC6) : [u'\u002E'], # * FULL STOP
+chr(0xC7) : [u'\u002F'], # * /
+chr(0xC8) : [u'\u002A'], # * *
+chr(0xC9) : [u'\u007E'], # * ~
+chr(0xCA) : [u'\u003A'], # * COLON
+chr(0xCB) : [u'\u061B'], # ARABIC SEMICOLON
+chr(0xCC) : [u'\u003E'], # * GREATER-THAN SIGN
+chr(0xCD) : [u'\u002B'], # * +
+chr(0xCE) : [u'\u003D'], # * =
+chr(0xCF) : [u'\u003C'], # * LESS-THAN SIGN
+# chr(0xD0) : [u'\u0040'], # * @
+chr(0xD0) : [u''], # * @
+chr(0xD1) : [u'\u005D'], # * [
+chr(0xD2) : [u'\u005C'], # * \
+chr(0xD3) : [u'\u005B'], # * ]
+chr(0xD4) : [u'\u005E'], # * ^
+chr(0xD5) : [u'\u005F'], # * _
+chr(0xD6) : [u'\u0060'], # * `
+chr(0xD7) : [u'\u007D'], # * {
+chr(0xD8) : [u'\u007C'], # * |
+chr(0xDA) : [u'\u0020'], # * SPACE
+chr(0xDD) : [u'\u0021'], # * EXCLAMATION MARK
+chr(0xDE) : [u'\u007B'], # * }
+chr(0xE0) : [u'\u0638'], # ARABIC LETTER ZAH, initial-medial form
+chr(0xE1) : [u'\u0639'], # ARABIC LETTER AIN, isolated form
+chr(0xE2) : [u'\u0639'], # ARABIC LETTER AIN, final form
+chr(0xE3) : [u'\u0639'], # ARABIC LETTER AIN, medial form
+chr(0xE4) : [u'\u0639'], # ARABIC LETTER AIN, initial form
+chr(0xE5) : [u'\u063A'], # ARABIC LETTER GHAIN, isolated form
+chr(0xE6) : [u'\u063A'], # ARABIC LETTER GHAIN, final form
+chr(0xE7) : [u'\u063A'], # ARABIC LETTER GHAIN, medial form
+chr(0xE8) : [u'\u063A'], # ARABIC LETTER GHAIN, initial form
+chr(0xE9) : [u'\u0641'], # ARABIC LETTER FEH, final-isolated form
+chr(0xEA) : [u'\u0641'], # ARABIC LETTER FEH, initial-medial form
+chr(0xEB) : [u'\u0642'], # ARABIC LETTER QAF, final-isolated form
+chr(0xEC) : [u'\u0642'], # ARABIC LETTER QAF, initial-medial form
+chr(0xED) : [u'\u06A9'], # ARABIC LETTER KEHEH, final-isolated form
+chr(0xEE) : [u'\u06A9'], # ARABIC LETTER KEHEH, initial-medial form
+chr(0xEF) : [u'\u06AF'], # ARABIC LETTER GAF, final-isolated form
+chr(0xF0) : [u'\u06AF'], # ARABIC LETTER GAF, initial-medial form
+chr(0xF1) : [u'\u0644'], # ARABIC LETTER LAM, final-isolated form
+chr(0xF2) : [u'\u0644\u0627'], # ARABIC LIGATURE LAM WITH ALEF
+chr(0xF3) : [u'\u0644'], # ARABIC LETTER LAM, initial-medial form
+chr(0xF4) : [u'\u0645'], # ARABIC LETTER MEEM, final-isolated form
+chr(0xF5) : [u'\u0645'], # ARABIC LETTER MEEM, initial-medial form
+chr(0xF6) : [u'\u0646'], # ARABIC LETTER NOON, final-isolated form
+chr(0xF7) : [u'\u0646'], # ARABIC LETTER NOON, initial-medial form
+chr(0xF8) : [u'\u0648'], # ARABIC LETTER WAW
+chr(0xF9) : [u'\u0647'], # ARABIC LETTER HEH, final-isolated form
+chr(0xFA) : [u'\u0647'], # ARABIC LETTER HEH, medial form
+chr(0xFB) : [u'\u0647'], # ARABIC LETTER HEH, initial form
+chr(0xFC) : [u'\u06CC'], # ARABIC LETTER FARSI YEH, final form
+chr(0xFD) : [u'\u06CC'], # ARABIC LETTER FARSI YEH, isolated form
+chr(0xFE) : [u'\u06CC'] # ARABIC LETTER FARSI YEH, initial-medial form
+}
+
+F_PERCENT_SIGN = chr(0xB7)
+F_AT_SIGN = chr(0xD0)
+F_SLASH = chr(0xD2)
+F_SPACE = chr(0xDA)
+F_PRNT_OPEN = chr(0xDE)
+F_PRNT_CLOSE = chr(0xD7)
+
+# latex and farsitex commands whose first parameter does not need \lr{...}
+commands = [
+"begin", "end",
+"input", "include", "includeonly",
+"hspace", "vspace", "hspace*", "vspace*",
+"label", "ref", "cite", "bibitem",
+"bibliographystyle",
+"parbox",
+"newenvironment", "newtheorem",
+"persianmathdigitsfamily",
+"fontfamily", "fontseries", "fontshape",
+"rmdefault", "sfdefault", "ttdefault",
+"bfdefault", "itdefault", "sldefault", "scdefault",
+"pagenumbering", "pagestyle", "thispagestyle",
+"setcounter", "stepcounter", "setlength", "addtolength"
+]
+
+def ft_is_all_persian_space(next_part):
+ l = len(next_part)
+ i = 0
+ while (i < l):
+ if (next_part[i] != F_SPACE):
+ return 0
+ i += 1
+ return 1
+
+def ft_is_numeric(ch):
+ if ((ch in ft_numerical) or
+ ((ch >= chr(0x80)) and (ch <= chr(0x89))) ):
+ return 1
+ return 0
+
+def ft_can_join_left(ch):
+ if ((ch in ft_bidi_joiners_initial) or
+ (ch in ft_bidi_joiners_medial) or
+ (ch in ft_bidi_joiners_final) or
+ (ch in ft_bidi_joiners_isolated) or
+ (ch in ft_bidi_joiners_initial_medial) or
+ (ch in ft_bidi_joiners_final_isolated)):
+ return 1
+ return 0
+
+def ft_can_join_right(ch):
+ if (ft_can_join_left(ch) or
+ (ch in ft_right_joiners_final) or
+ (ch in ft_right_joiners_isolated) or
+ (ch in ft_right_joiners_final_isolated)):
+ return 1
+ return 0
+
+def ft_joining_left(ch):
+ if ((ch in ft_bidi_joiners_initial) or
+ (ch in ft_bidi_joiners_medial) or
+ (ch in ft_bidi_joiners_initial_medial)):
+ return 1
+ return 0
+
+
+def ft_joining_right(ch):
+ if ((ch in ft_right_joiners_final) or
+ (ch in ft_bidi_joiners_medial) or
+ (ch in ft_bidi_joiners_final)):
+ return 1
+ return 0
+
+def ft_not_right_joined(ch):
+ if ((ch in ft_bidi_joiners_initial) or
+ (ch in ft_right_joiners_isolated) or
+ (ch in ft_bidi_joiners_isolated)):
+ return 1
+ return 0
+
+def ft_adjust_shaping(text, i):
+ current = text[i]
+ u = u''
+ try:
+ u = table_FT_UN[current][0]
+ except KeyError:
+ return u''
+
+ #if you don't want shaping remove the following comment
+ #return u
+
+ if ((current in ft_vowels) or (ft_is_numeric(current))):
+ return u
+
+ #find next non-vowel character on the left
+ text_len = len(text)
+ next_index = i+1
+ while ((next_index < text_len) and (text[next_index] in ft_vowels)):
+ next_index += 1
+
+ if (next_index == text_len):
+ next = ''
+ else:
+ next = text[next_index]
+
+ # if current letter is joining from left but next letter is or can not joining
+ if (ft_joining_left(current)):
+ if (not ft_can_join_right(next)):
+ u += u'\u200D' #ZWJ
+ elif (ft_not_right_joined(next)):
+ u += u'\u200D\u200C' #ZWJ+ZWNJ
+ # if current letter can join but next letter is joining from right
+ elif (ft_can_join_left(current)):
+ if (ft_joining_right(next)):
+ u += u'\u200C\u200D' #ZWNJ+ZWJ
+ elif (ft_can_join_right(next)):
+ u += u'\u200C' #ZWNJ
+ return u
+
+def ft_adjust_number(text):
+ result = u''
+ i = len(text)-1
+ while (i >= 0):
+ result += ft_adjust_shaping(text, i)
+ i -= 1
+ return result
+
+
+def map_ft_unicode(text):
+ mapped_text = u''
+
+ i = 0
+ while (i < len(text)):
+ if (ft_is_numeric(text[i])):
+ next_index = i
+ while ((next_index+1 < len(text)) and
+ (ft_is_numeric(text[next_index+1]))):
+ next_index += 1
+ mapped_text += ft_adjust_number(text[i:next_index+1])
+ i = next_index+1
+ continue
+
+ mapped_text += ft_adjust_shaping(text, i)
+ i += 1
+ return mapped_text
+
+# Finds next token all of the same language
+def ft_next_part(line, i, line_len):
+ global global_state
+ global recursive
+ global filenames
+
+ j = i
+ language_flag = (line[j]<chr(0x80))
+ while ((j<line_len) and ((line[j]<chr(0x80)) == language_flag) ):
+ if ( (global_state == 0) and ( (line[j] == '%') or (line[j] == F_PERCENT_SIGN) ) and (line[j-1] != '\\') and (line[j-1] != F_SLASH) ):
+ global_state = 1
+ elif ((global_state == 0) and ((line[j:j+16] == '\\begin{verbatim}') or (line[j:j+17] == '\\begin{verbatim*}'))):
+ global_state = 2
+ elif ((global_state == 2) and ((line[j:j+14] == '\\end{verbatim}') or (line[j:j+15] == '\\end{verbatim*}'))):
+ global_state = 0
+ elif ((global_state == 0) and (line[j:j+6] == '\\verb*')):
+ next_index = line.find(line[j+6], j+7)
+ j = next_index
+ elif ((global_state == 0) and (line[j:j+5] == '\\verb')):
+ next_index = line.find(line[j+5], j+6)
+ j = next_index
+ elif (recursive == 1):
+ if ((global_state == 0) and (line[j:j+9] == '\\include{')):
+ next_index = line.find('}', j+9)
+ filename = line[j+10:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ elif ((global_state == 0) and (line[j:j+7] == '\\input{')):
+ next_index = line.find('}', j+7)
+ filename = line[j+8:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ elif ((global_state == 0) and (line[j:j+9] == F_SLASH + 'include' + F_PRNT_OPEN)):
+ next_index = line.find(F_PRNT_CLOSE, j+9)
+ if (line[j+9]!=F_AT_SIGN):
+ filename = line[j+9:next_index] + '.ftx'
+ else:
+ filename = line[j+10:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ elif ((global_state == 0) and (line[j:j+7] == F_SLASH + 'input' + F_PRNT_OPEN)):
+ next_index = line.find(F_PRNT_CLOSE, j+7)
+ if (line[j+7]!=F_AT_SIGN):
+ filename = line[j+7:next_index] + '.ftx'
+ else:
+ filename = line[j+8:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ j += 1
+ return j
+
+###############################################
+# from here all functions are used to translate
+# farsitex commands to xepersian commands
+###############################################
+
+def read_size(input,index,last_index):
+ dim_index = -1
+ inch_index = input.find(u'in', index)
+ if (inch_index != -1):
+ dim_index = inch_index
+ mm_index = input.find(u'mm', index)
+ if (mm_index != -1):
+ if (dim_index == -1 or mm_index < index):
+ dim_index = mm_index
+ cm_index = input.find(u'cm', index)
+ if (cm_index != -1):
+ if (dim_index == -1 or cm_index < dim_index):
+ dim_index = cm_index
+ pt_index = input.find(u'pt', index)
+ if (pt_index != -1):
+ if (dim_index == -1 or pt_index < dim_index):
+ dim_index = pt_index
+ next_cmd = input.find(u'\\', index)
+ if (next_cmd == -1 and dim_index == -1):
+ print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
+ return -1
+ elif (next_cmd == -1 or (dim_index != -1 and next_cmd > dim_index)):
+ epsfxsize = input[index:dim_index+2]
+ return dim_index+2
+ elif (next_cmd != -1):
+ end_cmd = next_cmd+1
+ while (end_cmd < last_index and input[end_cmd].isalpha()):
+ end_cmd += 1
+ return end_cmd
+ else:
+ print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
+ return -1
+
+
+latex_options=[u'a4paper', u'a5paper', u'b5paper',
+ u'letterpaper', u'legalpaper', u'executivepaper',
+ u'landscape', u'10pt', u'11pt', u'12pt',
+ u'oneside', u'twoside', u'draft',
+ u'final', u'titlepage', u'notitlepage',
+ u'onecolumn', u'twocolumn',
+ u'leqno', u'fleqn']
+
+table_eq_packages = {
+u'poem' : u'persianpoem',
+u'fmakeidx' : u'makeidx',
+u'ffancyhe' : u'fancyhdr',
+u'fmultico' : u'multicol'
+}
+
+farsitex_ignore_options = [u'persian', u'farsi', u'epsf', u'fgraphix', u'lotusfont']
+
+xepersian_packages = u'\n\\usepackage{url}\n%\\usepackage{fancyvrb}\n\\usepackage{setspace}\\doublespacing\n\\usepackage{graphicx} \n\\usepackage{amssymb}\n'
+
+xepersian_preamble = u'\\settextfont[Scale=1.2]{XB Zar}\n\\setlatintextfont[Scale=1.1]{Times New Roman}\n\\setdigitfont{XB Zar}\n\\setpookfont{XB Kayhan Pook}\n\\setsayehfont{XB Kayhan Sayeh}\n\\defpersianfont\\lotoos[Scale=1.2]{XB Roya}\n\\defpersianfont\elmi[Scale=1.2]{XB Roya} \n\\def\\nazok{\\normalfont\\normalsize}\n\\let\\iranic\\it\n\\let\\siah\\bf\n\\let\\khabide\\sl\n\\def\\siahir{\\siah\\iranic} \n\\def\\siahkh{\\siah\\khabide}\n\\let\\tookhali\\pookfamily\n\\let\\sayedar\\sayehfamily\n\\let\\farsi\\Persian\n\\let\\english\\Latin \n\\let\\farmbox\\mbox\n\\newcommand{\\ftxepmatrix}[1]{\\begin{pmatrix}#1\\end{pmatrix}}\n\\newcommand{\\ftxematrix}[1]{\\begin{matrix}#1\\end{matrix}} \n\\def\\FarsiTeX{\\lr{FarsiTeX}}\n\\def\\فارسی‌تک{\\rl{فارسی‌‌تک}}\n\\def\\InE{\\begingroup\\beginL\\latinfont}\n\\def\\EnE{\\endL\\endgroup} \n\\def\\InF{\\begingroup\\beginR\\persianfont}\n\\def\\EnF{\\endR\\endgroup}\n\\newcommand{\\IE}[1]{\\lr{#1}}\n\\newcommand{\\IP}[1]{\\rl{#1}} \n\\newcommand{\\IF}[1]{\\rl{#1}}\n\\def\\persiandash{\\rl{-}} \n\\def\\DeclareRobustBiCommand#1#2#3#4{\\DeclareRobustCommand#1{\\if@rl{}#4\\else{}#3\\fi}\\let#2=#1} \n\\catcode`\\﷼=3\n\\catcode`‌=11\n\\newcommand\\dotsectionseparator{\\SepMark{.}}\n\\newcommand\\dashsectionseparator{\\SepMark{-}}\n'
+
+thesis_preamble = u'\\university{\\lr{UniversityName}}\n\\city{\\lr{CityName}}\n\\latinuniversity{UniversityName}\n\\latincity{CityName} \n\\let\\englishtitle\\latintitle\n\\let\\englishauthor\\latinauthor\n\\let\\englishdegree\\latindegree\n\\let\\englishthesisdate\\latinthesisdate \n\\let\\englishsupervisor\\latinsupervisor\n\\let\\englishdepartment\\latindepartment\n\\let\\makeenglishtitle\\makelatintitle \n\\let\\englishkeywords\\latinkeywords\n\\newenvironment{englishabstract}{\\begin{latinabstract}}{\\end{latinabstract}}\n'
+
+def is_alpha_numeric_space(input):
+ input_len = len(input)
+ i = 0
+ while (i<input_len):
+ if (not (input[i].isalpha() or input[i].isdigit() or input[i]==u'.' or input[i]==u' ') ):
+ return 0
+ i+=1
+ return 1
+
+def is_alpha_numeric(input):
+ input_len = len(input)
+ i = 0
+ while (i<input_len):
+ if (not (input[i].isalpha() or input[i].isdigit() or input[i]=='.') ):
+ return 0
+ i+=1
+ return 1
+
+def find_eq_cmd(keyword):
+ try:
+ eq_cmd = table_eq_packages[keyword]
+ except KeyError:
+ eq_cmd = u''
+ return eq_cmd
+
+def convert_persian_to_english(num):
+ result = u''
+ num_len = len(num)
+ index = 0
+ while (index < num_len):
+ if (ord(num[index]) >= ord(u'۰') and ord(num[index]) <= ord(u'۹')):
+ result += unichr(ord(num[index]) - ord(u'۰') + ord(u'0'))
+ else:
+ result += num[index]
+ index += 1
+ return result
+
+def generate_farsitex_cmds_file(helper_filename,preamble):
+ try:
+ of = codecs.open(helper_filename, encoding='utf-8', mode='w')
+ except IOError:
+ print "Can not open the output file: " + helper_filename
+ exit(0)
+ of.write(preamble)
+ of.close
+
+
+# \verb|| -> \item[\verb||] or \section{\verb||}
+# \kasre{} \alef{} ...
+def translate_cmds(output_line):
+ global last_epsfxsize
+ global last_epsfxsize_line
+ global last_epsfysize
+ global last_epsfysize_line
+ global state
+ global filename
+
+ result = u''
+ line_len = len(output_line)
+ index = 0
+ if (state == 1): #\begin{verbatim}
+ end_verbatim = output_line.find('\\end{verbatim}')
+ if (end_verbatim == -1):
+ return output_line
+ result += output_line[0:end_verbatim+14]
+ index = end_verbatim+14
+ state = 0
+ elif (state == 2): #\begin{verbatim*}
+ end_verbatim = output_line.find('\\end{verbatim*}')
+ if (end_verbatim == -1):
+ return output_line
+ result += output_line[0:end_verbatim+15]
+ index = end_verbatim+15
+ state = 0
+ elif (output_line[0:14] == "\\documentstyle"):
+ result += u'\\documentclass'
+ #process options
+ last_index = output_line.find(u']')
+ index = 15
+ first_option = 1
+ preamble = xepersian_preamble
+ packages = xepersian_packages
+ xe_document_class = u''
+ while (index < last_index):
+ next_comma = output_line.find(u',',index,last_index)
+ if (next_comma == -1):
+ next_comma = last_index
+ first_of_option = index
+ while (output_line[first_of_option] == u' '):
+ first_of_option += 1
+ end_of_option = next_comma
+ while (output_line[end_of_option-1] == u' '):
+ end_of_option -= 1
+ option = output_line[first_of_option:end_of_option]
+ index = next_comma+1
+ eq_cmd = find_eq_cmd(option)
+ if (eq_cmd != u''):
+ packages += u'\\usepackage{' + eq_cmd + u'}\n'
+ continue
+ elif (option in farsitex_ignore_options):
+ continue
+ elif (option == u'sharifth'):
+ xe_document_class = u'xepersian-thesis'
+ preamble += thesis_preamble
+ continue
+ elif (not option in latex_options):
+ packages += u'\\usepackage{' + option + u'}\n'
+ continue
+
+ if (first_option):
+ result += u'['
+ else:
+ result += u','
+ result += option
+ first_option = 0
+ #end while
+ if (not first_option):
+ result += u']'
+ # process document style into document class
+ index = output_line.find(u'}',last_index)
+ document_class = output_line[last_index+2:index]
+ if (xe_document_class != u''):
+ result += u'{' + xe_document_class + u'}'
+ elif (document_class == u'oldarticle'):
+ result += u'{article}'
+ elif (document_class == u'oldbook'):
+ result += u'{book}'
+ elif (document_class == u'oldreport'):
+ result += u'{report}'
+ else:
+ result += u'{' + document_class + u'}'
+ # I assume that nothing important is after
+ # \documentstyle[...]{...}, otherwise it may conflict
+ # with our preamble
+ if (index != -1):
+ result += output_line[index+1:]
+ result += packages + u'\\usepackage{xepersian}\n'
+ helper_filename = filename + '_farsitex_cmds_xepersian.tex'
+ generate_farsitex_cmds_file(helper_filename,preamble)
+ result += '\\input{' + helper_filename + '}\n'
+ return result
+ #end elif "documentstyle"
+
+ while (index < line_len):
+ next_index = output_line.find(u'\\', index)
+ comment_index = output_line.find(u'%', index)
+ if (next_index == -1):
+ result += output_line[index:]
+ break
+ elif (state == 1):
+ if (output_line[next_index:next_index+14] == u'\\end{verbatim}'):
+ result += output_line[index:next_index+14]
+ index = next_index+14
+ state = 0
+ else:
+ result += output_line[index:next_index+1]
+ index = next_index+1
+ elif (state == 2):
+ if (output_line[next_index:next_index+15] == u'\\end{verbatim*}'):
+ result += output_line[index:next_index+15]
+ index = next_index+15
+ state = 0
+ else:
+ result += output_line[index:next_index+1]
+ index = next_index+1
+ elif (comment_index != -1 and comment_index < next_index):
+ result += output_line[index:]
+ break
+ elif (output_line[next_index:next_index+14] == u"\\input{amssym}"):
+ result += u'\\usepackage{amssymb}'
+ index = next_index+14
+ elif (output_line[next_index:next_index+12] == u"\\input{epsf}"):
+ index = next_index+12
+ elif (output_line[next_index:next_index+15] == u"\\includeepspdf{"):
+ result += u'\\includegraphics{'
+ index = next_index+15
+ elif (output_line[next_index:next_index+16] == u"\\begin{verbatim}"):
+ result += output_line[index:next_index+16]
+ index = next_index+16
+ state = 1
+ elif (output_line[next_index:next_index+17] == u"\\begin{verbatim*}"):
+ result += output_line[index:next_index+17]
+ index = next_index+17
+ state = 2
+ elif (output_line[next_index:next_index+26] == u'\\setlength{\\headrulewidth}'):
+ end_cmd = output_line.find('}', next_index+26)
+ result += u'\\renewcommand{\\headrulewidth}' + output_line[next_index+26:end_cmd+1]
+ index = end_cmd+1
+ elif (output_line[next_index:next_index+26] == u'\\setlength{\\footrulewidth}'):
+ end_cmd = output_line.find('}', next_index+26)
+ result += u'\\renewcommand{\\footrulewidth}' + output_line[next_index+26:end_cmd+1]
+ index = end_cmd+1
+ elif (output_line[next_index:next_index+10] == u"\\epsffile{"):
+ result += output_line[index:next_index]
+ result += u'\\includegraphics'
+ size_options = u''
+ if (line_number - last_epsfxsize_line <= 3):
+ size_options = u'width=' + last_epsfxsize
+ if (line_number - last_epsfysize_line <= 3):
+ if (size_options != u''):
+ size_options += u','
+ size_options += u'height=' + last_epsfysize
+ if (size_options != u''):
+ result += u'[' + size_options + u']'
+ end_prn = output_line.find(u'.eps}', next_index+9)
+
+ if (end_prn != -1):
+ result += output_line[next_index+9:end_prn] + u'}'
+ index = end_prn+5
+ else:
+ end_prn = output_line.find(u'.ps}', next_index+9)
+ if (end_prn != -1):
+ result += output_line[next_index+9:end_prn] + u'}'
+ index = end_prn+4
+ else:
+ end_prn = output_line.find(u'}', next_index+9)
+ result += output_line[next_index+9:end_prn+1]
+ index = end_prn+1
+ # I assume all the parameter of \epsfxsize comes in one line
+ elif (output_line[next_index:next_index+11] == u"\\epsfxsize="):
+ end_size = read_size(output_line, next_index+11, line_len)
+ if (end_size != -1):
+ last_epsfxsize = output_line[next_index+11:end_size]
+ index = end_size
+ else:
+ index = next_index+11
+ last_epsfxsize_line = line_number
+ # I assume all the parameter of \epsfysize comes in one line
+ elif (output_line[next_index:next_index+11] == u"\\epsfysize="):
+ end_size = read_size(output_line, next_index+11, line_len)
+ if (end_size != -1):
+ last_epsfysize = output_line[next_index+11:end_size]
+ index = end_size
+ else:
+ index = next_index+11
+ last_epsfysize_line = line_number
+ elif (output_line[next_index:next_index+10] == u"\\LR{\\verb*"):
+ end_verb = output_line.find(output_line[next_index+10], next_index+11)
+ verb_param = output_line[next_index+11:end_verb]
+ if (is_alpha_numeric(verb_param)):
+ result += output_line[index:next_index]
+ result += u'\\lr{\\tt{}' + verb_param
+ else:
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+9] == u"\\LR{\\verb"):
+ end_verb = output_line.find(output_line[next_index+9], next_index+10)
+ verb_param = output_line[next_index+10:end_verb]
+ if (is_alpha_numeric_space(verb_param)):
+ result += output_line[index:next_index]
+ result += u'\\lr{\\tt{}' + verb_param
+ else:
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+6] == u"\\verb*"):
+ end_verb = output_line.find(output_line[next_index+6], next_index+7)
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+5] == u"\\verb"):
+ end_verb = output_line.find(output_line[next_index+5], next_index+6)
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+9] == u"\\pmatrix{"):
+ result += u'\\ftxepmatrix{'
+ index = next_index+9
+ elif (output_line[next_index:next_index+8] == u"\\matrix{"):
+ result += u'\\ftxematrix{'
+ index = next_index+8
+ elif (output_line[next_index:next_index+16] == u"\\begin{document}"):
+ result += u'\\begin{document}\n%\\VerbatimFootnotes'
+ index = next_index+16
+ elif (output_line[next_index:next_index+8] == u'\\label {'):
+ begin_param = next_index+8
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param-2]
+ result += u'{' + param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+6] == u'\\ref {'):
+ begin_param = next_index+6
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param-2]
+ result += u'{' + param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+7] == u'\\label{'):
+ begin_param = next_index+7
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param]
+ result += param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+5] == u'\\ref{'):
+ begin_param = next_index+5
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param]
+ result += param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+13] == u'\\multicolumn{'):
+ begin_param = next_index+13
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param]
+ result += param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+12] == u'\\setcounter{'):
+ begin_num = output_line.find(u'{', next_index+12)
+ end_num = output_line.find(u'}', begin_num)
+ num = convert_persian_to_english(output_line[begin_num+1:end_num])
+ result += output_line[index:begin_num+1]
+ result += num + u'}'
+ index = end_num+1
+ elif (output_line[next_index:next_index+14] == u'\\addtocounter{'):
+ begin_num = output_line.find(u'{', next_index+14)
+ end_num = output_line.find(u'}', begin_num)
+ num = convert_persian_to_english(output_line[begin_num+1:end_num])
+ result += output_line[index:begin_num+1]
+ result += num + u'}'
+ index = end_num+1
+ else:
+ result += output_line[index:next_index+2]
+ index = next_index+2
+ #end while
+ return result
+
+###############################################
+# from here all functions are mainly used to
+# convert farsitex format to unicode
+###############################################
+
+def convert_file(f, of, convert_cmds):
+ global state
+ global line_number
+ global last_epsfysize_line
+ global last_epsfxsize_line
+ global last_epsfxsize
+ global last_epsfysize
+ global global_state
+
+ state = 0
+ line_number = 0
+ last_epsfysize_line = 0
+ last_epsfxsize_line = 0
+ last_epsfxsize = u''
+ last_epsfysize = u''
+
+ for line in f:
+ line_number += 1
+ print line_number,
+ output_line = u''
+ line_len = len(line)
+
+ # remove new-line characters from end of line
+ if (line_len>1 and line[line_len-1] == '\n'):
+ line_len-=1
+ if (line_len>1 and line[line_len-1] == '\r'):
+ line_len-=1
+
+ # check line-direction character
+ line_direction_rtl = (line[0] == '<')
+ if (line[0] != '>') and (line[0] != '<'):
+ print "FORMAT ERROR AT LINE: " + str(line_number)
+ exit(0)
+
+ i = 1
+
+ while (i<line_len):
+ next_part_index = ft_next_part(line, i, line_len)
+ next_part = line[i:next_part_index]
+ next_part_latin = (line[i]<chr(0x80))
+
+ # see if we should put \lr{...} for the current english expression
+ if (global_state == 0):
+ if line_direction_rtl and next_part_latin:
+ is_command_rtl = (next_part_latin and (i>1) and (line[i-1]==F_SLASH) )
+ is_parameter_rtl = (next_part_latin and (i>1) and (next_part_index<line_len) and (line[i-1]==F_AT_SIGN) and (line[next_part_index]==F_AT_SIGN) )
+ is_math_rtl = (next_part_latin and (line[i]=="$") and (line[next_part_index-1]=="$") )
+ is_verb_parameter = ( (line[i-6:i] == F_SLASH+"verb") and not isalpha(line[i]))
+ is_verb = (next_part_latin and (line[i:i+5]=='\\verb' or line[i:i+6]==' \\verb'))
+ is_english = (next_part_latin and (line[i:i+8]=='\\english'))
+
+ cmd_index = 0
+ while cmd_index < len(commands):
+ len_cmd = len(commands[cmd_index])+2
+ if ( (i > len_cmd) and (line[i-len_cmd:i] == F_SLASH+commands[cmd_index]+F_PRNT_OPEN) ):
+ break
+ elif ( (i > len_cmd+1) and (line[i-len_cmd-1:i] == F_SLASH+commands[cmd_index]+F_SPACE+F_PRNT_OPEN) ):
+ break
+ cmd_index += 1
+ is_commands_group = cmd_index < len(commands)
+ is_documentstyle_cmd = (line_len > 15) and (line[1:15] == F_SLASH+"documentstyle")
+
+ if next_part_latin:
+ if (global_state == 0):
+ # whether we should put a \lr{ command
+ if ( line_direction_rtl and not (is_command_rtl or is_parameter_rtl or is_math_rtl or is_commands_group or is_documentstyle_cmd or is_verb_parameter or is_verb or is_english) ):
+ output_line += u'\\lr{'
+ if ( line_direction_rtl and is_verb):
+ output_line += u'\\LR{'
+
+ # here is the main place that converting happens
+ output_line += next_part.encode( 'utf-8' )
+
+ if (global_state == 0):
+ # check whether we already used a \lr command: then end it
+ if ( line_direction_rtl and not (is_command_rtl or is_parameter_rtl or is_math_rtl or is_commands_group or is_documentstyle_cmd or is_verb_parameter or is_verb or is_english) ):
+ output_line += u'}'
+ if ( line_direction_rtl and is_verb):
+ output_line += u'}'
+ else:
+ if (global_state == 0):
+ # whether we should put a \rl{} command
+ if ( not line_direction_rtl and not ft_is_all_persian_space(next_part)):
+ output_line += u'\\rl{'
+
+ # here is the main place that converting happens
+ output_line += map_ft_unicode(next_part)
+
+ if (global_state == 0):
+ # check whether we already used a \rl command: then end it
+ if (not line_direction_rtl and not ft_is_all_persian_space(next_part)):
+ output_line += u'}'
+
+ i = next_part_index
+ # end of while
+
+ #if there was a % commenting then we can return to normal situation
+ if (global_state == 1):
+ global_state = 0
+
+ # convert some of the FarsiTeX commands to XePersian commands
+ # only if it is requested
+ if (convert_cmds):
+ result = translate_cmds(output_line)
+ else:
+ result = output_line
+ output_line = result + u'\n'
+ # write the processed line
+ of.write(output_line)
+ # end of line processing
+ # end of file processing
+
+def print_usage():
+ print 'usage: python ftxe-0-11 [-r] [-s] [-x] [-u] in_filename1 in_filename2'
+ print '-r: (DEFAULT) recursively consider files included in the given files'
+ print '-s: do not recursively consider files'
+ print '-x: (DEFAULT) insert xepersian related commands'
+ print '-u: only convert to unicode'
+
+###################################
+# Begin of main body of the program
+###################################
+
+# global variables
+line_number = 0
+last_epsfxsize = u''
+last_epsfxsize_line = 0
+last_epsfysize = u''
+last_epsfysize_line = 0
+state = 0
+global_state = 0
+recursive = 1
+convert_xepersian = 1
+filename = ''
+
+if len(sys.argv) <= 1:
+ print_usage()
+ exit(0)
+
+#find options
+options_index = 1
+while (options_index < len(sys.argv) and sys.argv[options_index][0]=='-'):
+ if (sys.argv[options_index]=='-s'):
+ recursive = 0
+ elif (sys.argv[options_index]=='-u'):
+ convert_xepersian = 0
+ options_index += 1
+
+filenames = []
+while (options_index < len(sys.argv)):
+ filenames.append(sys.argv[options_index])
+ options_index += 1
+
+if (len(filenames) == 0):
+ print 'error: no input filename is specified!'
+ print_usage()
+ exit(0)
+
+index = 0
+while (index < len(filenames)):
+ filename = filenames[index]
+ index += 1
+
+ outfile = ''
+ if (filename[-4:] != '.tex'):
+ outfile = filename[0:-3] + 'tex'
+ else:
+ outfile = filename + '.tex'
+
+ print '\n\nConverting "' + filename + '" into "' + outfile + '"'
+ try:
+ f = open(filename, 'r')
+ except IOError:
+ print "Can not open the input file: " + filename
+ exit(0)
+
+ try:
+ of = codecs.open(outfile, encoding='utf-8', mode='w')
+ except IOError:
+ print "Can not open the output file: " + outfile
+ exit(0)
+
+ convert_file(f, of, convert_xepersian)
+
+ of.close()
+ f.close()
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/footnote-bidi-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/footnote-bidi-xepersian.def
new file mode 100644
index 00000000000..e71891a73be
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/footnote-bidi-xepersian.def
@@ -0,0 +1,113 @@
+%%
+%% This is file `footnote-bidi-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `footnote-bidi-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\long\def\@footnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@RTLfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLtrue\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\persianfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@LTRfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLfalse\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\latinfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@mpfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpRTLfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLtrue
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\persianfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpLTRfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLfalse
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\latinfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `footnote-bidi-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/ftun-0.1.py b/Master/texmf-dist/doc/xelatex/xepersian/ftun-0.1.py
deleted file mode 100644
index 6d53ef6adfa..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/ftun-0.1.py
+++ /dev/null
@@ -1,430 +0,0 @@
-#########################################
-# General Public License #
-# Author: Mostafa Vahedi #
-# Date: 3 Mar. 2008 #
-# Version 0.1 #
-#########################################
-
-import codecs
-
-import sys
-
-
-ft_numerical = [
-chr(0xB9), # Arabic Thoushads Seperator
-chr(0xBC) # ARABIC DECIMAL SEPARATOR
-]
-
-
-ft_vowels = [
-chr(0xB0), # ARABIC FATHA
-chr(0xB1), # ARABIC KASRA
-chr(0xB2), # ARABIC DAMMA
-chr(0xB3), # ARABIC FATHATAN
-chr(0xB4), # ARABIC SHADDA
-chr(0xBA), # ARABIC LETTER SUPERSCRIPT ALEF
-chr(0xBB), # ARABIC HAMZA ABOVE
-chr(0xC4) # ARABIC SUKUN
-]
-
-ft_non_joiners = [
-chr(0x8F) # ARABIC LETTER HAMZA
-]
-
-ft_bidi_joiners_initial = [
-chr(0xE4), # ARABIC LETTER AIN, initial form
-chr(0xE8), # ARABIC LETTER GHAIN, initial form
-chr(0xFB) # ARABIC LETTER HEH, initial form
-]
-
-ft_bidi_joiners_medial = [
-chr(0xE3), # ARABIC LETTER AIN, medial form
-chr(0xE7), # ARABIC LETTER GHAIN, medial form
-chr(0xFA) # ARABIC LETTER HEH, medial form
-]
-
-ft_bidi_joiners_final = [
-chr(0xE2), # ARABIC LETTER AIN, final form
-chr(0xE6), # ARABIC LETTER GHAIN, final form
-chr(0xFC) # ARABIC LETTER FARSI YEH, final form
-]
-
-ft_bidi_joiners_isolated = [
-chr(0xE1), # ARABIC LETTER AIN, isolated form
-chr(0xE5), # ARABIC LETTER GHAIN, isolated form
-chr(0xFD) # ARABIC LETTER FARSI YEH, isolated form
-]
-
-ft_bidi_joiners_initial_medial = [
-chr(0x8B), # ARABIC TATWEEL
-chr(0x8E), # ARABIC LETTER YEH WITH HAMZA ABOVE, initial-medial form
-chr(0x93), # ARABIC LETTER BEH, initial-medial form
-chr(0x95), # ARABIC LETTER PEH, initial-medial form
-chr(0x97), # ARABIC LETTER TEH, initial-medial form
-chr(0x99), # ARABIC LETTER THEH, initial-medial form
-chr(0x9B), # ARABIC LETTER JEEM, initial-medial form
-chr(0x9D), # ARABIC LETTER TCHEH, initial-medial form
-chr(0x9F), # ARABIC LETTER HAH, initial-medial form
-chr(0xA1), # ARABIC LETTER KHAH, initial-medial form
-chr(0xA8), # ARABIC LETTER SEEN, initial-medial form
-chr(0xAA), # ARABIC LETTER SHEEN, initial-medial form
-chr(0xAC), # ARABIC LETTER SAD, initial-medial form
-chr(0xAE), # ARABIC LETTER DAD, initial-medial form
-chr(0xAF), # ARABIC LETTER TAH, initial-medial form
-chr(0xE0), # ARABIC LETTER ZAH, initial-medial form
-chr(0xEA), # ARABIC LETTER FEH, initial-medial form
-chr(0xEC), # ARABIC LETTER QAF, initial-medial form
-chr(0xEE), # ARABIC LETTER KEHEH, initial-medial form
-chr(0xF0), # ARABIC LETTER GAF, initial-medial form
-chr(0xF3), # ARABIC LETTER LAM, initial-medial form
-chr(0xF5), # ARABIC LETTER MEEM, initial-medial form
-chr(0xF7), # ARABIC LETTER NOON, initial-medial form
-chr(0xFE) # ARABIC LETTER FARSI YEH, initial-medial form
-]
-
-ft_bidi_joiners_final_isolated = [
-chr(0x92), # ARABIC LETTER BEH, final-isolated form
-chr(0x94), # ARABIC LETTER PEH, final-isolated form
-chr(0x96), # ARABIC LETTER TEH, final-isolated form
-chr(0x98), # ARABIC LETTER THEH, final-isolated form
-chr(0x9A), # ARABIC LETTER JEEM, final-isolated form
-chr(0x9C), # ARABIC LETTER TCHEH, final-isolated form
-chr(0x9E), # ARABIC LETTER HAH, final-isolated form
-chr(0xA0), # ARABIC LETTER KHAH, final-isolated form
-chr(0xA7), # ARABIC LETTER SEEN, final-isolated form
-chr(0xA9), # ARABIC LETTER SHEEN, final-isolated form
-chr(0xAB), # ARABIC LETTER SAD, final-isolated form
-chr(0xAD), # ARABIC LETTER DAD, final-isolated form
-chr(0xC1), # ARABIC LETTER TAH, final-isolated form
-chr(0xC2), # ARABIC LETTER ZAH, final-isolated form
-chr(0xE9), # ARABIC LETTER FEH, final-isolated form
-chr(0xEB), # ARABIC LETTER QAF, final-isolated form
-chr(0xED), # ARABIC LETTER KEHEH, final-isolated form
-chr(0xEF), # ARABIC LETTER GAF, final-isolated form
-chr(0xF1), # ARABIC LETTER LAM, final-isolated form
-chr(0xF4), # ARABIC LETTER MEEM, final-isolated form
-chr(0xF6), # ARABIC LETTER NOON, final-isolated form
-chr(0xF9) # ARABIC LETTER HEH, final-isolated form
-]
-
-ft_right_joiners_final = [
-chr(0x91) # ARABIC LETTER ALEF, final form
-]
-
-ft_right_joiners_isolated = [
-chr(0x8D), # ARABIC LETTER ALEF WITH MADDA ABOVE, isolated form
-chr(0x90) # ARABIC LETTER ALEF, isolated form
-]
-
-ft_right_joiners_final_isolated = [
-chr(0xA2), # ARABIC LETTER DAL
-chr(0xA3), # ARABIC LETTER THAL
-chr(0xA4), # ARABIC LETTER REH
-chr(0xA5), # ARABIC LETTER ZAIN
-chr(0xA6), # ARABIC LETTER JEH
-chr(0xBF), # ARABIC LETTER TEH MARBUTAH
-chr(0xF2), # ARABIC LIGATURE LAM WITH ALEF
-chr(0xF8) # ARABIC LETTER WAW
-]
-
-
-table_FT_UN = {
-chr(0x80) : [u'\u06F0'], # EXTENDED ARABIC-INDIC DIGIT ZERO
-chr(0x81) : [u'\u06F1'], # EXTENDED ARABIC-INDIC DIGIT ONE
-chr(0x82) : [u'\u06F2'], # EXTENDED ARABIC-INDIC DIGIT TWO
-chr(0x83) : [u'\u06F3'], # EXTENDED ARABIC-INDIC DIGIT THREE
-chr(0x84) : [u'\u06F4'], # EXTENDED ARABIC-INDIC DIGIT FOUR
-chr(0x85) : [u'\u06F5'], # EXTENDED ARABIC-INDIC DIGIT FIVE
-chr(0x86) : [u'\u06F6'], # EXTENDED ARABIC-INDIC DIGIT SIX
-chr(0x87) : [u'\u06F7'], # EXTENDED ARABIC-INDIC DIGIT SEVEN
-chr(0x88) : [u'\u06F8'], # EXTENDED ARABIC-INDIC DIGIT EIGHT
-chr(0x89) : [u'\u06F9'], # EXTENDED ARABIC-INDIC DIGIT NINE
-chr(0x8A) : [u'\u060C'], # ARABIC COMMA
-chr(0x8B) : [u'\u0640'], # ARABIC TATWEEL
-chr(0x8C) : [u'\u061F'], # ARABIC QUESTION MARK
-chr(0x8D) : [u'\u0622'], # ARABIC LETTER ALEF WITH MADDA ABOVE, isolated form
-chr(0x8E) : [u'\u0626'], # ARABIC LETTER YEH WITH HAMZA ABOVE, initial-medial form
-chr(0x8F) : [u'\u0621'], # ARABIC LETTER HAMZA
-chr(0x90) : [u'\u0627'], # ARABIC LETTER ALEF, isolated form
-chr(0x91) : [u'\u0627'], # ARABIC LETTER ALEF, final form
-chr(0x92) : [u'\u0628'], # ARABIC LETTER BEH, final-isolated form
-chr(0x93) : [u'\u0628'], # ARABIC LETTER BEH, initial-medial form
-chr(0x94) : [u'\u067E'], # ARABIC LETTER PEH, final-isolated form
-chr(0x95) : [u'\u067E'], # ARABIC LETTER PEH, initial-medial form
-chr(0x96) : [u'\u062A'], # ARABIC LETTER TEH, final-isolated form
-chr(0x97) : [u'\u062A'], # ARABIC LETTER TEH, initial-medial form
-chr(0x98) : [u'\u062B'], # ARABIC LETTER THEH, final-isolated form
-chr(0x99) : [u'\u062B'], # ARABIC LETTER THEH, initial-medial form
-chr(0x9A) : [u'\u062C'], # ARABIC LETTER JEEM, final-isolated form
-chr(0x9B) : [u'\u062C'], # ARABIC LETTER JEEM, initial-medial form
-chr(0x9C) : [u'\u0686'], # ARABIC LETTER TCHEH, final-isolated form
-chr(0x9D) : [u'\u0686'], # ARABIC LETTER TCHEH, initial-medial form
-chr(0x9E) : [u'\u062D'], # ARABIC LETTER HAH, final-isolated form
-chr(0x9F) : [u'\u062D'], # ARABIC LETTER HAH, initial-medial form
-chr(0xA0) : [u'\u062E'], # ARABIC LETTER KHAH, final-isolated form
-chr(0xA1) : [u'\u062E'], # ARABIC LETTER KHAH, initial-medial form
-chr(0xA2) : [u'\u062F'], # ARABIC LETTER DAL
-chr(0xA3) : [u'\u0630'], # ARABIC LETTER THAL
-chr(0xA4) : [u'\u0631'], # ARABIC LETTER REH
-chr(0xA5) : [u'\u0632'], # ARABIC LETTER ZAIN
-chr(0xA6) : [u'\u0698'], # ARABIC LETTER JEH
-chr(0xA7) : [u'\u0633'], # ARABIC LETTER SEEN, final-isolated form
-chr(0xA8) : [u'\u0633'], # ARABIC LETTER SEEN, initial-medial form
-chr(0xA9) : [u'\u0634'], # ARABIC LETTER SHEEN, final-isolated form
-chr(0xAA) : [u'\u0634'], # ARABIC LETTER SHEEN, initial-medial form
-chr(0xAB) : [u'\u0635'], # ARABIC LETTER SAD, final-isolated form
-chr(0xAC) : [u'\u0635'], # ARABIC LETTER SAD, initial-medial form
-chr(0xAD) : [u'\u0636'], # ARABIC LETTER DAD, final-isolated form
-chr(0xAE) : [u'\u0636'], # ARABIC LETTER DAD, initial-medial form
-chr(0xAF) : [u'\u0637'], # ARABIC LETTER TAH, initial-medial form
-chr(0xB0) : [u'\u064E'], # ARABIC FATHA
-chr(0xB1) : [u'\u0650'], # ARABIC KASRA
-chr(0xB2) : [u'\u064F'], # ARABIC DAMMA
-chr(0xB3) : [u'\u064B'], # ARABIC FATHATAN
-chr(0xB4) : [u'\u0651'], # ARABIC SHADDA
-chr(0xB5) : [u'\u0023'], # * #
-chr(0xB6) : [u'\u0024'], # * $
-chr(0xB7) : [u'\u0025'], # * %
-chr(0xB8) : [u'\u0026'], # * &
-chr(0xB9) : [u'\u066C'], # Arabic Thoushads Seperator
-chr(0xBA) : [u'\u0670'], # ARABIC LETTER SUPERSCRIPT ALEF
-chr(0xBB) : [u'\u0654'], # ARABIC HAMZA ABOVE
-chr(0xBC) : [u'\u066B'], # ARABIC DECIMAL SEPARATOR
-chr(0xBD) : [u'\u0029'], # * RIGHT PARENTHESIS
-chr(0xBE) : [u'\u0028'], # * LEFT PARENTHESIS
-chr(0xBF) : [u'\u0629'], # ARABIC LETTER TEH MARBUTAH
-chr(0xC0) : [u'\u00BB'], # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-chr(0xC1) : [u'\u0637'], # ARABIC LETTER TAH, final-isolated form
-chr(0xC2) : [u'\u0638'], # ARABIC LETTER ZAH, final-isolated form
-chr(0xC3) : [u'\u00AB'], # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-chr(0xC4) : [u'\u0652'], # ARABIC SUKUN
-chr(0xC5) : [u'\u002D'], # * -
-chr(0xC6) : [u'\u002E'], # * FULL STOP
-chr(0xC7) : [u'\u002F'], # * /
-chr(0xC8) : [u'\u002A'], # * *
-chr(0xC9) : [u'\u007E'], # * ~
-chr(0xCA) : [u'\u003A'], # * COLON
-chr(0xCB) : [u'\u061B'], # ARABIC SEMICOLON
-chr(0xCC) : [u'\u003E'], # * GREATER-THAN SIGN
-chr(0xCD) : [u'\u002B'], # * +
-chr(0xCE) : [u'\u003D'], # * =
-chr(0xCF) : [u'\u003C'], # * LESS-THAN SIGN
-chr(0xD0) : [u'\u0040'], # * @
-chr(0xD1) : [u'\u005D'], # * [
-chr(0xD2) : [u'\u005C'], # * \
-chr(0xD3) : [u'\u005B'], # * ]
-chr(0xD4) : [u'\u005E'], # * ^
-chr(0xD5) : [u'\u005F'], # * _
-chr(0xD6) : [u'\u0060'], # * `
-chr(0xD7) : [u'\u007D'], # * {
-chr(0xD8) : [u'\u007C'], # * |
-chr(0xDA) : [u'\u0020'], # * SPACE
-chr(0xDD) : [u'\u0021'], # * EXCLAMATION MARK
-chr(0xDE) : [u'\u007B'], # * }
-chr(0xE0) : [u'\u0638'], # ARABIC LETTER ZAH, initial-medial form
-chr(0xE1) : [u'\u0639'], # ARABIC LETTER AIN, isolated form
-chr(0xE2) : [u'\u0639'], # ARABIC LETTER AIN, final form
-chr(0xE3) : [u'\u0639'], # ARABIC LETTER AIN, medial form
-chr(0xE4) : [u'\u0639'], # ARABIC LETTER AIN, initial form
-chr(0xE5) : [u'\u063A'], # ARABIC LETTER GHAIN, isolated form
-chr(0xE6) : [u'\u063A'], # ARABIC LETTER GHAIN, final form
-chr(0xE7) : [u'\u063A'], # ARABIC LETTER GHAIN, medial form
-chr(0xE8) : [u'\u063A'], # ARABIC LETTER GHAIN, initial form
-chr(0xE9) : [u'\u0641'], # ARABIC LETTER FEH, final-isolated form
-chr(0xEA) : [u'\u0641'], # ARABIC LETTER FEH, initial-medial form
-chr(0xEB) : [u'\u0642'], # ARABIC LETTER QAF, final-isolated form
-chr(0xEC) : [u'\u0642'], # ARABIC LETTER QAF, initial-medial form
-chr(0xED) : [u'\u06A9'], # ARABIC LETTER KEHEH, final-isolated form
-chr(0xEE) : [u'\u06A9'], # ARABIC LETTER KEHEH, initial-medial form
-chr(0xEF) : [u'\u06AF'], # ARABIC LETTER GAF, final-isolated form
-chr(0xF0) : [u'\u06AF'], # ARABIC LETTER GAF, initial-medial form
-chr(0xF1) : [u'\u0644'], # ARABIC LETTER LAM, final-isolated form
-chr(0xF2) : [u'\u0644\u0627'], # ARABIC LIGATURE LAM WITH ALEF
-chr(0xF3) : [u'\u0644'], # ARABIC LETTER LAM, initial-medial form
-chr(0xF4) : [u'\u0645'], # ARABIC LETTER MEEM, final-isolated form
-chr(0xF5) : [u'\u0645'], # ARABIC LETTER MEEM, initial-medial form
-chr(0xF6) : [u'\u0646'], # ARABIC LETTER NOON, final-isolated form
-chr(0xF7) : [u'\u0646'], # ARABIC LETTER NOON, initial-medial form
-chr(0xF8) : [u'\u0648'], # ARABIC LETTER WAW
-chr(0xF9) : [u'\u0647'], # ARABIC LETTER HEH, final-isolated form
-chr(0xFA) : [u'\u0647'], # ARABIC LETTER HEH, medial form
-chr(0xFB) : [u'\u0647'], # ARABIC LETTER HEH, initial form
-chr(0xFC) : [u'\u06CC'], # ARABIC LETTER FARSI YEH, final form
-chr(0xFD) : [u'\u06CC'], # ARABIC LETTER FARSI YEH, isolated form
-chr(0xFE) : [u'\u06CC'] # ARABIC LETTER FARSI YEH, initial-medial form
-}
-
-
-def ft_is_numeric(ch):
- if ((ch in ft_numerical) or
- ((ch >= chr(0x80)) and (ch <= chr(0x89))) ):
- return 1
- return 0
-
-def ft_can_join_left(ch):
- if ((ch in ft_bidi_joiners_initial) or
- (ch in ft_bidi_joiners_medial) or
- (ch in ft_bidi_joiners_final) or
- (ch in ft_bidi_joiners_isolated) or
- (ch in ft_bidi_joiners_initial_medial) or
- (ch in ft_bidi_joiners_final_isolated)):
- return 1
- return 0
-
-def ft_can_join_right(ch):
- if (ft_can_join_left(ch) or
- (ch in ft_right_joiners_final) or
- (ch in ft_right_joiners_isolated) or
- (ch in ft_right_joiners_final_isolated)):
- return 1
- return 0
-
-def ft_joining_left(ch):
- if ((ch in ft_bidi_joiners_initial) or
- (ch in ft_bidi_joiners_medial) or
- (ch in ft_bidi_joiners_initial_medial)):
- return 1
- return 0
-
-
-def ft_joining_right(ch):
- if ((ch in ft_right_joiners_final) or
- (ch in ft_bidi_joiners_medial) or
- (ch in ft_bidi_joiners_final)):
- return 1
- return 0
-
-def ft_not_right_joined(ch):
- if ((ch in ft_bidi_joiners_initial) or
- (ch in ft_right_joiners_isolated) or
- (ch in ft_bidi_joiners_isolated)):
- return 1
- return 0
-
-def ft_adjust_shaping(text, i):
- current = text[i]
- u = u''
- try:
- u = table_FT_UN[current][0]
- except KeyError:
- return u''
-
- #if you don't want shaping remove the following comment
- #return u
-
- if ((current in ft_vowels) or (ft_is_numeric(current))):
- return u
-
- #find next non-vowel character on the left
- text_len = len(text)
- next_index = i+1
- while ((next_index < text_len) and (text[next_index] in ft_vowels)):
- next_index += 1
-
- if (next_index == text_len):
- next = ''
- else:
- next = text[next_index]
-
- # if current letter is joining from left but next letter is or can not joining
- if (ft_joining_left(current)):
- if (not ft_can_join_right(next)):
- u += u'\u200D' #ZWJ
- elif (ft_not_right_joined(next)):
- u += u'\u200D\u200C' #ZWJ+ZWNJ
- # if current letter can join but next letter is joining from right
- elif (ft_can_join_left(current)):
- if (ft_joining_right(next)):
- u += u'\u200C\u200D' #ZWNJ+ZWJ
- elif (ft_can_join_right(next)):
- u += u'\u200C' #ZWNJ
- return u
-
-def ft_adjust_number(text):
- result = u''
- i = len(text)-1
- while (i >= 0):
- result += ft_adjust_shaping(text, i)
- i -= 1
- return result
-
-
-def map_ft_unicode(text):
- mapped_text = u''
-
- i = 0
- while (i < len(text)):
- if (ft_is_numeric(text[i])):
- next_index = i
- while ((next_index+1 < len(text)) and
- (ft_is_numeric(text[next_index+1]))):
- next_index += 1
- mapped_text += ft_adjust_number(text[i:next_index+1])
- i = next_index+1
- continue
-
- mapped_text += ft_adjust_shaping(text, i)
- i += 1
- return mapped_text
-
-def ft_next_part(line, i):
- j = i
- language_flag = (line[j]<chr(0x80))
- while ((j<line_len) and ((line[j]<chr(0x80)) == language_flag) ):
- j += 1
- return j
-
-# Main body of the program
-if len(sys.argv) <= 2:
- print 'usage: python undk in_filename out_filename'
- exit(0)
-
-filename = sys.argv[1]
-outfile = sys.argv[2]
-
-try:
- f = open(filename, 'r')
-except IOError:
- print "Can not open the input file: " + filename
- exit(0)
-
-try:
- of = codecs.open(outfile, encoding='utf-8', mode='w')
-except IOError:
- print "Can not open the output file: " + outfile
- exit(0)
-
-line_number = 0
-for line in f:
- line_number += 1
- output_line = u''
- line_len = len(line)
-
- line_direction_rtl = 1
- if line[0] == '>':
- line_direction_rtl = 0
- elif line[0] != '<':
- print "FORMAT ERROR AT LINE: " + str(line_number)
- exit(0)
-
- i = 1
-
- while (i<line_len):
- next_part_index = ft_next_part(line, i)
- next_part = line[i:next_part_index]
- next_part_latin = (line[i]<chr(0x80))
-
- if next_part_latin:
- output_line += next_part.encode( 'utf-8' )
- else:
- output_line += map_ft_unicode(next_part)
- i = next_part_index
- # end of while
-
- # write the processed line
- of.write(output_line)
- # end of line processing
-# end of file processing
-
-of.close()
-f.close()
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/ftxe-0.11.py b/Master/texmf-dist/doc/xelatex/xepersian/ftxe-0.11.py
new file mode 100644
index 00000000000..eb01b1de984
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/ftxe-0.11.py
@@ -0,0 +1,1045 @@
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses>
+
+##################################################
+# Author: Mostafa Vahedi #
+# Date: 06 July 2009 #
+# Version: 0-11 #
+# Application: FarsiTeX to XePersian converter #
+##################################################
+
+import codecs
+
+import sys
+import os
+
+ft_numerical = [
+chr(0xB9), # Arabic Thoushads Seperator
+chr(0xBC) # ARABIC DECIMAL SEPARATOR
+]
+
+
+ft_vowels = [
+chr(0xB0), # ARABIC FATHA
+chr(0xB1), # ARABIC KASRA
+chr(0xB2), # ARABIC DAMMA
+chr(0xB3), # ARABIC FATHATAN
+chr(0xB4), # ARABIC SHADDA
+chr(0xBA), # ARABIC LETTER SUPERSCRIPT ALEF
+chr(0xBB), # ARABIC HAMZA ABOVE
+chr(0xC4) # ARABIC SUKUN
+]
+
+ft_non_joiners = [
+chr(0x8F) # ARABIC LETTER HAMZA
+]
+
+ft_bidi_joiners_initial = [
+chr(0xE4), # ARABIC LETTER AIN, initial form
+chr(0xE8), # ARABIC LETTER GHAIN, initial form
+chr(0xFB) # ARABIC LETTER HEH, initial form
+]
+
+ft_bidi_joiners_medial = [
+chr(0xE3), # ARABIC LETTER AIN, medial form
+chr(0xE7), # ARABIC LETTER GHAIN, medial form
+chr(0xFA) # ARABIC LETTER HEH, medial form
+]
+
+ft_bidi_joiners_final = [
+chr(0xE2), # ARABIC LETTER AIN, final form
+chr(0xE6), # ARABIC LETTER GHAIN, final form
+chr(0xFC) # ARABIC LETTER FARSI YEH, final form
+]
+
+ft_bidi_joiners_isolated = [
+chr(0xE1), # ARABIC LETTER AIN, isolated form
+chr(0xE5), # ARABIC LETTER GHAIN, isolated form
+chr(0xFD) # ARABIC LETTER FARSI YEH, isolated form
+]
+
+ft_bidi_joiners_initial_medial = [
+chr(0x8B), # ARABIC TATWEEL
+chr(0x8E), # ARABIC LETTER YEH WITH HAMZA ABOVE, initial-medial form
+chr(0x93), # ARABIC LETTER BEH, initial-medial form
+chr(0x95), # ARABIC LETTER PEH, initial-medial form
+chr(0x97), # ARABIC LETTER TEH, initial-medial form
+chr(0x99), # ARABIC LETTER THEH, initial-medial form
+chr(0x9B), # ARABIC LETTER JEEM, initial-medial form
+chr(0x9D), # ARABIC LETTER TCHEH, initial-medial form
+chr(0x9F), # ARABIC LETTER HAH, initial-medial form
+chr(0xA1), # ARABIC LETTER KHAH, initial-medial form
+chr(0xA8), # ARABIC LETTER SEEN, initial-medial form
+chr(0xAA), # ARABIC LETTER SHEEN, initial-medial form
+chr(0xAC), # ARABIC LETTER SAD, initial-medial form
+chr(0xAE), # ARABIC LETTER DAD, initial-medial form
+chr(0xAF), # ARABIC LETTER TAH, initial-medial form
+chr(0xE0), # ARABIC LETTER ZAH, initial-medial form
+chr(0xEA), # ARABIC LETTER FEH, initial-medial form
+chr(0xEC), # ARABIC LETTER QAF, initial-medial form
+chr(0xEE), # ARABIC LETTER KEHEH, initial-medial form
+chr(0xF0), # ARABIC LETTER GAF, initial-medial form
+chr(0xF3), # ARABIC LETTER LAM, initial-medial form
+chr(0xF5), # ARABIC LETTER MEEM, initial-medial form
+chr(0xF7), # ARABIC LETTER NOON, initial-medial form
+chr(0xFE) # ARABIC LETTER FARSI YEH, initial-medial form
+]
+
+ft_bidi_joiners_final_isolated = [
+chr(0x92), # ARABIC LETTER BEH, final-isolated form
+chr(0x94), # ARABIC LETTER PEH, final-isolated form
+chr(0x96), # ARABIC LETTER TEH, final-isolated form
+chr(0x98), # ARABIC LETTER THEH, final-isolated form
+chr(0x9A), # ARABIC LETTER JEEM, final-isolated form
+chr(0x9C), # ARABIC LETTER TCHEH, final-isolated form
+chr(0x9E), # ARABIC LETTER HAH, final-isolated form
+chr(0xA0), # ARABIC LETTER KHAH, final-isolated form
+chr(0xA7), # ARABIC LETTER SEEN, final-isolated form
+chr(0xA9), # ARABIC LETTER SHEEN, final-isolated form
+chr(0xAB), # ARABIC LETTER SAD, final-isolated form
+chr(0xAD), # ARABIC LETTER DAD, final-isolated form
+chr(0xC1), # ARABIC LETTER TAH, final-isolated form
+chr(0xC2), # ARABIC LETTER ZAH, final-isolated form
+chr(0xE9), # ARABIC LETTER FEH, final-isolated form
+chr(0xEB), # ARABIC LETTER QAF, final-isolated form
+chr(0xED), # ARABIC LETTER KEHEH, final-isolated form
+chr(0xEF), # ARABIC LETTER GAF, final-isolated form
+chr(0xF1), # ARABIC LETTER LAM, final-isolated form
+chr(0xF4), # ARABIC LETTER MEEM, final-isolated form
+chr(0xF6), # ARABIC LETTER NOON, final-isolated form
+chr(0xF9) # ARABIC LETTER HEH, final-isolated form
+]
+
+ft_right_joiners_final = [
+chr(0x91) # ARABIC LETTER ALEF, final form
+]
+
+ft_right_joiners_isolated = [
+chr(0x8D), # ARABIC LETTER ALEF WITH MADDA ABOVE, isolated form
+chr(0x90) # ARABIC LETTER ALEF, isolated form
+]
+
+ft_right_joiners_final_isolated = [
+chr(0xA2), # ARABIC LETTER DAL
+chr(0xA3), # ARABIC LETTER THAL
+chr(0xA4), # ARABIC LETTER REH
+chr(0xA5), # ARABIC LETTER ZAIN
+chr(0xA6), # ARABIC LETTER JEH
+chr(0xBF), # ARABIC LETTER TEH MARBUTAH
+chr(0xF2), # ARABIC LIGATURE LAM WITH ALEF
+chr(0xF8) # ARABIC LETTER WAW
+]
+
+
+table_FT_UN = {
+chr(0x80) : [u'\u06F0'], # EXTENDED ARABIC-INDIC DIGIT ZERO
+chr(0x81) : [u'\u06F1'], # EXTENDED ARABIC-INDIC DIGIT ONE
+chr(0x82) : [u'\u06F2'], # EXTENDED ARABIC-INDIC DIGIT TWO
+chr(0x83) : [u'\u06F3'], # EXTENDED ARABIC-INDIC DIGIT THREE
+chr(0x84) : [u'\u06F4'], # EXTENDED ARABIC-INDIC DIGIT FOUR
+chr(0x85) : [u'\u06F5'], # EXTENDED ARABIC-INDIC DIGIT FIVE
+chr(0x86) : [u'\u06F6'], # EXTENDED ARABIC-INDIC DIGIT SIX
+chr(0x87) : [u'\u06F7'], # EXTENDED ARABIC-INDIC DIGIT SEVEN
+chr(0x88) : [u'\u06F8'], # EXTENDED ARABIC-INDIC DIGIT EIGHT
+chr(0x89) : [u'\u06F9'], # EXTENDED ARABIC-INDIC DIGIT NINE
+chr(0x8A) : [u'\u060C'], # ARABIC COMMA
+chr(0x8B) : [u'\u0640'], # ARABIC TATWEEL
+chr(0x8C) : [u'\u061F'], # ARABIC QUESTION MARK
+chr(0x8D) : [u'\u0622'], # ARABIC LETTER ALEF WITH MADDA ABOVE, isolated form
+chr(0x8E) : [u'\u0626'], # ARABIC LETTER YEH WITH HAMZA ABOVE, initial-medial form
+chr(0x8F) : [u'\u0621'], # ARABIC LETTER HAMZA
+chr(0x90) : [u'\u0627'], # ARABIC LETTER ALEF, isolated form
+chr(0x91) : [u'\u0627'], # ARABIC LETTER ALEF, final form
+chr(0x92) : [u'\u0628'], # ARABIC LETTER BEH, final-isolated form
+chr(0x93) : [u'\u0628'], # ARABIC LETTER BEH, initial-medial form
+chr(0x94) : [u'\u067E'], # ARABIC LETTER PEH, final-isolated form
+chr(0x95) : [u'\u067E'], # ARABIC LETTER PEH, initial-medial form
+chr(0x96) : [u'\u062A'], # ARABIC LETTER TEH, final-isolated form
+chr(0x97) : [u'\u062A'], # ARABIC LETTER TEH, initial-medial form
+chr(0x98) : [u'\u062B'], # ARABIC LETTER THEH, final-isolated form
+chr(0x99) : [u'\u062B'], # ARABIC LETTER THEH, initial-medial form
+chr(0x9A) : [u'\u062C'], # ARABIC LETTER JEEM, final-isolated form
+chr(0x9B) : [u'\u062C'], # ARABIC LETTER JEEM, initial-medial form
+chr(0x9C) : [u'\u0686'], # ARABIC LETTER TCHEH, final-isolated form
+chr(0x9D) : [u'\u0686'], # ARABIC LETTER TCHEH, initial-medial form
+chr(0x9E) : [u'\u062D'], # ARABIC LETTER HAH, final-isolated form
+chr(0x9F) : [u'\u062D'], # ARABIC LETTER HAH, initial-medial form
+chr(0xA0) : [u'\u062E'], # ARABIC LETTER KHAH, final-isolated form
+chr(0xA1) : [u'\u062E'], # ARABIC LETTER KHAH, initial-medial form
+chr(0xA2) : [u'\u062F'], # ARABIC LETTER DAL
+chr(0xA3) : [u'\u0630'], # ARABIC LETTER THAL
+chr(0xA4) : [u'\u0631'], # ARABIC LETTER REH
+chr(0xA5) : [u'\u0632'], # ARABIC LETTER ZAIN
+chr(0xA6) : [u'\u0698'], # ARABIC LETTER JEH
+chr(0xA7) : [u'\u0633'], # ARABIC LETTER SEEN, final-isolated form
+chr(0xA8) : [u'\u0633'], # ARABIC LETTER SEEN, initial-medial form
+chr(0xA9) : [u'\u0634'], # ARABIC LETTER SHEEN, final-isolated form
+chr(0xAA) : [u'\u0634'], # ARABIC LETTER SHEEN, initial-medial form
+chr(0xAB) : [u'\u0635'], # ARABIC LETTER SAD, final-isolated form
+chr(0xAC) : [u'\u0635'], # ARABIC LETTER SAD, initial-medial form
+chr(0xAD) : [u'\u0636'], # ARABIC LETTER DAD, final-isolated form
+chr(0xAE) : [u'\u0636'], # ARABIC LETTER DAD, initial-medial form
+chr(0xAF) : [u'\u0637'], # ARABIC LETTER TAH, initial-medial form
+chr(0xB0) : [u'\u064E'], # ARABIC FATHA
+chr(0xB1) : [u'\u0650'], # ARABIC KASRA
+chr(0xB2) : [u'\u064F'], # ARABIC DAMMA
+chr(0xB3) : [u'\u064B'], # ARABIC FATHATAN
+chr(0xB4) : [u'\u0651'], # ARABIC SHADDA
+chr(0xB5) : [u'\u0023'], # * #
+chr(0xB6) : [u'\u0024'], # * $
+chr(0xB7) : [u'\u0025'], # * %
+chr(0xB8) : [u'\u0026'], # * &
+chr(0xB9) : [u'\u066C'], # Arabic Thoushads Seperator
+chr(0xBA) : [u'\u0670'], # ARABIC LETTER SUPERSCRIPT ALEF
+chr(0xBB) : [u'\u0654'], # ARABIC HAMZA ABOVE
+chr(0xBC) : [u'\u066B'], # ARABIC DECIMAL SEPARATOR
+chr(0xBD) : [u'\u0029'], # * RIGHT PARENTHESIS
+chr(0xBE) : [u'\u0028'], # * LEFT PARENTHESIS
+chr(0xBF) : [u'\u0629'], # ARABIC LETTER TEH MARBUTAH
+chr(0xC0) : [u'\u00BB'], # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+chr(0xC1) : [u'\u0637'], # ARABIC LETTER TAH, final-isolated form
+chr(0xC2) : [u'\u0638'], # ARABIC LETTER ZAH, final-isolated form
+chr(0xC3) : [u'\u00AB'], # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+chr(0xC4) : [u'\u0652'], # ARABIC SUKUN
+chr(0xC5) : [u'\u002D'], # * -
+chr(0xC6) : [u'\u002E'], # * FULL STOP
+chr(0xC7) : [u'\u002F'], # * /
+chr(0xC8) : [u'\u002A'], # * *
+chr(0xC9) : [u'\u007E'], # * ~
+chr(0xCA) : [u'\u003A'], # * COLON
+chr(0xCB) : [u'\u061B'], # ARABIC SEMICOLON
+chr(0xCC) : [u'\u003E'], # * GREATER-THAN SIGN
+chr(0xCD) : [u'\u002B'], # * +
+chr(0xCE) : [u'\u003D'], # * =
+chr(0xCF) : [u'\u003C'], # * LESS-THAN SIGN
+# chr(0xD0) : [u'\u0040'], # * @
+chr(0xD0) : [u''], # * @
+chr(0xD1) : [u'\u005D'], # * [
+chr(0xD2) : [u'\u005C'], # * \
+chr(0xD3) : [u'\u005B'], # * ]
+chr(0xD4) : [u'\u005E'], # * ^
+chr(0xD5) : [u'\u005F'], # * _
+chr(0xD6) : [u'\u0060'], # * `
+chr(0xD7) : [u'\u007D'], # * {
+chr(0xD8) : [u'\u007C'], # * |
+chr(0xDA) : [u'\u0020'], # * SPACE
+chr(0xDD) : [u'\u0021'], # * EXCLAMATION MARK
+chr(0xDE) : [u'\u007B'], # * }
+chr(0xE0) : [u'\u0638'], # ARABIC LETTER ZAH, initial-medial form
+chr(0xE1) : [u'\u0639'], # ARABIC LETTER AIN, isolated form
+chr(0xE2) : [u'\u0639'], # ARABIC LETTER AIN, final form
+chr(0xE3) : [u'\u0639'], # ARABIC LETTER AIN, medial form
+chr(0xE4) : [u'\u0639'], # ARABIC LETTER AIN, initial form
+chr(0xE5) : [u'\u063A'], # ARABIC LETTER GHAIN, isolated form
+chr(0xE6) : [u'\u063A'], # ARABIC LETTER GHAIN, final form
+chr(0xE7) : [u'\u063A'], # ARABIC LETTER GHAIN, medial form
+chr(0xE8) : [u'\u063A'], # ARABIC LETTER GHAIN, initial form
+chr(0xE9) : [u'\u0641'], # ARABIC LETTER FEH, final-isolated form
+chr(0xEA) : [u'\u0641'], # ARABIC LETTER FEH, initial-medial form
+chr(0xEB) : [u'\u0642'], # ARABIC LETTER QAF, final-isolated form
+chr(0xEC) : [u'\u0642'], # ARABIC LETTER QAF, initial-medial form
+chr(0xED) : [u'\u06A9'], # ARABIC LETTER KEHEH, final-isolated form
+chr(0xEE) : [u'\u06A9'], # ARABIC LETTER KEHEH, initial-medial form
+chr(0xEF) : [u'\u06AF'], # ARABIC LETTER GAF, final-isolated form
+chr(0xF0) : [u'\u06AF'], # ARABIC LETTER GAF, initial-medial form
+chr(0xF1) : [u'\u0644'], # ARABIC LETTER LAM, final-isolated form
+chr(0xF2) : [u'\u0644\u0627'], # ARABIC LIGATURE LAM WITH ALEF
+chr(0xF3) : [u'\u0644'], # ARABIC LETTER LAM, initial-medial form
+chr(0xF4) : [u'\u0645'], # ARABIC LETTER MEEM, final-isolated form
+chr(0xF5) : [u'\u0645'], # ARABIC LETTER MEEM, initial-medial form
+chr(0xF6) : [u'\u0646'], # ARABIC LETTER NOON, final-isolated form
+chr(0xF7) : [u'\u0646'], # ARABIC LETTER NOON, initial-medial form
+chr(0xF8) : [u'\u0648'], # ARABIC LETTER WAW
+chr(0xF9) : [u'\u0647'], # ARABIC LETTER HEH, final-isolated form
+chr(0xFA) : [u'\u0647'], # ARABIC LETTER HEH, medial form
+chr(0xFB) : [u'\u0647'], # ARABIC LETTER HEH, initial form
+chr(0xFC) : [u'\u06CC'], # ARABIC LETTER FARSI YEH, final form
+chr(0xFD) : [u'\u06CC'], # ARABIC LETTER FARSI YEH, isolated form
+chr(0xFE) : [u'\u06CC'] # ARABIC LETTER FARSI YEH, initial-medial form
+}
+
+F_PERCENT_SIGN = chr(0xB7)
+F_AT_SIGN = chr(0xD0)
+F_SLASH = chr(0xD2)
+F_SPACE = chr(0xDA)
+F_PRNT_OPEN = chr(0xDE)
+F_PRNT_CLOSE = chr(0xD7)
+
+# latex and farsitex commands whose first parameter does not need \lr{...}
+commands = [
+"begin", "end",
+"input", "include", "includeonly",
+"hspace", "vspace", "hspace*", "vspace*",
+"label", "ref", "cite", "bibitem",
+"bibliographystyle",
+"parbox",
+"newenvironment", "newtheorem",
+"persianmathdigitsfamily",
+"fontfamily", "fontseries", "fontshape",
+"rmdefault", "sfdefault", "ttdefault",
+"bfdefault", "itdefault", "sldefault", "scdefault",
+"pagenumbering", "pagestyle", "thispagestyle",
+"setcounter", "stepcounter", "setlength", "addtolength"
+]
+
+def ft_is_all_persian_space(next_part):
+ l = len(next_part)
+ i = 0
+ while (i < l):
+ if (next_part[i] != F_SPACE):
+ return 0
+ i += 1
+ return 1
+
+def ft_is_numeric(ch):
+ if ((ch in ft_numerical) or
+ ((ch >= chr(0x80)) and (ch <= chr(0x89))) ):
+ return 1
+ return 0
+
+def ft_can_join_left(ch):
+ if ((ch in ft_bidi_joiners_initial) or
+ (ch in ft_bidi_joiners_medial) or
+ (ch in ft_bidi_joiners_final) or
+ (ch in ft_bidi_joiners_isolated) or
+ (ch in ft_bidi_joiners_initial_medial) or
+ (ch in ft_bidi_joiners_final_isolated)):
+ return 1
+ return 0
+
+def ft_can_join_right(ch):
+ if (ft_can_join_left(ch) or
+ (ch in ft_right_joiners_final) or
+ (ch in ft_right_joiners_isolated) or
+ (ch in ft_right_joiners_final_isolated)):
+ return 1
+ return 0
+
+def ft_joining_left(ch):
+ if ((ch in ft_bidi_joiners_initial) or
+ (ch in ft_bidi_joiners_medial) or
+ (ch in ft_bidi_joiners_initial_medial)):
+ return 1
+ return 0
+
+
+def ft_joining_right(ch):
+ if ((ch in ft_right_joiners_final) or
+ (ch in ft_bidi_joiners_medial) or
+ (ch in ft_bidi_joiners_final)):
+ return 1
+ return 0
+
+def ft_not_right_joined(ch):
+ if ((ch in ft_bidi_joiners_initial) or
+ (ch in ft_right_joiners_isolated) or
+ (ch in ft_bidi_joiners_isolated)):
+ return 1
+ return 0
+
+def ft_adjust_shaping(text, i):
+ current = text[i]
+ u = u''
+ try:
+ u = table_FT_UN[current][0]
+ except KeyError:
+ return u''
+
+ #if you don't want shaping remove the following comment
+ #return u
+
+ if ((current in ft_vowels) or (ft_is_numeric(current))):
+ return u
+
+ #find next non-vowel character on the left
+ text_len = len(text)
+ next_index = i+1
+ while ((next_index < text_len) and (text[next_index] in ft_vowels)):
+ next_index += 1
+
+ if (next_index == text_len):
+ next = ''
+ else:
+ next = text[next_index]
+
+ # if current letter is joining from left but next letter is or can not joining
+ if (ft_joining_left(current)):
+ if (not ft_can_join_right(next)):
+ u += u'\u200D' #ZWJ
+ elif (ft_not_right_joined(next)):
+ u += u'\u200D\u200C' #ZWJ+ZWNJ
+ # if current letter can join but next letter is joining from right
+ elif (ft_can_join_left(current)):
+ if (ft_joining_right(next)):
+ u += u'\u200C\u200D' #ZWNJ+ZWJ
+ elif (ft_can_join_right(next)):
+ u += u'\u200C' #ZWNJ
+ return u
+
+def ft_adjust_number(text):
+ result = u''
+ i = len(text)-1
+ while (i >= 0):
+ result += ft_adjust_shaping(text, i)
+ i -= 1
+ return result
+
+
+def map_ft_unicode(text):
+ mapped_text = u''
+
+ i = 0
+ while (i < len(text)):
+ if (ft_is_numeric(text[i])):
+ next_index = i
+ while ((next_index+1 < len(text)) and
+ (ft_is_numeric(text[next_index+1]))):
+ next_index += 1
+ mapped_text += ft_adjust_number(text[i:next_index+1])
+ i = next_index+1
+ continue
+
+ mapped_text += ft_adjust_shaping(text, i)
+ i += 1
+ return mapped_text
+
+# Finds next token all of the same language
+def ft_next_part(line, i, line_len):
+ global global_state
+ global recursive
+ global filenames
+
+ j = i
+ language_flag = (line[j]<chr(0x80))
+ while ((j<line_len) and ((line[j]<chr(0x80)) == language_flag) ):
+ if ( (global_state == 0) and ( (line[j] == '%') or (line[j] == F_PERCENT_SIGN) ) and (line[j-1] != '\\') and (line[j-1] != F_SLASH) ):
+ global_state = 1
+ elif ((global_state == 0) and ((line[j:j+16] == '\\begin{verbatim}') or (line[j:j+17] == '\\begin{verbatim*}'))):
+ global_state = 2
+ elif ((global_state == 2) and ((line[j:j+14] == '\\end{verbatim}') or (line[j:j+15] == '\\end{verbatim*}'))):
+ global_state = 0
+ elif ((global_state == 0) and (line[j:j+6] == '\\verb*')):
+ next_index = line.find(line[j+6], j+7)
+ j = next_index
+ elif ((global_state == 0) and (line[j:j+5] == '\\verb')):
+ next_index = line.find(line[j+5], j+6)
+ j = next_index
+ elif (recursive == 1):
+ if ((global_state == 0) and (line[j:j+9] == '\\include{')):
+ next_index = line.find('}', j+9)
+ filename = line[j+10:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ elif ((global_state == 0) and (line[j:j+7] == '\\input{')):
+ next_index = line.find('}', j+7)
+ filename = line[j+8:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ elif ((global_state == 0) and (line[j:j+9] == F_SLASH + 'include' + F_PRNT_OPEN)):
+ next_index = line.find(F_PRNT_CLOSE, j+9)
+ if (line[j+9]!=F_AT_SIGN):
+ filename = line[j+9:next_index] + '.ftx'
+ else:
+ filename = line[j+10:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ elif ((global_state == 0) and (line[j:j+7] == F_SLASH + 'input' + F_PRNT_OPEN)):
+ next_index = line.find(F_PRNT_CLOSE, j+7)
+ if (line[j+7]!=F_AT_SIGN):
+ filename = line[j+7:next_index] + '.ftx'
+ else:
+ filename = line[j+8:next_index-1] + '.ftx'
+ if (os.path.exists(filename) and not filename in filenames):
+ filenames.append(filename)
+ j += 1
+ return j
+
+###############################################
+# from here all functions are used to translate
+# farsitex commands to xepersian commands
+###############################################
+
+def read_size(input,index,last_index):
+ dim_index = -1
+ inch_index = input.find(u'in', index)
+ if (inch_index != -1):
+ dim_index = inch_index
+ mm_index = input.find(u'mm', index)
+ if (mm_index != -1):
+ if (dim_index == -1 or mm_index < index):
+ dim_index = mm_index
+ cm_index = input.find(u'cm', index)
+ if (cm_index != -1):
+ if (dim_index == -1 or cm_index < dim_index):
+ dim_index = cm_index
+ pt_index = input.find(u'pt', index)
+ if (pt_index != -1):
+ if (dim_index == -1 or pt_index < dim_index):
+ dim_index = pt_index
+ next_cmd = input.find(u'\\', index)
+ if (next_cmd == -1 and dim_index == -1):
+ print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
+ return -1
+ elif (next_cmd == -1 or (dim_index != -1 and next_cmd > dim_index)):
+ epsfxsize = input[index:dim_index+2]
+ return dim_index+2
+ elif (next_cmd != -1):
+ end_cmd = next_cmd+1
+ while (end_cmd < last_index and input[end_cmd].isalpha()):
+ end_cmd += 1
+ return end_cmd
+ else:
+ print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
+ return -1
+
+
+latex_options=[u'a4paper', u'a5paper', u'b5paper',
+ u'letterpaper', u'legalpaper', u'executivepaper',
+ u'landscape', u'10pt', u'11pt', u'12pt',
+ u'oneside', u'twoside', u'draft',
+ u'final', u'titlepage', u'notitlepage',
+ u'onecolumn', u'twocolumn',
+ u'leqno', u'fleqn']
+
+table_eq_packages = {
+u'poem' : u'persianpoem',
+u'fmakeidx' : u'makeidx',
+u'ffancyhe' : u'fancyhdr',
+u'fmultico' : u'multicol'
+}
+
+farsitex_ignore_options = [u'persian', u'farsi', u'epsf', u'fgraphix', u'lotusfont']
+
+xepersian_packages = u'\n\\usepackage{url}\n%\\usepackage{fancyvrb}\n\\usepackage{setspace}\\doublespacing\n\\usepackage{graphicx} \n\\usepackage{amssymb}\n'
+
+xepersian_preamble = u'\\settextfont[Scale=1.2]{XB Zar}\n\\setlatintextfont[Scale=1.1]{Times New Roman}\n\\setdigitfont{XB Zar}\n\\setpookfont{XB Kayhan Pook}\n\\setsayehfont{XB Kayhan Sayeh}\n\\defpersianfont\\lotoos[Scale=1.2]{XB Roya}\n\\defpersianfont\elmi[Scale=1.2]{XB Roya} \n\\def\\nazok{\\normalfont\\normalsize}\n\\let\\iranic\\it\n\\let\\siah\\bf\n\\let\\khabide\\sl\n\\def\\siahir{\\siah\\iranic} \n\\def\\siahkh{\\siah\\khabide}\n\\let\\tookhali\\pookfamily\n\\let\\sayedar\\sayehfamily\n\\let\\farsi\\Persian\n\\let\\english\\Latin \n\\let\\farmbox\\mbox\n\\newcommand{\\ftxepmatrix}[1]{\\begin{pmatrix}#1\\end{pmatrix}}\n\\newcommand{\\ftxematrix}[1]{\\begin{matrix}#1\\end{matrix}} \n\\def\\FarsiTeX{\\lr{FarsiTeX}}\n\\def\\فارسی‌تک{\\rl{فارسی‌‌تک}}\n\\def\\InE{\\begingroup\\beginL\\latinfont}\n\\def\\EnE{\\endL\\endgroup} \n\\def\\InF{\\begingroup\\beginR\\persianfont}\n\\def\\EnF{\\endR\\endgroup}\n\\newcommand{\\IE}[1]{\\lr{#1}}\n\\newcommand{\\IP}[1]{\\rl{#1}} \n\\newcommand{\\IF}[1]{\\rl{#1}}\n\\def\\persiandash{\\rl{-}} \n\\def\\DeclareRobustBiCommand#1#2#3#4{\\DeclareRobustCommand#1{\\if@rl{}#4\\else{}#3\\fi}\\let#2=#1} \n\\catcode`\\﷼=3\n\\catcode`‌=11\n\\newcommand\\dotsectionseparator{\\SepMark{.}}\n\\newcommand\\dashsectionseparator{\\SepMark{-}}\n'
+
+thesis_preamble = u'\\university{\\lr{UniversityName}}\n\\city{\\lr{CityName}}\n\\latinuniversity{UniversityName}\n\\latincity{CityName} \n\\let\\englishtitle\\latintitle\n\\let\\englishauthor\\latinauthor\n\\let\\englishdegree\\latindegree\n\\let\\englishthesisdate\\latinthesisdate \n\\let\\englishsupervisor\\latinsupervisor\n\\let\\englishdepartment\\latindepartment\n\\let\\makeenglishtitle\\makelatintitle \n\\let\\englishkeywords\\latinkeywords\n\\newenvironment{englishabstract}{\\begin{latinabstract}}{\\end{latinabstract}}\n'
+
+def is_alpha_numeric_space(input):
+ input_len = len(input)
+ i = 0
+ while (i<input_len):
+ if (not (input[i].isalpha() or input[i].isdigit() or input[i]==u'.' or input[i]==u' ') ):
+ return 0
+ i+=1
+ return 1
+
+def is_alpha_numeric(input):
+ input_len = len(input)
+ i = 0
+ while (i<input_len):
+ if (not (input[i].isalpha() or input[i].isdigit() or input[i]=='.') ):
+ return 0
+ i+=1
+ return 1
+
+def find_eq_cmd(keyword):
+ try:
+ eq_cmd = table_eq_packages[keyword]
+ except KeyError:
+ eq_cmd = u''
+ return eq_cmd
+
+def convert_persian_to_english(num):
+ result = u''
+ num_len = len(num)
+ index = 0
+ while (index < num_len):
+ if (ord(num[index]) >= ord(u'۰') and ord(num[index]) <= ord(u'۹')):
+ result += unichr(ord(num[index]) - ord(u'۰') + ord(u'0'))
+ else:
+ result += num[index]
+ index += 1
+ return result
+
+def generate_farsitex_cmds_file(helper_filename,preamble):
+ try:
+ of = codecs.open(helper_filename, encoding='utf-8', mode='w')
+ except IOError:
+ print "Can not open the output file: " + helper_filename
+ exit(0)
+ of.write(preamble)
+ of.close
+
+
+# \verb|| -> \item[\verb||] or \section{\verb||}
+# \kasre{} \alef{} ...
+def translate_cmds(output_line):
+ global last_epsfxsize
+ global last_epsfxsize_line
+ global last_epsfysize
+ global last_epsfysize_line
+ global state
+ global filename
+
+ result = u''
+ line_len = len(output_line)
+ index = 0
+ if (state == 1): #\begin{verbatim}
+ end_verbatim = output_line.find('\\end{verbatim}')
+ if (end_verbatim == -1):
+ return output_line
+ result += output_line[0:end_verbatim+14]
+ index = end_verbatim+14
+ state = 0
+ elif (state == 2): #\begin{verbatim*}
+ end_verbatim = output_line.find('\\end{verbatim*}')
+ if (end_verbatim == -1):
+ return output_line
+ result += output_line[0:end_verbatim+15]
+ index = end_verbatim+15
+ state = 0
+ elif (output_line[0:14] == "\\documentstyle"):
+ result += u'\\documentclass'
+ #process options
+ last_index = output_line.find(u']')
+ index = 15
+ first_option = 1
+ preamble = xepersian_preamble
+ packages = xepersian_packages
+ xe_document_class = u''
+ while (index < last_index):
+ next_comma = output_line.find(u',',index,last_index)
+ if (next_comma == -1):
+ next_comma = last_index
+ first_of_option = index
+ while (output_line[first_of_option] == u' '):
+ first_of_option += 1
+ end_of_option = next_comma
+ while (output_line[end_of_option-1] == u' '):
+ end_of_option -= 1
+ option = output_line[first_of_option:end_of_option]
+ index = next_comma+1
+ eq_cmd = find_eq_cmd(option)
+ if (eq_cmd != u''):
+ packages += u'\\usepackage{' + eq_cmd + u'}\n'
+ continue
+ elif (option in farsitex_ignore_options):
+ continue
+ elif (option == u'sharifth'):
+ xe_document_class = u'xepersian-thesis'
+ preamble += thesis_preamble
+ continue
+ elif (not option in latex_options):
+ packages += u'\\usepackage{' + option + u'}\n'
+ continue
+
+ if (first_option):
+ result += u'['
+ else:
+ result += u','
+ result += option
+ first_option = 0
+ #end while
+ if (not first_option):
+ result += u']'
+ # process document style into document class
+ index = output_line.find(u'}',last_index)
+ document_class = output_line[last_index+2:index]
+ if (xe_document_class != u''):
+ result += u'{' + xe_document_class + u'}'
+ elif (document_class == u'oldarticle'):
+ result += u'{article}'
+ elif (document_class == u'oldbook'):
+ result += u'{book}'
+ elif (document_class == u'oldreport'):
+ result += u'{report}'
+ else:
+ result += u'{' + document_class + u'}'
+ # I assume that nothing important is after
+ # \documentstyle[...]{...}, otherwise it may conflict
+ # with our preamble
+ if (index != -1):
+ result += output_line[index+1:]
+ result += packages + u'\\usepackage{xepersian}\n'
+ helper_filename = filename + '_farsitex_cmds_xepersian.tex'
+ generate_farsitex_cmds_file(helper_filename,preamble)
+ result += '\\input{' + helper_filename + '}\n'
+ return result
+ #end elif "documentstyle"
+
+ while (index < line_len):
+ next_index = output_line.find(u'\\', index)
+ comment_index = output_line.find(u'%', index)
+ if (next_index == -1):
+ result += output_line[index:]
+ break
+ elif (state == 1):
+ if (output_line[next_index:next_index+14] == u'\\end{verbatim}'):
+ result += output_line[index:next_index+14]
+ index = next_index+14
+ state = 0
+ else:
+ result += output_line[index:next_index+1]
+ index = next_index+1
+ elif (state == 2):
+ if (output_line[next_index:next_index+15] == u'\\end{verbatim*}'):
+ result += output_line[index:next_index+15]
+ index = next_index+15
+ state = 0
+ else:
+ result += output_line[index:next_index+1]
+ index = next_index+1
+ elif (comment_index != -1 and comment_index < next_index):
+ result += output_line[index:]
+ break
+ elif (output_line[next_index:next_index+14] == u"\\input{amssym}"):
+ result += u'\\usepackage{amssymb}'
+ index = next_index+14
+ elif (output_line[next_index:next_index+12] == u"\\input{epsf}"):
+ index = next_index+12
+ elif (output_line[next_index:next_index+15] == u"\\includeepspdf{"):
+ result += u'\\includegraphics{'
+ index = next_index+15
+ elif (output_line[next_index:next_index+16] == u"\\begin{verbatim}"):
+ result += output_line[index:next_index+16]
+ index = next_index+16
+ state = 1
+ elif (output_line[next_index:next_index+17] == u"\\begin{verbatim*}"):
+ result += output_line[index:next_index+17]
+ index = next_index+17
+ state = 2
+ elif (output_line[next_index:next_index+26] == u'\\setlength{\\headrulewidth}'):
+ end_cmd = output_line.find('}', next_index+26)
+ result += u'\\renewcommand{\\headrulewidth}' + output_line[next_index+26:end_cmd+1]
+ index = end_cmd+1
+ elif (output_line[next_index:next_index+26] == u'\\setlength{\\footrulewidth}'):
+ end_cmd = output_line.find('}', next_index+26)
+ result += u'\\renewcommand{\\footrulewidth}' + output_line[next_index+26:end_cmd+1]
+ index = end_cmd+1
+ elif (output_line[next_index:next_index+10] == u"\\epsffile{"):
+ result += output_line[index:next_index]
+ result += u'\\includegraphics'
+ size_options = u''
+ if (line_number - last_epsfxsize_line <= 3):
+ size_options = u'width=' + last_epsfxsize
+ if (line_number - last_epsfysize_line <= 3):
+ if (size_options != u''):
+ size_options += u','
+ size_options += u'height=' + last_epsfysize
+ if (size_options != u''):
+ result += u'[' + size_options + u']'
+ end_prn = output_line.find(u'.eps}', next_index+9)
+
+ if (end_prn != -1):
+ result += output_line[next_index+9:end_prn] + u'}'
+ index = end_prn+5
+ else:
+ end_prn = output_line.find(u'.ps}', next_index+9)
+ if (end_prn != -1):
+ result += output_line[next_index+9:end_prn] + u'}'
+ index = end_prn+4
+ else:
+ end_prn = output_line.find(u'}', next_index+9)
+ result += output_line[next_index+9:end_prn+1]
+ index = end_prn+1
+ # I assume all the parameter of \epsfxsize comes in one line
+ elif (output_line[next_index:next_index+11] == u"\\epsfxsize="):
+ end_size = read_size(output_line, next_index+11, line_len)
+ if (end_size != -1):
+ last_epsfxsize = output_line[next_index+11:end_size]
+ index = end_size
+ else:
+ index = next_index+11
+ last_epsfxsize_line = line_number
+ # I assume all the parameter of \epsfysize comes in one line
+ elif (output_line[next_index:next_index+11] == u"\\epsfysize="):
+ end_size = read_size(output_line, next_index+11, line_len)
+ if (end_size != -1):
+ last_epsfysize = output_line[next_index+11:end_size]
+ index = end_size
+ else:
+ index = next_index+11
+ last_epsfysize_line = line_number
+ elif (output_line[next_index:next_index+10] == u"\\LR{\\verb*"):
+ end_verb = output_line.find(output_line[next_index+10], next_index+11)
+ verb_param = output_line[next_index+11:end_verb]
+ if (is_alpha_numeric(verb_param)):
+ result += output_line[index:next_index]
+ result += u'\\lr{\\tt{}' + verb_param
+ else:
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+9] == u"\\LR{\\verb"):
+ end_verb = output_line.find(output_line[next_index+9], next_index+10)
+ verb_param = output_line[next_index+10:end_verb]
+ if (is_alpha_numeric_space(verb_param)):
+ result += output_line[index:next_index]
+ result += u'\\lr{\\tt{}' + verb_param
+ else:
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+6] == u"\\verb*"):
+ end_verb = output_line.find(output_line[next_index+6], next_index+7)
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+5] == u"\\verb"):
+ end_verb = output_line.find(output_line[next_index+5], next_index+6)
+ result += output_line[index:end_verb+1]
+ index = end_verb+1
+ elif (output_line[next_index:next_index+9] == u"\\pmatrix{"):
+ result += u'\\ftxepmatrix{'
+ index = next_index+9
+ elif (output_line[next_index:next_index+8] == u"\\matrix{"):
+ result += u'\\ftxematrix{'
+ index = next_index+8
+ elif (output_line[next_index:next_index+16] == u"\\begin{document}"):
+ result += u'\\begin{document}\n%\\VerbatimFootnotes'
+ index = next_index+16
+ elif (output_line[next_index:next_index+8] == u'\\label {'):
+ begin_param = next_index+8
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param-2]
+ result += u'{' + param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+6] == u'\\ref {'):
+ begin_param = next_index+6
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param-2]
+ result += u'{' + param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+7] == u'\\label{'):
+ begin_param = next_index+7
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param]
+ result += param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+5] == u'\\ref{'):
+ begin_param = next_index+5
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param]
+ result += param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+13] == u'\\multicolumn{'):
+ begin_param = next_index+13
+ end_param = output_line.find(u'}', begin_param)
+ param = convert_persian_to_english(output_line[begin_param:end_param])
+ result += output_line[index:begin_param]
+ result += param + u'}'
+ index = end_param+1
+ elif (output_line[next_index:next_index+12] == u'\\setcounter{'):
+ begin_num = output_line.find(u'{', next_index+12)
+ end_num = output_line.find(u'}', begin_num)
+ num = convert_persian_to_english(output_line[begin_num+1:end_num])
+ result += output_line[index:begin_num+1]
+ result += num + u'}'
+ index = end_num+1
+ elif (output_line[next_index:next_index+14] == u'\\addtocounter{'):
+ begin_num = output_line.find(u'{', next_index+14)
+ end_num = output_line.find(u'}', begin_num)
+ num = convert_persian_to_english(output_line[begin_num+1:end_num])
+ result += output_line[index:begin_num+1]
+ result += num + u'}'
+ index = end_num+1
+ else:
+ result += output_line[index:next_index+2]
+ index = next_index+2
+ #end while
+ return result
+
+###############################################
+# from here all functions are mainly used to
+# convert farsitex format to unicode
+###############################################
+
+def convert_file(f, of, convert_cmds):
+ global state
+ global line_number
+ global last_epsfysize_line
+ global last_epsfxsize_line
+ global last_epsfxsize
+ global last_epsfysize
+ global global_state
+
+ state = 0
+ line_number = 0
+ last_epsfysize_line = 0
+ last_epsfxsize_line = 0
+ last_epsfxsize = u''
+ last_epsfysize = u''
+
+ for line in f:
+ line_number += 1
+ print line_number,
+ output_line = u''
+ line_len = len(line)
+
+ # remove new-line characters from end of line
+ if (line_len>1 and line[line_len-1] == '\n'):
+ line_len-=1
+ if (line_len>1 and line[line_len-1] == '\r'):
+ line_len-=1
+
+ # check line-direction character
+ line_direction_rtl = (line[0] == '<')
+ if (line[0] != '>') and (line[0] != '<'):
+ print "FORMAT ERROR AT LINE: " + str(line_number)
+ exit(0)
+
+ i = 1
+
+ while (i<line_len):
+ next_part_index = ft_next_part(line, i, line_len)
+ next_part = line[i:next_part_index]
+ next_part_latin = (line[i]<chr(0x80))
+
+ # see if we should put \lr{...} for the current english expression
+ if (global_state == 0):
+ if line_direction_rtl and next_part_latin:
+ is_command_rtl = (next_part_latin and (i>1) and (line[i-1]==F_SLASH) )
+ is_parameter_rtl = (next_part_latin and (i>1) and (next_part_index<line_len) and (line[i-1]==F_AT_SIGN) and (line[next_part_index]==F_AT_SIGN) )
+ is_math_rtl = (next_part_latin and (line[i]=="$") and (line[next_part_index-1]=="$") )
+ is_verb_parameter = ( (line[i-6:i] == F_SLASH+"verb") and not isalpha(line[i]))
+ is_verb = (next_part_latin and (line[i:i+5]=='\\verb' or line[i:i+6]==' \\verb'))
+ is_english = (next_part_latin and (line[i:i+8]=='\\english'))
+
+ cmd_index = 0
+ while cmd_index < len(commands):
+ len_cmd = len(commands[cmd_index])+2
+ if ( (i > len_cmd) and (line[i-len_cmd:i] == F_SLASH+commands[cmd_index]+F_PRNT_OPEN) ):
+ break
+ elif ( (i > len_cmd+1) and (line[i-len_cmd-1:i] == F_SLASH+commands[cmd_index]+F_SPACE+F_PRNT_OPEN) ):
+ break
+ cmd_index += 1
+ is_commands_group = cmd_index < len(commands)
+ is_documentstyle_cmd = (line_len > 15) and (line[1:15] == F_SLASH+"documentstyle")
+
+ if next_part_latin:
+ if (global_state == 0):
+ # whether we should put a \lr{ command
+ if ( line_direction_rtl and not (is_command_rtl or is_parameter_rtl or is_math_rtl or is_commands_group or is_documentstyle_cmd or is_verb_parameter or is_verb or is_english) ):
+ output_line += u'\\lr{'
+ if ( line_direction_rtl and is_verb):
+ output_line += u'\\LR{'
+
+ # here is the main place that converting happens
+ output_line += next_part.encode( 'utf-8' )
+
+ if (global_state == 0):
+ # check whether we already used a \lr command: then end it
+ if ( line_direction_rtl and not (is_command_rtl or is_parameter_rtl or is_math_rtl or is_commands_group or is_documentstyle_cmd or is_verb_parameter or is_verb or is_english) ):
+ output_line += u'}'
+ if ( line_direction_rtl and is_verb):
+ output_line += u'}'
+ else:
+ if (global_state == 0):
+ # whether we should put a \rl{} command
+ if ( not line_direction_rtl and not ft_is_all_persian_space(next_part)):
+ output_line += u'\\rl{'
+
+ # here is the main place that converting happens
+ output_line += map_ft_unicode(next_part)
+
+ if (global_state == 0):
+ # check whether we already used a \rl command: then end it
+ if (not line_direction_rtl and not ft_is_all_persian_space(next_part)):
+ output_line += u'}'
+
+ i = next_part_index
+ # end of while
+
+ #if there was a % commenting then we can return to normal situation
+ if (global_state == 1):
+ global_state = 0
+
+ # convert some of the FarsiTeX commands to XePersian commands
+ # only if it is requested
+ if (convert_cmds):
+ result = translate_cmds(output_line)
+ else:
+ result = output_line
+ output_line = result + u'\n'
+ # write the processed line
+ of.write(output_line)
+ # end of line processing
+ # end of file processing
+
+def print_usage():
+ print 'usage: python ftxe-0-11 [-r] [-s] [-x] [-u] in_filename1 in_filename2'
+ print '-r: (DEFAULT) recursively consider files included in the given files'
+ print '-s: do not recursively consider files'
+ print '-x: (DEFAULT) insert xepersian related commands'
+ print '-u: only convert to unicode'
+
+###################################
+# Begin of main body of the program
+###################################
+
+# global variables
+line_number = 0
+last_epsfxsize = u''
+last_epsfxsize_line = 0
+last_epsfysize = u''
+last_epsfysize_line = 0
+state = 0
+global_state = 0
+recursive = 1
+convert_xepersian = 1
+filename = ''
+
+if len(sys.argv) <= 1:
+ print_usage()
+ exit(0)
+
+#find options
+options_index = 1
+while (options_index < len(sys.argv) and sys.argv[options_index][0]=='-'):
+ if (sys.argv[options_index]=='-s'):
+ recursive = 0
+ elif (sys.argv[options_index]=='-u'):
+ convert_xepersian = 0
+ options_index += 1
+
+filenames = []
+while (options_index < len(sys.argv)):
+ filenames.append(sys.argv[options_index])
+ options_index += 1
+
+if (len(filenames) == 0):
+ print 'error: no input filename is specified!'
+ print_usage()
+ exit(0)
+
+index = 0
+while (index < len(filenames)):
+ filename = filenames[index]
+ index += 1
+
+ outfile = ''
+ if (filename[-4:] != '.tex'):
+ outfile = filename[0:-3] + 'tex'
+ else:
+ outfile = filename + '.tex'
+
+ print '\n\nConverting "' + filename + '" into "' + outfile + '"'
+ try:
+ f = open(filename, 'r')
+ except IOError:
+ print "Can not open the input file: " + filename
+ exit(0)
+
+ try:
+ of = codecs.open(outfile, encoding='utf-8', mode='w')
+ except IOError:
+ print "Can not open the output file: " + outfile
+ exit(0)
+
+ convert_file(f, of, convert_xepersian)
+
+ of.close()
+ f.close()
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/gradient1.png b/Master/texmf-dist/doc/xelatex/xepersian/gradient1.png
deleted file mode 100644
index 02cff8d380a..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/gradient1.png
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/gradient2.png b/Master/texmf-dist/doc/xelatex/xepersian/gradient2.png
deleted file mode 100644
index e6db39cf0c1..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/gradient2.png
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa-output.tex b/Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa-output.tex
new file mode 100644
index 00000000000..b1b02051cf0
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa-output.tex
@@ -0,0 +1,19 @@
+\documentclass[11pt,a4paper]{article}
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{ieeetr-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa.bst b/Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa.bst
new file mode 100644
index 00000000000..6c49f4db12e
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/ieeetr-fa.bst
@@ -0,0 +1,1178 @@
+%%
+%% This is file `ieeetr-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `ieeetr-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "ieeetr-fa", Persian (farsi) version of ieeetr.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+after.quoted.block after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- ieeetr-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.quote =
+{ " " * write$ }
+{ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+'write$
+{ output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+{ after.quoted.block 'output.state := }
+{ after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { %s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+{ " {\em" * bbl.etal * "}" * }
+{ bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+{ fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+}
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+{ fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+}
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume *
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+{ bbl.pages pages n.dashify * }
+{ bbl.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume * }%M.Amintoosi "vol.~"
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.number number * }%M.Amintoosi "no.~"
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+{ type "t" change.case$ }
+{ type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+{ "" }
+{ address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " {\em" * bbl.etal * "}" * }
+ { #2 <
+'skip$
+{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em" bbl.etal * "}" * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in "{\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.volume output
+ month empty$
+{ format.number output }
+'skip$
+ if$
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+{ format.title.p output.nonnull }
+{ format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+{ format.title.p output.nonnull }
+{ format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications ACM"}
+
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM J. Computing"}
+
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+
+MACRO {tods} {"ACM Trans. Database Systems"}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `ieeetr-fa.bst'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/iran.jpg b/Master/texmf-dist/doc/xelatex/xepersian/iran.jpg
deleted file mode 100644
index 7ab38904137..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/iran.jpg
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/kashida-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/kashida-xepersian.def
new file mode 100644
index 00000000000..76325f1a653
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/kashida-xepersian.def
@@ -0,0 +1,70 @@
+%%
+%% This is file `kashida-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `kashida-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\chardef\zwj="200D % zero-width joiner
+\chardef\ksh="0640 % kashida
+
+\chardef\D=10 % dual-joiner class
+\chardef\L=11 % lam
+\chardef\R=12 % right-joiner
+\chardef\A=13 % alef
+\chardef\V=256 % vowel or other combining mark (to be ignored)
+
+\def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
+ \leaders\hrule height\ht0 \hskip0pt plus 0.5em \zwj}
+
+\def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}%
+ \expandafter\dosetclass\charlist,\end}
+\def\dosetclass#1,#2\end{%
+ \def\test{#1}\def\charlist{#2}%
+ \ifx\test\empty\let\next\finishsetclass
+ \else \XeTeXcharclass "\test = \theclass
+ \let\next\dosetclass \fi
+ \expandafter\next\charlist,,\end}
+\def\finishsetclass#1,,\end{}
+
+\setclass \A {0622,0623,0625,0627}
+\setclass \R {0624,0629,062F,0630,0631,0632,0648,0698}
+\setclass \D {0626,0628,062A,062B,062C,062D,062E}
+\setclass \D {0633,0634,0635,0636,0637,0638,0639,063A}
+\setclass \D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
+\setclass \D {067E,0686,06A9,06AF,06CC}
+\setclass \L {0644}
+\setclass \V {064B,064C,064D,064E,064F,0650,0651,0652}
+
+\XeTeXinterchartoks \D \D = {\kashida}
+\XeTeXinterchartoks \L \D = {\kashida}
+\XeTeXinterchartoks \D \L = {\kashida}
+\XeTeXinterchartoks \L \L = {\kashida}
+\XeTeXinterchartoks \D \R = {\kashida}
+\XeTeXinterchartoks \D \A = {\kashida}
+\XeTeXinterchartoks \L \R = {\kashida}
+\XeTeXinterchartoks \L \A = {}
+
+\XeTeXinterchartokenstate=1
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `kashida-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/listings-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/listings-xepersian.def
new file mode 100644
index 00000000000..5963ea43195
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/listings-xepersian.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `listings-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `listings-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\lstlistingname{برنامهٔ}
+\def\lstlistlistingname{فهرست برنامه‌ها}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `listings-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/localise-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/localise-xepersian.def
new file mode 100644
index 00000000000..a5fdd4d44a0
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/localise-xepersian.def
@@ -0,0 +1,53 @@
+%%
+%% This is file `localise-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `localise-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\catcode`\﷼=3
+\catcode`‌=11
+\newcommand\eqcommand[2][]{\let#1=#2}
+\newcommand\eqenvironment[2][]{\newenvironment{#1}{\begin{#2}}{\end{#2}}}
+\define@key[zf]{options}{مقیاس}{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{MatchLowercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{5}%
+ \else
+ \edef\@tempb{MatchUppercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{8}%
+ \else
+ \edef\zf@scale{#1}%
+ \fi
+ \fi
+ \zf@update@family{+scale:\zf@scale}%
+ \edef\zf@scale{s*[\zf@scale]}}
+\input{commands-ltx.def}
+\input{commands-xepersian.def}
+\input{environments-ltx.def}
+\input{environments-xepersian.def}
+\input{misccommandsenvironments-ltx.def}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `localise-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf
deleted file mode 100644
index f4ae64ad985..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.tex b/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.tex
index 5197b86757f..9badb482be7 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/magazine-sample.tex
@@ -1,7 +1,9 @@
\documentclass[12pt,twoside]{xepersian-magazine}
+\usepackage{graphicx}
\usepackage{xepersian}
+\usepackage{xunicode}
\settextfont[Scale=1]{XB Zar}
-\setromantextfont[Scale=1]{Junicode}
+\setlatintextfont[Scale=1]{Junicode}
\setdigitfont{XB Zar}
\pagestyle{fancy}
\title{مجلهٔ زی‌پرشین}
@@ -10,25 +12,25 @@
\customlogo{مجلهٔ زی‌پرشین}
\customminilogo{مجلهٔ زی‌پرشین}
\custommagazinename{مجلهٔ زی‌پرشین}
-\customwwwTxt{http://parsilatex.org}
+\customwwwTxt{http://developer.berlios.de/projects/xepersian}
\begin{document}
\begin{frontpage}
\firstimage{img/ireland.jpg}{این زیرنویس تصویر اصلی در صفحهٔ اول است.}
\firstarticle{این تیتر مقالهٔ اول است.}
- {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
- {۱۲:۳۴}
+{خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+{۱۲:۳۴}
\secondarticle{این هم سر تیتر مقالهٔ دوم است.}%
- {این هم زیر تیتر مقالهٔ دوم است که آن را در اینجا می‌نویسیم.}%
- {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
- {قسمت الف}%
- {۱۰:۲۳}
+{این هم زیر تیتر مقالهٔ دوم است که آن را در اینجا می‌نویسیم.}%
+{خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+{قسمت الف}%
+{۱۰:۲۳}
\thirdarticle{این سرتیتر مقالهٔ سوم است.}%
- {این هم زیرتیتر مقالهٔ سوم است که ما آن را در اینجا قرار می‌دهیم.}%
- {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد. و همانطور که می‌بینید من مطلبی برای گفتن ندارم فقط متن علکی می‌نویسم تا کمی صفحه را پر کرده باشم. اما در قسمتهای بعدی مقداری از سهراب سپهری خواهم نوشت.}%
-
- {قسمت ب}%
- {۱۰:۰۲}
+{این هم زیرتیتر مقالهٔ سوم است که ما آن را در اینجا قرار می‌دهیم.}%
+{خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد. و همانطور که می‌بینید من مطلبی برای گفتن ندارم فقط متن علکی می‌نویسم تا کمی صفحه را پر کرده باشم. اما در قسمتهای بعدی مقداری از سهراب سپهری خواهم نوشت.}%
+
+{قسمت ب}%
+{۱۰:۰۲}
\begin{indexblock}{نمایه (فهرست مطالب) اصلی}
\indexitem{۱- مقاله اول}{1}
@@ -46,30 +48,26 @@
\weatheritem{img/weather/clouds.jpg}{جمعه}{12}{6}{}
\end{weatherblock}
-
\begin{authorblock}
\textbf{ویرایشگران}
وفا خلیقی، مهدی امیدعلی و مصطفی واحدی
-\texttt{vafa@aol.com.au\\[5pt]
-http://parsilatex.org}\\
+\texttt{vafa@users.berlios.de\\[5pt]
+http://developer.berlios.de/projects/xepersian}\\
\end{authorblock}
\end{frontpage}
\newsection{قسمت الف}
\begin{article}{2}
- {این تیتر این مقاله است.}
- {این هم زیرتیتر این مقاله هست.}
- {قسمت الف}
- {1}
+{این تیتر این مقاله است.}
+{این هم زیرتیتر این مقاله هست.}
+{قسمت الف}
+{1}
\authorandplace{نام نویسنده}{مکان}
-
-
-
\noindent\timestamp{۸:۲۵}
ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
-\footnote{این یک زیرنویس فارسی است.}\Footnote{This is an English footnote.}
+\footnote{این یک زیرنویس فارسی است.}\LTRfootnote{This is an English footnote.}
\begin{equation}
(a+b)^3=a^3+3a^2b+3ab^2+b^3\label{eq-1}
\end{equation}
@@ -86,24 +84,24 @@ http://parsilatex.org}\\
\articlesep
\begin{article}{2}
- {این تیتر این مقاله است.}
- {این هم زیرتیتر این مقاله هست.}
- {قسمت الف}
- {1}
+{این تیتر این مقاله است.}
+{این هم زیرتیتر این مقاله هست.}
+{قسمت الف}
+{1}
\authorandplace{نام نویسنده}{مکان}
\noindent\timestamp{08:25}
ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
-\Footnote{This is an English footnote.}\footnote{این یک زیرنویس فارسی است.}
+\LTRfootnote{This is an English footnote.}\footnote{این یک زیرنویس فارسی است.}
اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
-اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
-اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
\expandedtitle{doublebox}{این هم مطلی است مهم یا چیزی که از خلاصهٔ این مقاله ما متوجه شده‌ایم و این برای ما و خوانندگان خیلی مهم است.}
@@ -111,35 +109,32 @@ http://parsilatex.org}\\
اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
-اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
\end{article}
\articlesep
\newsection{قسمت ب}
-
\begin{article}{2}
- {این یک تیتر کوتاه است.وفا خلیقی}
- {این هم مثل همیشه زیرتیتر است که ما آن را در اینجا قرار می‌دهیم.}
- {قسمت ب}
- {3}
+{این یک تیتر کوتاه است.وفا خلیقی}
+{این هم مثل همیشه زیرتیتر است که ما آن را در اینجا قرار می‌دهیم.}
+{قسمت ب}
+{3}
\authorandplace{نام نویسنده}{مکان}
-
-
\noindent\timestamp{08:25} et ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
-اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
-اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
\expandedtitle{lines}{این هم دوباره مطلب مهمی است که ما آن را از لابلای این مقاله برای خواننده درست کرده‌ایم.}
@@ -147,12 +142,11 @@ http://parsilatex.org}\\
اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
-اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
\end{article}
\articlesep
-
\begin{editorial}{1}{این یک مثال از مقاله‌ای از طرف ویرایشگر است.}{نام و نام خانوادگی}{4}
يژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
@@ -163,7 +157,6 @@ http://parsilatex.org}\\
\articlesep
-
\begin{shortarticle}{4}{محیط مقالهٔ کوتاه}{محیط مقالهٔ کوتاه داخل مجلهٔ زی‌پرشین}{5}
\shortarticleitem{این یک تیتر کوتاه است}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/minitoc-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/minitoc-xepersian.def
new file mode 100644
index 00000000000..67ff92b9753
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/minitoc-xepersian.def
@@ -0,0 +1,38 @@
+%%
+%% This is file `minitoc-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `minitoc-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\ptctitle{\if@RTL فهرست مطالب\else Table of Contents\fi}%
+\def\plftitle{\if@RTL لیست تصاویر\else List of Figures\fi}%
+\def\plttitle{\if@RTL لیست جداول\else List of Tables\fi}%
+\def\mtctitle{\if@RTL عناوین\else Contents\fi}%
+\def\mlftitle{\if@RTL اشکال\else Figures\fi}%
+\def\mlttitle{\if@RTL جداول\else Tables\fi}%
+\def\stctitle{\if@RTL عناوین\else Contents\fi}%
+\def\slftitle{\if@RTL اشکال\else Figures\fi}%
+\def\slttitle{\if@RTL جداول\else Tables\fi}%
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `minitoc-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/misccommandsenvironments-ltx.def b/Master/texmf-dist/doc/xelatex/xepersian/misccommandsenvironments-ltx.def
new file mode 100644
index 00000000000..305d8903472
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/misccommandsenvironments-ltx.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `misccommandsenvironments-ltx.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `misccommandsenvironments-ltx.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\eqcommand[\سند]{\document}
+\eqcommand[\endسند]{\enddocument}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `misccommandsenvironments-ltx.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/parsidigits.map b/Master/texmf-dist/doc/xelatex/xepersian/parsidigits.map
new file mode 100644
index 00000000000..ff530f197a8
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/parsidigits.map
@@ -0,0 +1,46 @@
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "ParsiDigits"
+
+pass(Unicode)
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/parsidigits.tec b/Master/texmf-dist/doc/xelatex/xepersian/parsidigits.tec
new file mode 100644
index 00000000000..6844196c273
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/parsidigits.tec
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/plain-fa-output.tex b/Master/texmf-dist/doc/xelatex/xepersian/plain-fa-output.tex
new file mode 100644
index 00000000000..72345bfd1d3
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/plain-fa-output.tex
@@ -0,0 +1,19 @@
+\documentclass[11pt,a4paper]{article}
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{XB Zar}
+
+\title{نمونه خروجی با سبک فارسی \lr{plain-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences1}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/plain-fa.bst b/Master/texmf-dist/doc/xelatex/xepersian/plain-fa.bst
new file mode 100644
index 00000000000..10ab3f0fbfe
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/plain-fa.bst
@@ -0,0 +1,1304 @@
+%%
+%% This is file `plain-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `plain-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.2" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %if$
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+{ key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+{ key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+}
+{ "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+'editor.organization.sort
+{ type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+}
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `plain-fa.bst'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf
deleted file mode 100644
index afa161f416e..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.tex b/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.tex
deleted file mode 100644
index 9632d6ba3e7..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/presentation-sample.tex
+++ /dev/null
@@ -1,53 +0,0 @@
-\documentclass[12pt,twoside]{xepersian-presentation}
-\usepackage{eso-pic}
-\usepackage{xepersian}
-\settextfont[Scale=1]{XB Zar}
-\setromantextfont[Scale=1]{Linux Libertine}
-\setdigitfont[Scale=1]{XB Zar}
-\pagestyle{pres}
-\AddToShipoutPicture{
-\includegraphics{gradient2.png}
-}
-
-\begin{document}
-\begin{titlepage}
-\distance{1}
-\centering \LARGE
- \bfseries عنوان اسلاید
-
-\distance{1}
-\large
-وفا خلیقی\\[1ex]نام دانشگاه
-\distance{2}
-\end{titlepage}
-
-\begin{plainslide}[این عنوان یک صفحه است.]
-این اولین صفحه اسلاید ما است که من در حال نوشتن آن هستم و کمی بیشتر می‌نویسم تا به خط بعدی بروم
-\footnote{این یک زیرنویس فارسی است.}\Footnote{This is an English footnote.}
-\begin{equation}
-(a+b)^2=a^2+2ab+b^2
-\end{equation}
-\begin{itemize}
- \item یک
- \item دو
-\end{itemize}
-
-\begin{enumerate}
- \item یک
- \item دو
-\end{enumerate}
-
-\begin{description}
- \item [یک:] اولین عدد
- \item [دو:] دومین عدد
-\end{description}
-
-\end{plainslide}
-\begin{rawslide}
-دومین صفحه
-
-\end{rawslide}
-
-\end{document}
-
-
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/rapport3-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/rapport3-xepersian.def
new file mode 100644
index 00000000000..c4f35c6a5f6
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/rapport3-xepersian.def
@@ -0,0 +1,35 @@
+%%
+%% This is file `rapport3-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `rapport3-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\thepart{\@tartibi\c@part}
+\renewcommand*\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `rapport3-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/refrep-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/refrep-xepersian.def
new file mode 100644
index 00000000000..7c34218c196
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/refrep-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `refrep-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `refrep-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `refrep-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/report-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/report-xepersian.def
new file mode 100644
index 00000000000..d88e4ece981
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/report-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `report-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `report-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `report-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/scrartcl-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/scrartcl-xepersian.def
new file mode 100644
index 00000000000..beafd08bf27
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/scrartcl-xepersian.def
@@ -0,0 +1,64 @@
+%%
+%% This is file `scrartcl-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `scrartcl-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `scrartcl-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/scrbook-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/scrbook-xepersian.def
new file mode 100644
index 00000000000..eb621e8468b
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/scrbook-xepersian.def
@@ -0,0 +1,69 @@
+%%
+%% This is file `scrbook-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `scrbook-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*\frontmatter{%
+ \if@twoside\cleardoubleoddpage\else\clearpage\fi
+ \@mainmatterfalse\pagenumbering{harfi}%
+}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `scrbook-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/scrreprt-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/scrreprt-xepersian.def
new file mode 100644
index 00000000000..ce36d9f3d8c
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/scrreprt-xepersian.def
@@ -0,0 +1,65 @@
+%%
+%% This is file `scrreprt-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `scrreprt-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `scrreprt-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/test-correction.tex b/Master/texmf-dist/doc/xelatex/xepersian/test-correction.tex
new file mode 100644
index 00000000000..9c542954ed6
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/test-correction.tex
@@ -0,0 +1,39 @@
+\documentclass{article}
+\usepackage[correction]{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/test-empty-form.tex b/Master/texmf-dist/doc/xelatex/xepersian/test-empty-form.tex
new file mode 100644
index 00000000000..37a891b40fb
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/test-empty-form.tex
@@ -0,0 +1,43 @@
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+\bigskip
+
+\begin{center}
+\makeform
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/test-question-only.tex b/Master/texmf-dist/doc/xelatex/xepersian/test-question-only.tex
new file mode 100644
index 00000000000..b3f84d4c9bf
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/test-question-only.tex
@@ -0,0 +1,39 @@
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/test-solution-form.tex b/Master/texmf-dist/doc/xelatex/xepersian/test-solution-form.tex
new file mode 100644
index 00000000000..2492d6be6c1
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/test-solution-form.tex
@@ -0,0 +1,43 @@
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\bigskip
+\begin{center}
+\makemask
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdf b/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdf
deleted file mode 100644
index 96bded8c101..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.tex b/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.tex
index ea9b50a224e..1c9dd05c490 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.tex
+++ b/Master/texmf-dist/doc/xelatex/xepersian/thesis-sample.tex
@@ -1,12 +1,10 @@
\documentclass[a4paper,11pt]{xepersian-thesis}
+\usepackage{graphicx}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Zar}
-\setromantextfont[Scale=1]{Linux Libertine}
+\setlatintextfont[Scale=1]{Linux Libertine}
\setdigitfont[Scale=1]{XB Zar}
-
-
-
\begin{document}
\title{اعداد مرکب}
\author{وفا خلیقی}
@@ -46,21 +44,19 @@
\bibliographystyle{unsrt}
\begin{thebibliography}{99}
\end{thebibliography}
-%\printindex
-\begin{roman}
-\romantitle{Pure Mathematics}
-\romanauthor{Vafa Khalighi}
-\romandegree{Bachelor of Pure Mathematics}
-\romanthesisdate{\romantoday}
-\romansupervisor{Mohammad Ghodsi}
-\romandepartment{Computer Science}
-\romanuniversity{Iran University of Science \& Technology}
-\romancity{Tehran}
-\begin{romanabstract}
+\begin{latin}
+\latintitle{Pure Mathematics}
+\latinauthor{Vafa Khalighi}
+\latindegree{Bachelor of Pure Mathematics}
+\latinthesisdate{\latintoday}
+\latinsupervisor{Mohammad Ghodsi}
+\latindepartment{Computer Science}
+\latinuniversity{Iran University of Science \& Technology}
+\latincity{Tehran}
+\begin{latinabstract}
\noindent This is our abstract written in English and This thesis is written very very very carefully so that we can keep an eye on the beauty of typesetting.
-\romankeywords{Mathematics, topology, geometry and category theory.}
-\end{romanabstract}
-\makeromantitle
-\end{roman}
+\latinkeywords{Mathematics, topology, geometry and category theory.}
+\end{latinabstract}
+\makelatintitle
+\end{latin}
\end{document}
-
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/tocloft-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/tocloft-xepersian.def
new file mode 100644
index 00000000000..72821e6cae7
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/tocloft-xepersian.def
@@ -0,0 +1,39 @@
+%%
+%% This is file `tocloft-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `tocloft-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*{\cftchapname}{\if@RTL فصل\else chapter\fi}
+\renewcommand*{\cftsecname}{\if@RTL قسمت\else section\fi}
+\renewcommand*{\cftsubsecname}{\if@RTL زیرقسمت\else subsection\fi}
+\renewcommand*{\cftsubsubsecname}{\if@RTL زیرزیرقسمت\else subsubsection\fi}
+\renewcommand*{\cftparaname}{\if@RTL پاراگراف\else paragraph\fi}
+\renewcommand*{\cftsubparaname}{\if@RTL زیرپاراگراف\else subparagraph\fi}
+\renewcommand*{\cftfigname}{\if@RTL شکل\else figure\fi}
+\renewcommand*{\cftsubfigname}{\if@RTL زیرشکل\else subfigure\fi}
+\renewcommand*{\cfttabname}{\if@RTL جدول\else table\fi}
+\renewcommand*{\cftsubtabname}{\if@RTL زیرجدول\else subtable\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `tocloft-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/txt2maths.map b/Master/texmf-dist/doc/xelatex/xepersian/txt2maths.map
new file mode 100644
index 00000000000..f8b4dae0da6
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/txt2maths.map
@@ -0,0 +1,48 @@
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "txt2maths"
+
+Pass(Unicode)
+U+002E <> U+066B ; convert dot to Persian decimal separator
+U+002D <> U+2212 ; convert hyphen to minus sign
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/txt2maths.tec b/Master/texmf-dist/doc/xelatex/xepersian/txt2maths.tec
new file mode 100644
index 00000000000..c51f869ddf7
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/txt2maths.tec
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/unsrt-fa.bst b/Master/texmf-dist/doc/xelatex/xepersian/unsrt-fa.bst
new file mode 100644
index 00000000000..1097d437d5a
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/unsrt-fa.bst
@@ -0,0 +1,1146 @@
+%%
+%% This is file `unsrt-fa.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `unsrt-fa.bst')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "usrt-fa", Persian (farsi) version of unsrt.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+
+%%%%%%%%%%% History:
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.22" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- unsrt-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " eds." 'bbl.editors :=
+ " ed." 'bbl.editor :=
+ " ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+{ add.period$ write$
+ newline$
+ "\newblock " write$
+}
+{ output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+}
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+'skip$
+{ after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff}{vv~}{ll}{, jj}
+ nameptr #1 >
+{ namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+{ "," * }
+'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+}
+ if$
+}
+'t
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+editor num.names$ #1 >
+{bbl.editors editor format.names * }
+{bbl.editor editor format.names * }
+if$
+}
+{
+ editor format.names
+editor num.names$ #1 >
+{ ", " bbl.editors * *}
+{ ", " bbl.editor * *}
+if$
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+bbl.translator translator format.names *
+}
+{
+ translator format.names
+", " bbl.translator * *
+}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+{ t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+{ "-" *
+ t #2 global.max$ substring$ 't :=
+}
+ while$
+ }
+ if$
+}
+{ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+}
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+{ "" }
+{ "there's a month but no year in " cite$ * warning$
+ month
+}
+ if$
+ }
+ { month empty$
+'year
+{ month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+'skip$
+{ bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+{ series field.or.null }
+{ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+}
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+}
+{
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+}
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+{ #1 'multiresult := }
+{ t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+{ pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+{ "there's a number but no volume in " cite$ * warning$ }
+'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+{ pop$ format.pages }
+{ ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+{ bbl.chapter }
+{ type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+'skip$
+{ ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+}
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+{ "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+}
+{ bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+}
+{ key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+{ booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+}
+{ bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+format.authors output
+ new.block
+ format.btitle "title" output.check
+new.block
+ format.translators output
+format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+{ "author and editor" editor either.or.check }
+'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+{ organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+}
+{ address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+}
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+'skip$
+{ organization output.nonnull
+ address output
+}
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+{ address new.block.checka
+ address output
+}
+'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+{ publisher new.sentence.checka }
+{ organization publisher new.sentence.checkb
+ organization output
+}
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+'skip$
+{ organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by unsrt-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `unsrt-fa.bst'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-cove.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-cove.tex
deleted file mode 100644
index 510a197d2cf..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-cove.tex
+++ /dev/null
@@ -1,56 +0,0 @@
-\begingroup
-\evensidemargin \paperwidth\relax
-\advance\evensidemargin -2in
-\advance\evensidemargin -\textwidth
-\divide\evensidemargin 2
-\oddsidemargin\evensidemargin
-
-\begin{titlepage}
-
-\let\footnotesize\small
-\let\footnoterule\relax
-\setcounter{page}{0}
-
-\null
-\vfil
-\vskip 25pt
-\begin{center}
- {\LARGE\textbf{\XePersian}}\\[5pt]
- {\large\textbf{\XeLaTeX\ macros for typesetting Persian in \XeTeX}.}\\
-\end{center}
-
-\bigskip\bigskip
-\hbox to \hsize{%
- \hss
-\includegraphics[width=9cm,height=9cm]{iran.jpg}
- \hss}
-\bigskip
-\bigskip
-
-\begin{center}
-{\LARGE\textbf{User's Guide}}\par
-\vskip 3em
-{\large \lineskip .75em Vafa Khalighi}\par
-\vskip 1.5em
-{\large \thefiledate\\[2pt]
- Version \Version%
- \footnote{Documentation edited and repacked at \thefiledate\ by
- Vafa Khalighi \url{vafa.khalighi@students.mq.edu.au}.}}\par
-
-\end{center}
-\vfil
-\small
-Author's address:\\
- 4/34 Sorrell Street\\
- Parramatta\\
- NSW 2150\\
- Australia\\[3mm]
- Internet: \Verb[codes={\catcode`\<=12}]+<vafa.khalighi@students.mq.edu.au>+
-\end{titlepage}
-
-\endgroup
-
-\setcounter{footnote}{0}
-\tableofcontents
-\pagenumbering{arabic}
-\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex
deleted file mode 100644
index b7bda8b57b7..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-esse.tex
+++ /dev/null
@@ -1,301 +0,0 @@
-\part*{Welcome to XePersian}
-\XePersian\ is a set of macro written for \LaTeX\ over \XeTeX\ in the hope that Persian typesetting in \TeX\ becomes quite easy and at the same time the Persian users would benefit from the \TeX\ tools that are available for English users.
-
-\File{\textsf{New!}}
-There is a change in the manual. I wrote a new \LaTeX\ class\footnote{The name of this class is \textsf{xepersian-user} and is included in the \XePersian\ package but please note that this class has no use for Persian typesetting and it is simply designed for typesetting the manual.} for writing the manual just to be more attractive, eye-catching and tidy. I also decided to write the manual in English and that is because \XePersian\ package will be placed on CTAN and it is included in various \TeX\ distributions like MiK\TeX\ and \TeX Live and if I write the manual in Persian, then I have abused the hospitality of CTAN, MiK\TeX\ and \TeX Live distributions, so I wrote the manual in plain English in the hope that everyone will be able to understand the material explained here.
-
-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{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.
-
-
-
-\begin{Warning}
-Keep in mind the following typographical conventions in this User's Guide.
-\begin{itemize}
- \item All literal input characters, i.e., those that should appear verbatim
- in your input file, appear in upright "Helvetica" and {\UsageFont
- Helvetica-Bold} fonts.
- \item Meta arguments, for which you are supposed to substitute a value
- (e.g., <Scale>) appear in slanted <Helvetica-Oblique> and
- {\UsageFont\MetaFont Helvetica-BoldOblique} fonts.
- \item The main entry for a macro or parameter that states its syntax appears
- in a large bold font, \emph{except for the optional arguments, which are in
- medium weight}. This is how you can recognize the optional arguments.
- \item References to \XePersian\ commands and parameters within paragraphs are
- set in {\UsageFont Helvetica-Bold}.
-
-\end{itemize}
-\end{Warning}
-\part{The Essentials}
-\section{An Example of the Input File}
-\begin{LVerb}
- \documentclass{book}
- \usepackage{xepersian}
- \settextfont[Scale=1]{XB Zar}
- \setromantextfont[Scale=1]{Linux Libertine}
- \setdigitfont[Scale=1]{XB Zar}
- \title{<title name>}
- \author{<author name>}
- \begin{document}
- \maketitle
- \tableofcontents
- \chapter{<chapter name>}
- ...
- \section{<section name>}
- ...
- \subsection{<subsection name>}
- ...
- \end{document}
-\end{LVerb}
-
-\begin{Warning}
-Always load \XePersian\ package as the last package in the permeable of your document and put your definitions after loading \XePersian . Also note that the packages: \textsf{amsmath}, \textsf{amssymb}, \textsf{amsthm} and \textsf{graphicx} are loaded by default and you \emph{should not} load them.
-\end{Warning}
-
-\section{The Basic Commands of The Package\label{s-1}}
-In this section, I will be explaining some of the useful commands which you are best equipped to know.
-\begin{description}
-\mitem \settextfont`[...]'{...}
-
-Selects the default Persian font.
-
-\mitem \setromantextfont`[...]'{...}
-
-Selects the deafult Roman font.
-
-\mitem \setdigitfont`[...]'{...}
-
-Selects the digits font in maths formuals.
-
-\mitem \defpersianfont\n\fontname`[...]'{...}
-
-Defines an extra Persian font.
-
-\mitem \defromanfont\n\fontname`[...]'{...}
-
-Defines an extra Roman font.
-
-\mitem \footnote{...}
-
-Inserts Persian footnote.
-
-\mitem \Footnote{...}
-
-Inserts Roman footnote.
-
-\mitem \today
-
-Inserts Iranian date of today.
-
-\mitem \romantoday
-
-Inserts Roman date of today.
-
-\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 \LTRdblcol
-
-Places columns from left to right in the \emph{twocolumns} documents.
-
-\mitem \twocolumnstableofcontents
-
-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.
-
-\mitem \rl{...}
-
-Typesets a short Persian text in a Roman paragraph.
-\end{description}
-\begin{Ex}
- "\begin{LTR}" \ldots\ "\end{LTR}"
-\end{Ex}
-Left To Right environment.
-
-\begin{Ex}
- "\begin{RTL}" \ldots\ "\end{RTL}"
-\end{Ex}
-Right To Left environment.
-
-\begin{Ex}
- "\begin{roman}" \ldots\ "\end{roman}"
-\end{Ex}
-Typesets a Roman paragraph.
-
-\begin{Ex}
- "\begin{persian}" \ldots\ "\end{persian}"
-\end{Ex}
-Typesets a Persian paragraph.
-\begin{description}
-\mitem \Roman
-
-Similar to {\UsageFont roman} environment but intended to be used in the bibliography environment.
-
-\mitem \Persian
-
-Similar to {\UsageFont persian} environment but intended to be used in the bibliography environment.
-
-\mitem \rmfamily
-
-Uses Roman font for typesetting (deafult in {\UsageFont roman} environment).
-
-\mitem \persianfont
-
-Uses Persian font for typesetting (deafualt in {\UsageFont persian} environment).
-
-\mitem \PersianFootNum
-
-Typesets the the Roman footnote numbers in Persian (default).
-
-\mitem \RomanFootNum
-
-Typesets the Roman footnote numbers in Roman.
-
-
-\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=<number>]'{<fontname>}
-\endgroup
-For example with the command:
-\begin{LVerb}
- \settextfont[Scale=1]{XB Zar}
-\end{LVerb}
-We choose {\UsageFont XB Zar} as the main text font with the Scale of 1.
-
-\begin{drivers} {\UsageFont XB Zar} is the name of the font which should be installed on your machine. If you are on \textsf{Microsoft Windows}, then the font should be avaliable in \fbox{C:$\backslash$windows$\backslash$fonts} folder. This font is one of the \textsf{X Series} font made by \textsf{IRMUG} (Iranian Mac Users Group) which are perfect and you are advised to use these fonts. To obtain them, you can explore \href{http://wiki.irmug.org/index.php/X_Series_2}{\textsf{IRMUG}}.\end{drivers}
-
-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=<number>]'{<fontname>}
-\endgroup
-And we select the font for digits in maths formuals by the command:
-\begingroup
-\catcode`\<=12
- \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=<number>]'{<fontname>}
- \Mac \defromanfont\n\fontname`[Scale=<number>]'{<fontname>}
-\endgroup
-For example, the command:
-\begin{LVerb}
- \defpersianfont\nastaligh[Scale=1.5]{IranNastaliq}
-\end{LVerb}
-Defines the {\UsageFont Nastaligh} font for the text and you can use it in the following ways:
-\begin{itemize}
-\item If your intention is to write a short text with this font, you can use:
-\begingroup
-\catcode`\<=12
- \Mac \nastaligh{<text>}
-\endgroup
-\item If you are going to write a long piece of text with this font you can either use {\UsageFont RTL} environment as follow:
-\begingroup
-\catcode`\<=12
-\begin{Ex}
- "\begin{RTL}"
- "\nastaligh"
- <text>
- "\end{RTL}"
-\end{Ex}
-\endgroup
-or even better define a new environment as follow:
-\begin{LVerb}
- \newenvironment{Nastaligh}{\begin{RTL}\nastaligh}
- {\end{RTL}}
-\end{LVerb}
-and then use this environment to typeset the text whenever you wish.
-\end{itemize}
-I am not going to explain this for Roman fonts because I would just repeat myself but it can be done quite similar to what I have been demonstrating above for Persian fonts.
-\subsection{The Bilingual Bibliography Environment}
-The commands \n\Persian\ and \n\Roman\ are defined so that you can switch between Persian and Roman texts easily in the bibliography environment.
-\subsection{The Options Of The Package}
-\subsubsection{The Footnotes}
-You can use the commands \n\footnote\ and \n\Footnote\ to insert Persian and English footnotes respectively. The package puts the numbers of all footnotes in Persian and automatically places the footnote-rule on the appropriate side of the page based on the first footnote on the page automatically by default\footnote{This means if your first footnote in a page is a Roman footnote, then the footnote-rule will appear on the left bottom side of the page and if your first footnote in a page is a Persian footnote, then the footnote rule will appear on the right bottom side of the page.}.
-
-\File{OPTION!}
-If you wish all Roman footnote numbers appear in Roman instead Persian, then you can load \XePersian\ with the appropriate option as follow:
- \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.
-
-
-
-\section{The Counters}
-The following counters are defined in the package:
-\begin{description}
-\mitem arabic
-
-The main {\UsageFont arabic} counter of \LaTeX.
-
-
-
-\mitem adadi
-
-Changes the counting to the Prsian Numbers.
-
-\mitem harfi
-
-Changes the counting to the Persian alphabets.
-
-\mitem tartibi
-
-Changes the counting to the Persian ordering numbers.
-\end{description}
-\section{Typesetting Persian Poems}
-To typeset a poem, you will nead to load \textsf{persianpoem} package as this package is not loaded by default and then use \textsf{oldpoem} or its starred version (\textsf{oldpoem*}). The \textsf{oldpoem} has the following syntax:
-\begin{LVerb}
- \begin{oldpoem}
- <verse1>&<verse2>\\
- <verse3>&<verse4>\\
- \end{oldpoem}
-\end{LVerb}
-\section{Multicolumns Typesetting}
-To typeset a text in multicolumns, you need to load \textsf{fmultico} package and use the \textsf{multicols} environment which has the following syntax:
-\begingroup
-\catcode`\<=12
-\begin{Ex}
- "\begin{multicols}{<number of columns>}"
- <text>
- "\end{multicols}"
-\end{Ex}
-\endgroup
-\section{The Persian Case}
-The Persian case is also defined which has the following syntax:
-\begin{LVerb}
- $$\rcases{\mbox{<branch1>}\cr\mbox{<branch2>}\cr ...}
- \mbox{<main>}$$
-\end{LVerb}
-\section{Index Generation}
-To generate index, you will need to place \textsf{persian.xdy} file in the current directory and then open a \textsf{command prompt} and do the following:
-\begin{LVerb}
- tex2xindy < filename.idx > filename.raw
- xindy -I xindy -M persian.xdy filename.raw
-\end{LVerb}
-\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.cls b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.cls
new file mode 100644
index 00000000000..f17eec1b48f
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.cls
@@ -0,0 +1,898 @@
+%%
+%% This is file `xepersian-magazine.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-magazine.cls')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{xepersian-magazine}[2009/01/05 v0.1 Typesetting Persian magazines in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{ifthen}
+\newlength{\xepersian@imgsize}
+\newlength{\xepersian@coltitsize}
+\newlength{\xepersian@pageneed}
+\newlength{\xepersian@pageleft}
+\newlength{\xepersian@indexwidth}
+\newcommand{\xepersian@ncolumns}{0}
+\newlength{\columnlines}
+\setlength{\columnlines}{0 pt} % no lines by default
+\newboolean{xepersian@hyphenatedtitles}
+\setboolean{xepersian@hyphenatedtitles}{true}
+\newboolean{xepersian@ninepoints}
+\setboolean{xepersian@ninepoints}{false}
+\newboolean{xepersian@showgrid}
+\setboolean{xepersian@showgrid}{false}
+\newboolean{xepersian@a3paper}
+\setboolean{xepersian@a3paper}{false}
+\newboolean{xepersian@insidefrontpage}
+\setboolean{xepersian@insidefrontpage}{false}
+\newboolean{xepersian@insideweather}
+\setboolean{xepersian@insideweather}{false}
+\newboolean{xepersian@insideindex}
+\setboolean{xepersian@insideindex}{false}
+\newcount\xepersian@gridrows
+\newcount\xepersian@gridcolumns
+\xepersian@gridrows=40
+\xepersian@gridcolumns=50
+\newcount\minraggedcols
+\minraggedcols=5
+\DeclareOption{10pt}{\PassOptionsToClass{10pt}{article}}
+\DeclareOption{11pt}{\PassOptionsToClass{11pt}{article}}
+\DeclareOption{12pt}{\PassOptionsToClass{12pt}{article}}
+\DeclareOption{twocolumn}%
+{\ClassWarning{xepersian-magazine}{Option 'twocolumn' not available for xepersian-magazine.}}
+\DeclareOption{notitlepage}%
+{\ClassWarning{xepersian-magazine}{Option 'notitlepage' not available for xepersian-magazine.}}
+\DeclareOption{twoside}%
+{\ClassWarning{xepersian-magazine}{Option 'twoside' not available for xepersian-magazine.}}
+\DeclareOption{9pt}{\setboolean{xepersian@ninepoints}{true}}
+\DeclareOption{hyphenatedtitles}{\setboolean{xepersian@hyphenatedtitles}{false}}
+\DeclareOption{columnlines}{\setlength{\columnlines}{0.1 pt}}
+\DeclareOption{showgrid}{\setboolean{xepersian@showgrid}{true}}
+\DeclareOption{a3paper}{\setboolean{xepersian@a3paper}{true}}
+\ProcessOptions\relax
+\LoadClass[10pt, onecolumn, titlepage, a4paper]{article}
+\RequirePackage{ifxetex}
+\RequirePackage{multido}
+\RequirePackage{datetime}
+\RequirePackage{fmultico}
+\RequirePackage{fancyhdr}
+\RequirePackage{fancybox}
+\ifthenelse{\boolean{xepersian@a3paper}}{%
+\RequirePackage[a3paper,headsep=0.5cm,vmargin={2cm,2cm},hmargin={1.5cm,1.5cm}]{geometry}
+}{
+\RequirePackage[headsep=0.5cm,vmargin={2cm,2cm},hmargin={1.5cm,1.5cm}]{geometry}
+}
+\RequirePackage[absolute]{textpos} % absoulte positioning
+\RequirePackage{hyphenat} % when hyphenate
+\RequirePackage{lastpage} % to know the last page number
+\RequirePackage{setspace} % set space between lines
+\RequirePackage{ragged2e}
+\newcommand{\raggedFormat}{\RaggedLeft}
+\AtEndOfClass{\xepersianInit}
+\ifthenelse{\boolean{xepersian@showgrid}}{%
+\AtBeginDocument{
+\grid[show]{\xepersian@gridrows}{\xepersian@gridcolumns}}
+\advance\minraggedcols by -1
+}{%
+\AtBeginDocument{
+\grid[]{\xepersian@gridrows}{\xepersian@gridcolumns}}
+\advance\minraggedcols by -1
+}
+\ifthenelse{\boolean{xepersian@ninepoints}}{
+\renewcommand{\normalsize}{%
+ \@setfontsize{\normalsize}{9pt}{10pt}%
+ \setlength{\abovedisplayskip}{5pt plus 1pt minus .5pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{3pt plus 1pt minus 2pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\tiny}{\@setfontsize{\tiny}{5pt}{6pt}}
+
+\renewcommand{\scriptsize}{\@setfontsize{\scriptsize}{7pt}{8pt}}
+
+\renewcommand{\small}{%
+ \@setfontsize{\small}{8pt}{9pt}%
+ \setlength{\abovedisplayskip}{4pt plus 1pt minus 1pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\footnotesize}{%
+ \@setfontsize{\footnotesize}{8pt}{9pt}%
+ \setlength{\abovedisplayskip}{4pt plus 1pt minus .5pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\large}{\@setfontsize{\large}{11pt}{13pt}}
+\renewcommand{\Large}{\@setfontsize{\Large}{14pt}{18pt}}
+\renewcommand{\LARGE}{\@setfontsize{\LARGE}{18pt}{20pt}}
+\renewcommand{\huge}{\@setfontsize{\huge}{20pt}{25pt}}
+\renewcommand{\Huge}{\@setfontsize{\Huge}{25pt}{30pt}}
+}{}
+\def\customwwwTxt#1{\gdef\@customwwwTxt{\lr{#1}}}
+\newcommand{\xepersian@wwwFormat}{\sffamily}
+\newcommand{\xepersian@www}{%
+\raisebox{-3pt}{{\xepersian@wwwFormat\@customwwwTxt}}
+}
+\newcommand{\xepersian@edition}{ویرایش من}
+\newcommand{\editionFormat}{\large\bfseries\texttt}
+\newcommand{\xepersian@editionLogo}{%
+\raisebox{-3pt}{%
+{\editionFormat\xepersian@edition}%
+}%
+}
+\newcommand{\indexFormat}{\large\bfseries}
+\newcommand{\xepersian@indexFrameTitle}[1]
+{\begin{flushright}{{\indexFormat #1}}\end{flushright}}
+
+\newcommand{\indexEntryFormat}{\normalsize}
+\newcommand{\xepersian@indexEntry}[1]{\begin{minipage}{13\TPHorizModule}%
+{\indexEntryFormat\noindent\ignorespaces{#1}}%
+\end{minipage}}
+\newcommand{\indexEntrySeparator}{\rule{\xepersian@indexwidth}{.1pt}}
+\newcommand{\indexEntryPageTxt}{صفحهٔ}
+\newcommand{\indexEntryPageFormat}{\footnotesize}
+\newcommand{\xepersian@indexEntryPage}[1]{%
+{\indexEntryPageFormat{\indexEntryPageTxt{}~#1}}%
+}
+\newcommand{\headDateTimeFormat}{}
+\newcommand{\xepersian@headDateTime}{%
+\headDateTimeFormat\date\hspace{5pt}$\parallel$\hspace{5pt}%
+\currenttime %
+}
+\newcommand{\weatherFormat}{\bfseries}
+\newcommand{\xepersian@weather}[1]{%
+\noindent{\weatherFormat #1}%
+}
+\newcommand{\weatherTempFormat}{\small}
+\newcommand{\weatherUnits}{\textdegree{}C}
+\newcommand{\xepersian@section}[0]{صفحهٔ جلو}
+\newcommand{\xepersian@headleft}{%
+{\small\bfseries \@custommagazinename}، \date
+}
+\newcommand{\xepersian@headcenter}{%
+\xepersian@section{}
+}
+\newcommand{\xepersian@headright}{%
+\small\xepersian@edition%
+\hspace*{5pt}\beginL\thepage\ / \pageref{LastPage}\endL
+}
+
+\newcommand{\heading}[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}}%
+}
+\newcommand{\xepersian@footcenter}{%
+}
+\newcommand{\xepersian@footleft}{%
+}
+
+\newcommand{\foot}[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]{%
+{%
+\begin{spacing}{2.0}{%
+\noindent\ignorespaces
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\firstTitleFormat #1}}%
+{{\firstTitleFormat #1}}%
+}%
+\end{spacing}%
+}%
+}
+\newcommand{\firstTextFormat}{}
+\newcommand{\xepersian@firstText}[1]{%
+{\noindent\ignorespaces\firstTextFormat #1}%
+}
+\newcommand{\secondTitleFormat}{\LARGE\bfseries}
+\newcommand{\xepersian@secondTitle}[1]{%
+\begin{spacing}{1.5}{%
+\noindent\ignorespaces\flushright
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\secondTitleFormat #1}}%
+{{\secondTitleFormat #1}}%
+}\end{spacing}%
+}
+\newcommand{\secondSubtitleFormat}{\large}
+\newcommand{\xepersian@secondSubtitle}[1]{%
+{\noindent\ignorespaces{\secondSubtitleFormat #1}}%
+}
+\newcommand{\secondTextFormat}{}
+\newcommand{\xepersian@secondText}[1]{%
+\begin{multicols}{2}
+{\noindent\ignorespaces\secondTextFormat #1}
+\end{multicols}
+}
+\newcommand{\thirdTitleFormat}{\Large\bfseries}
+\newcommand{\xepersian@thirdTitle}[1]{%
+\begin{spacing}{1.5}{%
+\noindent\ignorespaces\flushright
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\thirdTitleFormat #1}}%
+{{\thirdTitleFormat #1}}%
+}\end{spacing}%
+}
+\newcommand{\thirdSubtitleFormat}{\large}
+\newcommand{\xepersian@thirdSubtitle}[1]%
+{{\noindent\ignorespaces\thirdSubtitleFormat #1}}
+\newcommand{\thirdTextFormat}{}
+\newcommand{\xepersian@thirdText}[1]{{\thirdTextFormat #1}}
+\newcommand{\pictureCaptionFormat}{\small\bfseries}
+\newcommand{\xepersian@pictureCaption}[1]{%
+{\noindent\pictureCaptionFormat #1}%
+}
+\newcommand{\pagesFormat}{\bfseries\footnotesize}
+\newcommand{\xepersian@pages}[1]%
+{\noindent{\pagesFormat\MakeUppercase{#1}}}
+\newcommand{\innerTitleFormat}{\Huge}
+\newcommand{\xepersian@innerTitle}[1]{%
+\begin{flushright}{%
+\noindent
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\innerTitleFormat #1}}%
+{{\innerTitleFormat #1}}%
+}%
+\\%
+\end{flushright}%
+}
+\newcommand{\innerSubtitleFormat}{\large}
+\newcommand{\xepersian@innerSubtitle}[1]{{\innerSubtitleFormat #1}}
+\newcommand{\timestampTxt}{}
+\newcommand{\timestampSeparator}{|}
+\newcommand{\timestampFormat}{\small}
+\newcommand{\timestamp}[1]{%
+{\timestampFormat%
+#1~\timestampTxt{}%
+}~\timestampSeparator{}%
+}
+\newcommand{\innerAuthorFormat}{\footnotesize}
+\newcommand{\innerPlaceFormat}{\footnotesize\bfseries}
+\newcommand{\innerTextFinalMark}{\rule{0.65em}{0.65em}}
+\newcommand{\editorialTitleFormat}{\LARGE\textit}
+\newcommand{\xepersian@editorialTitle}[1]{\editorialTitleFormat{#1}}
+\newcommand{\editorialAuthorFormat}{\textsc}
+\newcommand{\shortarticleTitleFormat}{\LARGE\bfseries}
+\newcommand{\xepersian@shortarticleTitle}[1]{{\shortarticleTitleFormat #1}}
+\newcommand{\shortarticleSubtitleFormat}{\Large}
+\newcommand{\xepersian@shortarticleSubtitle}[1]{{\shortarticleSubtitleFormat #1}}
+\newcommand{\shortarticleItemTitleFormat}{\large\bfseries}
+\newcommand{\xepersian@shortarticleItemTitle}[1]{{\shortarticleItemTitleFormat #1}}
+\renewcommand{\maketitle}{\begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \null\vfil
+ \vskip 60\p@
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 1em%
+ {\LARGE «\xepersian@edition» \par}%
+ \vskip 3em%
+ {\large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1.5em%
+ {\large \@date \par}%
+ \end{center}\par
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+}
+\newcommand{\xepersian@say}[1]{\typeout{#1}}
+\newsavebox{\xepersian@fmbox}
+\newenvironment{xepersian@fmpage}[1]
+ {\begin{lrbox}{\xepersian@fmbox}\begin{minipage}{#1}}
+ {\end{minipage}\end{lrbox}\fbox{\usebox{\xepersian@fmbox}}}
+\newcommand{\image}[2]{
+\vspace{5pt}
+\setlength{\fboxsep}{1pt}
+\addtolength{\xepersian@imgsize}{\columnwidth}
+\addtolength{\xepersian@imgsize}{-1\columnsep}
+\ifxetex
+\setlength{\xepersian@pageneed}{1.5\xepersian@imgsize}
+\addtolength{\xepersian@pageneed}{50pt}
+\ClassWarning{xepersian-magazine}{%
+Image #1 needs: \the\xepersian@pageneed \space %
+and there is left: \the\page@free\space%
+}
+\ifdim \xepersian@pageneed < \page@free
+
+{\centering\fbox{%
+\includegraphics[width = \xepersian@imgsize,
+height = \xepersian@imgsize,
+keepaspectratio ]{#1}}}
+\xepersian@pictureCaption{#2}
+
+\vspace{5pt}
+\else
+\ClassWarning{Image #1 needs more space!%
+ It was not inserted!}
+\fi
+\fi
+}
+\textblockorigin{1cm}{1cm}
+\newdimen\xepersian@dx
+\newdimen\xepersian@dy
+\newcount\xepersian@cx
+\newcount\xepersian@cy
+\newcommand{\grid}[3][]{
+\xepersian@dx=\textwidth%
+\xepersian@dy=\textheight%
+\xepersian@cx=#3% %columns
+\xepersian@cy=#2% %rows
+
+\count1=#3%
+\advance\count1 by 1
+
+\count2=#2%
+\advance\count2 by 1
+
+\divide\xepersian@dx by #3
+\divide\xepersian@dy by #2
+
+\setlength{\TPHorizModule}{\xepersian@dx}
+\setlength{\TPVertModule}{\xepersian@dy}
+
+\ifthenelse{\equal{#1}{show}}{
+\multido{\xepersian@nrow=0+1}{\count2}{
+\begin{textblock}{\xepersian@cx}(0,\xepersian@nrow)
+\rule[0pt]{\textwidth}{.1pt}
+\end{textblock}
+}
+
+\multido{\xepersian@ncol=0+1}{\count1}{
+\begin{textblock}{\xepersian@cy}(\xepersian@ncol,0)
+\rule[0pt]{.1pt}{\textheight}
+\end{textblock}
+}
+}{}
+}
+\newcommand{\xepersianInit}{
+\setlength{\headheight}{14pt}
+\renewcommand{\headrulewidth}{0.4pt}
+
+\pagestyle{fancy}
+
+\setlength{\columnseprule}{\columnlines}
+\setlength{\fboxrule}{0.1 pt}
+
+}
+
+\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
+
+\vspace*{-3pt}
+
+{\Large\bfseries \@customlogo}
+\hrulefill
+\hspace{10pt}\xepersian@headDateTime
+
+}
+\newcommand{\minilogo}[0]{
+{\large\bfseries \@customminilogo}
+
+\vspace*{5pt}
+}
+\newcommand{\mylogo}[1]{
+{\beginR#1\endR}
+
+\noindent
+\xepersian@editionLogo\hspace{5pt}
+\hrulefill
+\hspace{5pt}\xepersian@headDateTime
+}
+\newcommand{\edition}[1]{\renewcommand{\xepersian@edition}{#1}}
+\newenvironment{frontpage}[0]
+{
+\setboolean{xepersian@insidefrontpage}{true}
+\thispagestyle{empty}
+\logo
+
+}%
+{
+\thispagestyle{empty}
+\clearpage
+\newpage
+\fancyhead{}
+ \fancyfoot{}
+\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}
+
+}
+\newcommand{\firstarticle}[3]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}{%
+\begin{textblock}{24}(22,5)
+}
+{
+\begin{textblock}{28}(22,5)
+}
+\vspace{-7pt}
+\xepersian@firstTitle{#1}
+\end{textblock}
+\begin{textblock}{29}(22,10)
+\vspace{5pt plus 2pt minus 2pt}
+
+\xepersian@firstText{\timestamp{#3}~#2}
+
+\end{textblock}
+
+\begin{textblock}{50}(0,15)
+\rule{50\TPHorizModule}{.3pt}
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\firstarticle\space in a wrong place.\MessageBreak
+\protect\firstarticle\space may only appear inside frontpage environment.
+}{%
+\protect\firstarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\secondarticle}[5]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{33}(2,16)
+\xepersian@pages{#4}
+\vspace{-5pt}
+\xepersian@secondTitle{#1}
+
+\vspace*{5pt}
+
+\xepersian@secondSubtitle{#2}
+
+\vspace*{-7pt}
+
+\xepersian@secondText{\timestamp{#5}~#3}
+
+\end{textblock}
+
+\begin{textblock}{33}(2,25)
+\vspace{5pt plus 2pt minus 2pt}
+
+\noindent\ignorespaces\rule{33\TPHorizModule}{.3pt}
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\secondarticle\space in a wrong place.\MessageBreak
+\protect\secondarticle\space may only appear inside frontpage environment.
+}{%
+\protect\secondarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\thirdarticle}[6]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{32}(2,26)
+\xepersian@pages{#5}
+\vspace{-5pt}
+\setlength{\fboxsep}{1pt}
+\xepersian@thirdTitle{#1}
+
+\vspace*{5pt}
+
+\xepersian@thirdSubtitle{#2}
+
+\vspace*{5pt}
+
+{\noindent\ignorespaces %
+\ifthenelse{\equal{#4}{}}{}
+
+\xepersian@thirdText{\timestamp{#6}~#3}
+
+}
+
+\vspace*{5pt}
+
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\thirdarticle\space in a wrong place.\MessageBreak
+\protect\thirdarticle\space may only appear inside frontpage environment.
+}{%
+\protect\thirdarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\firstimage}[2]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{18}(2,5)
+\setlength{\fboxsep}{1pt}
+\ifxetex % only in PDF
+\noindent\fbox{\includegraphics[width = 18\TPHorizModule ]{#1}}
+\fi
+
+\xepersian@pictureCaption{#2}
+\end{textblock}%
+}
+{\ClassError{xepersian-magazine}{%
+\protect\firstimage\space in a wrong place.\MessageBreak
+\protect\firstimage\space may only appear inside frontpage environment.
+}{%
+\protect\firstimage\space may only appear inside frontpage environment.
+}}
+}%
+\newcommand{\weatheritem}[5]{%
+\ifthenelse{\boolean{xepersian@insideweather}}{
+\begin{minipage}{45pt}
+\ifxetex
+\includegraphics[width=40pt]{#1}
+\fi
+\end{minipage}
+\begin{minipage}{50pt}
+\weatherTempFormat
+#2\\
+\beginL#3 $\|$ #4 \lr{\weatherUnits{}}\endL\\
+#5
+\end{minipage}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\weatheritem\space in a wrong place.\MessageBreak
+\protect\weatheritem\space may only appear inside weatherblock environment.
+}{%
+\protect\weatheritem\space may only appear inside weatherblock environment.\MessageBreak
+weatherblock environment may only appear inside frontpage environment.
+}%
+}
+}
+\newenvironment{weatherblock}[1]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\setboolean{xepersian@insideweather}{true}
+\begin{textblock}{32}(2,38)
+\vspace*{-15pt}
+
+\xepersian@weather{\beginR#1\endR}
+
+\vspace*{5pt}
+
+\noindent\begin{xepersian@fmpage}{32\TPHorizModule}
+\begin{minipage}{32\TPHorizModule}
+\hspace{5pt}
+
+}{%
+\ClassError{xepersian-magazine}{%
+weatherblock in a wrong place.\MessageBreak
+weatherblock may only appear inside frontpage environment.
+}{%
+weatherblock may only appear inside frontpage environment.
+}
+}
+}%
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+\setboolean{xepersian@insideweather}{false}
+}
+\newenvironment{authorblock}[0]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{15}(36,35)
+\setlength{\fboxsep}{5pt}
+\begin{xepersian@fmpage}{13\TPHorizModule}
+\begin{minipage}{13\TPHorizModule}
+\centering
+\minilogo
+
+}{%else
+\ClassError{xepersian-magazine}{%
+authorblock in a wrong place.\MessageBreak
+authorblock may only appear inside frontpage environment.
+}{%
+authorblock may only appear inside frontpage environment.
+}
+}
+}
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+}
+\newenvironment{indexblock}[1]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\setboolean{xepersian@insideindex}{true}%let's in
+\begin{textblock}{15}(36,16)
+\setlength{\xepersian@indexwidth}{13\TPHorizModule}
+\xepersian@indexFrameTitle{#1}
+
+\setlength{\fboxsep}{5pt} %espacio entre el frame y la imagen
+\begin{xepersian@fmpage}{\xepersian@indexwidth}
+\begin{minipage}{\xepersian@indexwidth}
+\vspace*{10pt}
+}{%else
+\ClassError{xepersian-magazine}{%
+indexblock in a wrong place.\MessageBreak
+indexblock may only appear inside frontpage environment.
+}{%
+indexblock may only appear inside frontpage environment.
+}
+}
+}%
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+\setboolean{xepersian@insideindex}{false}%let's out
+}
+\newcommand{\indexitem}[2]
+{
+\ifthenelse{\boolean{xepersian@insideindex}}{
+\xepersian@indexEntry{#1، \xepersian@indexEntryPage{\pageref{#2}}}
+
+\vspace{0.5cm}
+
+\noindent\ignorespaces\indexEntrySeparator{}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\indexitem\space in a wrong place.\MessageBreak
+\protect\indexitem\space may only appear inside indexblock environment.
+}{%
+\protect\indexitem\space may only appear inside indexblock environment.\MessageBreak
+indexblock environment may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\xepersian@inexpandedtitle}[1]{
+\begin{minipage}{.95\textwidth}
+\begin{center}
+\noindent\Large\textbf{\beginR#1\endR}
+\end{center}
+\end{minipage}
+}
+\newcommand{\expandedtitle}[2]{
+\end{multicols}
+
+\begin{center}
+\setlength{\fboxsep}{5pt}
+\setlength{\shadowsize}{2pt}
+\ifthenelse{\equal{#1}{shadowbox}}{%
+\shadowbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{doublebox}}{%
+\doublebox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{ovalbox}}{%
+\ovalbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{Ovalbox}}{%
+\Ovalbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{lines}}{
+\hrule
+\vspace*{8pt}
+\begin{center}
+\noindent\Large\textbf{#2}
+\end{center}
+\vspace*{8pt}
+\hrule
+}{}
+\end{center}
+
+\begin{multicols}{\xepersian@ncolumns{}}
+\ifnum \xepersian@ncolumns > \minraggedcols
+\raggedFormat
+\fi
+}
+\newcommand{\xepersian@incolumntitle}[2]{
+\begin{minipage}{#1}
+\begin{center}
+\noindent\normalsize\textbf{#2}
+\end{center}
+\end{minipage}
+}
+
+\newcommand{\columntitle}[2]{
+\vspace*{5pt}
+\begin{center}
+\setlength{\fboxsep}{5pt}
+\setlength{\shadowsize}{2pt}
+\addtolength{\xepersian@coltitsize}{\columnwidth}
+\addtolength{\xepersian@coltitsize}{-1\columnsep}
+\addtolength{\xepersian@coltitsize}{-5pt}
+\addtolength{\xepersian@coltitsize}{-1\shadowsize}
+\ifthenelse{\equal{#1}{shadowbox}}{%
+\shadowbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{doublebox}}{%
+\doublebox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{ovalbox}}{%
+\ovalbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{Ovalbox}}{%
+\Ovalbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{lines}}{
+\hrule
+\vspace*{5pt}
+\begin{center}
+\noindent\normalsize\textbf{#2}
+\end{center}
+\vspace*{5pt}
+\hrule
+}{}
+\end{center}
+}
+\renewcommand{\date}{%
+\longdate{\today}%
+}
+\newcommand{\authorandplace}[2]{%
+\rightline{%
+{\innerAuthorFormat #1},\space{}{\innerPlaceFormat #2}%
+}%
+\par %
+}
+\newcommand{\newsection}[1]{
+\renewcommand{\xepersian@section}{#1}
+}
+\newenvironment{article}[5]
+{
+\xepersian@say{Adding a new piece of article}
+\renewcommand{\xepersian@ncolumns}{#1}
+\begin{multicols}{#1}[
+\xepersian@pages{#4}
+\xepersian@innerTitle{#2}%
+\xepersian@innerSubtitle{#3}%
+][4cm]%
+\label{#5}
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{~\innerTextFinalMark{}
+\end{multicols}
+}
+\newcommand{\articlesep}{%
+\setlength{\xepersian@pageneed}{16000pt}
+\setlength\xepersian@pageleft{\pagegoal}
+\addtolength\xepersian@pageleft{-\pagetotal}
+
+\xepersian@say{How much left \the\xepersian@pageleft}
+
+\ifdim \xepersian@pageneed < \xepersian@pageleft
+\xepersian@say{Not enough space}
+\else
+\xepersian@say{Adding sep line between articles}
+\vspace*{10pt plus 10pt minus 5pt}
+\hrule
+\vspace*{10pt plus 5pt minus 5pt}
+\fi
+
+}
+\newcommand{\xepersian@editorialTit}[2]{
+\setlength{\arrayrulewidth}{.1pt}
+\begin{center}
+\begin{tabular}{c}
+\noindent
+\xepersian@editorialTitle{#1}
+\vspace{2pt plus 1pt minus 1pt}
+\\
+\hline
+\vspace{2pt plus 1pt minus 1pt}
+\\
+\editorialAuthorFormat{#2}
+\end{tabular}
+\end{center}
+}
+\newenvironment{editorial}[4]
+{
+\xepersian@say{Adding a new editorial}
+\begin{multicols}{#1}[%
+\xepersian@editorialTit{#2}{#3}%
+][4cm]
+\label{#4}
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{
+\end{multicols}
+}
+\newcommand{\xepersian@shortarticleTit}[2]{
+\begin{center}
+\vbox{%
+\noindent
+\xepersian@shortarticleTitle{#1}
+\vspace{4pt plus 2pt minus 2pt}
+\hrule
+\vspace{4pt plus 2pt minus 2pt}
+\xepersian@shortarticleSubtitle{#2}
+}
+\end{center}
+}
+\newenvironment{shortarticle}[4]
+{
+\xepersian@say{Adding a short article block}
+\begin{multicols}{#1}[\xepersian@shortarticleTit{#2}{#3}][4cm] %
+ \label{#4}
+\par %
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{
+\end{multicols}
+}
+\newcommand{\shortarticleitem}[2]{
+\goodbreak
+\vspace{5pt plus 3pt minus 3pt}
+{\vbox{\noindent\xepersian@shortarticleItemTitle{#1}}}
+\vspace{5pt plus 3pt minus 3pt}
+{\noindent #2}\\
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-magazine.cls'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.tex
deleted file mode 100644
index 489e5b1cdce..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-magazine.tex
+++ /dev/null
@@ -1,262 +0,0 @@
-\part{Magazine Typesetting}
-\section{Introduction}
-\textsf{xepersian-magazine} class allows you to create magazines, newspapers and any other types of papers. The output document has a front page and as many inner pages as desired. Articles appear one after another, telling the type, number of columns, heading, subheading, images, author and so forth. It is possible to change the aspect of (almost) everything therefore it is highly customizable. Commands to add different titles, headings and footers are also provided.
-\section{Usage}
-To create a magazine just load the class as usual\footnote{You also need to load \XePersian\ after loading the document class and choose fonts for the main text, Roman text and digits in maths formuals. For more detail see section \ref{s-1} of the manual.}, with
-\begingroup
-\catcode`\<=12
- \Mac \documentclass`[<class-options>]'{xepersian-magazine}
-\endgroup
-at the beginning of your source file. The class options are described in section \ref{s-options}.
-
-From this point it is possible to include packages and renew class commands described in section \ref{s-custom}.
-\subsection{Front Page}
-
-\File{\small frontpage}
-As every magazine, \textsf{xepersian-magazine} has its own front page. It includes main headings, an index, the magazine logo and other useful information. This environment should be the first you use within \textsf{xepersian-magazine} class but it is not mandatory.
-
-\File{\small\n\firstimage}
-\File{\small\n\firstarticle}
-The first two commands you can use inside the {\UsageFont frontpage} environment are \n\firstimage\ and \n\firstarticle\ which include, respectively, the main image and the main heading in the front page. The first one takes two arguments "<image>" and "<description>". Notice that second argument is optional and it declares the image caption; "<image>" defines the relative path to the image. In order to include the first piece of article use
-\begingroup
-\catcode`\<=12
- \Mac \firstarticle{<title>}{<opening>}{`<time>'}
-\endgroup
-first two arguments are mandatory and represent heading and the opening paragraph. Last argument is optional (you can leave it blank) and indicates the time when article happened.
-
-\File{\footnotesize\n\secondarticle}
-The second piece of article is included using the command \n\secondarticle\ just as the first article. The main difference are that this second piece has two more arguments and it does not include an image.
-\begingroup
-\catcode`\<=12
- \Mac \secondarticle{<title>}{<subtitle>}{<opening>}
- \Mac {<pagesof>}{`<time>'}
-\endgroup
-The new arguments "<subtitle>" and "<pagesof>" define a subtitle and the name of the section for this piece of article.
-
-\File{\small\n\thirdarticle}
-The third piece of article is the last one in the \textsf{xepersian-magazine} front page. It works like the \n\secondarticle.
-\begingroup
-\catcode`\<=12
- \Mac \thirdarticle{<title>}{<subtitle>}{<opening>}
- \Mac {<pagesof>}{`<time>'}
-\endgroup
-The arguments meaning is the same as \n\secondarticle\ command.
-
-\File{\small indexblock}
-\File{\small authorblock}
-\File{\small weatherblock}
-The front page includes three information blocks besides the news: {\UsageFont indexblock} which contains the index, {\UsageFont authorblock} which includes information about the author and a {\UsageFont weatherblock} containing a weather forecast. All these three environments are mostly a frame in the front page therefore they can be redefined to fit your personal wishes but I kept them to give an example and to respec the original \textsf{xepersian-magazine} format.
-
-\File{\small \n\indexitem}
-The {\UsageFont indexblock} environment contains a manually editted index of \textsf{xepersian-magazine}. It takes one optional argument "<title>" and places a title over the index block. To add entries inside the index just type
-\begingroup
-\catcode`\<=12
- \Mac \indexitem{`<title>'}{<reference>}
-\endgroup
-inside the environment. The "<title>" is the index entry text and the "<reference>" points to a article inside \textsf{xepersian-magazine}. It will be more clear when you read subsecton \ref{sub-1}. In order to get a correct output, it is necessary to leave a blank line between index items.
-
-The {\UsageFont authorblock} environment can include whatever you would like. I called it {\UsageFont authorblock} because I think it is nice to include some author reference in the front page: who you are, why are you doing this... This environment creates a frame box in the bottom right corner of the front page with your own logo at the top.
-
-\File{\small\n\weatheritem}
-Finally, the {\UsageFont weatherblock} lets you include a weather forecast. It takes one optional argument "<title>" that places a title over the weather block. It can fit up to three weather icons with maximum and minimum temperatures, description and name. To add each of the weather entries type the following
-\begingroup
-\catcode`\<=12
- \Mac \weatheritem{<image>}{<day-name>}{<max>}
- \Mac {<min>}{<short-des>}
-\endgroup
-The first argument includes the path to the weather icon (i.e. sunny or rainy), "<day-name>" like Monday, "<max>" and "<min>" are the highest and lowest day temperatures and "<short-des>" is a brief description of the weather condition: partly cloudy, sunny and windy \ldots
-\subsection{Inside\label{sub-1}}
-Once we have created the front page we should include all articles inside our magazine. \textsf{xepersian-magazine} arranges all articles one after each other, expanding headings all over the page and splitting the article text in the number of columns we wish. There are three different environments to define a piece of article: the {\UsageFont article} environment described in section \ref{subsub-1}, the {\UsageFont editorial} environment \ref{subsub-2} for opinion articles and the {\UsageFont shortarticle} environment explained in \ref{subsub-3}.
-\subsubsection{The article environment\label{subsub-1}}
-
-\File{\small article}The main environment to include a piece of article is called {\UsageFont article}. It takes four arguments that set up the headings and structure of the article.
-\begingroup
-\catcode`\<=12
-\begin{Ex}
- "\begin{article}{<num-of-columns>}{<title>}{<subtitle>}"\\"{<pagesof>}{<label>}" \\
-\ldots\ "<text>" \ldots\ \\
- "\end{article}"
-\end{Ex}
-\endgroup
-
-The first argument "<num-of-columns>" sets the number of columns the article will be divided whereas "<label>" is used when pointing an article from the index in the front page. The rest of the arguments are easy to understand.
-
-Inside the {\UsageFont article} environment, besides the main text of the article, it is possible to include additional information using several class commands.
-
-\File{\scriptsize\n\authorandplace}
-\File{\small\n\timestamp}
-The \n\authorandplace"{<author>}{<place>}" inserts the name of the editor and the place where the article happened in the way many magazines do. Another useful command is \n\timestamp"{<time>}" which includes the time and a separator just before the text. These two commands should be used before the text because they type the text as the same place they are executed.
-
-\File{\small\n\image}
-To include images within the text of an article, \textsf{xepersian-magazine} provides an \n\image\ command. Since \textsf{fmultico} package does not provide any float support for its \textsf{multicols} environment, I created a macro that includes an image only if that is possible, calculating if there is enough space for the image.It is not the best solution but it works quite well and I could not find a better one. To include an image use the command and its two arguments: the relative path to the image and a short description.
-\begingroup
-\catcode`\<=12
- \Mac \image{<image>}{<description>}
-\endgroup
-
-\File{\small\n\columntitle}
-\File{\footnotesize\n\expandedtitle}
-Within the text of the article, it is possible to add column and expanded titles. The main difference between them is that the first one keeps inside the width of an article column whereas the second expands all over the width of the page, breaking all the columns. Their use is analogous, as follows
-\begingroup
-\catcode`\<=12
- \Mac \columntitle{<type>}{<text>}
- \Mac \expandedtitle{<type>}{<text>}
-\endgroup
-These two commands use \textsf{fancybox} package features. That’s why there are five different types of titles which correspond mainly with fancybox ones: \textsf{shadowbox},
-\textsf{doublebox}, \textsf{ovalbox}, \textsf{Ovalbox} and \textsf{lines}.
-\subsubsection{The editorial environment\label{subsub-2}}
-
-\File{editorial}
-In addition to the editorial article environment, one can use the editorial environment to create editorial or opinion texts. The main feature is that it transforms the style
-of the heading. Although this environment accepts all the commands article takes, it does not make any sense to use the \n\authorandplace\ command within it since it includes an author argument. To create an editorial text use
-\begingroup
-\catcode`\<=12
-\begin{Ex}
-"\begin{editorial}{<num-of-columns>}{<title>}{<author>}{<label>}"\\
- \ldots\ "<text>" \ldots\ \\
- "\end{editorial}"
-\end{Ex}
-\endgroup
-All arguments have the same meaning as article environment (see \ref{subsub-1}).
-\subsubsection{The shortarticle environment\label{subsub-3}}
-
-\File{\small shortarticle}
-The shortarticle environment creates a block of short article. Althought it has its own title and subtitle, each piece of article within it may have a title. To use it just
-type:
-\begingroup
-\catcode`\<=12
-\begin{Ex}
-"\begin{shortarticle}{<num-of-columns>}{<title>}{<subtitle>}{<label>}"\\
-\ldots\ "<text>" \ldots\ \\
-"\shortarticleitem{<title>}{<text>}"\\
-\ldots\ \\
-"\end{shortarticle}"
-\end{Ex}
-\endgroup
-You can also specify the number of columns of the block like editorial and article environments. To add a piece of article inside the shortarticle use the \n\shortarticleitem, indicating a title and the text of the issue.
-\subsubsection{Commands between articles}
-
-\File{\n\articlesep}
-\File{\small\n\newsection}
-There are two commands you can use among the articles inside \textsf{xepersian-magazine}: \n\articlesep\ and \n\newsection. The first one does not take any parameter and just draws a line between two articles. The second changes the content of "\xepersian@section" to the new "<section name>". From the point it is used, all articles which follow will be grouped within the new section.
-\begingroup
-\catcode`\<=12
- \Mac \newsection{<section name>}
-\endgroup
-
-
-\section{Customization\label{s-custom}}
-\textsf{xepersian-magazine} includes many commands which can be used to customize its aspect, from the front page to the last page. I will list them grouped so it is easy to find
-them. Treat them as standard \LaTeX\ commands, using \n\renewcommand\ to change
-their behaviour.
-\subsection{Front Page}
-
-\File{\small\n\customlogo}
-\File{\scriptsize\n\customminilogo}
-\File{\tiny\n\custommagazinename}
-When creating a magazine, everyone wants to show its own logo instead of \textsf{xepersian-magazine} default heading. To achieve this, you need to put the following command at the preamble of your document:
-\begingroup
-\catcode`\<=12
- \Mac \customlogo{<text>}
- \Mac \customminilogo{<text>}
- \Mac \custommagazinename{<text>}
-\endgroup
-
-\File{\n\edition}
-\File{\footnotesize\n\editionformat}
-The edition text has to be declared in the preamble of the document. One important thing to know is that \n\author, \n\date\ and \n\title\ have no effect inside \textsf{xepersian-magazine} since the magazine date is taken from \n\today\ command and the other two are only for the title page (if using \n\maketitle).
-
-\newpage
-\File{\footnotesize\n\indexFormat}
-\File{\tiny\n\indexEntryFormat}
-\File{\tiny\n\indexEntryPageTxt}
-\File{\tiny\n\indexEntryPageFormat}
-\File{\tiny\n\indexEntrySeparator}
-When defining the index in the front page, there are several commands to customize the final index style. \n\indexFormat\ sets the format of the title; \n\indexEntryFormat, the format of each index entry; \n\indexEntryPageTxt\ and \n\indexEntryPageFormat\ lets you define which is the text that goes with the page number and its format. Finally, \textsf{xepersian-magazine} creates a thin line between index entries, you can redefine it using \n\indexEntrySeparator. To get the index with "xepersian@indexwidth" is provided.
-\vskip 3.5cm
-
-\File{\tiny\n\weatherFormat}
-\File{\tiny\n\weatherTempFormat}
-\File{\tiny\n\weatherUnits}
-Relating to the weather block, the title format can be changed redefining \n\weatherFormat. In order to customize the format of the temperature numbers and their units it is necessary to redefine \n\weatherTempFormat\ and \n\weatherUnits\ respectively.
-\vskip 3cm
-
-\File{\tiny\n\*TitleFormat}
-\File{\tiny\n\*SubtitleFormat}
-\File{\tiny\n\*TextFormat}
-The main article that appear in the front page can change their formats. To obtain that there are three standard commands to modify the title, subtitle and text style. You just have to replace the star ("*") with first, second or third depending on which article you are editing. Note that first piece of article has no subtitle therefore it does not make any sense to use the non-existent command \n\firstSubtitleFormat.
-\vskip 2cm
-
-\File{\tiny\n\pictureCaptionFormat}
-\File{\tiny\n\pagesFormat}
-Two other elements to configure are the picture captions and the pages or section format in the entire document. To proceed just redefine the macros \n\pictureCaptionFormat\ and \n\pagesFormat.
-\newpage
-\subsection{Inside The Magazine}
-\File{\tiny\n\innerTitleFormat}
-\File{\tiny\n\innerSubtitleFormat}
-\File{\tiny\n\innerAuthorFormat}
-\File{\tiny\n\innerPlaceFormat}
-The articles inside \textsf{xepersian-magazine} may have a different format from the ones in the front page. To change their title or subtitle format redefine \n\innerTitleFormat\ and \n\innerSubtitleFormat. The article text format matches the document general definition. When using the \n\authorandplace\ command, you might want to change the default style. Just renew \n\innerAuthorFormat\ and \n\innerPlaceFormat\ to get the results.
-\vskip 3cm
-
-\File{\tiny\n\timestampTxt}
-\File{\tiny\n\timestampSeparator}
-\File{\tiny\n\timestampFormat}
-The \n\timestamp\ command described in section \ref{subsub-1} lets you introduce the time of the event before the article text. You can configure its appearance by altering
-several commands: \n\timestampTxt\ which means the text after the timestamp; \n\timestampSeparator\ which defines the element between the actual timestamp and the beginning of the text and, finally, \n\timestampFormat\ to change the entire timestamp format.
-\vskip 2cm
-
-\File{\tiny\n\innerTextFinalMark}
-\textsf{xepersian-magazine} puts a small black square at the end of the article. As I wanted to create a highly customizable \LaTeX\ class I added the macro \n\innerTextFinalMark\ to change this black square. This item will appear always following the last character of the text with the "~" character.
-
-\File{\tiny\n\minraggedcols}
-\File{\tiny\n\raggedFormat}
-The \n\minraggedcols\ counter is used to tell \textsf{xepersian-magazine} when article text should be ragged instead of justified. The counter represents the minimum number of columns that are needed in order to use ragged texts. For example, if \n\minraggedcols\ is set to 3, all articles with 3 columns or more will be ragged. Articles with 1, 2 columns will have justified text. By default, \n\minraggedcols\ is set to 4.
-
-The \n\raggedFormat\ macro can be redefined to fit user ragged style. Default value is \n\RaggedLeft.
-
-\File{\n\heading}
-\File{\n\foot}
-\textsf{xepersian-magazine} includes package \textsf{fancyhdr} for changing headings and footers. Although it is possible to use its own commands to modify \textsf{xepersian-magazine} style, there are two commands to change headings and foot appearance. Place them in the preamble of your \textsf{xepersian-magazine} document.
-\begingroup
-\catcode`\<=12
- \Mac \heading{<left>}{<center>}{<right>}
- \Mac \foot{<left>}{<center>}{<right>}
-\endgroup
-If you still prefer to use fancyhdr macros, use them after the {\UsageFont frontpage} environment.
-
-\begin{drivers}
-\textsf{xepersian-magazine} by default places no headers and footers. If you want headers and foooters, then after loading \textsf{xepersian} package, you should write "\pagestyle{fancy}" at the preamble of your document.
-\end{drivers}
-
-\section{Class Options\label{s-options}}
-The \textsf{xepersian-magazine} class is in itself an alteration of the standard \textsf{article} class, thus
-it inherits most of its class options but \textsf{twoside}, \textsf{twocolumn}, \textsf{notitlepage} and
-\textsf{a4paper}. If you find problems when loading other article features, please let me
-know to fix it.
-
-There are also five own options that \textsf{xepersian-magazine} implements.
-\begin{description}
-\mitem a3paper
-
-(false) This option makes \textsf{xepersian-magazine} 297 mm width by 420 mm height.
-This option is implemented because the standard \textsf{article} class does not
-allow this document size.
-
-\mitem 9pt
-
-(false) Allows the 9pt font size that \textsf{article} class does not include (default
-is 10pt).
-
-\mitem columnlines
-
-(false) Adds lines between columns in the entire \textsf{xepersian-magazine}. The
-default line width is 0.1pt but it is possible to change this by setting length
-\n\columnlines\ in the preamble.
-
-\mitem showgrid
-(false) This option is only for developing purposes. Because the front
-page has a personal design using the textpos package, I created this grid to
-make easier the lay out.
-\end{description}
-\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-mathsdigitspec.sty b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-mathsdigitspec.sty
new file mode 100644
index 00000000000..845b7398b75
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-mathsdigitspec.sty
@@ -0,0 +1,106 @@
+%%
+%% This is file `xepersian-mathsdigitspec.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-mathsdigitspec.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-mathsdigitspec}
+ [2009/04/22 v1.0.1 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)]
+\@zf@mathfalse
+\def\@preamblecmds{}
+\newcommand\not@onlypreamble[1]{{%
+ \def\do##1{\ifx#1##1\else\noexpand\do\noexpand##1\fi}%
+ \xdef\@preamblecmds{\@preamblecmds}}}
+\def\gm@notprerr{ can be used only in preamble (\on@line)}
+\AtBeginDocument{%
+ \def\do#1{\noexpand\do\noexpand#1}%
+ \edef\@preamblecmds{%
+ \def\noexpand\do##1{%
+ \def##1{\noexpand\PackageError{gmutils/LaTeX}%
+ {\noexpand\string##1 \noexpand\gm@notprerr}\noexpand\@eha}}%
+ \@preamblecmds}}
+\def\nocite#1{%
+ \@bsphack{\setbox0=\hbox{\cite{#1}}}\@esphack}
+\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}}
+\newcommand\SetMathCode[4]{%
+ \XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\newcommand\SetMathCharDef[4]{%
+ \XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\newcommand\setdigitfont[2][]{%
+ \let\glb@currsize\relax
+ \setkeys*[xepersian-mathsdigitspec]{options}{#1}%
+ \edef\@tempa{\noexpand\zf@fontspec{%
+ \XKV@rm}{#2}}\@tempa
+ \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
+ \DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n}
+ \SetSymbolFont{OPERATORS}{bold}{EU1}{\zf@family} {bx}{n}
+ \DeclareMathAlphabet {\mathit}{EU1}{\zf@family}{m}{it}
+ \DeclareSymbolFontAlphabet{\mathrm} {OPERATORS}
+ \DeclareMathAlphabet {\mathbf}{EU1}{\zf@family}{bx}{n}
+ \SetMathCode{`0}{\mathalpha}{OPERATORS}{"06F0}
+ \SetMathCode{`1}{\mathalpha}{OPERATORS}{"06F1}
+ \SetMathCode{`2}{\mathalpha}{OPERATORS}{"06F2}
+ \SetMathCode{`3}{\mathalpha}{OPERATORS}{"06F3}
+ \SetMathCode{`4}{\mathalpha}{OPERATORS}{"06F4}
+ \SetMathCode{`5}{\mathalpha}{OPERATORS}{"06F5}
+ \SetMathCode{`6}{\mathalpha}{OPERATORS}{"06F6}
+ \SetMathCode{`7}{\mathalpha}{OPERATORS}{"06F7}
+ \SetMathCode{`8}{\mathalpha}{OPERATORS}{"06F8}
+ \SetMathCode{`9}{\mathalpha}{OPERATORS}{"06F9}
+ \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}
+}
+\ifx\newcommand\undefined\else
+ \newcommand{\ZifferAn}{}
+\fi
+\mathchardef\ziffer@DotOri="013A
+{\ZifferAn
+ \catcode`\.=\active\gdef.{\begingroup\obeyspaces\futurelet\n\ziffer@dcheck}}
+\def\ziffer@dcheck{\ziffer@check\ZifferLeer\ziffer@DotOri}
+\def\ziffer@check#1#2{%
+ \ifx\n1\endgroup#1\else
+ \ifx\n2\endgroup#1\else
+ \ifx\n3\endgroup#1\else
+ \ifx\n4\endgroup#1\else
+ \ifx\n5\endgroup#1\else
+ \ifx\n6\endgroup#1\else
+ \ifx\n7\endgroup#1\else
+ \ifx\n8\endgroup#1\else
+ \ifx\n9\endgroup#1\else
+ \ifx\n0\endgroup#1\else
+ \endgroup#2%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+\mathcode`.="8000\relax
+\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-mathsdigitspec.sty'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-multiplechoice.sty b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-multiplechoice.sty
new file mode 100644
index 00000000000..226ccacf409
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-multiplechoice.sty
@@ -0,0 +1,164 @@
+%%
+%% This is file `xepersian-multiplechoice.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-multiplechoice.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-multiplechoice}[2009/03/21 v0.1
+ Multiple Choice Questionnaire class for Persian in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{pifont}
+\RequirePackage{fullpage}
+\RequirePackage{ifthen}
+\RequirePackage{calc}
+\RequirePackage{verbatim}
+\RequirePackage{fmultico}
+\def\@headerfont{\bfseries}
+\newcommand\headerfont[1]{\gdef\@headerfont{#1}}
+\def\@X{X}
+\newcommand\X[1]{\gdef\@X{#1}}
+\def\pbs#1{\let\tmp=\\#1\let\\=\tmp}
+\newcommand\makeform@nocorrection{%
+ \addtocontents{frm}{\protect\end{tabular}}
+ \@starttoc{frm}}
+\newcommand\makeform@correction{%
+ \addtocontents{frm}{\protect\end{tabular}}}
+\newcommand\makemask@nocorrection{%
+ \addtocontents{msk}{\protect\end{tabular}}
+ \@starttoc{msk}}
+\newcommand\makemask@correction{%
+ \addtocontents{msk}{\protect\end{tabular}}}
+\newlength\questionspace
+\setlength\questionspace{0pt}
+\newcommand\answerstitle[1]{\gdef\@answerstitle{#1}}
+\def\@answerstitlefont{\bfseries}
+\newcommand\answerstitlefont[1]{\gdef\@answerstitlefont{#1}}
+\def\@answernumberfont{\bfseries}
+\newcommand\answernumberfont[1]{\gdef\@answernumberfont{#1}}
+\newcounter{question}\stepcounter{question}
+\newcounter{@choice}
+\def\@initorcheck{%
+ \xdef\@choices{\the@choice}%
+ \setcounter{@choice}{1}%
+ \gdef\@arraydesc{|l||}%
+ \gdef\@headerline{}%
+ \whiledo{\not{\value{@choice}>\@choices}}{
+ \xdef\@arraydesc{\@arraydesc c|}
+ \def\@appendheader{\g@addto@macro\@headerline}
+ \@appendheader{&\protect\@headerfont}
+ \edef\@the@choice{{\alph{@choice}}}
+ \expandafter\@appendheader\@the@choice
+ \stepcounter{@choice}}%
+ \addtocontents{frm}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \addtocontents{msk}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \gdef\@initorcheck{%
+ \ifthenelse{\value{@choice} = \@choices}{}{%
+ \ClassError{xepersian-multiplechoice}{Question \thequestion: wrong number of choices
+ (\the@choice\space instead of \@choices)}{%
+ Questions must all have the same number of proposed answers.%
+ \MessageBreak
+ Type X <return> to quit, fix your MCQ (multiple choice question) and rerun XeLaTeX.}}}}
+\newenvironment{question}[1]{%
+ %% \begin{question}
+ \begin{minipage}{\textwidth}
+ \xdef\@formanswerline{\@questionheader}%
+ \xdef\@maskanswerline{\@questionheader}%
+ \fbox{\parbox[c]{\linewidth}{#1}}
+ \vspace\questionspace\par
+ {\@answerstitlefont\@answerstitle}
+\begin{multicols}{4}
+ \begin{list}{\@answernumberfont\alph{@choice})~}{\usecounter{@choice}}}{%
+ %% \end{question}
+ \end{list}
+\end{multicols}
+ \@initorcheck%
+ \addtocontents{frm}{\@formanswerline\protect\\\protect\hline}%
+ \addtocontents{msk}{\@maskanswerline\protect\\\protect\hline}%
+ \end{minipage}
+ \stepcounter{question}}
+\def\@truesymbol{\ding{52}~}
+\def\@falsesymbol{\ding{56}~}
+\newcommand\truesymbol[1]{\gdef\@truesymbol{#1}}
+\newcommand\falsesymbol[1]{\gdef\@falsesymbol{#1}}
+\def\@true@nocorrection{\item}
+\def\@false@nocorrection{\item}
+\def\@true@correction{\item[\@truesymbol\refstepcounter{@choice}]}
+\def\@false@correction{\item[\@falsesymbol\refstepcounter{@choice}]}
+\newcommand\true{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&\@X}%
+ \@true}%
+\newcommand\false{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&}%
+ \@false}%
+\def\@correctionstyle{\itshape}
+\newcommand\correctionstyle[1]{\gdef\@correctionstyle{#1}}
+\newenvironment{@correction}{\@correctionstyle}{}
+ \def\@questionheader{سؤال \thequestion}
+ \answerstitle{جوابهای ممکن:}
+\DeclareOption{nocorrection}{%
+ \let\@true\@true@nocorrection
+ \let\@false\@false@nocorrection
+ \let\correction\comment
+ \let\endcorrection\endcomment
+ \def\makeform{\makeform@nocorrection}
+ \def\makemask{\makemask@nocorrection}}
+\DeclareOption{correction}{%
+ \let\@true\@true@correction
+ \let\@false\@false@correction
+ \let\correction\@correction
+ \let\endcorrection\end@correction
+ \def\makeform{\makeform@correction}
+ \def\makemask{\makemask@correction}}
+\ExecuteOptions{nocorrection}
+\newcommand\questiontitle[1]{\gdef\@questiontitle{#1}}
+\def\@questiontitlefont{\bfseries}
+\newcommand\questiontitlefont[1]{\gdef\@questiontitlefont{#1}}
+\newlength\questiontitlespace
+\setlength\questiontitlespace{5pt}
+\newlength\questionsepspace
+\setlength\questionsepspace{20pt}
+\gdef\@questionsepspace{0pt}
+\let\old@question\question
+\let\old@endquestion\endquestion
+\renewenvironment{question}[1]{%
+ %% \begin{question}
+ \vspace\@questionsepspace
+ \fbox{\parbox[c]{0.25\linewidth}{\@questiontitlefont\@questiontitle}}
+ \nopagebreak\vspace\questiontitlespace\par
+ \old@question{#1}}{%
+ %% \end{question}
+ \old@endquestion
+ \gdef\@questionsepspace{\questionsepspace}}
+ \questiontitle{سؤال \thequestion:}
+\ProcessOptions
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-multiplechoice.sty'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-persiancal.sty b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-persiancal.sty
new file mode 100644
index 00000000000..c3ed422f0d6
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-persiancal.sty
@@ -0,0 +1,197 @@
+%%
+%% This is file `xepersian-persiancal.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-persiancal.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-persiancal}
+
+\newif\ifXePersian@leap \newif\ifXePersian@kabiseh
+\newcount\XePersian@i \newcount\XePersian@y \newcount\XePersian@m \newcount\XePersian@d
+\newcount\XePersian@latini \newcount\XePersian@persiani
+\newcount\XePersian@latinii \newcount\XePersian@persianii
+\newcount\XePersian@latiniii \newcount\XePersian@persianiii
+\newcount\XePersian@latiniv \newcount\XePersian@persianiv
+\newcount\XePersian@latinv \newcount\XePersian@persianv
+\newcount\XePersian@latinvi \newcount\XePersian@persianvi
+\newcount\XePersian@latinvii \newcount\XePersian@persianvii
+\newcount\XePersian@latinviii \newcount\XePersian@persianviii
+\newcount\XePersian@latinix \newcount\XePersian@persianix
+\newcount\XePersian@latinx \newcount\XePersian@persianx
+\newcount\XePersian@latinxi \newcount\XePersian@persianxi
+\newcount\XePersian@latinxii \newcount\XePersian@persianxii
+ \newcount\XePersian@persianxiii
+
+\newcount\XePersian@temp
+\newcount\XePersian@temptwo
+\newcount\XePersian@tempthree
+\newcount\XePersian@yModHundred
+\newcount\XePersian@thirtytwo
+\newcount\XePersian@dn
+\newcount\XePersian@sn
+\newcount\XePersian@mminusone
+
+\def\persiantoday{%
+\XePersian@y=\year \XePersian@m=\month \XePersian@d=\day
+\XePersian@temp=\XePersian@y
+\divide\XePersian@temp by 100\relax
+\multiply\XePersian@temp by 100\relax
+\XePersian@yModHundred=\XePersian@y
+\advance\XePersian@yModHundred by -\XePersian@temp\relax
+\ifodd\XePersian@yModHundred
+ \XePersian@leapfalse
+\else
+ \XePersian@temp=\XePersian@yModHundred
+ \divide\XePersian@temp by 2\relax
+ \ifodd\XePersian@temp\XePersian@leapfalse
+ \else
+ \ifnum\XePersian@yModHundred=0%
+ \XePersian@temp=\XePersian@y
+ \divide\XePersian@temp by 400\relax
+ \multiply\XePersian@temp by 400\relax
+ \ifnum\XePersian@y=\XePersian@temp\XePersian@leaptrue\else\XePersian@leapfalse\fi
+ \else\XePersian@leaptrue
+ \fi
+ \fi
+\fi
+\XePersian@latini=31\relax
+\ifXePersian@leap
+ \XePersian@latinii = 29\relax
+\else
+ \XePersian@latinii = 28\relax
+\fi
+\XePersian@latiniii = 31\relax
+\XePersian@latiniv = 30\relax
+\XePersian@latinv = 31\relax
+\XePersian@latinvi = 30\relax
+\XePersian@latinvii = 31\relax
+\XePersian@latinviii = 31\relax
+\XePersian@latinix = 30\relax
+\XePersian@latinx = 31\relax
+\XePersian@latinxi = 30\relax
+\XePersian@latinxii = 31\relax
+\XePersian@thirtytwo=32\relax
+\XePersian@temp=\XePersian@y
+\advance\XePersian@temp by -17\relax
+\XePersian@temptwo=\XePersian@temp
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\ifnum\XePersian@temp=\XePersian@thirtytwo\XePersian@kabisehfalse
+\else
+ \XePersian@temptwo=\XePersian@temp
+ \divide\XePersian@temptwo by 4\relax
+ \multiply\XePersian@temptwo by 4\relax
+ \advance\XePersian@temp by -\XePersian@temptwo
+ \ifnum\XePersian@temp=\z@\XePersian@kabisehtrue\else\XePersian@kabisehfalse\fi
+\fi
+\XePersian@tempthree=\XePersian@y % Number of Leap years
+\advance\XePersian@tempthree by -1
+\XePersian@temp=\XePersian@tempthree % T := (MY-1) div 4
+\divide\XePersian@temp by 4\relax
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((MY-1) div 100)
+\divide\XePersian@temptwo by 100\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree % T := T + ((MY-1) div 400)
+\divide\XePersian@temptwo by 400\relax
+\advance\XePersian@temp by \XePersian@temptwo
+\advance\XePersian@tempthree by -611 % Number of Kabise years
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 8\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree %
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@tempthree by -\XePersian@temptwo
+\ifnum\XePersian@tempthree=32\advance\XePersian@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\XePersian@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\XePersian@temp by -\XePersian@tempthree
+\advance\XePersian@temp by -137 % T := T - 137 Adjust the value
+\XePersian@persiani=31
+\advance\XePersian@persiani by -\XePersian@temp % now 31 - T is the persiani
+\XePersian@persianii = 30\relax
+\ifXePersian@kabiseh
+ \XePersian@persianiii = 30\relax
+\else
+ \XePersian@persianiii = 29\relax
+\fi
+\XePersian@persianiv = 31\relax
+\XePersian@persianv = 31\relax
+\XePersian@persianvi = 31\relax
+\XePersian@persianvii = 31\relax
+\XePersian@persianviii= 31\relax
+\XePersian@persianix = 31\relax
+\XePersian@persianx = 30\relax
+\XePersian@persianxi = 30\relax
+\XePersian@persianxii = 30\relax
+\XePersian@persianxiii= 30\relax
+\XePersian@dn= 0\relax
+\XePersian@sn= 0\relax
+\XePersian@mminusone=\XePersian@m
+\advance\XePersian@mminusone by -1\relax
+\XePersian@i=0\relax
+\ifnum\XePersian@i < \XePersian@mminusone
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@dn by \csname XePersian@latin\romannumeral\the\XePersian@i\endcsname
+\ifnum\XePersian@i<\XePersian@mminusone \repeat
+\fi
+\advance \XePersian@dn by \XePersian@d
+\XePersian@i=1\relax
+\XePersian@sn = \XePersian@persiani
+\ifnum \XePersian@sn<\XePersian@dn
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@sn by \csname XePersian@persian\romannumeral\the\XePersian@i\endcsname
+\ifnum \XePersian@sn<\XePersian@dn \repeat
+\fi
+\ifnum \XePersian@i < 4
+ \XePersian@m = 9 \advance\XePersian@m by \XePersian@i
+ \advance \XePersian@y by -622\relax
+\else
+ \XePersian@m = \XePersian@i \advance \XePersian@m by -3\relax
+ \advance \XePersian@y by -621\relax
+\fi
+\advance\XePersian@sn by -\csname XePersian@persian\romannumeral\the\XePersian@i%
+\endcsname
+\ifnum\XePersian@i = 1
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by 30 \advance\XePersian@d by -\XePersian@persiani
+\else
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by -\XePersian@sn
+\fi
+\beginL\number\XePersian@d\endL\space%
+\persianmonth{\XePersian@m}\space\beginL\number\XePersian@y\endL%
+}
+\def\persianmonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or
+خرداد\or تیر\or
+مرداد\or
+شهریور\or مهر\or
+آبان\or آذر\or
+دی\or بهمن\or
+اسفند\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-persiancal.sty'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex
deleted file mode 100644
index 71759f34e7e..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-presentation.tex
+++ /dev/null
@@ -1,200 +0,0 @@
-\part{Producing Presentations}
-At the moment, there are two classes that you can prepare your presentations with. These classes are:
-\section{xepersian-presentations class}
-\textsf{xepersian-presentation} is a simple class for presentations to be shown on screen or beamer. It is derived from \LaTeX 's
-article class.The “virtual paper size” of documents produced by this class: width=128mm,
-height=96mm. \textsf{xepersian-presentation} requires that the \textsf{fancyhdr} and \textsf{geometry} packages are available on the system.
-Enhancements to the \textsf{xepersian-presentation} class are easily made available by other packages, these include slides with a background from a bitmap (\textsf{eso-pic}
-package).
-
-\subsection{Usage}
-The class is used with
-\begingroup
-\catcode`\<=12
- \Mac \documentclass`[<options>]'{xepersian-presentation}
-\endgroup
-
-\File{OPTION!}
-Options of the \textsf{article} class are also available to \textsf{xepersian-presentation}, e. g. "10pt", "11pt", "12pt" for selection of
-font size. However, not all options
-of the \textsf{article} class will be appropriate for a presentation class, e. g. "twocolumn".
-
-\File{EXAMPLE}
-A simple example document:
-\begin{LVerb}
- \documentclass[12pt]{xepersian-presentation}
- \usepackage{eso-pic}
- \usepackage{xepersian}
- \settextfont[Scale=1]{XB Zar}
- \setromantextfont[Scale=1]{Linux Libertine}
- \setdigitfont[Scale=1]{XB Zar}
- \pagestyle{pres}
- \AddToShipoutPicture{
- \includegraphics{gradient2.png}
- }
- \begin{document}
- \begin{titlepage}
- \centering
- \distance{1}
- {
- \Huge \bfseries Title of the presentation \par
- }
- \vspace{1.3ex} \large
- Author\\[2ex]Institution
- \distance{2}
- \end{titlepage}
- \begin{plainslide}[Title of Page]
- The first page
- \end{plainslide}
- \begin{rawslide}
- The second page
- \end{rawslide}
- \end{document}
- \end{LVerb}
-
-The title page can be created within the "titlepage" environment, the "\maketitle" command is not
-available. Slides may be created with the "plainslide" environment, you may add the title of the slide with the
-optional parameter. The contents of the slide are centered vertically.
-Another environment generating a slide is "rawslide": slides are written without title, contents are not vertically
-centered.
-
-The \n\distance"{number}" command allows to introduce vertical space into slides constructed with the
-"rawslide" and "titlepage" environments. You should use pairs of "\distance{}" commands with numbers
-indicating the relative height of empty space, see the "titlepage" in the example above.
-
-Pictures can be included with the "includegraphics"-command of the "graphicx"-package. Please be
-aware that the dimensions of the pages are 128mm $\times$ 96mm and therefore included graphics are scaled
-appropriately.
-\subsection{Enhancements to xepersian-presentation}
-\subsubsection{Fill background of a presentation with bitmaps}
-\textsf{eso-pic} package allows you to paint the background with a picture:
-\begin{Ex}
-"\usepackage{eso-pic}"\\
-...\\
-"\AddToShipoutPicture{"\\
-"\includegraphics{gradient2.png}"\\
-"}"
-\end{Ex}
-
-\n\AddToShipoutPicture"{}" puts the picture on every page, \n\AddToShipoutPicture"*{}" puts
-it on to the current page, \n\ClearShipoutPicture\ clears the background beginning with the current
-page. Details of "eso-pic"'s commands can be found in its own documentation.
-
-\section{beamer Class}
-\XePersian\ currently works with \textsf{beamer} class quite well and all should go well with \textsf{default}, \textsf{Warsaw}, \textsf{Goettingen}, \textsf{Hannover}, \textsf{Malmoe}, \textsf{Marburg}, \textsf{Montpellier}, \textsf{PaloAlto}, \textsf{Pittsburgh}, \textsf{Singapore}, \textsf{Szeged} and \textsf{xepersian-JLTree}\footnote{\textsf{xepersian-JLTree} theme is the modified version of \textsf{JLTree} theme.} themes but other themes are not yet supported.
-
-\begin{Warning}
-I have defined some new environments for beamer and you should use these new environments instead beamer's original environments. These new environments are:
-\end{Warning}
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{قضیه}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{قضیه}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{قضیه}} environment instead \textbf{theorem} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{نتیجه}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{نتیجه}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{نتیجه}} environment instead \textbf{corollary} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{حقیقت}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{حقیقت}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{حقیقت}} environment instead \textbf{fact} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{لم}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{لم}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{لم}} environment instead \textbf{lema} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{مسئله}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{مسئله}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{مسئله}} environment instead \textbf{problem} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{پاسخ}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{پاسخ}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{پاسخ}} environment instead \textbf{solution} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{تعریف}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{تعریف}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{تعریف}} environment instead \textbf{definition} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{تعریفها}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{تعریفها}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{تعریفها}} environment instead \textbf{definitions} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{مثال}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{مثال}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{مثال}} environment instead \textbf{example} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{مثالها}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{مثالها}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{مثالها}} environment instead \textbf{examples} environment.
-
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{اثبات}}"}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{اثبات}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{اثبات}} environment instead \textbf{proof} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{بلوک}}"}{<title>}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{بلوک}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{بلوک}} environment instead \textbf{block} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{بلوک‌مثال}}"}{<title>}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{بلوک‌مثال}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{بلوک‌مثال}} environment instead \textbf{exampleblock} environment.
-\begin{Ex}
-"\begin{"\textbf{\PersianTxt{بلوک‌هشدار}}"}{<title>}"
-\ldots\ "<text>" \ldots\
-"\end{"\textbf{\PersianTxt{بلوک‌هشدار}}"}"
-\end{Ex}
-You should use \textbf{\PersianTxt{بلوک‌هشدار}} environment instead \textbf{alertblock} environment.
-
-\subsection{An Example}
-
-\File{Example}
-\begin{LVerb}
- \documentclass{beamer}
- \usetheme{Warsaw}
- \usepackage{xepersian}
- \settextfont[Scale=1]{XB Zar}
- \setromantextfont[Scale=1]{Linux Libertine}
- \AtBeginDocument{\setdigitfont[Scale=1]{XB Zar}}
- \title{<title>}
- \subtitle{<subtitle>}
- \author{<author>}
- \institute{<institute>}
- \begin{document}
- \begin{frame}
- \titlepage
- \end{frame}
- \begin{frame}{<frame-title>}
- \framesubtitle{<frame-subtitle>}
- ... <text> ...
- \end{frame}
- ...
- \end{document}
-\end{LVerb}
-\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis-xepersian.def b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis-xepersian.def
new file mode 100644
index 00000000000..2c416f9af98
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `xepersian-thesis-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-thesis-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-thesis-xepersian.def'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.cls b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.cls
new file mode 100644
index 00000000000..f80b47ebc52
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.cls
@@ -0,0 +1,174 @@
+%%
+%% This is file `xepersian-thesis.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-thesis.cls')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{xepersian-thesis}
+ [2009/01/05 v0.1
+ Persian thesis document class in XeLaTeX]
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
+\ProcessOptions
+\LoadClass{report}
+\def\university#1{\gdef\@university{#1}}
+\def\department#1{\gdef\@department{#1}}
+\def\degree#1{\gdef\@degree{#1}}
+\def\thesisdate#1{\gdef\@thesisdate{#1}}
+\def\supervisor#1{\gdef\@supervisor{#1}}
+\def\city#1{\gdef\@city{#1}}
+
+\def\latintitle#1{\gdef\@latintitle{#1}}
+\def\latinauthor#1{\gdef\@latinauthor{#1}}
+\def\latindegree#1{\gdef\@latindegree{#1}}
+\def\latindepartment#1{\gdef\@latindepartment{#1}}
+\def\latinthesisdate#1{\gdef\@latinthesisdate{#1}}
+\def\latinsupervisor#1{\gdef\@latinsupervisor{#1}}
+\def\latincity#1{\gdef\@latincity{#1}}
+\def\latinuniversity#1{\gdef\@latinuniversity{#1}}
+
+\def\maketitle{\begin{titlepage}
+{\includegraphics{logo}}
+\vskip 1.5cm
+{\Huge\bfseries \@title}\par
+\vskip 1cm
+{\large%
+ \by}\par
+{\Large\bfseries \@author}\par
+\vskip 5mm
+{\large\bfseries\writtenfor
+\par
+\@degree}
+\par
+\vskip 1cm
+{\large
+ \undersupervision\par
+\Large\bfseries \@supervisor}
+\par
+\vskip 1cm
+{\large \@thesisdate}
+\par
+\vskip 1cm
+{\large\bfseries\departmentof\space\@department}
+\par
+{\large\bfseries\universityof\space\@university \par\@city}
+\vfill
+\end{titlepage}%
+}
+
+\def\abstractpage{\newpage
+\thispagestyle{empty}
+\vskip 15mm
+\begin{center}{\large{\bfseries \@title} \\}
+\end{center}
+\par
+\begin{abstract}}
+\def\endabstractpage{\end{abstract}
+\newpage
+}
+
+\def\latinabstract{\newpage
+\thispagestyle{empty}
+\vskip 15mm
+\begin{center}{\Large\bfseries \@latintitle \\[5mm]}
+{\bfseries Abstract}
+\end{center}
+\vspace{5mm}}
+
+\def\endlatinabstract{\newpage}
+
+\def\acknowledgementpage{\newpage
+\thispagestyle{empty}
+\centerline{\Large \bfseries\acknowledgementname}
+\vspace{1cm}
+\par\noindent}
+\def\endacknowledgementpage{\newpage}
+
+\def\titlepage{\newpage\centering
+ \thispagestyle{empty}
+ \parindent 0pt \parskip 10pt plus 1fil minus 1fil
+ \def\baselinestretch{1}\@normalsize\vbox to \vsize\bgroup\vbox to 9in\bgroup}
+\def\endtitlepage{\par\kern 0pt\egroup\vss\egroup\newpage}
+
+\def\signature#1#2{\par\noindent#1\dotfill\null\\*
+ {\raggedright #2\par}}
+
+\def\abstract{\subsection*{\abstractname}\small
+\@normalsize}
+\def\endabstract{\par}
+
+\pagenumbering{harfi}
+\let\ol@chapter\@chapter
+\def\@chapter{%
+ \ifnum\c@chapter=0 \pagenumbering{arabic}\setcounter{page}{1}\fi
+ \ol@chapter}
+
+\def\keywords#1{\par \vspace{5mm}
+{\textbf{واژه‌های کلیدی:}} {\textit{ #1}}}
+
+\def\latinkeywords#1{\par \vspace{5mm}
+\noindent {\textbf{Keywords:}} {\textit{ #1}}}
+
+\font\titlefont=cmssbx10 scaled 2074
+\font\supervisorfont=cmbxti10
+\def\makelatintitle{\begin{titlepage}
+{\includegraphics{logo}}
+\vskip 1.5cm
+\addtolength{\baselineskip}{5mm}
+{\titlefont \@latintitle} \par
+\addtolength{\baselineskip}{-5mm}
+\vskip 1cm
+{\bfseries\latinby}\par
+{\Large\bfseries \@latinauthor}\par
+\vskip 5mm
+{\latinwrittenfor\par
+\large\@latindegree}
+\par
+\vskip 1cm
+Under supervision of \\
+{\supervisorfont\@latinsupervisor}
+\par
+\vskip 1cm
+{\@latinthesisdate}
+\par
+\vskip 1cm
+\large\bfseries
+\@latindepartment\space Department
+\par
+\@latinuniversity \par\@latincity
+\vfill
+\end{titlepage}%
+}
+
+\def\acknowledgementname{قدردانی}
+\def\by{توسط}
+\def\writtenfor{ رسالهٔ ارائه شده به عنوان بخشی از ملزومات برای دریافت درجهٔ}
+\def\undersupervision{زیر نظر}
+\def\departmentof{دانشکدهٔ}
+\def\universityof{دانشگاه}
+\def\latinby{by}
+\def\latinwrittenfor{Submitted in Partial Fulfillment\\ of the Requirements\\ for the Degree of}
+\def\latinundersupervision{Under supervision of}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-thesis.cls'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.tex
deleted file mode 100644
index 761621572a5..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-thesis.tex
+++ /dev/null
@@ -1,54 +0,0 @@
-\part{Thesis Typesetting}
-We typeset thesis by a class called \textsf{xepersian-thesis} which is the modified version of \textsf{report} class, therefore it contains all the commands and options that \textsf{report} class has. I just give an input example since the commands are easy to understand and this manual is already too long and boring enough!
-
-\begin{LVerb}
- \documentclass[a4paper,11pt]{xepersian-thesis}
- \usepackage{xepersian}
- \settextfont[Scale=1]{XB Zar}
- \setromantextfont[Scale=1]{Linux Libertine}
- \setdigitfont[Scale=1]{XB Zar}
- \begin{document}
- \title{<title name in Persian>}
- \author{<author name in Persian>}
- \degree{<degree name in Persian>}
- \supervisor{<supervisor name in Persian>}
- \department{<department name in Persian>}
- \university{<university name in Persian>}
- \city{<city name in Persian>}
- \thesisdate{\today}
- \maketitle
- \begin{acknowledgementpage}
- ... <text> ...
- \end{acknowledgementpage}
- \begin{abstractpage}
- ... <text> ...
- \keywords{<text>}
- \end{abstractpage}
- \tableofcontents
- \listoftables
- \chapter{<chapter name>}
- ... <text> ...
- \Roman
- \romantitle{<title name in English>}
- \romanauthor{<author name in English>}
- \romandegree{<degree name in English>}
- \romanthesisdate{\romantoday}
- \romansupervisor{<supervisor name in English>}
- \romandepartment{<department name in English>}
- \romanuniversity{<university name in English>}
- \romancity{<city name in English>}
- \begin{romanabstract}
- ... <text> ...
- \romankeywords{<text>}
- \end{romanabstract}
- \makeromantitle
- \end{document}
-\end{LVerb}
-
-\begin{Warning}
-\begin{itemize}
-\item You should rename the image of your university logo to \textsf{logo} and put it in the current directory so \XePersian\ can compile your document correctly.
-\item The argument of \n\romanuniversity\ does not contain the word {\UsageFont University} so this means you have to type it yourself, i.e. If your want to produce \textsf{University of Tehran}, then you have to type \texttt{University of Tehran} for "<university name in English>".
-\end{itemize}
-\end{Warning}
-\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdf b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdf
deleted file mode 100644
index 106b2f1c0ac..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex b/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex
deleted file mode 100644
index 637bc9bc5c6..00000000000
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian-user.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-\documentclass[11pt]{xepersian-user}
-\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,%
-xepersian-magazine,%
-xepersian-thesis,%
-xepersian-presentation%
-}
-\makeindex
-\begin{document}
-\include{xepersian-cove} % Cover page; Table of Contents
-\include{xepersian-esse} % Welcome to XePersian; The essentials
-\include{xepersian-magazine}
-\include{xepersian-thesis}
-\include{xepersian-presentation}
-
-
-\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/doc/xelatex/xepersian/xepersian.dtx
new file mode 100644
index 00000000000..d25a0a64170
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian.dtx
@@ -0,0 +1,9100 @@
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+_________________
+The XePersian package
+v1.0.1
+
+XePersian is a package written for XeLaTeX that allows users to typeset
+Persian easily. The current version is 1.0.1 and it will be developed to
+ meet the needs of Persian typesetting properly.
+
+The XePersian package is independent of any operating system, meaning it
+will work on all operating systems.
+
+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
+
+
+This version fixes all known bugs and adds heaps of new things.
+
+______________
+Vafa Khalighi
+vafa@users.berlios.de
+
+Copyright 2008-2009
+Distributed under the LaTeX Project Public License
+%</readme>
+%<*internal>
+\fi
+%
+%</internal>
+%
+%<*internal>
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\preamble
+
+ __________________________________
+ Copyright © 2008-2009 Vafa Khalighi
+
+ License information appended.
+
+
+\endpreamble
+\postamble
+
+Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+
+Distributable under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status)
+by Vafa Khalighi.
+
+
+
+
+\endpostamble
+\askforoverwritefalse
+\generate{\file{xepersian.sty}{\from{xepersian.dtx}{xepersian.sty}}}
+\generate{\file{algorithmic-xepersian.def}{\from{xepersian.dtx}{algorithmic-xepersian.def}}}
+\generate{\file{algorithm-xepersian.def}{\from{xepersian.dtx}{algorithm-xepersian.def}}}
+\generate{\file{amsart-xepersian.def}{\from{xepersian.dtx}{amsart-xepersian.def}}}
+\generate{\file{amsbook-xepersian.def}{\from{xepersian.dtx}{amsbook-xepersian.def}}}
+\generate{\file{article-xepersian.def}{\from{xepersian.dtx}{article-xepersian.def}}}
+\generate{\file{backref-xepersian.def}{\from{xepersian.dtx}{backref-xepersian.def}}}
+\generate{\file{bidibeamer-xepersian.def}{\from{xepersian.dtx}{bidibeamer-xepersian.def}}}
+\generate{\file{bidimoderncv-xepersian.def}{\from{xepersian.dtx}{bidimoderncv-xepersian.def}}}
+\generate{\file{bookest-xepersian.def}{\from{xepersian.dtx}{bookest-xepersian.def}}}
+\generate{\file{book-xepersian.def}{\from{xepersian.dtx}{book-xepersian.def}}}
+\generate{\file{footnote-bidi-xepersian.def}{\from{xepersian.dtx}{footnote-bidi-xepersian.def}}}
+\generate{\file{localise-xepersian.def}{\from{xepersian.dtx}{localise-xepersian.def}}}
+\generate{\file{commands-ltx.def}{\from{xepersian.dtx}{commands-ltx.def}}}
+\generate{\file{commands-xepersian.def}{\from{xepersian.dtx}{commands-xepersian.def}}}
+\generate{\file{enumerate-xepersian.def}{\from{xepersian.dtx}{enumerate-xepersian.def}}}
+\generate{\file{environments-ltx.def}{\from{xepersian.dtx}{environments-ltx.def}}}
+\generate{\file{environments-xepersian.def}{\from{xepersian.dtx}{environments-xepersian.def}}}
+\generate{\file{extbook-xepersian.def}{\from{xepersian.dtx}{extbook-xepersian.def}}}
+\generate{\file{kashida-xepersian.def}{\from{xepersian.dtx}{kashida-xepersian.def}}}
+\generate{\file{listings-xepersian.def}{\from{xepersian.dtx}{listings-xepersian.def}}}
+\generate{\file{bidimemoir-xepersian.def}{\from{xepersian.dtx}{bidimemoir-xepersian.def}}}
+\generate{\file{minitoc-xepersian.def}{\from{xepersian.dtx}{minitoc-xepersian.def}}}
+\generate{\file{misccommandsenvironments-ltx.def}{\from{xepersian.dtx}{misccommandsenvironments-ltx.def}}}
+\generate{\file{refrep-xepersian.def}{\from{xepersian.dtx}{refrep-xepersian.def}}}
+\generate{\file{report-xepersian.def}{\from{xepersian.dtx}{report-xepersian.def}}}
+\generate{\file{rapport3-xepersian.def}{\from{xepersian.dtx}{rapport3-xepersian.def}}}
+\generate{\file{scrartcl-xepersian.def}{\from{xepersian.dtx}{scrartcl-xepersian.def}}}
+\generate{\file{scrbook-xepersian.def}{\from{xepersian.dtx}{scrbook-xepersian.def}}}
+\generate{\file{scrreprt-xepersian.def}{\from{xepersian.dtx}{scrreprt-xepersian.def}}}
+\generate{\file{tocloft-xepersian.def}{\from{xepersian.dtx}{tocloft-xepersian.def}}}
+\generate{\file{xepersian-magazine.cls}{\from{xepersian.dtx}{xepersian-magazine.cls}}}
+\generate{\file{xepersian-mathsdigitspec.sty}{\from{xepersian.dtx}{xepersian-mathsdigitspec.sty}}}
+\generate{\file{xepersian-multiplechoice.sty}{\from{xepersian.dtx}{xepersian-multiplechoice.sty}}}
+\generate{\file{xepersian-persiancal.sty}{\from{xepersian.dtx}{xepersian-persiancal.sty}}}
+\generate{\file{xepersian-thesis.cls}{\from{xepersian.dtx}{xepersian-thesis.cls}}}
+\generate{\file{xepersian-thesis-xepersian.def}{\from{xepersian.dtx}{xepersian-thesis-xepersian.def}}}
+\generate{\file{acm-fa.bst}{\from{xepersian.dtx}{acm-fa.bst}}}
+\generate{\file{ieeetr-fa.bst}{\from{xepersian.dtx}{ieeetr-fa.bst}}}
+\generate{\file{plain-fa.bst}{\from{xepersian.dtx}{plain-fa.bst}}}
+\generate{\file{unsrt-fa.bst}{\from{xepersian.dtx}{unsrt-fa.bst}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{xepersian.ins}{\from{xepersian.dtx}{batchfile}}}
+\nopreamble\nopostamble
+\generate{\file{README.txt}{\from{xepersian.dtx}{readme}}}
+\generate{\file{parsidigits.map}{\from{xepersian.dtx}{parsidigits.map}}}
+\generate{\file{txt2maths.map}{\from{xepersian.dtx}{txt2maths.map}}}
+\generate{\file{thesis-sample.tex}{\from{xepersian.dtx}{thesis-sample.tex}}}
+\generate{\file{magazine-sample.tex}{\from{xepersian.dtx}{magazine-sample.tex}}}
+\generate{\file{test-correction.tex}{\from{xepersian.dtx}{test-correction.tex}}}
+\generate{\file{test-empty-form.tex}{\from{xepersian.dtx}{test-empty-form.tex}}}
+\generate{\file{test-question-only.tex}{\from{xepersian.dtx}{test-question-only.tex}}}
+\generate{\file{test-solution-form.tex}{\from{xepersian.dtx}{test-solution-form.tex}}}
+\generate{\file{acm-fa-output.tex}{\from{xepersian.dtx}{acm-fa-output.tex}}}
+\generate{\file{bibtex-example.tex}{\from{xepersian.dtx}{bibtex-example.tex}}}
+\generate{\file{ieeetr-fa-output.tex}{\from{xepersian.dtx}{ieeetr-fa-output.tex}}}
+\generate{\file{MyReferences.bib}{\from{xepersian.dtx}{MyReferences.bib}}}
+\generate{\file{plain-fa-output.tex}{\from{xepersian.dtx}{plain-fa-output.tex}}}
+\endgroup
+%</internal>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[sc,osf]{mathpazo}
+\usepackage{fvrb-ex}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\OnlyDescription
+
+\begin{document}
+ \DocInput{xepersian.dtx}
+\end{document}
+%</driver>
+%
+%
+% \fi
+%
+% \GetFileInfo{bidi.sty}
+% \makeatletter
+%
+%\title{The \textsf{XePersian} Package}
+%\author{Vafa Khalighi\\
+%\footnotesize\texttt{<vafa@users.berlios.de>}}
+%
+% \StopEventually{}
+% \section{Implementation}
+% \part{xepersian.sty}
+%\iffalse
+%<*xepersian.sty>
+% \fi
+%
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\def\xepersianversion{v1.0.1}
+\def\xepersianrevision{revision 88}
+\def\xepersiandate{2009/07/15}
+\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space <\xepersianrevision>
+ Persian typesetting in XeLaTeX]
+\DeclareOption{Kashida}{\input{kashida-xepersian.def}}
+\DeclareOption{localise}{\input{localise-xepersian.def}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{bidi}}
+\ProcessOptions\relax
+\newcommand\xepersian@isloaded[2][]{
+ \expandafter\ifx\csname if@xepersian@#2loaded@\endcsname\relax
+ \expandafter\newif\csname if@xepersian@#2loaded@\endcsname
+ \fi
+ \@ifpackageloaded{#2}
+ {\csname @xepersian@#2loaded@true\endcsname #1}
+ {\csname @xepersian@#2loaded@false\endcsname}}
+\xepersian@isloaded{xunicode}
+\AtBeginDocument{
+ \if@xepersian@xunicodeloaded@
+ \xepersian@isloaded[\PackageError{xepersian}{Oops! you have loaded package xunicode before xepersian package. Please load package xunicode after xepersian package, and then try to run xelatex on your document again}{}]{xunicode}
+ \fi%
+}
+\AtBeginDocument{\ifdefined\persianfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the main text of the document. Please specify a font for the main text of the document by using \settextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\latinfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the Latin texts of the document. Please specify a font for the Latin texts of the document by using \setlatintextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\decimalseparator\relax\else%
+\PackageWarning{xepersian}{“You have not specified any font for the digits in maths mode and so the digits in maths mode will appear Latin. If you would like to have Persian digits in maths mode, then please specify a font for the digits in maths mode by using \setdigitfont\space CS, and then try to run xelatex on your document again”}%
+\fi}
+\RequirePackage[RTLdocument]{bidi}
+\RequirePackage{fontspec}
+\RequirePackage{xepersian-persiancal}
+\RequirePackage{xepersian-mathsdigitspec}
+\RequirePackage{etoolbox}
+\AtBeginDocument{\special{pdf: docinfo <<
+ /Creator (X∃Persian \xepersianversion\space <\xepersianrevision> Copyright © 2008-2009 Vafa Khalighi)
+ >>}}
+\gdef\@latex@error#1#2{%
+ \GenericError{%
+ \space\space\space\@spaces\@spaces\@spaces
+ }{%
+ XePersian Error: #1%
+ }{%
+ Oops! either you have done something wrong or it is a xepersian bug. 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}}
+\def\prq{«}
+\def\plq{»}
+\newfontscript{Persian}{arab}
+\newfontlanguage{Persian}{ARA}
+\newcommand*\settextfont[2][]{%
+\newfontfamily\persianfont[Script=Persian,Mapping=parsidigits,#1]{#2}
+\let\rmdefault\zf@family
+ \normalfont
+}
+\newcommand*\settxtmathfont[2][]{%
+\newfontfamily\TXTmath[Mapping=txt2maths,#1]{#2}
+}
+\newcommand*\setlatintextfont[2][]{%
+\newfontfamily\latinfont[Mapping=tex-text,#1]{#2}
+}
+\newcommand*\defpersianfont[1]{%
+ \@ifnextchar[{\defpersianfont@i#1}{\defpersianfont@i#1[]}}
+\def\defpersianfont@i#1[#2]#3{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand*\deflatinfont[1]{%
+ \@ifnextchar[{\deflatinfont@i#1}{\deflatinfont@i#1[]}}
+\def\deflatinfont@i#1[#2]#3{%
+ \zf@fontspec{Mapping=tex-text,#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand\persiansfdefault{}
+\newcommand\persianttdefault{}
+\newcommand\navardefault{}
+\newcommand\pookdefault{}
+\newcommand\sayehdefault{}
+\DeclareRobustCommand\persiansffamily
+ {\not@math@alphabet\persiansffamily\mathpersiansf
+ \fontfamily\persiansfdefault\selectfont}
+\DeclareRobustCommand\persianttfamily
+ {\not@math@alphabet\persianttfamily\mathpersiantt
+ \fontfamily\persianttdefault\selectfont}
+\DeclareRobustCommand\navarfamily
+ {\not@math@alphabet\navarfamily\mathnavar
+ \fontfamily\navardefault\selectfont}
+\DeclareRobustCommand\pookfamily
+ {\not@math@alphabet\pookfamily\mathpook
+ \fontfamily\pookdefault\selectfont}
+\DeclareRobustCommand\sayehfamily
+ {\not@math@alphabet\sayehfamily\mathsayeh
+ \fontfamily\sayehdefault\selectfont}
+\DeclareTextFontCommand{\textpersiansf}{\persiansffamily}
+\DeclareTextFontCommand{\textpersiantt}{\persianttfamily}
+\DeclareTextFontCommand{\textnavar}{\navarfamily}
+\DeclareTextFontCommand{\textpook}{\pookfamily}
+\DeclareTextFontCommand{\textsayeh}{\sayehfamily}
+\newcommand*\setpersiansansfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persiansfdefault\zf@family
+ \normalfont}
+\newcommand*\setpersianmonofont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persianttdefault\zf@family
+ \normalfont}
+\newcommand*\setnavarfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\navardefault\zf@family
+ \normalfont}
+\newcommand*\setpookfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\pookdefault\zf@family
+ \normalfont}
+\newcommand*\setsayehfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\sayehdefault\zf@family
+ \normalfont}
+\def\lr#1{\begingroup\beginL\latinfont#1\endL\endgroup}
+\def\rl#1{\begingroup\beginR\persianfont#1\endR\endgroup}
+\def\latin{\bgroup\LatinAlphs\par\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\Latin{\if@RTL\par\LatinAlphs\@RTLfalse\@RTL@footnotefalse\latinfont\fi}
+\def\Persian{\if@RTL\relax\else\par\PersianAlphs\@RTLtrue\@RTL@footnotetrue\persianfont\fi}
+\let\originaltoday=\today
+\def\today{\lr{\originaltoday}}
+\let\latintoday\today
+\def\today{\rl{\persiantoday}}
+\newcommand\twocolumnstableofcontents{%
+ \begin{multicols}{2}[\section*{\contentsname}]%
+ \small
+ \@starttoc{toc}%
+ \end{multicols}}
+\def\XePersian{\lr{\leavevmode$\smash{\hbox{X\lower.5ex
+ \hbox{\kern-.125em\reflect{E}}Persian}}$}}
+\def\TeX{\lr{\@@TeX}}
+\def\LaTeX{\lr{\@@LaTeX}}
+\def\LaTeXe{\lr{\@@LaTeXe}}
+\let\origin@XeTeX\XeTeX
+\def\XeTeX{\lr{\origin@XeTeX}}
+\let\origin@XeLaTeX\XeLaTeX
+\def\XeLaTeX{\lr{\origin@XeLaTeX}}
+\def\figurename{\if@RTL شکل\else Figure\fi}
+\def\tablename{\if@RTL جدول\else Table\fi}
+\def\contentsname{\if@RTL فهرست مطالب\else Contents\fi}
+\def\listfigurename{\if@RTL لیست تصاویر\else List of Figures\fi}
+\def\listtablename{\if@RTL لیست جداول\else List of Tables\fi}
+\def\appendixname{\if@RTL پیوست\else Appendix\fi}
+\def\indexname{\if@RTL نمایه\else Index\fi}
+\def\refname{\if@RTL مراجع\else References\fi}
+\def\abstractname{\if@RTL چکیده\else Abstract\fi}
+\def\partname{\if@RTL بخش\else Part\fi}
+\def\datename{\if@RTL تاریخ:\else Date:\fi}
+\def\@@and{\if@RTL و\else and\fi}
+\def\bibname{\if@RTL کتاب‌نامه\else Bibliography\fi}
+\def\chaptername{\if@RTL فصل\else Chapter\fi}
+\def\ccname{\if@RTL رونوشت\else cc\fi}
+\def\enclname{\if@RTL پیوست\else encl\fi}
+\def\pagename{\if@RTL صفحه\else Page\fi}
+\def\headtoname{\if@RTL به\else To\fi}
+\def\proofname{\if@RTL اثبات\else Proof\fi}
+\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 ی\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}
+\providecommand*{\xpg@warning}[1]{%
+ \PackageWarning{XePersian}%
+ {#1}}
+\ifcsdef{abjad}{}{%
+\def\abjad#1{%
+\ifnum#1>1999 \xpg@warning{Illegal value (#1) for abjad numeral} {#1}
+\else
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for abjad numeral}%
+ \else
+ \ifnum#1<10\expandafter\abj@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\abj@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+\def\abjad@zero{}
+\def\abj@num@i#1{%
+ \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{%
+ \ifcase#1\or ی\or ک\or ل\or م\or ن%
+ \or س\or ع\or ف\or ص\fi
+ \ifnum#1=\z@\fi\abj@num@i}
+\def\abj@num@iii#1{%
+ \ifcase#1\or ق\or ر\or ش\or ت\or ث%
+ \or خ\or ذ\or ض\or ظ\fi
+ \ifnum#1=\z@\fi\abj@num@ii}
+\def\abj@num@iv#1{%
+ \ifcase#1\or غ\fi
+ \ifnum#1=\z@\fi\abj@num@iii}
+}
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+\def\PersianAlphs{%
+ \let\@alph\abjad%
+ \let\@Alph\abjad%
+}
+\def\LatinAlphs{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+\PersianAlphs
+\@ifpackageloaded{listings}{\input{listings-xepersian.def}}{}
+\@ifpackageloaded{algorithmic}{\input{algorithmic-xepersian.def}}{}
+\@ifpackageloaded{algorithm}{\input{algorithm-xepersian.def}}{}
+\@ifpackageloaded{backref}{\input{backref-xepersian.def}}{}
+\@ifpackageloaded{bidi}{\input{footnote-bidi-xepersian.def}}{}
+\@ifpackageloaded{enumerate}{\input{enumerate-xepersian.def}}{}
+\@ifpackageloaded{minitoc}{\input{minitoc-xepersian.def}}{}
+\@ifpackageloaded{tocloft}{\input{tocloft-xepersian.def}}{}
+\@ifclassloaded{article}{\input{article-xepersian.def}}{}
+\@ifclassloaded{amsart}{\input{amsart-xepersian.def}}{}
+\@ifclassloaded{bidimoderncv}{\input{bidimoderncv-xepersian.def}}{}
+\@ifclassloaded{report}{\input{report-xepersian.def}}{}
+\@ifclassloaded{rapport3}{\input{rapport3-xepersian.def}}{}
+\@ifclassloaded{scrartcl}{\input{scrartcl-xepersian.def}}{}
+\@ifclassloaded{scrbook}{\input{scrbook-xepersian.def}}{}
+\@ifclassloaded{scrreprt}{\input{scrreprt-xepersian.def}}{}
+\@ifclassloaded{xepersian-thesis}{\input{xepersian-thesis-xepersian.def}}{}
+\@ifclassloaded{amsbook}{\input{amsbook-xepersian.def}}{}
+\@ifclassloaded{bookest}{\input{bookest-xepersian.def}}{}
+\@ifclassloaded{extbook}{\input{extbook-xepersian.def}}{}
+\@ifclassloaded{book}{\input{book-xepersian.def}}{}
+\@ifclassloaded{refrep}{\input{refrep-xepersian.def}}{}
+\@ifclassloaded{bidibeamer}{\input{bidibeamer-xepersian.def}}{}
+\@ifclassloaded{bidimemoir}{\input{bidimemoir-xepersian.def}}{}
+% \end{macrocode}
+% \iffalse
+%</xepersian.sty>
+%<*algorithmic-xepersian.def>
+% \fi
+% \part{algorithmic-xepersian.def}
+% \begin{macrocode}
+\def\algorithmicrequire{\if@RTL\textbf{ورودی:}\else\textbf{Require:}\fi}
+\def\algorithmicensure{\if@RTL\textbf{خروجی:}\else\textbf{Ensure:}\fi}
+% \end{macrocode}
+% \iffalse
+%</algorithmic-xepersian.def>
+%<*algorithm-xepersian.def>
+% \fi
+% \part{algorithm-xepersian.def}
+% \begin{macrocode}
+\def\ALG@name{\if@RTL الگوریتم\else Algorithm\fi}
+\def\ALGS@name{الگوریتم‌ها}
+\def\listalgorithmname{\if@RTL لیست \ALGS@name\else List of \ALG@name s\fi}
+% \end{macrocode}
+% \iffalse
+%</algorithm-xepersian.def>
+%<*amsart-xepersian.def>
+% \fi
+% \part{amsart-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+% \end{macrocode}
+% \iffalse
+%</amsart-xepersian.def>
+%<*amsbook-xepersian.def>
+% \fi
+% \part{amsbook-xepersian.def}
+% \begin{macrocode}
+\def\frontmatter{\cleardoublepage\pagenumbering{harfi}}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</amsbook-xepersian.def>
+%<*article-xepersian.def>
+% \fi
+% \part{article-xepersian-def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+% \end{macrocode}
+% \iffalse
+%</article-xepersian.def>
+%<*backref-xepersian.def>
+% \fi
+% \part{backref-xepersian.def}
+% \begin{macrocode}
+\def\backrefpagesname{\if@RTL صفحات\else pages\fi}
+% \end{macrocode}
+% \iffalse
+%</backref-xepersian.def>
+%<*bidibeamer-xepersian.def>
+% \fi
+% \part{bidibeamer-xepersian.def}
+% \begin{macrocode}
+\def\familydefault{\rmdefault}
+\def\latin{\bgroup\LatinAlphs\par\raggedright\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\raggedleft\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\biditheoremname{قضیه}
+\def\bidicorollaryname{نتیجه}
+\def\bidifactname{حقیقت}
+\def\bidilemmaname{لم}
+\def\bidiproblemname{مسئله}
+\def\bidisolutionname{پاسخ}
+\def\bididefinitionname{تعریف}
+\def\bididefinitionsname{تعریف‌ها}
+\def\bidiexamplename{مثال}
+\def\bidiexamplesname{مثال‌ها}
+\def\bidiproofname{اثبات}
+% \end{macrocode}
+% \iffalse
+%</bidibeamer-xepersian.def>
+%<*bidimoderncv-xepersian.def>
+% \fi
+% \part{bidimoderncv-xepersian.def}
+% \begin{macrocode}
+\def\refname{تألیفات}
+% \end{macrocode}
+% \iffalse
+%</bidimoderncv-xepersian.def>
+%<*bookest-xepersian.def>
+% \fi
+% \part{bookest-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</bookest-xepersian.def>
+%<*book-xepersian.def>
+% \fi
+% \part{book-xepersian.def}
+% \begin{macrocode}
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</book-xepersian.def>
+%<*footnote-bidi-xepersian.def>
+% \fi
+% \part{footnote-bidi-xepersian.def}
+% \begin{macrocode}
+\long\def\@footnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@RTLfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLtrue\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\persianfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@LTRfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLfalse\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\latinfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@mpfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpRTLfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLtrue
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\persianfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpLTRfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLfalse
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\latinfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+% \end{macrocode}
+% \iffalse
+%</footnote-bidi-xepersian.def>
+%<*localise-xepersian.def>
+% \fi
+% \part{localise-xepersian.def}
+% \begin{macrocode}
+\catcode`\﷼=3
+\catcode`‌=11
+\newcommand\eqcommand[2][]{\let#1=#2}
+\newcommand\eqenvironment[2][]{\newenvironment{#1}{\begin{#2}}{\end{#2}}}
+\define@key[zf]{options}{مقیاس}{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{MatchLowercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{5}%
+ \else
+ \edef\@tempb{MatchUppercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{8}%
+ \else
+ \edef\zf@scale{#1}%
+ \fi
+ \fi
+ \zf@update@family{+scale:\zf@scale}%
+ \edef\zf@scale{s*[\zf@scale]}}
+\input{commands-ltx.def}
+\input{commands-xepersian.def}
+\input{environments-ltx.def}
+\input{environments-xepersian.def}
+\input{misccommandsenvironments-ltx.def}
+% \end{macrocode}
+% \iffalse
+%</localise-xepersian.def>
+%<*commands-ltx.def>
+% \fi
+% \part{commands-ltx.def}
+% \begin{macrocode}
+\eqcommand[]{\abovedisplayshortskip}
+\eqcommand[]{\abovedisplayskip}
+\eqcommand[]{\abstractname}
+\eqcommand[]{\acute}
+\eqcommand[]{\addcontentsline}
+\eqcommand[]{\address}
+\eqcommand[]{\addtocontents}
+\eqcommand[]{\addtocounter}
+\eqcommand[]{\addtolength}
+\eqcommand[]{\addvspace}
+\eqcommand[]{\aleph}
+\eqcommand[]{\allowdisplaybreaks}
+\eqcommand[]{\Alph}
+\eqcommand[]{\alph}
+\eqcommand[]{\alpha}
+\eqcommand[]{\alsoname}
+\eqcommand[]{\amalg}
+\eqcommand[]{\and}
+\eqcommand[]{\angle}
+\eqcommand[]{\appendixname}
+\eqcommand[]{\approx}
+\eqcommand[]{\arabic}
+\eqcommand[]{\arccos}
+\eqcommand[]{\arcsin}
+\eqcommand[]{\arctan}
+\eqcommand[]{\arg}
+\eqcommand[]{\arraycolsep}
+\eqcommand[]{\arrayrulewidth}
+\eqcommand[]{\arraystretch}
+\eqcommand[]{\ast}
+\eqcommand[]{\asymp}
+\eqcommand[]{\AtBeginDocument}
+\eqcommand[]{\AtEndDocument}
+\eqcommand[]{\AtEndOfClass}
+\eqcommand[]{\AtEndOfPackage}
+\eqcommand[]{\author}
+\eqcommand[]{\backmatter}
+\eqcommand[]{\backslash}
+\eqcommand[]{\bar}
+\eqcommand[]{\baselineskip}
+\eqcommand[]{\baselinestretch}
+\eqcommand[]{\begin}
+\eqcommand[]{\belowdisplayshortskip}
+\eqcommand[]{\belowdisplayskip}
+\eqcommand[]{\beta}
+\eqcommand[]{\bfdefault}
+\eqcommand[]{\bfseries}
+\eqcommand[]{\bibitem}
+\eqcommand[]{\bibliography}
+\eqcommand[]{\bibliographystyle}
+\eqcommand[]{\bibname}
+\eqcommand[]{\big}
+\eqcommand[]{\Big}
+\eqcommand[]{\bigcap}
+\eqcommand[]{\bigcirc}
+\eqcommand[]{\bigcup}
+\eqcommand[]{\bigg}
+\eqcommand[]{\Bigg}
+\eqcommand[]{\bigodot}
+\eqcommand[]{\bigoplus}
+\eqcommand[]{\bigotimes}
+\eqcommand[]{\bigskip}
+\eqcommand[]{\bigskipamount}
+\eqcommand[]{\bigsqcup}
+\eqcommand[]{\bigtriangledown}
+\eqcommand[]{\bigtriangleup}
+\eqcommand[]{\biguplus}
+\eqcommand[]{\bigvee}
+\eqcommand[]{\bigwedge}
+\eqcommand[]{\binom}
+\eqcommand[]{\bmod}
+\eqcommand[]{\boldmath}
+\eqcommand[]{\boldsymbol}
+\eqcommand[]{\bot}
+\eqcommand[]{\botfigrule}
+\eqcommand[]{\bottomfraction}
+\eqcommand[]{\bowtie}
+\eqcommand[]{\Box}
+\eqcommand[]{\boxed}
+\eqcommand[]{\breve}
+\eqcommand[]{\bullet}
+\eqcommand[]{\cap}
+\eqcommand[]{\caption}
+\eqcommand[]{\cc}
+\eqcommand[]{\ccname}
+\eqcommand[]{\cdot}
+\eqcommand[]{\cdots}
+\eqcommand[]{\centering}
+\eqcommand[]{\centerline}
+\eqcommand[]{\cfrac}
+\eqcommand[]{\chapter}
+\eqcommand[]{\chapter*}
+\eqcommand[]{\chaptername}
+\eqcommand[]{\check}
+\eqcommand[]{\CheckCommand}
+\eqcommand[]{\chi}
+\eqcommand[]{\circ}
+\eqcommand[]{\circle}
+\eqcommand[]{\circle*}
+\eqcommand[]{\cite}
+\eqcommand[]{\citep}
+\eqcommand[]{\citet}
+\eqcommand[]{\ClassError}
+\eqcommand[]{\ClassInfo}
+\eqcommand[]{\ClassWarning}
+\eqcommand[]{\ClassWarningNoLine}
+\eqcommand[]{\cleardoublepage}
+\eqcommand[]{\clearpage}
+\eqcommand[]{\cline}
+\eqcommand[]{\closing}
+\eqcommand[]{\clubsuit}
+\eqcommand[]{\color}
+\eqcommand[]{\colorbox}
+\eqcommand[]{\columnsep}
+\eqcommand[]{\columnseprule}
+\eqcommand[]{\cong}
+\eqcommand[]{\contentsline}
+\eqcommand[]{\contentsname}
+\eqcommand[]{\coprod}
+\eqcommand[]{\copyright}
+\eqcommand[]{\cos}
+\eqcommand[]{\cosh}
+\eqcommand[]{\cot}
+\eqcommand[]{\coth}
+\eqcommand[]{\csc}
+\eqcommand[]{\cup}
+\eqcommand[]{\CurrentOption}
+\eqcommand[]{\dag}
+\eqcommand[]{\dagger}
+\eqcommand[]{\dashbox}
+\eqcommand[]{\dashv}
+\eqcommand[]{\date}
+\eqcommand[]{\dbinom}
+\eqcommand[]{\dblfigrule}
+\eqcommand[]{\dblfloatpagefraction}
+\eqcommand[]{\dblfloatsep}
+\eqcommand[]{\dbltextfloatsep}
+\eqcommand[]{\dbltopfraction}
+\eqcommand[]{\ddag}
+\eqcommand[]{\ddagger}
+\eqcommand[]{\dddot}
+\eqcommand[]{\ddddot}
+\eqcommand[]{\ddot}
+\eqcommand[]{\ddots}
+\eqcommand[]{\DeclareGraphicsExtensions}
+\eqcommand[]{\DeclareGraphicsRule}
+\eqcommand[]{\DeclareOption}
+\eqcommand[]{\DeclareOption*}
+\eqcommand[]{\DeclareRobustCommand}
+\eqcommand[]{\DeclareRobustCommand*}
+\eqcommand[]{\definecolor}
+\eqcommand[]{\deg}
+\eqcommand[]{\DeleteShortVerb}
+\eqcommand[]{\Delta}
+\eqcommand[]{\delta}
+\eqcommand[]{\depth}
+\eqcommand[]{\det}
+\eqcommand[]{\dfrac}
+\eqcommand[]{\Diamond}
+\eqcommand[]{\diamond}
+\eqcommand[]{\diamondsuit}
+\eqcommand[]{\dim}
+\eqcommand[]{\discretionary}
+\eqcommand[]{\displaybreak}
+\eqcommand[]{\displaystyle}
+\eqcommand[]{\div}
+\eqcommand[]{\documentclass}
+\eqcommand[]{\dot}
+\eqcommand[]{\doteq}
+\eqcommand[]{\dotfill}
+\eqcommand[]{\dots}
+\eqcommand[]{\dotsb}
+\eqcommand[]{\dotsc}
+\eqcommand[]{\dotsi}
+\eqcommand[]{\dotsm}
+\eqcommand[]{\doublebox}
+\eqcommand[]{\doublerulesep}
+\eqcommand[]{\Downarrow}
+\eqcommand[]{\downarrow}
+\eqcommand[]{\ell}
+\eqcommand[]{\em}
+\eqcommand[]{\emph}
+\eqcommand[]{\emptyset}
+\eqcommand[]{\encl}
+\eqcommand[]{\enclname}
+\eqcommand[]{\end}
+\eqcommand[]{\endfirsthead}
+\eqcommand[]{\endfoot}
+\eqcommand[]{\endhead}
+\eqcommand[]{\endlastfoot}
+\eqcommand[]{\enlargethispage}
+\eqcommand[]{\enlargethispage*}
+\eqcommand[]{\ensuremath}
+\eqcommand[]{\epsilon}
+\eqcommand[]{\eqref}
+\eqcommand[]{\equiv}
+\eqcommand[]{\eta}
+\eqcommand[]{\euro}
+\eqcommand[]{\EUR}
+\eqcommand[]{\evensidemargin}
+\eqcommand[]{\ExecuteOptions}
+\eqcommand[]{\exists}
+\eqcommand[]{\exp}
+\eqcommand[]{\extracolsep}
+\eqcommand[]{\fancypage}
+\eqcommand[]{\fbox}
+\eqcommand[]{\fboxrule}
+\eqcommand[]{\fboxsep}
+\eqcommand[]{\fcolorbox}
+\eqcommand[]{\figurename}
+\eqcommand[]{\fill}
+\eqcommand[]{\flat}
+\eqcommand[]{\floatpagefraction}
+\eqcommand[]{\floatsep}
+\eqcommand[]{\flushbottom}
+\eqcommand[]{\fnsymbol}
+\eqcommand[]{\fontfamily}
+\eqcommand[]{\fontseries}
+\eqcommand[]{\fontshape}
+\eqcommand[]{\fontsize}
+\eqcommand[]{\LTRfootnote}
+\eqcommand[]{\footnote}
+\eqcommand[]{\footnotemark}
+\eqcommand[]{\footnoterule}
+\eqcommand[]{\footnotesep}
+\eqcommand[]{\footnotesize}
+\eqcommand[]{\footnotetext}
+\eqcommand[]{\footskip}
+\eqcommand[]{\forall}
+\eqcommand[]{\frac}
+\eqcommand[]{\frame}
+\eqcommand[]{\framebox}
+\eqcommand[]{\frenchspacing}
+\eqcommand[]{\frontmatter}
+\eqcommand[]{\frown}
+\eqcommand[]{\fussy}
+\eqcommand[]{\Gamma}
+\eqcommand[]{\gamma}
+\eqcommand[]{\gcd}
+\eqcommand[]{\ge}
+\eqcommand[]{\genfrac}
+\eqcommand[]{\geq}
+\eqcommand[]{\gets}
+\eqcommand[]{\gg}
+\eqcommand[]{\glossary}
+\eqcommand[]{\glossaryentry}
+\eqcommand[]{\graphpaper}
+\eqcommand[]{\grave}
+\eqcommand[]{\guillemotleft}
+\eqcommand[]{\guillemotright}
+\eqcommand[]{\guilsinglleft}
+\eqcommand[]{\guilsinglright}
+\eqcommand[]{\hat}
+\eqcommand[]{\hbar}
+\eqcommand[]{\headheight}
+\eqcommand[]{\headsep}
+\eqcommand[]{\headtoname}
+\eqcommand[]{\heartsuit}
+\eqcommand[]{\height}
+\eqcommand[]{\hfill}
+\eqcommand[]{\hline}
+\eqcommand[]{\hoffset}
+\eqcommand[]{\hom}
+\eqcommand[]{\hookleftarrow}
+\eqcommand[]{\hookrightarrow}
+\eqcommand[]{\hrulefill}
+\eqcommand[]{\hspace}
+\eqcommand[]{\hspace*}
+\eqcommand[]{\huge}
+\eqcommand[]{\Huge}
+\eqcommand[]{\hyperlink}
+\eqcommand[]{\hypersetup}
+\eqcommand[]{\hypertarget}
+\eqcommand[]{\hyphenation}
+\eqcommand[]{\idotsint}
+\eqcommand[]{\iff}
+\eqcommand[]{\IfFileExists}
+\eqcommand[]{\ifthenelse}
+\eqcommand[]{\Im}
+\eqcommand[]{\imath}
+\eqcommand[]{\in}
+\eqcommand[]{\include}
+\eqcommand[]{\includegraphics}
+\eqcommand[]{\includegraphics*}
+\eqcommand[]{\includeonly}
+\eqcommand[]{\indent}
+\eqcommand[]{\index}
+\eqcommand[]{\indexentry}
+\eqcommand[]{\indexname}
+\eqcommand[]{\indexspace}
+\eqcommand[]{\inf}
+\eqcommand[]{\infty}
+\eqcommand[]{\input}
+\eqcommand[]{\InputIfFileExists}
+\eqcommand[]{\int}
+\eqcommand[]{\iint}
+\eqcommand[]{\iiint}
+\eqcommand[]{\iiiint}
+\eqcommand[]{\intertext}
+\eqcommand[]{\intertextsep}
+\eqcommand[]{\invisible}
+\eqcommand[]{\iota}
+\eqcommand[]{\itdefault}
+\eqcommand[]{\item}
+\eqcommand[]{\itemindent}
+\eqcommand[]{\itemsep}
+\eqcommand[]{\itshape}
+\eqcommand[]{\jmath}
+\eqcommand[]{\join}
+\eqcommand[]{\jot}
+\eqcommand[]{\kappa}
+\eqcommand[]{\ker}
+\eqcommand[]{\kill}
+\eqcommand[]{\label}
+\eqcommand[]{\labelenumi}
+\eqcommand[]{\labelenumii}
+\eqcommand[]{\labelenumiii}
+\eqcommand[]{\labelenumiv}
+\eqcommand[]{\labelitemi}
+\eqcommand[]{\labelitemii}
+\eqcommand[]{\labelitemiii}
+\eqcommand[]{\labelitemiv}
+\eqcommand[]{\labelsep}
+\eqcommand[]{\labelwidth}
+\eqcommand[]{\Lambda}
+\eqcommand[]{\lambda}
+\eqcommand[]{\langle}
+\eqcommand[]{\language}
+\eqcommand[]{\large}
+\eqcommand[]{\Large}
+\eqcommand[]{\LARGE}
+\eqcommand[]{\LaTeX}
+\eqcommand[]{\LaTeXe}
+\eqcommand[]{\lceil}
+\eqcommand[]{\ldots}
+\eqcommand[]{\le}
+\eqcommand[]{\leadsto}
+\eqcommand[]{\left}
+\eqcommand[]{\Leftarrow}
+\eqcommand[]{\leftarrow}
+\eqcommand[]{\lefteqn}
+\eqcommand[]{\leftharpoondown}
+\eqcommand[]{\leftharpoonup}
+\eqcommand[]{\leftmargin}
+\eqcommand[]{\Leftrightarrow}
+\eqcommand[]{\leftrightarrow}
+\eqcommand[]{\leftroot}
+\eqcommand[]{\leq}
+\eqcommand[]{\lfloor}
+\eqcommand[]{\lg}
+\eqcommand[]{\lhd}
+\eqcommand[]{\lim}
+\eqcommand[]{\liminf}
+\eqcommand[]{\limits}
+\eqcommand[]{\limsup}
+\eqcommand[]{\line}
+\eqcommand[]{\linebreak}
+\eqcommand[]{\linethickness}
+\eqcommand[]{\linewidth}
+\eqcommand[]{\listfigurename}
+\eqcommand[]{\listfiles}
+\eqcommand[]{\listoffigures}
+\eqcommand[]{\listoftables}
+\eqcommand[]{\listparindent}
+\eqcommand[]{\listtablename}
+\eqcommand[]{\ll}
+\eqcommand[]{\ln}
+\eqcommand[]{\LoadClass}
+\eqcommand[]{\LoadClassWithOptions}
+\eqcommand[]{\location}
+\eqcommand[]{\log}
+\eqcommand[]{\Longleftarrow}
+\eqcommand[]{\longleftarrow}
+\eqcommand[]{\Longleftrightarrow}
+\eqcommand[]{\longleftrightarrow}
+\eqcommand[]{\longmapsto}
+\eqcommand[]{\Longrightarrow}
+\eqcommand[]{\longrightarrow}
+\eqcommand[]{\lvert}
+\eqcommand[]{\lVert}
+\eqcommand[]{\mainmatter}
+\eqcommand[]{\makebox}
+\eqcommand[]{\makeglossary}
+\eqcommand[]{\makeindex}
+\eqcommand[]{\makelabel}
+\eqcommand[]{\makelabels}
+\eqcommand[]{\MakeLowercase}
+\eqcommand[]{\MakeShortVerb}
+\eqcommand[]{\maketitle}
+\eqcommand[]{\MakeUppercase}
+\eqcommand[]{\mapsto}
+\eqcommand[]{\marginpar}
+\eqcommand[]{\marginparpush}
+\eqcommand[]{\marginparsep}
+\eqcommand[]{\marginparwidth}
+\eqcommand[]{\markboth}
+\eqcommand[]{\markright}
+\eqcommand[]{\mathbf}
+\eqcommand[]{\mathcal}
+\eqcommand[]{\mathindent}
+\eqcommand[]{\mathit}
+\eqcommand[]{\mathnormal}
+\eqcommand[]{\mathring}
+\eqcommand[]{\mathrm}
+\eqcommand[]{\mathsf}
+\eqcommand[]{\mathtt}
+\eqcommand[]{\max}
+\eqcommand[]{\mbox}
+\eqcommand[]{\mddefault}
+\eqcommand[]{\mdseries}
+\eqcommand[]{\medskip}
+\eqcommand[]{\medskipamount}
+\eqcommand[]{\medspace}
+\eqcommand[]{\MessageBreak}
+\eqcommand[]{\mho}
+\eqcommand[]{\mid}
+\eqcommand[]{\min}
+\eqcommand[]{\mod}
+\eqcommand[]{\models}
+\eqcommand[]{\mp}
+\eqcommand[]{\mspace}
+\eqcommand[]{\mu}
+\eqcommand[]{\multicolumn}
+\eqcommand[]{\multiput}
+\eqcommand[]{\multlinegap}
+\eqcommand[]{\nabla}
+\eqcommand[]{\name}
+\eqcommand[]{\natural}
+\eqcommand[]{\nearrow}
+\eqcommand[]{\NeedsTeXFormat}
+\eqcommand[]{\neg}
+\eqcommand[]{\negmedspace}
+\eqcommand[]{\negthickspace}
+\eqcommand[]{\negthinspace}
+\eqcommand[]{\neq}
+\eqcommand[]{\newboolean}
+\eqcommand[]{\newcommand}
+\eqcommand[]{\newcommand*}
+\eqcommand[]{\newcounter}
+\eqcommand[]{\newenvironment}
+\eqcommand[]{\newenvironment*}
+\eqcommand[]{\newfont}
+\eqcommand[]{\newlength}
+\eqcommand[]{\newline}
+\eqcommand[]{\newpage}
+\eqcommand[]{\newsavebox}
+\eqcommand[]{\newtheorem}
+\eqcommand[]{\ni}
+\eqcommand[]{\nocite}
+\eqcommand[]{\nofiles}
+\eqcommand[]{\noindent}
+\eqcommand[]{\nolimits}
+\eqcommand[]{\nolinebreak}
+\eqcommand[]{\nonfrenchspacing}
+\eqcommand[]{\nonumber}
+\eqcommand[]{\nopagebreak}
+\eqcommand[]{\normalcolor}
+\eqcommand[]{\normalfont}
+\eqcommand[]{\normalmarginpar}
+\eqcommand[]{\normalsize}
+\eqcommand[]{\not}
+\eqcommand[]{\notag}
+\eqcommand[]{\notin}
+\eqcommand[]{\nu}
+\eqcommand[]{\numberwithin}
+\eqcommand[]{\nwarrow}
+\eqcommand[]{\oddsidemargin}
+\eqcommand[]{\odot}
+\eqcommand[]{\oint}
+\eqcommand[]{\Omega}
+\eqcommand[]{\omega}
+\eqcommand[]{\ominus}
+\eqcommand[]{\onecolumn}
+\eqcommand[]{\onlynotes}
+\eqcommand[]{\onlyslides}
+\eqcommand[]{\opening}
+\eqcommand[]{\oplus}
+\eqcommand[]{\OptionNotUsed}
+\eqcommand[]{\oslash}
+\eqcommand[]{\otimes}
+\eqcommand[]{\oval}
+\eqcommand[]{\ovalbox}
+\eqcommand[]{\Ovalbox}
+\eqcommand[]{\overbrace}
+\eqcommand[]{\overleftarrow}
+\eqcommand[]{\overleftrightarrow}
+\eqcommand[]{\overline}
+\eqcommand[]{\overrightarrow}
+\eqcommand[]{\overset}
+\eqcommand[]{\PackageError}
+\eqcommand[]{\PackageInfo}
+\eqcommand[]{\PackageWarning}
+\eqcommand[]{\PackageWarningNoLine}
+\eqcommand[]{\pagebreak}
+\eqcommand[]{\pagecolor}
+\eqcommand[]{\pagename}
+\eqcommand[]{\pagenumbering}
+\eqcommand[]{\pageref}
+\eqcommand[]{\pagestyle}
+\eqcommand[]{\paperheight}
+\eqcommand[]{\paperwidth}
+\eqcommand[]{\par}
+\eqcommand[]{\paragraph}
+\eqcommand[]{\paragraph*}
+\eqcommand[]{\parallel}
+\eqcommand[]{\parbox}
+\eqcommand[]{\parindent}
+\eqcommand[]{\parsep}
+\eqcommand[]{\parskip}
+\eqcommand[]{\part}
+\eqcommand[]{\part*}
+\eqcommand[]{\partial}
+\eqcommand[]{\partname}
+\eqcommand[]{\partopsep}
+\eqcommand[]{\PassOptionToClass}
+\eqcommand[]{\PassOptionToPackage}
+\eqcommand[]{\path}
+\eqcommand[]{\prep}
+\eqcommand[]{\Phi}
+\eqcommand[]{\phi}
+\eqcommand[]{\Pi}
+\eqcommand[]{\pi}
+\eqcommand[]{\pm}
+\eqcommand[]{\pmb}
+\eqcommand[]{\pmod}
+\eqcommand[]{\pod}
+\eqcommand[]{\poptabs}
+\eqcommand[]{\pounds}
+\eqcommand[]{\Pr}
+\eqcommand[]{\prec}
+\eqcommand[]{\preceq}
+\eqcommand[]{\prime}
+\eqcommand[]{\printindex}
+\eqcommand[]{\ProcessOptions}
+\eqcommand[]{\ProcessOptions*}
+\eqcommand[]{\prod}
+\eqcommand[]{\propto}
+\eqcommand[]{\protect}
+\eqcommand[]{\providecommand}
+\eqcommand[]{\providecommand*}
+\eqcommand[]{\ProvidesClass}
+\eqcommand[]{\ProvidesFile}
+\eqcommand[]{\ProvidesPackage}
+\eqcommand[]{\ps}
+\eqcommand[]{\Psi}
+\eqcommand[]{\psi}
+\eqcommand[]{\pushtabs}
+\eqcommand[]{\put}
+\eqcommand[]{\qbezier}
+\eqcommand[]{\qquad}
+\eqcommand[]{\quad}
+\eqcommand[]{\raggedbottom}
+\eqcommand[]{\raggedleft}
+\eqcommand[]{\raggedright}
+\eqcommand[]{\raisebox}
+\eqcommand[]{\raisetag}
+\eqcommand[]{\rangle}
+\eqcommand[]{\rceil}
+\eqcommand[]{\Re}
+\eqcommand[]{\ref}
+\eqcommand[]{\reflectbox}
+\eqcommand[]{\refname}
+\eqcommand[]{\refstepcounter}
+\eqcommand[]{\renewcommand}
+\eqcommand[]{\renewcommand*}
+\eqcommand[]{\renewenvironment}
+\eqcommand[]{\renewenvironment*}
+\eqcommand[]{\RequirePackage}
+\eqcommand[]{\RequirePackageWithOptions}
+\eqcommand[]{\resizebox}
+\eqcommand[]{\resizebox*}
+\eqcommand[]{\reversemarginpar}
+\eqcommand[]{\rfloor}
+\eqcommand[]{\rhd}
+\eqcommand[]{\rho}
+\eqcommand[]{\right}
+\eqcommand[]{\Rightarrow}
+\eqcommand[]{\rightarrow}
+\eqcommand[]{\rightharpoondown}
+\eqcommand[]{\rightharpoonup}
+\eqcommand[]{\rightleftharpoons}
+\eqcommand[]{\rightmargin}
+\eqcommand[]{\rmdefault}
+\eqcommand[]{\rmfamily}
+\eqcommand[]{\Roman}
+\eqcommand[]{\roman}
+\eqcommand[]{\rotatebox}
+\eqcommand[]{\rule}
+\eqcommand[]{\rvert}
+\eqcommand[]{\rVert}
+\eqcommand[]{\savebox}
+\eqcommand[]{\sbox}
+\eqcommand[]{\scalebox}
+\eqcommand[]{\scdefault}
+\eqcommand[]{\scriptscriptstyle}
+\eqcommand[]{\scriptsize}
+\eqcommand[]{\scripstyle}
+\eqcommand[]{\scshape}
+\eqcommand[]{\searrow}
+\eqcommand[]{\sec}
+\eqcommand[]{\section}
+\eqcommand[]{\section*}
+\eqcommand[]{\see}
+\eqcommand[]{\seealso}
+\eqcommand[]{\seename}
+\eqcommand[]{\selectfont}
+\eqcommand[]{\setboolean}
+\eqcommand[]{\setcounter}
+\eqcommand[]{\setlength}
+\eqcommand[]{\setminus}
+\eqcommand[]{\settodepth}
+\eqcommand[]{\settoheight}
+\eqcommand[]{\settowidth}
+\eqcommand[]{\sfdefault}
+\eqcommand[]{\sffamily}
+\eqcommand[]{\shadowbox}
+\eqcommand[]{\sharp}
+\eqcommand[]{\shortstack}
+\eqcommand[]{\sideset}
+\eqcommand[]{\Sigma}
+\eqcommand[]{\sigma}
+\eqcommand[]{\signature}
+\eqcommand[]{\sim}
+\eqcommand[]{\simeq}
+\eqcommand[]{\sin}
+\eqcommand[]{\sinh}
+\eqcommand[]{\sldefault}
+\eqcommand[]{\sloppy}
+\eqcommand[]{\slshape}
+\eqcommand[]{\small}
+\eqcommand[]{\smallskip}
+\eqcommand[]{\smallskipamount}
+\eqcommand[]{\smash}
+\eqcommand[]{\smile}
+\eqcommand[]{\spadesuit}
+\eqcommand[]{\sqcap}
+\eqcommand[]{\sqcup}
+\eqcommand[]{\sqrt}
+\eqcommand[]{\sqsubset}
+\eqcommand[]{\sqsubseteq}
+\eqcommand[]{\sqsupset}
+\eqcommand[]{\sqsupseteq}
+\eqcommand[]{\stackrel}
+\eqcommand[]{\star}
+\eqcommand[]{\stepcounter}
+\eqcommand[]{\stretch}
+\eqcommand[]{\subitem}
+\eqcommand[]{\subparagraph}
+\eqcommand[]{\subparagraph*}
+\eqcommand[]{\subsection}
+\eqcommand[]{\subsection*}
+\eqcommand[]{\substack}
+\eqcommand[]{\subsubitem}
+\eqcommand[]{\subsubsection}
+\eqcommand[]{\subsubsection*}
+\eqcommand[]{\subset}
+\eqcommand[]{\subseteq}
+\eqcommand[]{\succ}
+\eqcommand[]{\succeq}
+\eqcommand[]{\sum}
+\eqcommand[]{\sup}
+\eqcommand[]{\supressfloats}
+\eqcommand[]{\supset}
+\eqcommand[]{\supseteq}
+\eqcommand[]{\surd}
+\eqcommand[]{\swarrow}
+\eqcommand[]{\tabbingsep}
+\eqcommand[]{\tabcolsep}
+\eqcommand[]{\tableofcontents}
+\eqcommand[]{\tablename}
+\eqcommand[]{\tabularnewline}
+\eqcommand[]{\tag}
+\eqcommand[]{\tan}
+\eqcommand[]{\tanh}
+\eqcommand[]{\tau}
+\eqcommand[]{\tbinom}
+\eqcommand[]{\telephone}
+\eqcommand[]{\TeX}
+\eqcommand[]{\text}
+\eqcommand[]{\textbullet}
+\eqcommand[]{\textemdash}
+\eqcommand[]{\textendash}
+\eqcommand[]{\textexclamdown}
+\eqcommand[]{\textperiodcentered}
+\eqcommand[]{\textquestiondown}
+\eqcommand[]{\textquotedblleft}
+\eqcommand[]{\textquotedblright}
+\eqcommand[]{\textquoteleft}
+\eqcommand[]{\textquoteright}
+\eqcommand[]{\textvisiblespace}
+\eqcommand[]{\textasciicircum}
+\eqcommand[]{\textasciitilde}
+\eqcommand[]{\textbackslash}
+\eqcommand[]{\textbar}
+\eqcommand[]{\textgreater}
+\eqcommand[]{\textless}
+\eqcommand[]{\textbf}
+\eqcommand[]{\textcircled}
+\eqcommand[]{\textcolor}
+\eqcommand[]{\textcompwordmark}
+\eqcommand[]{\textfloatsep}
+\eqcommand[]{\textfraction}
+\eqcommand[]{\textheight}
+\eqcommand[]{\textit}
+\eqcommand[]{\textmd}
+\eqcommand[]{\textnormal}
+\eqcommand[]{\textregistered}
+\eqcommand[]{\textrm}
+\eqcommand[]{\textsc}
+\eqcommand[]{\textsf}
+\eqcommand[]{\textsl}
+\eqcommand[]{\textstyle}
+\eqcommand[]{\textsuperscript}
+\eqcommand[]{\texttrademark}
+\eqcommand[]{\texttt}
+\eqcommand[]{\textup}
+\eqcommand[]{\textwidth}
+\eqcommand[]{\tfrac}
+\eqcommand[]{\thanks}
+\eqcommand[]{\Theta}
+\eqcommand[]{\theta}
+\eqcommand[]{\thicklines}
+\eqcommand[]{\thickspace}
+\eqcommand[]{\thinlines}
+\eqcommand[]{\thinspace}
+\eqcommand[]{\thisfancypage}
+\eqcommand[]{\thispagestyle}
+\eqcommand[]{\tilde}
+\eqcommand[]{\tiny}
+\eqcommand[]{\times}
+\eqcommand[]{\title}
+\eqcommand[]{\to}
+\eqcommand[]{\today}
+\eqcommand[]{\top}
+\eqcommand[]{\topfigrule}
+\eqcommand[]{\topfraction}
+\eqcommand[]{\topmargin}
+\eqcommand[]{\topsep}
+\eqcommand[]{\topskip}
+\eqcommand[]{\totalheight}
+\eqcommand[]{\triangle}
+\eqcommand[]{\triangleleft}
+\eqcommand[]{\triangleright}
+\eqcommand[]{\ttdefault}
+\eqcommand[]{\ttfamily}
+\eqcommand[]{\twocolumn}
+\eqcommand[]{\typein}
+\eqcommand[]{\typeout}
+\eqcommand[]{\unboldmath}
+\eqcommand[]{\underbrace}
+\eqcommand[]{\underleftarrow}
+\eqcommand[]{\underleftrightarrow}
+\eqcommand[]{\underline}
+\eqcommand[]{\underrightarrow}
+\eqcommand[]{\underset}
+\eqcommand[]{\unitlength}
+\eqcommand[]{\unlhd}
+\eqcommand[]{\unrhd}
+\eqcommand[]{\Uparrow}
+\eqcommand[]{\uparrow}
+\eqcommand[]{\updefault}
+\eqcommand[]{\Updownarrow}
+\eqcommand[]{\updownarrow}
+\eqcommand[]{\uplus}
+\eqcommand[]{\upshape}
+\eqcommand[]{\Upsilon}
+\eqcommand[]{\upsilon}
+\eqcommand[]{\uproot}
+\eqcommand[]{\url}
+\eqcommand[]{\urlstyle}
+\eqcommand[]{\usebox}
+\eqcommand[]{\usecounter}
+\eqcommand[]{\usefont}
+\eqcommand[]{\usepackage}
+\eqcommand[]{\value}
+\eqcommand[]{\varepsilon}
+\eqcommand[]{\varinjlim}
+\eqcommand[]{\varliminf}
+\eqcommand[]{\varlimsup}
+\eqcommand[]{\varphi}
+\eqcommand[]{\varpi}
+\eqcommand[]{\varprojlim}
+\eqcommand[]{\varrho}
+\eqcommand[]{\varsigma}
+\eqcommand[]{\vartheta}
+\eqcommand[]{\vdash}
+\eqcommand[]{\vdots}
+\eqcommand[]{\vec}
+\eqcommand[]{\vector}
+\eqcommand[]{\vee}
+\eqcommand[]{\verb}
+\eqcommand[]{\verb*}
+\eqcommand[]{\vfill}
+\eqcommand[]{\visible}
+\eqcommand[]{\vline}
+\eqcommand[]{\voffset}
+\eqcommand[]{\vpageref}
+\eqcommand[]{\vref}
+\eqcommand[]{\vspace}
+\eqcommand[]{\vspace*}
+\eqcommand[]{\wedge}
+\eqcommand[]{\whiledo}
+\eqcommand[]{\widehat}
+\eqcommand[]{\widetilde}
+\eqcommand[]{\width}
+\eqcommand[]{\wp}
+\eqcommand[]{\wr}
+\eqcommand[]{\Xi}
+\eqcommand[]{\xi}
+\eqcommand[]{\xleftarrow}
+\eqcommand[]{\xrightarrow}
+\eqcommand[]{\zeta}
+% \end{macrocode}
+% \iffalse
+%</commands-ltx.def>
+%<*commands-xepersian.def>
+% \fi
+% \part{commands-xepersian.def}
+% \begin{macrocode}
+
+% \end{macrocode}
+% \iffalse
+%</commands-xepersian.def>
+%<*enumerate-xepersian.def>
+% \fi
+% \part{enumerate-xepersian.def}
+% \begin{macrocode}
+\def\@enloop@{%
+ \ifx ا\@entemp \def\@tempa{\@enLabel\harfi }\else
+ \ifx ی\@entemp \def\@tempa{\@enLabel\adadi }\else
+ \ifx ت\@entemp \def\@tempa{\@enLabel\tartibi }\else
+ \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else
+ \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else
+ \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else
+ \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else
+ \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else
+ \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else
+ \ifx \bgroup\@entemp \let\@tempa\@enGroup \else
+ \ifx \@enum@\@entemp \let\@tempa\@gobble \else
+ \let\@tempa\@enOther
+ \@enhook
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \@tempa}
+% \end{macrocode}
+% \iffalse
+%</enumerate-xepersian.def>
+%<*minitoc-xepersian.def>
+% \fi
+% \part{minitoc-xepersian.def}
+% \begin{macrocode}
+\def\ptctitle{\if@RTL فهرست مطالب\else Table of Contents\fi}%
+\def\plftitle{\if@RTL لیست تصاویر\else List of Figures\fi}%
+\def\plttitle{\if@RTL لیست جداول\else List of Tables\fi}%
+\def\mtctitle{\if@RTL عناوین\else Contents\fi}%
+\def\mlftitle{\if@RTL اشکال\else Figures\fi}%
+\def\mlttitle{\if@RTL جداول\else Tables\fi}%
+\def\stctitle{\if@RTL عناوین\else Contents\fi}%
+\def\slftitle{\if@RTL اشکال\else Figures\fi}%
+\def\slttitle{\if@RTL جداول\else Tables\fi}%
+% \end{macrocode}
+% \iffalse
+%</minitoc-xepersian.def>
+%<*environments-ltx.def>
+% \fi
+% \part{environments-ltx.def}
+% \begin{macrocode}
+\eqenvironment[]{abstract}
+\eqenvironment[]{align}
+\eqenvironment[]{alignat}
+\eqenvironment[]{aligned}
+\eqenvironment[]{appendix}
+\eqenvironment[]{array}
+\eqenvironment[]{center}
+\eqenvironment[]{alltt}
+\eqenvironment[]{bmatrix}
+\eqenvironment[]{Bmatrix}
+\eqenvironment[]{cases}
+\eqenvironment[]{description}
+\eqenvironment[]{displaymath}
+\eqenvironment[]{enumerate}
+\eqenvironment[]{eqnarray}
+\eqenvironment[]{eqnarray*}
+\eqenvironment[]{equation}
+\eqenvironment[]{equation*}
+\eqenvironment[]{falign}
+\eqenvironment[]{figure}
+\eqenvironment[]{figure*}
+\eqenvironment[]{filecontents}
+\eqenvironment[]{filecontents*}
+\eqenvironment[]{flushleft}
+\eqenvironment[]{flushright}
+\eqenvironment[]{gather}
+\eqenvironment[]{gathered}
+\eqenvironment[]{itemize}
+\eqenvironment[]{letter}
+\eqenvironment[]{list}
+\eqenvironment[]{longtable}
+\eqenvironment[]{lrbox}
+\eqenvironment[]{math}
+\eqenvironment[]{matrix}
+\eqenvironment[]{minipage}
+\eqenvironment[]{multicols}
+\eqenvironment[]{multline}
+\eqenvironment[]{note}
+\eqenvironment[]{overlay}
+\eqenvironment[]{picture}
+\eqenvironment[]{pmatrix}
+\eqenvironment[]{quotation}
+\eqenvironment[]{quote}
+\eqenvironment[]{slide}
+\eqenvironment[]{sloppypar}
+\eqenvironment[]{split}
+\eqenvironment[]{subarray}
+\eqenvironment[]{subequations}
+\eqenvironment[]{tabbing}
+\eqenvironment[]{table}
+\eqenvironment[]{table*}
+\eqenvironment[]{tabular}
+\eqenvironment[]{tabular*}
+\eqenvironment[]{thebibliography}
+\eqenvironment[]{theindex}
+\eqenvironment[]{titlepage}
+\eqenvironment[]{trivlist}
+\eqenvironment[]{verbatim}
+\eqenvironment[]{verbatim*}
+\eqenvironment[]{verse}
+\eqenvironment[]{vmatrix}
+\eqenvironment[]{Vmatrix}
+% \end{macrocode}
+% \iffalse
+%</environments-ltx.def>
+%<*environments-xepersian.def>
+% \fi
+% \part{environments-xepersian.def}
+% \begin{macrocode}
+
+% \end{macrocode}
+% \iffalse
+%</environments-xepersian.def>
+%<*extbook-xepersian.def>
+% \fi
+% \part{extbook-xepersian.def}
+% \begin{macrocode}
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</extbook-xepersian.def>
+%<*kashida-xepersian.def>
+% \fi
+% \part{kashida-xepersian.def}
+% \begin{macrocode}
+\chardef\zwj="200D % zero-width joiner
+\chardef\ksh="0640 % kashida
+
+\chardef\D=10 % dual-joiner class
+\chardef\L=11 % lam
+\chardef\R=12 % right-joiner
+\chardef\A=13 % alef
+\chardef\V=256 % vowel or other combining mark (to be ignored)
+
+\def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
+ \leaders\hrule height\ht0 \hskip0pt plus 0.5em \zwj}
+
+\def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}%
+ \expandafter\dosetclass\charlist,\end}
+\def\dosetclass#1,#2\end{%
+ \def\test{#1}\def\charlist{#2}%
+ \ifx\test\empty\let\next\finishsetclass
+ \else \XeTeXcharclass "\test = \theclass
+ \let\next\dosetclass \fi
+ \expandafter\next\charlist,,\end}
+\def\finishsetclass#1,,\end{}
+
+\setclass \A {0622,0623,0625,0627}
+\setclass \R {0624,0629,062F,0630,0631,0632,0648,0698}
+\setclass \D {0626,0628,062A,062B,062C,062D,062E}
+\setclass \D {0633,0634,0635,0636,0637,0638,0639,063A}
+\setclass \D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
+\setclass \D {067E,0686,06A9,06AF,06CC}
+\setclass \L {0644}
+\setclass \V {064B,064C,064D,064E,064F,0650,0651,0652}
+
+\XeTeXinterchartoks \D \D = {\kashida}
+\XeTeXinterchartoks \L \D = {\kashida}
+\XeTeXinterchartoks \D \L = {\kashida}
+\XeTeXinterchartoks \L \L = {\kashida}
+\XeTeXinterchartoks \D \R = {\kashida}
+\XeTeXinterchartoks \D \A = {\kashida}
+\XeTeXinterchartoks \L \R = {\kashida}
+\XeTeXinterchartoks \L \A = {}
+
+\XeTeXinterchartokenstate=1
+% \end{macrocode}
+% \iffalse
+%</kashida-xepersian.def>
+%<*listings-xepersian.def>
+% \fi
+% \part{listings-xepersian.def}
+% \begin{macrocode}
+\def\lstlistingname{برنامهٔ}
+\def\lstlistlistingname{فهرست برنامه‌ها}
+% \end{macrocode}
+% \iffalse
+%</listings-xepersian.def>
+%<*bidimemoir-xepersian.def>
+% \fi
+% \part{bidimemoir-xepersian.def}
+% \begin{macrocode}
+\renewcommand{\@memfront}{%
+ \@smemfront\pagenumbering{harfi}}
+\renewcommand{\setthesection}{\thechapter\@SepMark\harfi{section}}
+\renewcommand*{\thebook}{\@tartibi\c@book}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand{\appendix}{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \anappendixtrue}
+% \end{macrocode}
+% \iffalse
+%</bidimemoir-xepersian.def>
+%<*misccommandsenvironments-ltx.def>
+% \fi
+% \part{misccommandsenvironments-ltx.def}
+% \begin{macrocode}
+\eqcommand[\سند]{\document}
+\eqcommand[\endسند]{\enddocument}
+% \end{macrocode}
+% \iffalse
+%</misccommandsenvironments-ltx.def>
+%<*refrep-xepersian.def>
+% \fi
+% \part{refrep-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</refrep-xepersian.def>
+%<*report-xepersian.def>
+% \fi
+% \part{report-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</report-xepersian.def>
+%<*rapport3-xepersian.def>
+% \fi
+% \part{rapport3-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\thepart{\@tartibi\c@part}
+\renewcommand*\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}}
+% \end{macrocode}
+% \iffalse
+%</rapport3-xepersian.def>
+%<*scrartcl-xepersian.def>
+% \fi
+% \part{scrartcl-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+% \end{macrocode}
+% \iffalse
+%</scrartcl-xepersian.def>
+%<*scrbook-xepersian.def>
+% \fi
+% \part{scrbook-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*\frontmatter{%
+ \if@twoside\cleardoubleoddpage\else\clearpage\fi
+ \@mainmatterfalse\pagenumbering{harfi}%
+}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+% \end{macrocode}
+% \iffalse
+%</scrbook-xepersian.def>
+%<*scrreprt-xepersian.def>
+% \fi
+% \part{scrreprt-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+% \end{macrocode}
+% \iffalse
+%</scrreprt-xepersian.def>
+%<*tocloft-xepersian.def>
+% \fi
+% \part{tocloft-xepersian.def}
+% \begin{macrocode}
+\renewcommand*{\cftchapname}{\if@RTL فصل\else chapter\fi}
+\renewcommand*{\cftsecname}{\if@RTL قسمت\else section\fi}
+\renewcommand*{\cftsubsecname}{\if@RTL زیرقسمت\else subsection\fi}
+\renewcommand*{\cftsubsubsecname}{\if@RTL زیرزیرقسمت\else subsubsection\fi}
+\renewcommand*{\cftparaname}{\if@RTL پاراگراف\else paragraph\fi}
+\renewcommand*{\cftsubparaname}{\if@RTL زیرپاراگراف\else subparagraph\fi}
+\renewcommand*{\cftfigname}{\if@RTL شکل\else figure\fi}
+\renewcommand*{\cftsubfigname}{\if@RTL زیرشکل\else subfigure\fi}
+\renewcommand*{\cfttabname}{\if@RTL جدول\else table\fi}
+\renewcommand*{\cftsubtabname}{\if@RTL زیرجدول\else subtable\fi}
+% \end{macrocode}
+% \iffalse
+%</tocloft-xepersian.def>
+%<*xepersian-magazine.cls>
+% \fi
+% \part{xepersian-magazine.cls}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{xepersian-magazine}[2009/01/05 v0.1 Typesetting Persian magazines in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{ifthen}
+\newlength{\xepersian@imgsize}
+\newlength{\xepersian@coltitsize}
+\newlength{\xepersian@pageneed}
+\newlength{\xepersian@pageleft}
+\newlength{\xepersian@indexwidth}
+\newcommand{\xepersian@ncolumns}{0}
+\newlength{\columnlines}
+\setlength{\columnlines}{0 pt} % no lines by default
+\newboolean{xepersian@hyphenatedtitles}
+\setboolean{xepersian@hyphenatedtitles}{true}
+\newboolean{xepersian@ninepoints}
+\setboolean{xepersian@ninepoints}{false}
+\newboolean{xepersian@showgrid}
+\setboolean{xepersian@showgrid}{false}
+\newboolean{xepersian@a3paper}
+\setboolean{xepersian@a3paper}{false}
+\newboolean{xepersian@insidefrontpage}
+\setboolean{xepersian@insidefrontpage}{false}
+\newboolean{xepersian@insideweather}
+\setboolean{xepersian@insideweather}{false}
+\newboolean{xepersian@insideindex}
+\setboolean{xepersian@insideindex}{false}
+\newcount\xepersian@gridrows
+\newcount\xepersian@gridcolumns
+\xepersian@gridrows=40
+\xepersian@gridcolumns=50
+\newcount\minraggedcols
+\minraggedcols=5
+\DeclareOption{10pt}{\PassOptionsToClass{10pt}{article}}
+\DeclareOption{11pt}{\PassOptionsToClass{11pt}{article}}
+\DeclareOption{12pt}{\PassOptionsToClass{12pt}{article}}
+\DeclareOption{twocolumn}%
+{\ClassWarning{xepersian-magazine}{Option 'twocolumn' not available for xepersian-magazine.}}
+\DeclareOption{notitlepage}%
+{\ClassWarning{xepersian-magazine}{Option 'notitlepage' not available for xepersian-magazine.}}
+\DeclareOption{twoside}%
+{\ClassWarning{xepersian-magazine}{Option 'twoside' not available for xepersian-magazine.}}
+\DeclareOption{9pt}{\setboolean{xepersian@ninepoints}{true}}
+\DeclareOption{hyphenatedtitles}{\setboolean{xepersian@hyphenatedtitles}{false}}
+\DeclareOption{columnlines}{\setlength{\columnlines}{0.1 pt}}
+\DeclareOption{showgrid}{\setboolean{xepersian@showgrid}{true}}
+\DeclareOption{a3paper}{\setboolean{xepersian@a3paper}{true}}
+\ProcessOptions\relax
+\LoadClass[10pt, onecolumn, titlepage, a4paper]{article}
+\RequirePackage{ifxetex}
+\RequirePackage{multido}
+\RequirePackage{datetime}
+\RequirePackage{fmultico}
+\RequirePackage{fancyhdr}
+\RequirePackage{fancybox}
+\ifthenelse{\boolean{xepersian@a3paper}}{%
+\RequirePackage[a3paper,headsep=0.5cm,vmargin={2cm,2cm},hmargin={1.5cm,1.5cm}]{geometry}
+}{
+\RequirePackage[headsep=0.5cm,vmargin={2cm,2cm},hmargin={1.5cm,1.5cm}]{geometry}
+}
+\RequirePackage[absolute]{textpos} % absoulte positioning
+\RequirePackage{hyphenat} % when hyphenate
+\RequirePackage{lastpage} % to know the last page number
+\RequirePackage{setspace} % set space between lines
+\RequirePackage{ragged2e}
+\newcommand{\raggedFormat}{\RaggedLeft}
+\AtEndOfClass{\xepersianInit}
+\ifthenelse{\boolean{xepersian@showgrid}}{%
+\AtBeginDocument{
+\grid[show]{\xepersian@gridrows}{\xepersian@gridcolumns}}
+\advance\minraggedcols by -1
+}{%
+\AtBeginDocument{
+\grid[]{\xepersian@gridrows}{\xepersian@gridcolumns}}
+\advance\minraggedcols by -1
+}
+\ifthenelse{\boolean{xepersian@ninepoints}}{
+\renewcommand{\normalsize}{%
+ \@setfontsize{\normalsize}{9pt}{10pt}%
+ \setlength{\abovedisplayskip}{5pt plus 1pt minus .5pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{3pt plus 1pt minus 2pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\tiny}{\@setfontsize{\tiny}{5pt}{6pt}}
+
+\renewcommand{\scriptsize}{\@setfontsize{\scriptsize}{7pt}{8pt}}
+
+\renewcommand{\small}{%
+ \@setfontsize{\small}{8pt}{9pt}%
+ \setlength{\abovedisplayskip}{4pt plus 1pt minus 1pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\footnotesize}{%
+ \@setfontsize{\footnotesize}{8pt}{9pt}%
+ \setlength{\abovedisplayskip}{4pt plus 1pt minus .5pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\large}{\@setfontsize{\large}{11pt}{13pt}}
+\renewcommand{\Large}{\@setfontsize{\Large}{14pt}{18pt}}
+\renewcommand{\LARGE}{\@setfontsize{\LARGE}{18pt}{20pt}}
+\renewcommand{\huge}{\@setfontsize{\huge}{20pt}{25pt}}
+\renewcommand{\Huge}{\@setfontsize{\Huge}{25pt}{30pt}}
+}{}
+\def\customwwwTxt#1{\gdef\@customwwwTxt{\lr{#1}}}
+\newcommand{\xepersian@wwwFormat}{\sffamily}
+\newcommand{\xepersian@www}{%
+\raisebox{-3pt}{{\xepersian@wwwFormat\@customwwwTxt}}
+}
+\newcommand{\xepersian@edition}{ویرایش من}
+\newcommand{\editionFormat}{\large\bfseries\texttt}
+\newcommand{\xepersian@editionLogo}{%
+\raisebox{-3pt}{%
+{\editionFormat\xepersian@edition}%
+}%
+}
+\newcommand{\indexFormat}{\large\bfseries}
+\newcommand{\xepersian@indexFrameTitle}[1]
+{\begin{flushright}{{\indexFormat #1}}\end{flushright}}
+
+\newcommand{\indexEntryFormat}{\normalsize}
+\newcommand{\xepersian@indexEntry}[1]{\begin{minipage}{13\TPHorizModule}%
+{\indexEntryFormat\noindent\ignorespaces{#1}}%
+\end{minipage}}
+\newcommand{\indexEntrySeparator}{\rule{\xepersian@indexwidth}{.1pt}}
+\newcommand{\indexEntryPageTxt}{صفحهٔ}
+\newcommand{\indexEntryPageFormat}{\footnotesize}
+\newcommand{\xepersian@indexEntryPage}[1]{%
+{\indexEntryPageFormat{\indexEntryPageTxt{}~#1}}%
+}
+\newcommand{\headDateTimeFormat}{}
+\newcommand{\xepersian@headDateTime}{%
+\headDateTimeFormat\date\hspace{5pt}$\parallel$\hspace{5pt}%
+\currenttime %
+}
+\newcommand{\weatherFormat}{\bfseries}
+\newcommand{\xepersian@weather}[1]{%
+\noindent{\weatherFormat #1}%
+}
+\newcommand{\weatherTempFormat}{\small}
+\newcommand{\weatherUnits}{\textdegree{}C}
+\newcommand{\xepersian@section}[0]{صفحهٔ جلو}
+\newcommand{\xepersian@headleft}{%
+{\small\bfseries \@custommagazinename}، \date
+}
+\newcommand{\xepersian@headcenter}{%
+\xepersian@section{}
+}
+\newcommand{\xepersian@headright}{%
+\small\xepersian@edition%
+\hspace*{5pt}\beginL\thepage\ / \pageref{LastPage}\endL
+}
+
+\newcommand{\heading}[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}}%
+}
+\newcommand{\xepersian@footcenter}{%
+}
+\newcommand{\xepersian@footleft}{%
+}
+
+\newcommand{\foot}[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]{%
+{%
+\begin{spacing}{2.0}{%
+\noindent\ignorespaces
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\firstTitleFormat #1}}%
+{{\firstTitleFormat #1}}%
+}%
+\end{spacing}%
+}%
+}
+\newcommand{\firstTextFormat}{}
+\newcommand{\xepersian@firstText}[1]{%
+{\noindent\ignorespaces\firstTextFormat #1}%
+}
+\newcommand{\secondTitleFormat}{\LARGE\bfseries}
+\newcommand{\xepersian@secondTitle}[1]{%
+\begin{spacing}{1.5}{%
+\noindent\ignorespaces\flushright
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\secondTitleFormat #1}}%
+{{\secondTitleFormat #1}}%
+}\end{spacing}%
+}
+\newcommand{\secondSubtitleFormat}{\large}
+\newcommand{\xepersian@secondSubtitle}[1]{%
+{\noindent\ignorespaces{\secondSubtitleFormat #1}}%
+}
+\newcommand{\secondTextFormat}{}
+\newcommand{\xepersian@secondText}[1]{%
+\begin{multicols}{2}
+{\noindent\ignorespaces\secondTextFormat #1}
+\end{multicols}
+}
+\newcommand{\thirdTitleFormat}{\Large\bfseries}
+\newcommand{\xepersian@thirdTitle}[1]{%
+\begin{spacing}{1.5}{%
+\noindent\ignorespaces\flushright
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\thirdTitleFormat #1}}%
+{{\thirdTitleFormat #1}}%
+}\end{spacing}%
+}
+\newcommand{\thirdSubtitleFormat}{\large}
+\newcommand{\xepersian@thirdSubtitle}[1]%
+{{\noindent\ignorespaces\thirdSubtitleFormat #1}}
+\newcommand{\thirdTextFormat}{}
+\newcommand{\xepersian@thirdText}[1]{{\thirdTextFormat #1}}
+\newcommand{\pictureCaptionFormat}{\small\bfseries}
+\newcommand{\xepersian@pictureCaption}[1]{%
+{\noindent\pictureCaptionFormat #1}%
+}
+\newcommand{\pagesFormat}{\bfseries\footnotesize}
+\newcommand{\xepersian@pages}[1]%
+{\noindent{\pagesFormat\MakeUppercase{#1}}}
+\newcommand{\innerTitleFormat}{\Huge}
+\newcommand{\xepersian@innerTitle}[1]{%
+\begin{flushright}{%
+\noindent
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\innerTitleFormat #1}}%
+{{\innerTitleFormat #1}}%
+}%
+\\%
+\end{flushright}%
+}
+\newcommand{\innerSubtitleFormat}{\large}
+\newcommand{\xepersian@innerSubtitle}[1]{{\innerSubtitleFormat #1}}
+\newcommand{\timestampTxt}{}
+\newcommand{\timestampSeparator}{|}
+\newcommand{\timestampFormat}{\small}
+\newcommand{\timestamp}[1]{%
+{\timestampFormat%
+#1~\timestampTxt{}%
+}~\timestampSeparator{}%
+}
+\newcommand{\innerAuthorFormat}{\footnotesize}
+\newcommand{\innerPlaceFormat}{\footnotesize\bfseries}
+\newcommand{\innerTextFinalMark}{\rule{0.65em}{0.65em}}
+\newcommand{\editorialTitleFormat}{\LARGE\textit}
+\newcommand{\xepersian@editorialTitle}[1]{\editorialTitleFormat{#1}}
+\newcommand{\editorialAuthorFormat}{\textsc}
+\newcommand{\shortarticleTitleFormat}{\LARGE\bfseries}
+\newcommand{\xepersian@shortarticleTitle}[1]{{\shortarticleTitleFormat #1}}
+\newcommand{\shortarticleSubtitleFormat}{\Large}
+\newcommand{\xepersian@shortarticleSubtitle}[1]{{\shortarticleSubtitleFormat #1}}
+\newcommand{\shortarticleItemTitleFormat}{\large\bfseries}
+\newcommand{\xepersian@shortarticleItemTitle}[1]{{\shortarticleItemTitleFormat #1}}
+\renewcommand{\maketitle}{\begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \null\vfil
+ \vskip 60\p@
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 1em%
+ {\LARGE «\xepersian@edition» \par}%
+ \vskip 3em%
+ {\large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1.5em%
+ {\large \@date \par}%
+ \end{center}\par
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+}
+\newcommand{\xepersian@say}[1]{\typeout{#1}}
+\newsavebox{\xepersian@fmbox}
+\newenvironment{xepersian@fmpage}[1]
+ {\begin{lrbox}{\xepersian@fmbox}\begin{minipage}{#1}}
+ {\end{minipage}\end{lrbox}\fbox{\usebox{\xepersian@fmbox}}}
+\newcommand{\image}[2]{
+\vspace{5pt}
+\setlength{\fboxsep}{1pt}
+\addtolength{\xepersian@imgsize}{\columnwidth}
+\addtolength{\xepersian@imgsize}{-1\columnsep}
+\ifxetex
+\setlength{\xepersian@pageneed}{1.5\xepersian@imgsize}
+\addtolength{\xepersian@pageneed}{50pt}
+\ClassWarning{xepersian-magazine}{%
+Image #1 needs: \the\xepersian@pageneed \space %
+and there is left: \the\page@free\space%
+}
+\ifdim \xepersian@pageneed < \page@free
+
+{\centering\fbox{%
+\includegraphics[width = \xepersian@imgsize,
+height = \xepersian@imgsize,
+keepaspectratio ]{#1}}}
+\xepersian@pictureCaption{#2}
+
+\vspace{5pt}
+\else
+\ClassWarning{Image #1 needs more space!%
+ It was not inserted!}
+\fi
+\fi
+}
+\textblockorigin{1cm}{1cm}
+\newdimen\xepersian@dx
+\newdimen\xepersian@dy
+\newcount\xepersian@cx
+\newcount\xepersian@cy
+\newcommand{\grid}[3][]{
+\xepersian@dx=\textwidth%
+\xepersian@dy=\textheight%
+\xepersian@cx=#3% %columns
+\xepersian@cy=#2% %rows
+
+\count1=#3%
+\advance\count1 by 1
+
+\count2=#2%
+\advance\count2 by 1
+
+\divide\xepersian@dx by #3
+\divide\xepersian@dy by #2
+
+\setlength{\TPHorizModule}{\xepersian@dx}
+\setlength{\TPVertModule}{\xepersian@dy}
+
+\ifthenelse{\equal{#1}{show}}{
+\multido{\xepersian@nrow=0+1}{\count2}{
+\begin{textblock}{\xepersian@cx}(0,\xepersian@nrow)
+\rule[0pt]{\textwidth}{.1pt}
+\end{textblock}
+}
+
+\multido{\xepersian@ncol=0+1}{\count1}{
+\begin{textblock}{\xepersian@cy}(\xepersian@ncol,0)
+\rule[0pt]{.1pt}{\textheight}
+\end{textblock}
+}
+}{}
+}
+\newcommand{\xepersianInit}{
+\setlength{\headheight}{14pt}
+\renewcommand{\headrulewidth}{0.4pt}
+
+\pagestyle{fancy}
+
+\setlength{\columnseprule}{\columnlines}
+\setlength{\fboxrule}{0.1 pt}
+
+}
+
+\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
+
+\vspace*{-3pt}
+
+{\Large\bfseries \@customlogo}
+\hrulefill
+\hspace{10pt}\xepersian@headDateTime
+
+}
+\newcommand{\minilogo}[0]{
+{\large\bfseries \@customminilogo}
+
+\vspace*{5pt}
+}
+\newcommand{\mylogo}[1]{
+{\beginR#1\endR}
+
+\noindent
+\xepersian@editionLogo\hspace{5pt}
+\hrulefill
+\hspace{5pt}\xepersian@headDateTime
+}
+\newcommand{\edition}[1]{\renewcommand{\xepersian@edition}{#1}}
+\newenvironment{frontpage}[0]
+{
+\setboolean{xepersian@insidefrontpage}{true}
+\thispagestyle{empty}
+%\pdfbookmark[1]{صفحهٔ اول}{\thepage}
+\logo
+
+}%
+{
+\thispagestyle{empty}
+\clearpage
+\newpage
+\fancyhead{}
+ \fancyfoot{}
+\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}
+
+}
+\newcommand{\firstarticle}[3]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}{%
+\begin{textblock}{24}(22,5)
+}
+{
+\begin{textblock}{28}(22,5)
+}
+\vspace{-7pt}
+\xepersian@firstTitle{#1}
+\end{textblock}
+\begin{textblock}{29}(22,10)
+\vspace{5pt plus 2pt minus 2pt}
+
+\xepersian@firstText{\timestamp{#3}~#2}
+
+\end{textblock}
+
+\begin{textblock}{50}(0,15)
+\rule{50\TPHorizModule}{.3pt}
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\firstarticle\space in a wrong place.\MessageBreak
+\protect\firstarticle\space may only appear inside frontpage environment.
+}{%
+\protect\firstarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\secondarticle}[5]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{33}(2,16)
+\xepersian@pages{#4}
+\vspace{-5pt}
+\xepersian@secondTitle{#1}
+
+\vspace*{5pt}
+
+\xepersian@secondSubtitle{#2}
+
+\vspace*{-7pt}
+
+\xepersian@secondText{\timestamp{#5}~#3}
+
+\end{textblock}
+
+\begin{textblock}{33}(2,25)
+\vspace{5pt plus 2pt minus 2pt}
+
+\noindent\ignorespaces\rule{33\TPHorizModule}{.3pt}
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\secondarticle\space in a wrong place.\MessageBreak
+\protect\secondarticle\space may only appear inside frontpage environment.
+}{%
+\protect\secondarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\thirdarticle}[6]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{32}(2,26)
+\xepersian@pages{#5}
+\vspace{-5pt}
+\setlength{\fboxsep}{1pt}
+\xepersian@thirdTitle{#1}
+
+\vspace*{5pt}
+
+\xepersian@thirdSubtitle{#2}
+
+\vspace*{5pt}
+
+{\noindent\ignorespaces %
+\ifthenelse{\equal{#4}{}}{}
+
+\xepersian@thirdText{\timestamp{#6}~#3}
+
+}
+
+\vspace*{5pt}
+
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\thirdarticle\space in a wrong place.\MessageBreak
+\protect\thirdarticle\space may only appear inside frontpage environment.
+}{%
+\protect\thirdarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\firstimage}[2]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{18}(2,5)
+\setlength{\fboxsep}{1pt}
+\ifxetex % only in PDF
+\noindent\fbox{\includegraphics[width = 18\TPHorizModule ]{#1}}
+\fi
+
+\xepersian@pictureCaption{#2}
+\end{textblock}%
+}
+{\ClassError{xepersian-magazine}{%
+\protect\firstimage\space in a wrong place.\MessageBreak
+\protect\firstimage\space may only appear inside frontpage environment.
+}{%
+\protect\firstimage\space may only appear inside frontpage environment.
+}}
+}%
+\newcommand{\weatheritem}[5]{%
+\ifthenelse{\boolean{xepersian@insideweather}}{
+\begin{minipage}{45pt}
+\ifxetex
+\includegraphics[width=40pt]{#1}
+\fi
+\end{minipage}
+\begin{minipage}{50pt}
+\weatherTempFormat
+#2\\
+\beginL#3 $\|$ #4 \lr{\weatherUnits{}}\endL\\
+#5
+\end{minipage}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\weatheritem\space in a wrong place.\MessageBreak
+\protect\weatheritem\space may only appear inside weatherblock environment.
+}{%
+\protect\weatheritem\space may only appear inside weatherblock environment.\MessageBreak
+weatherblock environment may only appear inside frontpage environment.
+}%
+}
+}
+\newenvironment{weatherblock}[1]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\setboolean{xepersian@insideweather}{true}
+\begin{textblock}{32}(2,38)
+\vspace*{-15pt}
+
+\xepersian@weather{\beginR#1\endR}
+
+\vspace*{5pt}
+
+\noindent\begin{xepersian@fmpage}{32\TPHorizModule}
+\begin{minipage}{32\TPHorizModule}
+\hspace{5pt}
+
+}{%
+\ClassError{xepersian-magazine}{%
+weatherblock in a wrong place.\MessageBreak
+weatherblock may only appear inside frontpage environment.
+}{%
+weatherblock may only appear inside frontpage environment.
+}
+}
+}%
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+\setboolean{xepersian@insideweather}{false}
+}
+\newenvironment{authorblock}[0]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{15}(36,35)
+\setlength{\fboxsep}{5pt}
+\begin{xepersian@fmpage}{13\TPHorizModule}
+\begin{minipage}{13\TPHorizModule}
+\centering
+\minilogo
+
+}{%else
+\ClassError{xepersian-magazine}{%
+authorblock in a wrong place.\MessageBreak
+authorblock may only appear inside frontpage environment.
+}{%
+authorblock may only appear inside frontpage environment.
+}
+}
+}
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+}
+\newenvironment{indexblock}[1]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\setboolean{xepersian@insideindex}{true}%let's in
+\begin{textblock}{15}(36,16)
+\setlength{\xepersian@indexwidth}{13\TPHorizModule}
+\xepersian@indexFrameTitle{#1}
+
+\setlength{\fboxsep}{5pt} %espacio entre el frame y la imagen
+\begin{xepersian@fmpage}{\xepersian@indexwidth}
+\begin{minipage}{\xepersian@indexwidth}
+\vspace*{10pt}
+}{%else
+\ClassError{xepersian-magazine}{%
+indexblock in a wrong place.\MessageBreak
+indexblock may only appear inside frontpage environment.
+}{%
+indexblock may only appear inside frontpage environment.
+}
+}
+}%
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+\setboolean{xepersian@insideindex}{false}%let's out
+}
+\newcommand{\indexitem}[2]
+{
+\ifthenelse{\boolean{xepersian@insideindex}}{
+\xepersian@indexEntry{#1، \xepersian@indexEntryPage{\pageref{#2}}}
+
+\vspace{0.5cm}
+
+\noindent\ignorespaces\indexEntrySeparator{}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\indexitem\space in a wrong place.\MessageBreak
+\protect\indexitem\space may only appear inside indexblock environment.
+}{%
+\protect\indexitem\space may only appear inside indexblock environment.\MessageBreak
+indexblock environment may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\xepersian@inexpandedtitle}[1]{
+\begin{minipage}{.95\textwidth}
+\begin{center}
+\noindent\Large\textbf{\beginR#1\endR}
+\end{center}
+\end{minipage}
+}
+\newcommand{\expandedtitle}[2]{
+\end{multicols}
+
+\begin{center}
+\setlength{\fboxsep}{5pt}
+\setlength{\shadowsize}{2pt}
+\ifthenelse{\equal{#1}{shadowbox}}{%
+\shadowbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{doublebox}}{%
+\doublebox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{ovalbox}}{%
+\ovalbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{Ovalbox}}{%
+\Ovalbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{lines}}{
+\hrule
+\vspace*{8pt}
+\begin{center}
+\noindent\Large\textbf{#2}
+\end{center}
+\vspace*{8pt}
+\hrule
+}{}
+\end{center}
+
+\begin{multicols}{\xepersian@ncolumns{}}
+\ifnum \xepersian@ncolumns > \minraggedcols
+\raggedFormat
+\fi
+}
+\newcommand{\xepersian@incolumntitle}[2]{
+\begin{minipage}{#1}
+\begin{center}
+\noindent\normalsize\textbf{#2}
+\end{center}
+\end{minipage}
+}
+
+\newcommand{\columntitle}[2]{
+\vspace*{5pt}
+\begin{center}
+\setlength{\fboxsep}{5pt}
+\setlength{\shadowsize}{2pt}
+\addtolength{\xepersian@coltitsize}{\columnwidth}
+\addtolength{\xepersian@coltitsize}{-1\columnsep}
+\addtolength{\xepersian@coltitsize}{-5pt}
+\addtolength{\xepersian@coltitsize}{-1\shadowsize}
+\ifthenelse{\equal{#1}{shadowbox}}{%
+\shadowbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{doublebox}}{%
+\doublebox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{ovalbox}}{%
+\ovalbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{Ovalbox}}{%
+\Ovalbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{lines}}{
+\hrule
+\vspace*{5pt}
+\begin{center}
+\noindent\normalsize\textbf{#2}
+\end{center}
+\vspace*{5pt}
+\hrule
+}{}
+\end{center}
+}
+\renewcommand{\date}{%
+\longdate{\today}%
+}
+\newcommand{\authorandplace}[2]{%
+\rightline{%
+{\innerAuthorFormat #1},\space{}{\innerPlaceFormat #2}%
+}%
+\par %
+}
+\newcommand{\newsection}[1]{
+%\pdfbookmark[0]{#1}{\thepage} %bookmark para el pdf
+\renewcommand{\xepersian@section}{#1}
+}
+\newenvironment{article}[5]
+{
+\xepersian@say{Adding a new piece of article}
+\renewcommand{\xepersian@ncolumns}{#1}
+\begin{multicols}{#1}[
+\xepersian@pages{#4}
+\xepersian@innerTitle{#2}%
+\xepersian@innerSubtitle{#3}%
+][4cm]%
+\label{#5}
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{~\innerTextFinalMark{}
+\end{multicols}
+}
+\newcommand{\articlesep}{%
+\setlength{\xepersian@pageneed}{16000pt}
+\setlength\xepersian@pageleft{\pagegoal}
+\addtolength\xepersian@pageleft{-\pagetotal}
+
+\xepersian@say{How much left \the\xepersian@pageleft}
+
+\ifdim \xepersian@pageneed < \xepersian@pageleft
+\xepersian@say{Not enough space}
+\else
+\xepersian@say{Adding sep line between articles}
+\vspace*{10pt plus 10pt minus 5pt}
+\hrule
+\vspace*{10pt plus 5pt minus 5pt}
+\fi
+
+}
+\newcommand{\xepersian@editorialTit}[2]{
+\setlength{\arrayrulewidth}{.1pt}
+\begin{center}
+\begin{tabular}{c}
+\noindent
+\xepersian@editorialTitle{#1}
+\vspace{2pt plus 1pt minus 1pt}
+\\
+\hline
+\vspace{2pt plus 1pt minus 1pt}
+\\
+\editorialAuthorFormat{#2}
+\end{tabular}
+\end{center}
+}
+\newenvironment{editorial}[4]
+{
+\xepersian@say{Adding a new editorial}
+\begin{multicols}{#1}[%
+\xepersian@editorialTit{#2}{#3}%
+][4cm]
+\label{#4}
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{
+\end{multicols}
+}
+\newcommand{\xepersian@shortarticleTit}[2]{
+\begin{center}
+\vbox{%
+\noindent
+\xepersian@shortarticleTitle{#1}
+\vspace{4pt plus 2pt minus 2pt}
+\hrule
+\vspace{4pt plus 2pt minus 2pt}
+\xepersian@shortarticleSubtitle{#2}
+}
+\end{center}
+}
+\newenvironment{shortarticle}[4]
+{
+\xepersian@say{Adding a short article block}
+\begin{multicols}{#1}[\xepersian@shortarticleTit{#2}{#3}][4cm] %
+ \label{#4}
+\par %
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{
+\end{multicols}
+}
+\newcommand{\shortarticleitem}[2]{
+\goodbreak
+\vspace{5pt plus 3pt minus 3pt}
+{\vbox{\noindent\xepersian@shortarticleItemTitle{#1}}}
+\vspace{5pt plus 3pt minus 3pt}
+{\noindent #2}\\
+}
+% \end{macrocode}
+% \iffalse
+%</xepersian-magazine.cls>
+%<*xepersian-mathsdigitspec.sty>
+% \fi
+% \part{xepersian-mathsdigitspec.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-mathsdigitspec}
+ [2009/04/22 v1.0.1 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)]
+\@zf@mathfalse
+\def\@preamblecmds{}
+\newcommand\not@onlypreamble[1]{{%
+ \def\do##1{\ifx#1##1\else\noexpand\do\noexpand##1\fi}%
+ \xdef\@preamblecmds{\@preamblecmds}}}
+\def\gm@notprerr{ can be used only in preamble (\on@line)}
+\AtBeginDocument{%
+ \def\do#1{\noexpand\do\noexpand#1}%
+ \edef\@preamblecmds{%
+ \def\noexpand\do##1{%
+ \def##1{\noexpand\PackageError{gmutils/LaTeX}%
+ {\noexpand\string##1 \noexpand\gm@notprerr}\noexpand\@eha}}%
+ \@preamblecmds}}
+\def\nocite#1{%
+ \@bsphack{\setbox0=\hbox{\cite{#1}}}\@esphack}
+\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}}
+\newcommand\SetMathCode[4]{%
+ \XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\newcommand\SetMathCharDef[4]{%
+ \XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\newcommand\setdigitfont[2][]{%
+ \let\glb@currsize\relax
+ \setkeys*[xepersian-mathsdigitspec]{options}{#1}%
+ \edef\@tempa{\noexpand\zf@fontspec{%
+ \XKV@rm}{#2}}\@tempa
+ \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
+ \DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n}
+ \SetSymbolFont{OPERATORS}{bold}{EU1}{\zf@family} {bx}{n}
+ \DeclareMathAlphabet {\mathit}{EU1}{\zf@family}{m}{it}
+ \DeclareSymbolFontAlphabet{\mathrm} {OPERATORS}
+ \DeclareMathAlphabet {\mathbf}{EU1}{\zf@family}{bx}{n}
+ \SetMathCode{`0}{\mathalpha}{OPERATORS}{"06F0}
+ \SetMathCode{`1}{\mathalpha}{OPERATORS}{"06F1}
+ \SetMathCode{`2}{\mathalpha}{OPERATORS}{"06F2}
+ \SetMathCode{`3}{\mathalpha}{OPERATORS}{"06F3}
+ \SetMathCode{`4}{\mathalpha}{OPERATORS}{"06F4}
+ \SetMathCode{`5}{\mathalpha}{OPERATORS}{"06F5}
+ \SetMathCode{`6}{\mathalpha}{OPERATORS}{"06F6}
+ \SetMathCode{`7}{\mathalpha}{OPERATORS}{"06F7}
+ \SetMathCode{`8}{\mathalpha}{OPERATORS}{"06F8}
+ \SetMathCode{`9}{\mathalpha}{OPERATORS}{"06F9}
+ \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}
+}
+\ifx\newcommand\undefined\else
+ \newcommand{\ZifferAn}{}
+\fi
+\mathchardef\ziffer@DotOri="013A
+{\ZifferAn
+ \catcode`\.=\active\gdef.{\begingroup\obeyspaces\futurelet\n\ziffer@dcheck}}
+\def\ziffer@dcheck{\ziffer@check\ZifferLeer\ziffer@DotOri}
+\def\ziffer@check#1#2{%
+ \ifx\n1\endgroup#1\else
+ \ifx\n2\endgroup#1\else
+ \ifx\n3\endgroup#1\else
+ \ifx\n4\endgroup#1\else
+ \ifx\n5\endgroup#1\else
+ \ifx\n6\endgroup#1\else
+ \ifx\n7\endgroup#1\else
+ \ifx\n8\endgroup#1\else
+ \ifx\n9\endgroup#1\else
+ \ifx\n0\endgroup#1\else
+ \endgroup#2%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+\mathcode`.="8000\relax
+\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi}
+% \end{macrocode}
+% \iffalse
+%</xepersian-mathsdigitspec.sty>
+%<*xepersian-multiplechoice.sty>
+% \fi
+% \part{xepersian-multiplechoice.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-multiplechoice}[2009/03/21 v0.1
+ Multiple Choice Questionnaire class for Persian in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{pifont}
+\RequirePackage{fullpage}
+\RequirePackage{ifthen}
+\RequirePackage{calc}
+\RequirePackage{verbatim}
+\RequirePackage{fmultico}
+\def\@headerfont{\bfseries}
+\newcommand\headerfont[1]{\gdef\@headerfont{#1}}
+\def\@X{X}
+\newcommand\X[1]{\gdef\@X{#1}}
+\def\pbs#1{\let\tmp=\\#1\let\\=\tmp}
+\newcommand\makeform@nocorrection{%
+ \addtocontents{frm}{\protect\end{tabular}}
+ \@starttoc{frm}}
+\newcommand\makeform@correction{%
+ \addtocontents{frm}{\protect\end{tabular}}}
+\newcommand\makemask@nocorrection{%
+ \addtocontents{msk}{\protect\end{tabular}}
+ \@starttoc{msk}}
+\newcommand\makemask@correction{%
+ \addtocontents{msk}{\protect\end{tabular}}}
+\newlength\questionspace
+\setlength\questionspace{0pt}
+\newcommand\answerstitle[1]{\gdef\@answerstitle{#1}}
+\def\@answerstitlefont{\bfseries}
+\newcommand\answerstitlefont[1]{\gdef\@answerstitlefont{#1}}
+\def\@answernumberfont{\bfseries}
+\newcommand\answernumberfont[1]{\gdef\@answernumberfont{#1}}
+\newcounter{question}\stepcounter{question}
+\newcounter{@choice}
+\def\@initorcheck{%
+ \xdef\@choices{\the@choice}%
+ \setcounter{@choice}{1}%
+ \gdef\@arraydesc{|l||}%
+ \gdef\@headerline{}%
+ \whiledo{\not{\value{@choice}>\@choices}}{
+ \xdef\@arraydesc{\@arraydesc c|}
+ \def\@appendheader{\g@addto@macro\@headerline}
+ \@appendheader{&\protect\@headerfont}
+ \edef\@the@choice{{\alph{@choice}}}
+ \expandafter\@appendheader\@the@choice
+ \stepcounter{@choice}}%
+ \addtocontents{frm}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \addtocontents{msk}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \gdef\@initorcheck{%
+ \ifthenelse{\value{@choice} = \@choices}{}{%
+ \ClassError{xepersian-multiplechoice}{Question \thequestion: wrong number of choices
+ (\the@choice\space instead of \@choices)}{%
+ Questions must all have the same number of proposed answers.%
+ \MessageBreak
+ Type X <return> to quit, fix your MCQ (multiple choice question) and rerun XeLaTeX.}}}}
+\newenvironment{question}[1]{%
+ %% \begin{question}
+ \begin{minipage}{\textwidth}
+ \xdef\@formanswerline{\@questionheader}%
+ \xdef\@maskanswerline{\@questionheader}%
+ \fbox{\parbox[c]{\linewidth}{#1}}
+ \vspace\questionspace\par
+ {\@answerstitlefont\@answerstitle}
+\begin{multicols}{4}
+ \begin{list}{\@answernumberfont\alph{@choice})~}{\usecounter{@choice}}}{%
+ %% \end{question}
+ \end{list}
+\end{multicols}
+ \@initorcheck%
+ \addtocontents{frm}{\@formanswerline\protect\\\protect\hline}%
+ \addtocontents{msk}{\@maskanswerline\protect\\\protect\hline}%
+ \end{minipage}
+ \stepcounter{question}}
+\def\@truesymbol{\ding{52}~}
+\def\@falsesymbol{\ding{56}~}
+\newcommand\truesymbol[1]{\gdef\@truesymbol{#1}}
+\newcommand\falsesymbol[1]{\gdef\@falsesymbol{#1}}
+\def\@true@nocorrection{\item}
+\def\@false@nocorrection{\item}
+\def\@true@correction{\item[\@truesymbol\refstepcounter{@choice}]}
+\def\@false@correction{\item[\@falsesymbol\refstepcounter{@choice}]}
+\newcommand\true{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&\@X}%
+ \@true}%
+\newcommand\false{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&}%
+ \@false}%
+\def\@correctionstyle{\itshape}
+\newcommand\correctionstyle[1]{\gdef\@correctionstyle{#1}}
+\newenvironment{@correction}{\@correctionstyle}{}
+ \def\@questionheader{سؤال \thequestion}
+ \answerstitle{جوابهای ممکن:}
+\DeclareOption{nocorrection}{%
+ \let\@true\@true@nocorrection
+ \let\@false\@false@nocorrection
+ \let\correction\comment
+ \let\endcorrection\endcomment
+ \def\makeform{\makeform@nocorrection}
+ \def\makemask{\makemask@nocorrection}}
+\DeclareOption{correction}{%
+ \let\@true\@true@correction
+ \let\@false\@false@correction
+ \let\correction\@correction
+ \let\endcorrection\end@correction
+ \def\makeform{\makeform@correction}
+ \def\makemask{\makemask@correction}}
+\ExecuteOptions{nocorrection}
+\newcommand\questiontitle[1]{\gdef\@questiontitle{#1}}
+\def\@questiontitlefont{\bfseries}
+\newcommand\questiontitlefont[1]{\gdef\@questiontitlefont{#1}}
+\newlength\questiontitlespace
+\setlength\questiontitlespace{5pt}
+\newlength\questionsepspace
+\setlength\questionsepspace{20pt}
+\gdef\@questionsepspace{0pt}
+\let\old@question\question
+\let\old@endquestion\endquestion
+\renewenvironment{question}[1]{%
+ %% \begin{question}
+ \vspace\@questionsepspace
+ \fbox{\parbox[c]{0.25\linewidth}{\@questiontitlefont\@questiontitle}}
+ \nopagebreak\vspace\questiontitlespace\par
+ \old@question{#1}}{%
+ %% \end{question}
+ \old@endquestion
+ \gdef\@questionsepspace{\questionsepspace}}
+ \questiontitle{سؤال \thequestion:}
+\ProcessOptions
+% \end{macrocode}
+% \iffalse
+%</xepersian-multiplechoice.sty>
+%<*xepersian-persiancal.sty>
+% \fi
+% \part{xepersian-persiancal.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-persiancal}
+
+\newif\ifXePersian@leap \newif\ifXePersian@kabiseh
+\newcount\XePersian@i \newcount\XePersian@y \newcount\XePersian@m \newcount\XePersian@d
+\newcount\XePersian@latini \newcount\XePersian@persiani
+\newcount\XePersian@latinii \newcount\XePersian@persianii
+\newcount\XePersian@latiniii \newcount\XePersian@persianiii
+\newcount\XePersian@latiniv \newcount\XePersian@persianiv
+\newcount\XePersian@latinv \newcount\XePersian@persianv
+\newcount\XePersian@latinvi \newcount\XePersian@persianvi
+\newcount\XePersian@latinvii \newcount\XePersian@persianvii
+\newcount\XePersian@latinviii \newcount\XePersian@persianviii
+\newcount\XePersian@latinix \newcount\XePersian@persianix
+\newcount\XePersian@latinx \newcount\XePersian@persianx
+\newcount\XePersian@latinxi \newcount\XePersian@persianxi
+\newcount\XePersian@latinxii \newcount\XePersian@persianxii
+ \newcount\XePersian@persianxiii
+
+\newcount\XePersian@temp
+\newcount\XePersian@temptwo
+\newcount\XePersian@tempthree
+\newcount\XePersian@yModHundred
+\newcount\XePersian@thirtytwo
+\newcount\XePersian@dn
+\newcount\XePersian@sn
+\newcount\XePersian@mminusone
+
+\def\persiantoday{%
+\XePersian@y=\year \XePersian@m=\month \XePersian@d=\day
+%
+\XePersian@temp=\XePersian@y
+\divide\XePersian@temp by 100\relax
+\multiply\XePersian@temp by 100\relax
+\XePersian@yModHundred=\XePersian@y
+\advance\XePersian@yModHundred by -\XePersian@temp\relax
+%
+\ifodd\XePersian@yModHundred
+ \XePersian@leapfalse
+\else
+ \XePersian@temp=\XePersian@yModHundred
+ \divide\XePersian@temp by 2\relax
+ \ifodd\XePersian@temp\XePersian@leapfalse
+ \else
+ \ifnum\XePersian@yModHundred=0%
+ \XePersian@temp=\XePersian@y
+ \divide\XePersian@temp by 400\relax
+ \multiply\XePersian@temp by 400\relax
+ \ifnum\XePersian@y=\XePersian@temp\XePersian@leaptrue\else\XePersian@leapfalse\fi
+ \else\XePersian@leaptrue
+ \fi
+ \fi
+\fi
+%
+\XePersian@latini=31\relax
+\ifXePersian@leap
+ \XePersian@latinii = 29\relax
+\else
+ \XePersian@latinii = 28\relax
+\fi
+\XePersian@latiniii = 31\relax
+\XePersian@latiniv = 30\relax
+\XePersian@latinv = 31\relax
+\XePersian@latinvi = 30\relax
+\XePersian@latinvii = 31\relax
+\XePersian@latinviii = 31\relax
+\XePersian@latinix = 30\relax
+\XePersian@latinx = 31\relax
+\XePersian@latinxi = 30\relax
+\XePersian@latinxii = 31\relax
+%
+\XePersian@thirtytwo=32\relax
+%
+\XePersian@temp=\XePersian@y
+\advance\XePersian@temp by -17\relax
+\XePersian@temptwo=\XePersian@temp
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\ifnum\XePersian@temp=\XePersian@thirtytwo\XePersian@kabisehfalse
+\else
+ \XePersian@temptwo=\XePersian@temp
+ \divide\XePersian@temptwo by 4\relax
+ \multiply\XePersian@temptwo by 4\relax
+ \advance\XePersian@temp by -\XePersian@temptwo
+ \ifnum\XePersian@temp=\z@\XePersian@kabisehtrue\else\XePersian@kabisehfalse\fi
+\fi
+%
+% In fact persiani is equal to the Leap years from a fixed year to the last
+% year minus the Kabise years from a fixed year to the last year plus a const.
+%
+\XePersian@tempthree=\XePersian@y % Number of Leap years
+\advance\XePersian@tempthree by -1
+\XePersian@temp=\XePersian@tempthree % T := (MY-1) div 4
+\divide\XePersian@temp by 4\relax
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((MY-1) div 100)
+\divide\XePersian@temptwo by 100\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree % T := T + ((MY-1) div 400)
+\divide\XePersian@temptwo by 400\relax
+\advance\XePersian@temp by \XePersian@temptwo
+\advance\XePersian@tempthree by -611 % Number of Kabise years
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 8\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree %
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@tempthree by -\XePersian@temptwo
+\ifnum\XePersian@tempthree=32\advance\XePersian@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\XePersian@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\XePersian@temp by -\XePersian@tempthree
+\advance\XePersian@temp by -137 % T := T - 137 Adjust the value
+\XePersian@persiani=31
+\advance\XePersian@persiani by -\XePersian@temp % now 31 - T is the persiani
+%
+\XePersian@persianii = 30\relax
+\ifXePersian@kabiseh
+ \XePersian@persianiii = 30\relax
+\else
+ \XePersian@persianiii = 29\relax
+\fi
+\XePersian@persianiv = 31\relax
+\XePersian@persianv = 31\relax
+\XePersian@persianvi = 31\relax
+\XePersian@persianvii = 31\relax
+\XePersian@persianviii= 31\relax
+\XePersian@persianix = 31\relax
+\XePersian@persianx = 30\relax
+\XePersian@persianxi = 30\relax
+\XePersian@persianxii = 30\relax
+\XePersian@persianxiii= 30\relax
+%
+\XePersian@dn= 0\relax
+\XePersian@sn= 0\relax
+\XePersian@mminusone=\XePersian@m
+\advance\XePersian@mminusone by -1\relax
+%
+\XePersian@i=0\relax
+\ifnum\XePersian@i < \XePersian@mminusone
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@dn by \csname XePersian@latin\romannumeral\the\XePersian@i\endcsname
+\ifnum\XePersian@i<\XePersian@mminusone \repeat
+\fi
+\advance \XePersian@dn by \XePersian@d
+%
+\XePersian@i=1\relax
+\XePersian@sn = \XePersian@persiani
+\ifnum \XePersian@sn<\XePersian@dn
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@sn by \csname XePersian@persian\romannumeral\the\XePersian@i\endcsname
+\ifnum \XePersian@sn<\XePersian@dn \repeat
+\fi
+\ifnum \XePersian@i < 4
+ \XePersian@m = 9 \advance\XePersian@m by \XePersian@i
+ \advance \XePersian@y by -622\relax
+\else
+ \XePersian@m = \XePersian@i \advance \XePersian@m by -3\relax
+ \advance \XePersian@y by -621\relax
+\fi
+\advance\XePersian@sn by -\csname XePersian@persian\romannumeral\the\XePersian@i%
+\endcsname
+\ifnum\XePersian@i = 1
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by 30 \advance\XePersian@d by -\XePersian@persiani
+\else
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by -\XePersian@sn
+\fi
+\beginL\number\XePersian@d\endL\space%
+\persianmonth{\XePersian@m}\space\beginL\number\XePersian@y\endL%
+}
+\def\persianmonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or
+خرداد\or تیر\or
+مرداد\or
+شهریور\or مهر\or
+آبان\or آذر\or
+دی\or بهمن\or
+اسفند\fi}
+% \end{macrocode}
+% \iffalse
+%</xepersian-persiancal.sty>
+%<*xepersian-thesis.cls>
+% \fi
+% \part{xepersian-thesis.cls}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{xepersian-thesis}
+ [2009/01/05 v0.1
+ Persian thesis document class in XeLaTeX]
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
+\ProcessOptions
+\LoadClass{report}
+\def\university#1{\gdef\@university{#1}}
+\def\department#1{\gdef\@department{#1}}
+\def\degree#1{\gdef\@degree{#1}}
+\def\thesisdate#1{\gdef\@thesisdate{#1}}
+\def\supervisor#1{\gdef\@supervisor{#1}}
+\def\city#1{\gdef\@city{#1}}
+
+\def\latintitle#1{\gdef\@latintitle{#1}}
+\def\latinauthor#1{\gdef\@latinauthor{#1}}
+\def\latindegree#1{\gdef\@latindegree{#1}}
+\def\latindepartment#1{\gdef\@latindepartment{#1}}
+\def\latinthesisdate#1{\gdef\@latinthesisdate{#1}}
+\def\latinsupervisor#1{\gdef\@latinsupervisor{#1}}
+\def\latincity#1{\gdef\@latincity{#1}}
+\def\latinuniversity#1{\gdef\@latinuniversity{#1}}
+
+\def\maketitle{\begin{titlepage}
+{\includegraphics{logo}}
+\vskip 1.5cm
+{\Huge\bfseries \@title}\par
+\vskip 1cm
+{\large%
+ \by}\par
+{\Large\bfseries \@author}\par
+\vskip 5mm
+{\large\bfseries\writtenfor
+\par
+\@degree}
+\par
+\vskip 1cm
+{\large
+ \undersupervision\par
+\Large\bfseries \@supervisor}
+\par
+\vskip 1cm
+{\large \@thesisdate}
+\par
+\vskip 1cm
+{\large\bfseries\departmentof\space\@department}
+\par
+{\large\bfseries\universityof\space\@university \par\@city}
+\vfill
+\end{titlepage}%
+}
+
+\def\abstractpage{\newpage
+\thispagestyle{empty}
+\vskip 15mm
+\begin{center}{\large{\bfseries \@title} \\}
+\end{center}
+\par
+\begin{abstract}}
+\def\endabstractpage{\end{abstract}
+\newpage
+}
+
+\def\latinabstract{\newpage
+\thispagestyle{empty}
+\vskip 15mm
+\begin{center}{\Large\bfseries \@latintitle \\[5mm]}
+{\bfseries Abstract}
+\end{center}
+\vspace{5mm}}
+
+\def\endlatinabstract{\newpage}
+
+\def\acknowledgementpage{\newpage
+\thispagestyle{empty}
+\centerline{\Large \bfseries\acknowledgementname}
+\vspace{1cm}
+\par\noindent}
+\def\endacknowledgementpage{\newpage}
+
+\def\titlepage{\newpage\centering
+ \thispagestyle{empty}
+ \parindent 0pt \parskip 10pt plus 1fil minus 1fil
+ \def\baselinestretch{1}\@normalsize\vbox to \vsize\bgroup\vbox to 9in\bgroup}
+\def\endtitlepage{\par\kern 0pt\egroup\vss\egroup\newpage}
+
+\def\signature#1#2{\par\noindent#1\dotfill\null\\*
+ {\raggedright #2\par}}
+
+\def\abstract{\subsection*{\abstractname}\small
+\@normalsize}
+\def\endabstract{\par}
+
+\pagenumbering{harfi}
+\let\ol@chapter\@chapter
+\def\@chapter{%
+ \ifnum\c@chapter=0 \pagenumbering{arabic}\setcounter{page}{1}\fi
+ \ol@chapter}
+
+
+
+\def\keywords#1{\par \vspace{5mm}
+{\textbf{واژه‌های کلیدی:}} {\textit{ #1}}}
+
+\def\latinkeywords#1{\par \vspace{5mm}
+\noindent {\textbf{Keywords:}} {\textit{ #1}}}
+
+\font\titlefont=cmssbx10 scaled 2074
+\font\supervisorfont=cmbxti10
+\def\makelatintitle{\begin{titlepage}
+{\includegraphics{logo}}
+\vskip 1.5cm
+\addtolength{\baselineskip}{5mm}
+{\titlefont \@latintitle} \par
+\addtolength{\baselineskip}{-5mm}
+\vskip 1cm
+{\bfseries\latinby}\par
+{\Large\bfseries \@latinauthor}\par
+\vskip 5mm
+{\latinwrittenfor\par
+\large\@latindegree}
+\par
+\vskip 1cm
+Under supervision of \\
+{\supervisorfont\@latinsupervisor}
+\par
+\vskip 1cm
+{\@latinthesisdate}
+\par
+\vskip 1cm
+\large\bfseries
+\@latindepartment\space Department
+\par
+\@latinuniversity \par\@latincity
+\vfill
+\end{titlepage}%
+}
+
+
+\def\acknowledgementname{قدردانی}
+\def\by{توسط}
+\def\writtenfor{ رسالهٔ ارائه شده به عنوان بخشی از ملزومات برای دریافت درجهٔ}
+\def\undersupervision{زیر نظر}
+\def\departmentof{دانشکدهٔ}
+\def\universityof{دانشگاه}
+\def\latinby{by}
+\def\latinwrittenfor{Submitted in Partial Fulfillment\\ of the Requirements\\ for the Degree of}
+\def\latinundersupervision{Under supervision of}
+% \end{macrocode}
+% \iffalse
+%</xepersian-thesis.cls>
+%<*xepersian-thesis-xepersian.def>
+% \fi
+% \part{xepersian-thesis-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</xepersian-thesis-xepersian.def>
+%<*acm-fa.bst>
+% \fi
+% \part{acm-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "acm-fa", Persian (farsi) version of acm.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%% NOTE: Its output for English references may has a bit difference with acm.bst, for pure English texts please use acm.bst
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright of acm.bst
+% ACM Transactions bibliography style (24-Jan-88 version)
+% A lot like abbrv.bst, but names come out "Last, initials", and in \sc.
+% Some dates are parenthesized.
+
+% History of acm-fa.bst
+% 2009/02/12, The initial release was a combination of acm.bst and plain-fa.bst
+% \textsc is used here instead of \sc.
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- acm-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. thesis" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasizeic}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{ " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { "," bbl.etal * * }
+ { "," bbl.and * * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% For names inside entries (e.g., editors of an "In ...");
+% this is exactly ABBRV.BST's `format.names' function.
+FUNCTION {format.innames}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ {s nameptr "{ff}{vv~}{ll}{, jj}" format.name$ 't :=}
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names scapify}
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names scapify
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.innames
+ editor num.names$ #1 >
+ { ", " * bbl.editors *}
+ { ", " * bbl.editor *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages n.dashify }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pp.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.vol.num.date}
+{ journal empty$
+ { "empty journal in " cite$ * warning$
+ ""
+ }
+ { journal
+ volume empty$
+ 'skip$
+ { " " * volume * }
+ if$
+ number empty$
+ 'emphasizeic
+ { emphasize ", " * number * }
+ if$
+ year empty$
+ { "empty year in " cite$ * warning$ }
+ { " (" * format.date * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pp.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pp.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ {bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+% The proceedings title (it's on the stack) gets an (address, date) appended
+FUNCTION {format.proc.date}
+{ duplicate$ empty$
+ { pop$ "" }
+ { year empty$
+ { "empty year in " cite$ * warning$
+ address empty$
+ 'emphasize
+ { emphasizeic
+ " (" * address * ")" *
+ }
+ if$
+ }
+ { emphasizeic
+ " (" *
+ address empty$
+ 'skip$
+ { address * ", " * }
+ if$
+ format.date *
+ ")" *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.proc.date}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle format.proc.date * }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.journal.vol.num.date output
+ format.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pp.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.proc.date "booktitle" output.check
+ format.ineditors output
+ format.bvolume output
+ format.number.series output
+ organization output
+ publisher output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pp.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization scapify output }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ author empty$
+ { address new.block.checka }
+ { organization address new.block.checkb
+ organization output
+ }
+ if$
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization scapify output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title format.proc.date "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+
+MACRO {toplas} {"ACM Trans. Program. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</acm-fa.bst>
+%<*ieeetr-fa.bst>
+% \fi
+% \part{ieeetr-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "ieeetr-fa", Persian (farsi) version of ieeetr.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+% IEEE Transactions bibliography style (29-Jan-88 version)
+% numeric labels, order-of-reference, IEEE abbreviations,
+% quotes around article titles, commas separate all fields
+% except after book titles and before "notes". Otherwise,
+% much like the "plain" family, from which this is adapted.
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+ after.quoted.block after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- ieeetr-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.quote =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+ { after.quoted.block 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { %s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " {\em" * bbl.etal * "}" * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+ { fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume *
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify * }
+ { bbl.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume * }%M.Amintoosi "vol.~"
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.number number * }%M.Amintoosi "no.~"
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+ { type "t" change.case$ }
+ { type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " {\em" * bbl.etal * "}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em" bbl.etal * "}" * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.volume output
+ month empty$
+ { format.number output }
+ 'skip$
+ if$
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications ACM"}
+
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM J. Computing"}
+
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+
+MACRO {tods} {"ACM Trans. Database Systems"}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</ieeetr-fa.bst>
+%<*plain-fa.bst>
+% \fi
+% \part{plain-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+%History
+% 2009/02/11, Copy and made the necessary changes from unsrt-fa.bst
+% Changing the sortify function so that it does nothing for persian entries
+% 2009/02/12, Chaniging format.names so that prints last name and then first names,
+% also it uses only one character of latin first names and whole persian first names
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.2" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %t "t" change.case$ 't := %I wrote it to lower the letters of latin last names, but it also affected the first name
+ %}
+ %if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</plain-fa.bst>
+%<*unsrt-fa.bst>
+% \fi
+% \part{unsrt-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "usrt-fa", Persian (farsi) version of unsrt.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+%%%%%%%%%%% History:
+% 2009/02/07: v.1, First Release
+% 2009/02/08: v.2, Some bugs fixed
+% 2009/02/09: v.21, I have to check the persian language in format.edition, because in Persian, "edition" lies before the edition number.
+% 2009/02/09: v.22, I added a field Translator for translated books
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.22" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- unsrt-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " eds." 'bbl.editors :=
+ " ed." 'bbl.editor :=
+ " ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff}{vv~}{ll}{, jj}
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by unsrt-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</unsrt-fa.bst>
+% \fi
+% \clearpage
+% \PrintChanges
+% \Finale
+%
+% \iffalse
+%<*parsidigits.map>
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "ParsiDigits"
+
+pass(Unicode)
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
+%</parsidigits.map>
+%<*txt2maths.map>
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "txt2maths"
+
+Pass(Unicode)
+U+002E <> U+066B ; convert dot to Persian decimal separator
+U+002D <> U+2212 ; convert hyphen to minus sign
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
+%</txt2maths.map>
+%<*thesis-sample.tex>
+\documentclass[a4paper,11pt]{xepersian-thesis}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{XB Zar}
+
+
+
+
+\begin{document}
+\title{اعداد مرکب}
+\author{وفا خلیقی}
+\degree{کارشناسی ریاضیات محض}
+\supervisor{محمد قدسی}
+\department{ریاضی}
+\university{تهران}
+\city{تهران}
+\thesisdate{\today}
+\maketitle
+\begin{acknowledgementpage}
+در اینجا دوست دارم از همه تشکر کنم
+\end{acknowledgementpage}
+\begin{abstractpage}
+اینجا هم باید مطلبی نوشت...
+\keywords{ریاضی محض، هندسه و توپولوژی}
+\end{abstractpage}
+\tableofcontents
+\listoftables
+\chapter{مجموعه اعداد}
+در اینجا لازم می‌دانم تا نگاهی روی مجموعهٔ اعداد اندازیم تا متوجه خصلت‌های آن شویم
+\begin{equation}
+(a+b)^2=a^2+2ab+b^3
+\end{equation}
+\newpage
+این صفحهٔ جدید است که ما در این صفحه به نوشتن مقالات دیگری مشغول هستیم.
+\section{مقدمه}
+
+\newpage
+این هم یک صفحهٔ جدید دیگر
+\chapter{دوم}
+\chapter{سوم}
+\appendix
+\chapter{اول}
+\chapter{دوم}
+\chapter{سوم}
+\bibliographystyle{unsrt}
+\begin{thebibliography}{99}
+\end{thebibliography}
+%\printindex
+\begin{latin}
+\latintitle{Pure Mathematics}
+\latinauthor{Vafa Khalighi}
+\latindegree{Bachelor of Pure Mathematics}
+\latinthesisdate{\latintoday}
+\latinsupervisor{Mohammad Ghodsi}
+\latindepartment{Computer Science}
+\latinuniversity{Iran University of Science \& Technology}
+\latincity{Tehran}
+\begin{latinabstract}
+\noindent This is our abstract written in English and This thesis is written very very very carefully so that we can keep an eye on the beauty of typesetting.
+\latinkeywords{Mathematics, topology, geometry and category theory.}
+\end{latinabstract}
+\makelatintitle
+\end{latin}
+\end{document}
+%</thesis-sample.tex>
+%<*magazine-sample.tex>
+\documentclass[12pt,twoside]{xepersian-magazine}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\usepackage{xunicode}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Junicode}
+\setdigitfont{XB Zar}
+\pagestyle{fancy}
+\title{مجلهٔ زی‌پرشین}
+\author{وفا خلیقی}
+\edition{جلد اول}
+\customlogo{مجلهٔ زی‌پرشین}
+\customminilogo{مجلهٔ زی‌پرشین}
+\custommagazinename{مجلهٔ زی‌پرشین}
+\customwwwTxt{http://developer.berlios.de/projects/xepersian}
+\begin{document}
+\begin{frontpage}
+\firstimage{img/ireland.jpg}{این زیرنویس تصویر اصلی در صفحهٔ اول است.}
+\firstarticle{این تیتر مقالهٔ اول است.}
+ {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+ {۱۲:۳۴}
+\secondarticle{این هم سر تیتر مقالهٔ دوم است.}%
+ {این هم زیر تیتر مقالهٔ دوم است که آن را در اینجا می‌نویسیم.}%
+ {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+ {قسمت الف}%
+ {۱۰:۲۳}
+
+\thirdarticle{این سرتیتر مقالهٔ سوم است.}%
+ {این هم زیرتیتر مقالهٔ سوم است که ما آن را در اینجا قرار می‌دهیم.}%
+ {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد. و همانطور که می‌بینید من مطلبی برای گفتن ندارم فقط متن علکی می‌نویسم تا کمی صفحه را پر کرده باشم. اما در قسمتهای بعدی مقداری از سهراب سپهری خواهم نوشت.}%
+
+ {قسمت ب}%
+ {۱۰:۰۲}
+
+\begin{indexblock}{نمایه (فهرست مطالب) اصلی}
+\indexitem{۱- مقاله اول}{1}
+
+\indexitem{۲- مقاله دوم}{3}
+
+\indexitem{۳- مقاله سوم}{3}
+
+\indexitem{۴- مقاله چهارم}{5}
+\end{indexblock}
+
+\begin{weatherblock}{وضع آب و هوا}
+\weatheritem{img/weather/rain.jpg}{امروز}{13}{9}{}
+\weatheritem{img/weather/sun.jpg}{فردا}{15}{1}{}
+\weatheritem{img/weather/clouds.jpg}{جمعه}{12}{6}{}
+\end{weatherblock}
+
+
+\begin{authorblock}
+\textbf{ویرایشگران}
+
+وفا خلیقی، مهدی امیدعلی و مصطفی واحدی
+
+\texttt{vafa@users.berlios.de\\[5pt]
+http://developer.berlios.de/projects/xepersian}\\
+\end{authorblock}
+\end{frontpage}
+\newsection{قسمت الف}
+\begin{article}{2}
+ {این تیتر این مقاله است.}
+ {این هم زیرتیتر این مقاله هست.}
+ {قسمت الف}
+ {1}
+\authorandplace{نام نویسنده}{مکان}
+
+
+
+
+\noindent\timestamp{۸:۲۵}
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+\footnote{این یک زیرنویس فارسی است.}\LTRfootnote{This is an English footnote.}
+\begin{equation}
+(a+b)^3=a^3+3a^2b+3ab^2+b^3\label{eq-1}
+\end{equation}
+این معادلهٔ \eqref{eq-1} است.
+\columntitle{lines}{این را برای مهم یا نشان دادن حرفی مهم در این مجله انجام می‌دهیم.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\begin{article}{2}
+ {این تیتر این مقاله است.}
+ {این هم زیرتیتر این مقاله هست.}
+ {قسمت الف}
+ {1}
+\authorandplace{نام نویسنده}{مکان}
+
+\noindent\timestamp{08:25}
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+\LTRfootnote{This is an English footnote.}\footnote{این یک زیرنویس فارسی است.}
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+\expandedtitle{doublebox}{این هم مطلی است مهم یا چیزی که از خلاصهٔ این مقاله ما متوجه شده‌ایم و این برای ما و خوانندگان خیلی مهم است.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\newsection{قسمت ب}
+
+
+\begin{article}{2}
+ {این یک تیتر کوتاه است.وفا خلیقی}
+ {این هم مثل همیشه زیرتیتر است که ما آن را در اینجا قرار می‌دهیم.}
+ {قسمت ب}
+ {3}
+
+\authorandplace{نام نویسنده}{مکان}
+
+
+
+\noindent\timestamp{08:25} et ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+\expandedtitle{lines}{این هم دوباره مطلب مهمی است که ما آن را از لابلای این مقاله برای خواننده درست کرده‌ایم.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+
+\begin{editorial}{1}{این یک مثال از مقاله‌ای از طرف ویرایشگر است.}{نام و نام خانوادگی}{4}
+يژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{editorial}
+
+\articlesep
+
+
+\begin{shortarticle}{4}{محیط مقالهٔ کوتاه}{محیط مقالهٔ کوتاه داخل مجلهٔ زی‌پرشین}{5}
+\shortarticleitem{این یک تیتر کوتاه است}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\end{shortarticle}
+
+\articlesep
+
+\end{document}
+%</magazine-sample.tex>
+%<*test-correction.tex>
+\documentclass{article}
+\usepackage[correction]{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+
+\end{document}
+%</test-correction.tex>
+%<*test-empty-form.tex>
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+\bigskip
+
+\begin{center}
+\makeform
+\end{center}
+\end{document}
+%</test-empty-form.tex>
+%<*test-question-only.tex>
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+
+\end{document}
+%</test-question-only.tex>
+%<*test-solution-form.tex>
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\bigskip
+\begin{center}
+\makemask
+\end{center}
+\end{document}
+%</test-solution-form.tex>
+%<*acm-fa-output.tex>
+\documentclass[11pt,a4paper]{article}
+
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{acm-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+\nocite{*}
+\bibliographystyle{acm-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+
+\end{document}
+%</acm-fa-output.tex>
+%<*bibtex-example.tex>
+\documentclass[11pt,a4paper]{article}
+% محمود امین‌طوسی، http://webpages.iust.ac.ir/mamintoosi
+% فایل حاضر مثالی برای استفاده از سبک‌های فارسی در زی‌پرشین می‌باشد.
+% توجه نمایید که برای استفاده از این مثال باید به صورت زیر عمل نمایید:
+% xelatex filename (در نوت‌پد++ F6 یا Ctrl+F6) - با توجه به راهنمای زی‌پرشین
+% bibtex filename (تایپ دستور در خط فرمان نوت‌پد++)
+% xelatex filename (در نوت‌پد++ F6)
+% xelatex filename (در نوت‌پد++ F6 یا Ctrl+F6)
+% در این مثال به جای filename باید bibtex_example قرار دهید.
+% برای ویرایش مدخل‌ها فایل MyReferences.bib را باز کنید. در صورت تغییر این فایل بایستی دو مرحله‌ی میانی را پس از ذخیره‌ی آن اجرا نمایید.
+% در صورت تغییر در ارجاعات در این فایل باید هر چهار مرحله انجام شوند.
+
+% به جای unsrt می‌توانید سایر سبک‌ها را قرار داده و نتیجه را مشاهده نمایید. (plain-fa, acm-fa, ieeetr-fa, persia)
+
+\usepackage{verbatim}
+\usepackage{backref}
+\def\backrefpagesname{}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Times New latin}
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با استیل فارسی \lr{unsrt-fa} برای \lr{BibTeX} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+مرجع \cite{امیدعلی82دکترا} یک نمونه پروژه دکترا و مرجع\cite{واحدی87} یک نمونه مقاله مجله فارسی است.
+مرجع \cite{Baker02limits} یک نمونه مقاله انگلیسی است که در بین مراجع فارسی قرار گرفته است، مرجع \cite{Amintoosi87using} یک نمونه مقاله کنفرانس فارسی و
+مرجع \cite{استالینگ۸۰کتاب} یک نمونه کتاب فارسی با ذکر مترجمان و ویراستاران فارسی است. مرجع \cite{Khalighi07MscThesis} یک نمونه پروژه کارشناسی ارشد انگلیسی و
+\cite{خلیقی۸۷زی‌پرشین} هم یک نمونه متفرقه می‌باشند.
+
+%\nocite{*}
+{\small
+\bibliographystyle{unsrt-fa}%{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+}
+
+\end{document}
+%</bibtex-example.tex>
+%<*ieeetr-fa-output.tex>
+\documentclass[11pt,a4paper]{article}
+% محمود امین‌طوسی، http://webpages.iust.ac.ir/mamintoosi
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{ieeetr-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+
+\end{document}
+%</ieeetr-fa-output.tex>
+%<*MyReferences.bib>
+@article{Baker02limits,
+ author = {Baker,, Simon and Kanade,, Takeo},
+ title = {Limits on Super-Resolution and How to Break Them},
+ journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
+ volume = {24},
+ number = {9},
+ year = {2002},
+ issn = {0162-8828},
+ pages = {1167--1183},
+ publisher = {IEEE Computer Society},
+ address = {Washington, DC, USA}
+ }
+
+@CONFERENCE{Amintoosi87using,
+ AUTHOR = {\noopsort{امین‌طوسی,محمود}{امین‌طوسی,محمود} and others},
+ TITLE = {استفاده از تجزیه ماتریس در وضوح برتر},
+ BOOKTITLE = {پنجمین کنفرانس بینائی ماشین},
+ YEAR = {1387},
+ ORGANIZATION = {دانشگاه تبریز},
+ ADDRESS = {تبریز، ایران},
+ PAGES = {172-178},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{پورموسی۸۸ارشد,
+ AUTHOR = {\noopsort{بپورموسی, امیرمسعود}{پورموسی, امیرمسعود}},
+ TITLE = {یک موضوع فیزیک},
+ SCHOOL = {دانشکده فیزیک، دانشگاه صنعتی‌شریف},
+ YEAR = {۱۳۸۸},
+ MONTH = {مرداد},
+ NOTE = {(در حال انجام)},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{Khalighi07MscThesis,
+ AUTHOR = {Vafa Khalighi},
+ TITLE = {Category Theory},
+ SCHOOL = {Sydny Univ.},
+ YEAR = {2007},
+ MONTH = {April}
+}
+
+@PHDTHESIS{امیدعلی82دکترا,
+ AUTHOR = {\noopsort{امیدعلی, مهدی}{امیدعلی, مهدی}},
+ TITLE = {تابع هیلبرت},
+ SCHOOL = {دانشکده ریاضی، دانشگاه امیرکبیر},
+ YEAR = {1382},
+ MONTH = {تیر},
+ LANGUAGE = {Persian}
+}
+
+@MISC{خلیقی۸۷زی‌پرشین,
+ AUTHOR = {\noopsort{خلیقی,وفا}{خلیقی,وفا} and امیدعلی, مهدی and واحدی,مصطفی.},
+ TITLE = {زی‌پرشین (\lr{\XePersian}): بسته فارسی برای حروف‌چینی در \lr{\LaTeX2e}},
+ HOWPUBLISHED = {\lr{http://developer.berlios.de/projects/xepersian}},
+ YEAR = {۱۳۸۷},
+ LANGUAGE = {Persian}
+ }
+
+@BOOK{استالینگ۸۰کتاب,
+ AUTHOR = {\noopsort{استالینگ, ویلیام}{استالینگ, ویلیام}},
+ EDITOR = {برنجکوب, محمود},
+ translator = { صدیقی‌ مشکنانی, محسن and پدرام,حسین },
+ TITLE = {اصول طراحی و ویژگیهای داخلی سیستم‌های عامل},
+ PUBLISHER = {نشر شیخ بهایی},
+ YEAR = {۱۳۸۰},
+ ADDRESS = {اصفهان},
+ edition = {سوم},
+ MONTH = {بهار},
+ LANGUAGE = {Persian}
+}
+
+@ARTICLE{واحدی87,
+ AUTHOR = {\noopsort{واحدی, مصطفی}{واحدی, مصطفی}},
+ TITLE = {موضوعی جدید در هندسه محاسباتی},
+ JOURNAL = {مجله فارسی نمونه},
+ VOLUME = {1},
+ YEAR = {1387},
+ NUMBER = {2},
+ MONTH = {آبان},
+ PAGES = {22-30},
+ LANGUAGE = {Persian}
+}
+
+@CONFERENCE{Amintoosi09regional,
+ author = {Mahmood Amintoosi and Mahmood Fathy and Nasser Mozayani},
+ title = {Regional Varying Image Super-Resolution},
+ booktitle = {(CSO 2009) The 2009 IEEE International Joint Conference on Computational Sciences and Optimization},
+ year = {2009},
+ month = {24-26 April},
+ organization = {City University},
+ address = {Sanya, Hainan, China},
+ pages = {101-105}
+}
+
+@PHDTHESIS{Farsiu05thesis,
+ AUTHOR = {Sina Farsiu},
+ TITLE = {A Fast and Robust Framework for Image Fusion and Enhancement},
+ SCHOOL = {Electrical Engineeting},
+ YEAR = {2005},
+ ADDRESS = {UC Santa Cruz},
+ MONTH = {December}
+}
+
+
+@BOOK{Gonzalez02book,
+ AUTHOR = {Gonzalez,, Rafael C. and Woods,, Richard E.},
+ TITLE = {Digital Image Processing},
+ PUBLISHER = {Prentice-Hall, Inc.},
+ YEAR = {2006},
+ ISBN = {013168728X},
+ EDITION = {3rd},
+ ADDRESS = {Upper Saddle River, NJ, USA},
+}
+%</MyReferences.bib>
+%<*plain-fa-output.tex>
+\documentclass[11pt,a4paper]{article}
+% محمود امین‌طوسی، http://webpages.iust.ac.ir/mamintoosi
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{XB Zar}
+
+\title{نمونه خروجی با سبک فارسی \lr{plain-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences1}
+
+
+\end{document}
+%</plain-fa-output.tex>
+% \fi
+%
+% \typeout{*************************************************************}
+% \typeout{*}
+% \typeout{* To finish the installation you have to move the following}
+% \typeout{* file into a directory searched by TeX:}
+% \typeout{*}
+% \typeout{* \space\space\space all *.cls, *.sty and *.def files}
+% \typeout{* You also need to compile the *.map files with teckit_compile}
+% \typeout{* and place the resulting *.tec files under}
+% \typeout{* .../fonts/misc/xetex/fontmapping/xepersian}
+% \typeout{*}
+% \typeout{*************************************************************}
+\endinput
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/doc/xelatex/xepersian/xepersian.sty
new file mode 100644
index 00000000000..e20fb9e707d
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian.sty
@@ -0,0 +1,284 @@
+%%
+%% This is file `xepersian.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\xepersianversion{v1.0.1}
+\def\xepersianrevision{revision 88}
+\def\xepersiandate{2009/07/15}
+\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space <\xepersianrevision>
+Persian typesetting in XeLaTeX]
+\DeclareOption{Kashida}{\input{kashida-xepersian.def}}
+\DeclareOption{localise}{\input{localise-xepersian.def}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{bidi}}
+\ProcessOptions\relax
+\newcommand\xepersian@isloaded[2][]{
+ \expandafter\ifx\csname if@xepersian@#2loaded@\endcsname\relax
+ \expandafter\newif\csname if@xepersian@#2loaded@\endcsname
+ \fi
+ \@ifpackageloaded{#2}
+ {\csname @xepersian@#2loaded@true\endcsname #1}
+ {\csname @xepersian@#2loaded@false\endcsname}}
+\xepersian@isloaded{xunicode}
+\AtBeginDocument{
+ \if@xepersian@xunicodeloaded@
+ \xepersian@isloaded[\PackageError{xepersian}{Oops! you have loaded package xunicode before xepersian package. Please load package xunicode after xepersian package, and then try to run xelatex on your document again}{}]{xunicode}
+ \fi%
+}
+\AtBeginDocument{\ifdefined\persianfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the main text of the document. Please specify a font for the main text of the document by using \settextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\latinfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the Latin texts of the document. Please specify a font for the Latin texts of the document by using \setlatintextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\decimalseparator\relax\else%
+\PackageWarning{xepersian}{“You have not specified any font for the digits in maths mode and so the digits in maths mode will appear Latin. If you would like to have Persian digits in maths mode, then please specify a font for the digits in maths mode by using \setdigitfont\space CS, and then try to run xelatex on your document again”}%
+\fi}
+\RequirePackage[RTLdocument]{bidi}
+\RequirePackage{fontspec}
+\RequirePackage{xepersian-persiancal}
+\RequirePackage{xepersian-mathsdigitspec}
+\RequirePackage{etoolbox}
+\AtBeginDocument{\special{pdf: docinfo <<
+/Creator (X∃Persian \xepersianversion\space <\xepersianrevision> Copyright © 2008-2009 Vafa Khalighi)
+ >>}}
+\gdef\@latex@error#1#2{%
+ \GenericError{%
+ \space\space\space\@spaces\@spaces\@spaces
+ }{%
+ XePersian Error: #1%
+ }{%
+ Oops! either you have done something wrong or it is a xepersian bug. 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}}
+\def\prq{«}
+\def\plq{»}
+\newfontscript{Persian}{arab}
+\newfontlanguage{Persian}{ARA}
+\newcommand*\settextfont[2][]{%
+\newfontfamily\persianfont[Script=Persian,Mapping=parsidigits,#1]{#2}
+\let\rmdefault\zf@family
+ \normalfont
+}
+\newcommand*\settxtmathfont[2][]{%
+\newfontfamily\TXTmath[Mapping=txt2maths,#1]{#2}
+}
+\newcommand*\setlatintextfont[2][]{%
+\newfontfamily\latinfont[Mapping=tex-text,#1]{#2}
+}
+\newcommand*\defpersianfont[1]{%
+ \@ifnextchar[{\defpersianfont@i#1}{\defpersianfont@i#1[]}}
+\def\defpersianfont@i#1[#2]#3{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand*\deflatinfont[1]{%
+ \@ifnextchar[{\deflatinfont@i#1}{\deflatinfont@i#1[]}}
+\def\deflatinfont@i#1[#2]#3{%
+ \zf@fontspec{Mapping=tex-text,#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand\persiansfdefault{}
+\newcommand\persianttdefault{}
+\newcommand\navardefault{}
+\newcommand\pookdefault{}
+\newcommand\sayehdefault{}
+\DeclareRobustCommand\persiansffamily
+ {\not@math@alphabet\persiansffamily\mathpersiansf
+ \fontfamily\persiansfdefault\selectfont}
+\DeclareRobustCommand\persianttfamily
+ {\not@math@alphabet\persianttfamily\mathpersiantt
+ \fontfamily\persianttdefault\selectfont}
+\DeclareRobustCommand\navarfamily
+ {\not@math@alphabet\navarfamily\mathnavar
+ \fontfamily\navardefault\selectfont}
+\DeclareRobustCommand\pookfamily
+ {\not@math@alphabet\pookfamily\mathpook
+ \fontfamily\pookdefault\selectfont}
+\DeclareRobustCommand\sayehfamily
+ {\not@math@alphabet\sayehfamily\mathsayeh
+ \fontfamily\sayehdefault\selectfont}
+\DeclareTextFontCommand{\textpersiansf}{\persiansffamily}
+\DeclareTextFontCommand{\textpersiantt}{\persianttfamily}
+\DeclareTextFontCommand{\textnavar}{\navarfamily}
+\DeclareTextFontCommand{\textpook}{\pookfamily}
+\DeclareTextFontCommand{\textsayeh}{\sayehfamily}
+\newcommand*\setpersiansansfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persiansfdefault\zf@family
+ \normalfont}
+\newcommand*\setpersianmonofont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persianttdefault\zf@family
+ \normalfont}
+\newcommand*\setnavarfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\navardefault\zf@family
+ \normalfont}
+\newcommand*\setpookfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\pookdefault\zf@family
+ \normalfont}
+\newcommand*\setsayehfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\sayehdefault\zf@family
+ \normalfont}
+\def\lr#1{\begingroup\beginL\latinfont#1\endL\endgroup}
+\def\rl#1{\begingroup\beginR\persianfont#1\endR\endgroup}
+\def\latin{\bgroup\LatinAlphs\par\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\Latin{\if@RTL\par\LatinAlphs\@RTLfalse\@RTL@footnotefalse\latinfont\fi}
+\def\Persian{\if@RTL\relax\else\par\PersianAlphs\@RTLtrue\@RTL@footnotetrue\persianfont\fi}
+\let\originaltoday=\today
+\def\today{\lr{\originaltoday}}
+\let\latintoday\today
+\def\today{\rl{\persiantoday}}
+\newcommand\twocolumnstableofcontents{%
+ \begin{multicols}{2}[\section*{\contentsname}]%
+ \small
+ \@starttoc{toc}%
+ \end{multicols}}
+\def\XePersian{\lr{\leavevmode$\smash{\hbox{X\lower.5ex
+ \hbox{\kern-.125em\reflect{E}}Persian}}$}}
+\def\TeX{\lr{\@@TeX}}
+\def\LaTeX{\lr{\@@LaTeX}}
+\def\LaTeXe{\lr{\@@LaTeXe}}
+\let\origin@XeTeX\XeTeX
+\def\XeTeX{\lr{\origin@XeTeX}}
+\let\origin@XeLaTeX\XeLaTeX
+\def\XeLaTeX{\lr{\origin@XeLaTeX}}
+\def\figurename{\if@RTL شکل\else Figure\fi}
+\def\tablename{\if@RTL جدول\else Table\fi}
+\def\contentsname{\if@RTL فهرست مطالب\else Contents\fi}
+\def\listfigurename{\if@RTL لیست تصاویر\else List of Figures\fi}
+\def\listtablename{\if@RTL لیست جداول\else List of Tables\fi}
+\def\appendixname{\if@RTL پیوست\else Appendix\fi}
+\def\indexname{\if@RTL نمایه\else Index\fi}
+\def\refname{\if@RTL مراجع\else References\fi}
+\def\abstractname{\if@RTL چکیده\else Abstract\fi}
+\def\partname{\if@RTL بخش\else Part\fi}
+\def\datename{\if@RTL تاریخ:\else Date:\fi}
+\def\@@and{\if@RTL و\else and\fi}
+\def\bibname{\if@RTL کتاب‌نامه\else Bibliography\fi}
+\def\chaptername{\if@RTL فصل\else Chapter\fi}
+\def\ccname{\if@RTL رونوشت\else cc\fi}
+\def\enclname{\if@RTL پیوست\else encl\fi}
+\def\pagename{\if@RTL صفحه\else Page\fi}
+\def\headtoname{\if@RTL به\else To\fi}
+\def\proofname{\if@RTL اثبات\else Proof\fi}
+\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 ی\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}
+\providecommand*{\xpg@warning}[1]{%
+ \PackageWarning{XePersian}%
+ {#1}}
+\ifcsdef{abjad}{}{%
+\def\abjad#1{%
+\ifnum#1>1999 \xpg@warning{Illegal value (#1) for abjad numeral} {#1}
+\else
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for abjad numeral}%
+ \else
+ \ifnum#1<10\expandafter\abj@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\abj@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+\def\abjad@zero{}
+\def\abj@num@i#1{%
+ \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{%
+ \ifcase#1\or ی\or ک\or ل\or م\or ن%
+ \or س\or ع\or ف\or ص\fi
+ \ifnum#1=\z@\fi\abj@num@i}
+\def\abj@num@iii#1{%
+ \ifcase#1\or ق\or ر\or ش\or ت\or ث%
+ \or خ\or ذ\or ض\or ظ\fi
+ \ifnum#1=\z@\fi\abj@num@ii}
+\def\abj@num@iv#1{%
+ \ifcase#1\or غ\fi
+ \ifnum#1=\z@\fi\abj@num@iii}
+}
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+\def\PersianAlphs{%
+ \let\@alph\abjad%
+ \let\@Alph\abjad%
+}
+\def\LatinAlphs{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+\PersianAlphs
+\@ifpackageloaded{listings}{\input{listings-xepersian.def}}{}
+\@ifpackageloaded{algorithmic}{\input{algorithmic-xepersian.def}}{}
+\@ifpackageloaded{algorithm}{\input{algorithm-xepersian.def}}{}
+\@ifpackageloaded{backref}{\input{backref-xepersian.def}}{}
+\@ifpackageloaded{bidi}{\input{footnote-bidi-xepersian.def}}{}
+\@ifpackageloaded{enumerate}{\input{enumerate-xepersian.def}}{}
+\@ifpackageloaded{minitoc}{\input{minitoc-xepersian.def}}{}
+\@ifpackageloaded{tocloft}{\input{tocloft-xepersian.def}}{}
+\@ifclassloaded{article}{\input{article-xepersian.def}}{}
+\@ifclassloaded{amsart}{\input{amsart-xepersian.def}}{}
+\@ifclassloaded{bidimoderncv}{\input{bidimoderncv-xepersian.def}}{}
+\@ifclassloaded{report}{\input{report-xepersian.def}}{}
+\@ifclassloaded{rapport3}{\input{rapport3-xepersian.def}}{}
+\@ifclassloaded{scrartcl}{\input{scrartcl-xepersian.def}}{}
+\@ifclassloaded{scrbook}{\input{scrbook-xepersian.def}}{}
+\@ifclassloaded{scrreprt}{\input{scrreprt-xepersian.def}}{}
+\@ifclassloaded{xepersian-thesis}{\input{xepersian-thesis-xepersian.def}}{}
+\@ifclassloaded{amsbook}{\input{amsbook-xepersian.def}}{}
+\@ifclassloaded{bookest}{\input{bookest-xepersian.def}}{}
+\@ifclassloaded{extbook}{\input{extbook-xepersian.def}}{}
+\@ifclassloaded{book}{\input{book-xepersian.def}}{}
+\@ifclassloaded{refrep}{\input{refrep-xepersian.def}}{}
+\@ifclassloaded{bidibeamer}{\input{bidibeamer-xepersian.def}}{}
+\@ifclassloaded{bidimemoir}{\input{bidimemoir-xepersian.def}}{}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian.sty'.
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xindy/persian.xdy b/Master/texmf-dist/doc/xelatex/xepersian/xindy/persian.xdy
new file mode 100755
index 00000000000..548d939286d
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xindy/persian.xdy
@@ -0,0 +1,118 @@
+;; $Id: makeidx.xdy,v 1.1 1997/02/07 14:17:31 kehr Exp $
+;;
+;; This file implements the Output Style Specifiers for plain
+;; makeindex (see manpage of makeindex 2.x) in conjuction with
+;; TeX/LaTeX.
+;;
+;; The Input Style Specifiers of makeindex cannot de defined in a
+;; `xindy' style file. Use an appropriate version of the program
+;; `tex2xindy' which should be included with this distribution.
+;;
+;; Since `xindy' uses a different specification language than
+;; makeindex and some of the command-line options of makeindex are now
+;; only available as style-file commands, this file can only serve as
+;; a template that produces the default-markup of makeindex. However,
+;; it may be used as a starting point for further modification and
+;; specialization.
+;;
+;; The following values are taken from the source of the makeindex
+;; distribution (see file scanst.h and the manpage) for further
+;; details.
+;;
+
+;; Define all attributes appearing in your document. Your attributes
+;; are all encapsulators you use in your \index commands following the
+;; vertical bar sign `|'. For example `foo' is the attribute in the
+;; command \index{...|foo}. Here you specify the set of attributes
+;; that appear in your document, the order in which they appear in the
+;; index and which one superdes the other.
+;;
+;; Example: a) (define-attibutes (("default") ("bf") ("it")))
+;; b) (define-attibutes (("bf" "default")))
+;;
+;; The initial command is (change it accordingly):
+
+(define-attributes ("default"))
+
+;; The description of the location-classes.
+;; Add more location classes as needed.
+
+(define-location-class "arabic-page-numbers" ("arabic-numbers"))
+(define-location-class "roman-page-numbers" ("roman-numbers-lowercase"))
+(define-location-class "Roman-page-numbers" ("roman-numbers-uppercase"))
+(define-location-class "alpha-page-numbers" ("alpha"))
+(define-location-class "Alpha-page-numbers" ("ALPHA"))
+
+;; The most frequently used cross reference class "see". Add more, if
+;; necessary.
+
+(define-crossref-class "see")
+(markup-crossref-list :open "\see{" :close "}{}" :class "see")
+
+;; In makeindex: page_precedence <string> "rnaRA"
+;; List all location classes appearing in your document.
+
+(define-location-class-order ("roman-page-numbers"
+ "arabic-page-numbers"
+ "alpha-page-numbers"
+ "Roman-page-numbers"
+ "Alpha-page-numbers"
+ "see"))
+
+
+;; preamble <string> "\\begin{theindex}\n"
+;; postamble <string> "\n\n\\end{theindex}\n"
+
+(markup-index :open "\begin{theindex}~n"
+ :close "~n~n\end{theindex}~n"
+ :tree)
+
+;; These specifiers are not directly supported via a command-line
+;; switch as in makeindex. Add the appropriate markup-commands into
+;; the preamble.
+
+;; setpage_prefix <string> "~n \setcounter{page}{"
+;; setpage_suffix <string> "}~n"
+
+;; group_skip <string> "~n~n \indexspace~n"
+
+(markup-letter-group-list :sep "~n~n \indexspace~n")
+
+;; The indexentries (item_<..> specifiers)
+
+(markup-indexentry :open "~n \item " :depth 0)
+(markup-indexentry :open "~n \subitem " :depth 1)
+(markup-indexentry :open "~n \subsubitem " :depth 2)
+
+;; Location-references
+
+;; delim_0 <string> ", "
+;; delim_1 <string> ", "
+;; delim_2 <string> ", "
+
+(markup-locclass-list :open ", " :sep ", ")
+
+;; delim_n <string> ", "
+
+(markup-locref-list :sep ", ")
+
+;; delim_r <string> "--"
+
+(markup-range :sep "--")
+
+;; Here follow all letter-groups. The short-cut notation is used here.
+
+(define-letter-groups
+ ("آ" "ا" "ب" "پ" "ت" "ث" "ج" "چ" "ح" "خ" "د" "ذ" "ر" "ز"
+ "ژ" "س" "ش" "ص" "ض" "ط" "ظ" "ع" "غ" "ف" "ق" "ک" "گ" "ل" "م" "ن" "ه" "و" "ی"))
+
+;;
+;; The sort-rules map all letters to their lowercase counterpart.
+;;
+
+
+;; End
+
+;; Local Variables:
+;; mode: lisp
+;; End:
diff --git a/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.map b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.map
index 3502244cfba..ff530f197a8 100644
--- a/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.map
+++ b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.map
@@ -1,6 +1,6 @@
-; FC ...
-LHSName "Digits"
-RHSName "FarsiDigits"
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "ParsiDigits"
pass(Unicode)
U+0030 <> U+06F0 ;
@@ -14,10 +14,10 @@ U+0037 <> U+06F7 ;
U+0038 <> U+06F8 ;
U+0039 <> U+06F9 ;
-U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
-U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
-U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
@@ -27,20 +27,20 @@ U+003F <> U+061F ; question mark -> arabic qm
U+003B <> U+061B ; semicolon -> arabic semicolon
; ligatures from Knuth's original CMR fonts
-U+002D U+002D <> U+2013 ; -- -> en dash
-U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
-U+0027 <> U+2019 ; ' -> right single quote
-U+0027 U+0027 <> U+201D ; '' -> right double quote
-U+0022 > U+201D ; " -> right double quote
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
-U+0060 <> U+2018 ; ` -> left single quote
-U+0060 U+0060 <> U+201C ; `` -> left double quote
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
-U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
-U+003F U+0060 <> U+00BF ; ?` -> inverted question
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
; additions supported in T1 encoding
-U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
-U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
-U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET \ No newline at end of file
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
diff --git a/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.tec b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.tec
index c0b04e9f0a3..6844196c273 100644
--- a/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.tec
+++ b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/parsidigits.tec
Binary files differ
diff --git a/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.map b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.map
new file mode 100644
index 00000000000..f8b4dae0da6
--- /dev/null
+++ b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.map
@@ -0,0 +1,48 @@
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "txt2maths"
+
+Pass(Unicode)
+U+002E <> U+066B ; convert dot to Persian decimal separator
+U+002D <> U+2212 ; convert hyphen to minus sign
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
diff --git a/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.tec b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.tec
new file mode 100644
index 00000000000..c51f869ddf7
--- /dev/null
+++ b/Master/texmf-dist/fonts/misc/xetex/fontmapping/xepersian/txt2maths.tec
Binary files differ
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
new file mode 100644
index 00000000000..d25a0a64170
--- /dev/null
+++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
@@ -0,0 +1,9100 @@
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+_________________
+The XePersian package
+v1.0.1
+
+XePersian is a package written for XeLaTeX that allows users to typeset
+Persian easily. The current version is 1.0.1 and it will be developed to
+ meet the needs of Persian typesetting properly.
+
+The XePersian package is independent of any operating system, meaning it
+will work on all operating systems.
+
+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
+
+
+This version fixes all known bugs and adds heaps of new things.
+
+______________
+Vafa Khalighi
+vafa@users.berlios.de
+
+Copyright 2008-2009
+Distributed under the LaTeX Project Public License
+%</readme>
+%<*internal>
+\fi
+%
+%</internal>
+%
+%<*internal>
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\preamble
+
+ __________________________________
+ Copyright © 2008-2009 Vafa Khalighi
+
+ License information appended.
+
+
+\endpreamble
+\postamble
+
+Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+
+Distributable under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status)
+by Vafa Khalighi.
+
+
+
+
+\endpostamble
+\askforoverwritefalse
+\generate{\file{xepersian.sty}{\from{xepersian.dtx}{xepersian.sty}}}
+\generate{\file{algorithmic-xepersian.def}{\from{xepersian.dtx}{algorithmic-xepersian.def}}}
+\generate{\file{algorithm-xepersian.def}{\from{xepersian.dtx}{algorithm-xepersian.def}}}
+\generate{\file{amsart-xepersian.def}{\from{xepersian.dtx}{amsart-xepersian.def}}}
+\generate{\file{amsbook-xepersian.def}{\from{xepersian.dtx}{amsbook-xepersian.def}}}
+\generate{\file{article-xepersian.def}{\from{xepersian.dtx}{article-xepersian.def}}}
+\generate{\file{backref-xepersian.def}{\from{xepersian.dtx}{backref-xepersian.def}}}
+\generate{\file{bidibeamer-xepersian.def}{\from{xepersian.dtx}{bidibeamer-xepersian.def}}}
+\generate{\file{bidimoderncv-xepersian.def}{\from{xepersian.dtx}{bidimoderncv-xepersian.def}}}
+\generate{\file{bookest-xepersian.def}{\from{xepersian.dtx}{bookest-xepersian.def}}}
+\generate{\file{book-xepersian.def}{\from{xepersian.dtx}{book-xepersian.def}}}
+\generate{\file{footnote-bidi-xepersian.def}{\from{xepersian.dtx}{footnote-bidi-xepersian.def}}}
+\generate{\file{localise-xepersian.def}{\from{xepersian.dtx}{localise-xepersian.def}}}
+\generate{\file{commands-ltx.def}{\from{xepersian.dtx}{commands-ltx.def}}}
+\generate{\file{commands-xepersian.def}{\from{xepersian.dtx}{commands-xepersian.def}}}
+\generate{\file{enumerate-xepersian.def}{\from{xepersian.dtx}{enumerate-xepersian.def}}}
+\generate{\file{environments-ltx.def}{\from{xepersian.dtx}{environments-ltx.def}}}
+\generate{\file{environments-xepersian.def}{\from{xepersian.dtx}{environments-xepersian.def}}}
+\generate{\file{extbook-xepersian.def}{\from{xepersian.dtx}{extbook-xepersian.def}}}
+\generate{\file{kashida-xepersian.def}{\from{xepersian.dtx}{kashida-xepersian.def}}}
+\generate{\file{listings-xepersian.def}{\from{xepersian.dtx}{listings-xepersian.def}}}
+\generate{\file{bidimemoir-xepersian.def}{\from{xepersian.dtx}{bidimemoir-xepersian.def}}}
+\generate{\file{minitoc-xepersian.def}{\from{xepersian.dtx}{minitoc-xepersian.def}}}
+\generate{\file{misccommandsenvironments-ltx.def}{\from{xepersian.dtx}{misccommandsenvironments-ltx.def}}}
+\generate{\file{refrep-xepersian.def}{\from{xepersian.dtx}{refrep-xepersian.def}}}
+\generate{\file{report-xepersian.def}{\from{xepersian.dtx}{report-xepersian.def}}}
+\generate{\file{rapport3-xepersian.def}{\from{xepersian.dtx}{rapport3-xepersian.def}}}
+\generate{\file{scrartcl-xepersian.def}{\from{xepersian.dtx}{scrartcl-xepersian.def}}}
+\generate{\file{scrbook-xepersian.def}{\from{xepersian.dtx}{scrbook-xepersian.def}}}
+\generate{\file{scrreprt-xepersian.def}{\from{xepersian.dtx}{scrreprt-xepersian.def}}}
+\generate{\file{tocloft-xepersian.def}{\from{xepersian.dtx}{tocloft-xepersian.def}}}
+\generate{\file{xepersian-magazine.cls}{\from{xepersian.dtx}{xepersian-magazine.cls}}}
+\generate{\file{xepersian-mathsdigitspec.sty}{\from{xepersian.dtx}{xepersian-mathsdigitspec.sty}}}
+\generate{\file{xepersian-multiplechoice.sty}{\from{xepersian.dtx}{xepersian-multiplechoice.sty}}}
+\generate{\file{xepersian-persiancal.sty}{\from{xepersian.dtx}{xepersian-persiancal.sty}}}
+\generate{\file{xepersian-thesis.cls}{\from{xepersian.dtx}{xepersian-thesis.cls}}}
+\generate{\file{xepersian-thesis-xepersian.def}{\from{xepersian.dtx}{xepersian-thesis-xepersian.def}}}
+\generate{\file{acm-fa.bst}{\from{xepersian.dtx}{acm-fa.bst}}}
+\generate{\file{ieeetr-fa.bst}{\from{xepersian.dtx}{ieeetr-fa.bst}}}
+\generate{\file{plain-fa.bst}{\from{xepersian.dtx}{plain-fa.bst}}}
+\generate{\file{unsrt-fa.bst}{\from{xepersian.dtx}{unsrt-fa.bst}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{xepersian.ins}{\from{xepersian.dtx}{batchfile}}}
+\nopreamble\nopostamble
+\generate{\file{README.txt}{\from{xepersian.dtx}{readme}}}
+\generate{\file{parsidigits.map}{\from{xepersian.dtx}{parsidigits.map}}}
+\generate{\file{txt2maths.map}{\from{xepersian.dtx}{txt2maths.map}}}
+\generate{\file{thesis-sample.tex}{\from{xepersian.dtx}{thesis-sample.tex}}}
+\generate{\file{magazine-sample.tex}{\from{xepersian.dtx}{magazine-sample.tex}}}
+\generate{\file{test-correction.tex}{\from{xepersian.dtx}{test-correction.tex}}}
+\generate{\file{test-empty-form.tex}{\from{xepersian.dtx}{test-empty-form.tex}}}
+\generate{\file{test-question-only.tex}{\from{xepersian.dtx}{test-question-only.tex}}}
+\generate{\file{test-solution-form.tex}{\from{xepersian.dtx}{test-solution-form.tex}}}
+\generate{\file{acm-fa-output.tex}{\from{xepersian.dtx}{acm-fa-output.tex}}}
+\generate{\file{bibtex-example.tex}{\from{xepersian.dtx}{bibtex-example.tex}}}
+\generate{\file{ieeetr-fa-output.tex}{\from{xepersian.dtx}{ieeetr-fa-output.tex}}}
+\generate{\file{MyReferences.bib}{\from{xepersian.dtx}{MyReferences.bib}}}
+\generate{\file{plain-fa-output.tex}{\from{xepersian.dtx}{plain-fa-output.tex}}}
+\endgroup
+%</internal>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[sc,osf]{mathpazo}
+\usepackage{fvrb-ex}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\OnlyDescription
+
+\begin{document}
+ \DocInput{xepersian.dtx}
+\end{document}
+%</driver>
+%
+%
+% \fi
+%
+% \GetFileInfo{bidi.sty}
+% \makeatletter
+%
+%\title{The \textsf{XePersian} Package}
+%\author{Vafa Khalighi\\
+%\footnotesize\texttt{<vafa@users.berlios.de>}}
+%
+% \StopEventually{}
+% \section{Implementation}
+% \part{xepersian.sty}
+%\iffalse
+%<*xepersian.sty>
+% \fi
+%
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\def\xepersianversion{v1.0.1}
+\def\xepersianrevision{revision 88}
+\def\xepersiandate{2009/07/15}
+\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space <\xepersianrevision>
+ Persian typesetting in XeLaTeX]
+\DeclareOption{Kashida}{\input{kashida-xepersian.def}}
+\DeclareOption{localise}{\input{localise-xepersian.def}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{bidi}}
+\ProcessOptions\relax
+\newcommand\xepersian@isloaded[2][]{
+ \expandafter\ifx\csname if@xepersian@#2loaded@\endcsname\relax
+ \expandafter\newif\csname if@xepersian@#2loaded@\endcsname
+ \fi
+ \@ifpackageloaded{#2}
+ {\csname @xepersian@#2loaded@true\endcsname #1}
+ {\csname @xepersian@#2loaded@false\endcsname}}
+\xepersian@isloaded{xunicode}
+\AtBeginDocument{
+ \if@xepersian@xunicodeloaded@
+ \xepersian@isloaded[\PackageError{xepersian}{Oops! you have loaded package xunicode before xepersian package. Please load package xunicode after xepersian package, and then try to run xelatex on your document again}{}]{xunicode}
+ \fi%
+}
+\AtBeginDocument{\ifdefined\persianfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the main text of the document. Please specify a font for the main text of the document by using \settextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\latinfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the Latin texts of the document. Please specify a font for the Latin texts of the document by using \setlatintextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\decimalseparator\relax\else%
+\PackageWarning{xepersian}{“You have not specified any font for the digits in maths mode and so the digits in maths mode will appear Latin. If you would like to have Persian digits in maths mode, then please specify a font for the digits in maths mode by using \setdigitfont\space CS, and then try to run xelatex on your document again”}%
+\fi}
+\RequirePackage[RTLdocument]{bidi}
+\RequirePackage{fontspec}
+\RequirePackage{xepersian-persiancal}
+\RequirePackage{xepersian-mathsdigitspec}
+\RequirePackage{etoolbox}
+\AtBeginDocument{\special{pdf: docinfo <<
+ /Creator (X∃Persian \xepersianversion\space <\xepersianrevision> Copyright © 2008-2009 Vafa Khalighi)
+ >>}}
+\gdef\@latex@error#1#2{%
+ \GenericError{%
+ \space\space\space\@spaces\@spaces\@spaces
+ }{%
+ XePersian Error: #1%
+ }{%
+ Oops! either you have done something wrong or it is a xepersian bug. 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}}
+\def\prq{«}
+\def\plq{»}
+\newfontscript{Persian}{arab}
+\newfontlanguage{Persian}{ARA}
+\newcommand*\settextfont[2][]{%
+\newfontfamily\persianfont[Script=Persian,Mapping=parsidigits,#1]{#2}
+\let\rmdefault\zf@family
+ \normalfont
+}
+\newcommand*\settxtmathfont[2][]{%
+\newfontfamily\TXTmath[Mapping=txt2maths,#1]{#2}
+}
+\newcommand*\setlatintextfont[2][]{%
+\newfontfamily\latinfont[Mapping=tex-text,#1]{#2}
+}
+\newcommand*\defpersianfont[1]{%
+ \@ifnextchar[{\defpersianfont@i#1}{\defpersianfont@i#1[]}}
+\def\defpersianfont@i#1[#2]#3{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand*\deflatinfont[1]{%
+ \@ifnextchar[{\deflatinfont@i#1}{\deflatinfont@i#1[]}}
+\def\deflatinfont@i#1[#2]#3{%
+ \zf@fontspec{Mapping=tex-text,#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand\persiansfdefault{}
+\newcommand\persianttdefault{}
+\newcommand\navardefault{}
+\newcommand\pookdefault{}
+\newcommand\sayehdefault{}
+\DeclareRobustCommand\persiansffamily
+ {\not@math@alphabet\persiansffamily\mathpersiansf
+ \fontfamily\persiansfdefault\selectfont}
+\DeclareRobustCommand\persianttfamily
+ {\not@math@alphabet\persianttfamily\mathpersiantt
+ \fontfamily\persianttdefault\selectfont}
+\DeclareRobustCommand\navarfamily
+ {\not@math@alphabet\navarfamily\mathnavar
+ \fontfamily\navardefault\selectfont}
+\DeclareRobustCommand\pookfamily
+ {\not@math@alphabet\pookfamily\mathpook
+ \fontfamily\pookdefault\selectfont}
+\DeclareRobustCommand\sayehfamily
+ {\not@math@alphabet\sayehfamily\mathsayeh
+ \fontfamily\sayehdefault\selectfont}
+\DeclareTextFontCommand{\textpersiansf}{\persiansffamily}
+\DeclareTextFontCommand{\textpersiantt}{\persianttfamily}
+\DeclareTextFontCommand{\textnavar}{\navarfamily}
+\DeclareTextFontCommand{\textpook}{\pookfamily}
+\DeclareTextFontCommand{\textsayeh}{\sayehfamily}
+\newcommand*\setpersiansansfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persiansfdefault\zf@family
+ \normalfont}
+\newcommand*\setpersianmonofont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persianttdefault\zf@family
+ \normalfont}
+\newcommand*\setnavarfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\navardefault\zf@family
+ \normalfont}
+\newcommand*\setpookfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\pookdefault\zf@family
+ \normalfont}
+\newcommand*\setsayehfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\sayehdefault\zf@family
+ \normalfont}
+\def\lr#1{\begingroup\beginL\latinfont#1\endL\endgroup}
+\def\rl#1{\begingroup\beginR\persianfont#1\endR\endgroup}
+\def\latin{\bgroup\LatinAlphs\par\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\Latin{\if@RTL\par\LatinAlphs\@RTLfalse\@RTL@footnotefalse\latinfont\fi}
+\def\Persian{\if@RTL\relax\else\par\PersianAlphs\@RTLtrue\@RTL@footnotetrue\persianfont\fi}
+\let\originaltoday=\today
+\def\today{\lr{\originaltoday}}
+\let\latintoday\today
+\def\today{\rl{\persiantoday}}
+\newcommand\twocolumnstableofcontents{%
+ \begin{multicols}{2}[\section*{\contentsname}]%
+ \small
+ \@starttoc{toc}%
+ \end{multicols}}
+\def\XePersian{\lr{\leavevmode$\smash{\hbox{X\lower.5ex
+ \hbox{\kern-.125em\reflect{E}}Persian}}$}}
+\def\TeX{\lr{\@@TeX}}
+\def\LaTeX{\lr{\@@LaTeX}}
+\def\LaTeXe{\lr{\@@LaTeXe}}
+\let\origin@XeTeX\XeTeX
+\def\XeTeX{\lr{\origin@XeTeX}}
+\let\origin@XeLaTeX\XeLaTeX
+\def\XeLaTeX{\lr{\origin@XeLaTeX}}
+\def\figurename{\if@RTL شکل\else Figure\fi}
+\def\tablename{\if@RTL جدول\else Table\fi}
+\def\contentsname{\if@RTL فهرست مطالب\else Contents\fi}
+\def\listfigurename{\if@RTL لیست تصاویر\else List of Figures\fi}
+\def\listtablename{\if@RTL لیست جداول\else List of Tables\fi}
+\def\appendixname{\if@RTL پیوست\else Appendix\fi}
+\def\indexname{\if@RTL نمایه\else Index\fi}
+\def\refname{\if@RTL مراجع\else References\fi}
+\def\abstractname{\if@RTL چکیده\else Abstract\fi}
+\def\partname{\if@RTL بخش\else Part\fi}
+\def\datename{\if@RTL تاریخ:\else Date:\fi}
+\def\@@and{\if@RTL و\else and\fi}
+\def\bibname{\if@RTL کتاب‌نامه\else Bibliography\fi}
+\def\chaptername{\if@RTL فصل\else Chapter\fi}
+\def\ccname{\if@RTL رونوشت\else cc\fi}
+\def\enclname{\if@RTL پیوست\else encl\fi}
+\def\pagename{\if@RTL صفحه\else Page\fi}
+\def\headtoname{\if@RTL به\else To\fi}
+\def\proofname{\if@RTL اثبات\else Proof\fi}
+\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 ی\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}
+\providecommand*{\xpg@warning}[1]{%
+ \PackageWarning{XePersian}%
+ {#1}}
+\ifcsdef{abjad}{}{%
+\def\abjad#1{%
+\ifnum#1>1999 \xpg@warning{Illegal value (#1) for abjad numeral} {#1}
+\else
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for abjad numeral}%
+ \else
+ \ifnum#1<10\expandafter\abj@num@i\number#1%
+ \else
+ \ifnum#1<100\expandafter\abj@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+\def\abjad@zero{}
+\def\abj@num@i#1{%
+ \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{%
+ \ifcase#1\or ی\or ک\or ل\or م\or ن%
+ \or س\or ع\or ف\or ص\fi
+ \ifnum#1=\z@\fi\abj@num@i}
+\def\abj@num@iii#1{%
+ \ifcase#1\or ق\or ر\or ش\or ت\or ث%
+ \or خ\or ذ\or ض\or ظ\fi
+ \ifnum#1=\z@\fi\abj@num@ii}
+\def\abj@num@iv#1{%
+ \ifcase#1\or غ\fi
+ \ifnum#1=\z@\fi\abj@num@iii}
+}
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+\def\PersianAlphs{%
+ \let\@alph\abjad%
+ \let\@Alph\abjad%
+}
+\def\LatinAlphs{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+\PersianAlphs
+\@ifpackageloaded{listings}{\input{listings-xepersian.def}}{}
+\@ifpackageloaded{algorithmic}{\input{algorithmic-xepersian.def}}{}
+\@ifpackageloaded{algorithm}{\input{algorithm-xepersian.def}}{}
+\@ifpackageloaded{backref}{\input{backref-xepersian.def}}{}
+\@ifpackageloaded{bidi}{\input{footnote-bidi-xepersian.def}}{}
+\@ifpackageloaded{enumerate}{\input{enumerate-xepersian.def}}{}
+\@ifpackageloaded{minitoc}{\input{minitoc-xepersian.def}}{}
+\@ifpackageloaded{tocloft}{\input{tocloft-xepersian.def}}{}
+\@ifclassloaded{article}{\input{article-xepersian.def}}{}
+\@ifclassloaded{amsart}{\input{amsart-xepersian.def}}{}
+\@ifclassloaded{bidimoderncv}{\input{bidimoderncv-xepersian.def}}{}
+\@ifclassloaded{report}{\input{report-xepersian.def}}{}
+\@ifclassloaded{rapport3}{\input{rapport3-xepersian.def}}{}
+\@ifclassloaded{scrartcl}{\input{scrartcl-xepersian.def}}{}
+\@ifclassloaded{scrbook}{\input{scrbook-xepersian.def}}{}
+\@ifclassloaded{scrreprt}{\input{scrreprt-xepersian.def}}{}
+\@ifclassloaded{xepersian-thesis}{\input{xepersian-thesis-xepersian.def}}{}
+\@ifclassloaded{amsbook}{\input{amsbook-xepersian.def}}{}
+\@ifclassloaded{bookest}{\input{bookest-xepersian.def}}{}
+\@ifclassloaded{extbook}{\input{extbook-xepersian.def}}{}
+\@ifclassloaded{book}{\input{book-xepersian.def}}{}
+\@ifclassloaded{refrep}{\input{refrep-xepersian.def}}{}
+\@ifclassloaded{bidibeamer}{\input{bidibeamer-xepersian.def}}{}
+\@ifclassloaded{bidimemoir}{\input{bidimemoir-xepersian.def}}{}
+% \end{macrocode}
+% \iffalse
+%</xepersian.sty>
+%<*algorithmic-xepersian.def>
+% \fi
+% \part{algorithmic-xepersian.def}
+% \begin{macrocode}
+\def\algorithmicrequire{\if@RTL\textbf{ورودی:}\else\textbf{Require:}\fi}
+\def\algorithmicensure{\if@RTL\textbf{خروجی:}\else\textbf{Ensure:}\fi}
+% \end{macrocode}
+% \iffalse
+%</algorithmic-xepersian.def>
+%<*algorithm-xepersian.def>
+% \fi
+% \part{algorithm-xepersian.def}
+% \begin{macrocode}
+\def\ALG@name{\if@RTL الگوریتم\else Algorithm\fi}
+\def\ALGS@name{الگوریتم‌ها}
+\def\listalgorithmname{\if@RTL لیست \ALGS@name\else List of \ALG@name s\fi}
+% \end{macrocode}
+% \iffalse
+%</algorithm-xepersian.def>
+%<*amsart-xepersian.def>
+% \fi
+% \part{amsart-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+% \end{macrocode}
+% \iffalse
+%</amsart-xepersian.def>
+%<*amsbook-xepersian.def>
+% \fi
+% \part{amsbook-xepersian.def}
+% \begin{macrocode}
+\def\frontmatter{\cleardoublepage\pagenumbering{harfi}}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</amsbook-xepersian.def>
+%<*article-xepersian.def>
+% \fi
+% \part{article-xepersian-def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+% \end{macrocode}
+% \iffalse
+%</article-xepersian.def>
+%<*backref-xepersian.def>
+% \fi
+% \part{backref-xepersian.def}
+% \begin{macrocode}
+\def\backrefpagesname{\if@RTL صفحات\else pages\fi}
+% \end{macrocode}
+% \iffalse
+%</backref-xepersian.def>
+%<*bidibeamer-xepersian.def>
+% \fi
+% \part{bidibeamer-xepersian.def}
+% \begin{macrocode}
+\def\familydefault{\rmdefault}
+\def\latin{\bgroup\LatinAlphs\par\raggedright\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\raggedleft\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\biditheoremname{قضیه}
+\def\bidicorollaryname{نتیجه}
+\def\bidifactname{حقیقت}
+\def\bidilemmaname{لم}
+\def\bidiproblemname{مسئله}
+\def\bidisolutionname{پاسخ}
+\def\bididefinitionname{تعریف}
+\def\bididefinitionsname{تعریف‌ها}
+\def\bidiexamplename{مثال}
+\def\bidiexamplesname{مثال‌ها}
+\def\bidiproofname{اثبات}
+% \end{macrocode}
+% \iffalse
+%</bidibeamer-xepersian.def>
+%<*bidimoderncv-xepersian.def>
+% \fi
+% \part{bidimoderncv-xepersian.def}
+% \begin{macrocode}
+\def\refname{تألیفات}
+% \end{macrocode}
+% \iffalse
+%</bidimoderncv-xepersian.def>
+%<*bookest-xepersian.def>
+% \fi
+% \part{bookest-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</bookest-xepersian.def>
+%<*book-xepersian.def>
+% \fi
+% \part{book-xepersian.def}
+% \begin{macrocode}
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</book-xepersian.def>
+%<*footnote-bidi-xepersian.def>
+% \fi
+% \part{footnote-bidi-xepersian.def}
+% \begin{macrocode}
+\long\def\@footnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@RTLfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLtrue\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\persianfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@LTRfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLfalse\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\latinfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@mpfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpRTLfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLtrue
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\persianfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpLTRfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLfalse
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\latinfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+% \end{macrocode}
+% \iffalse
+%</footnote-bidi-xepersian.def>
+%<*localise-xepersian.def>
+% \fi
+% \part{localise-xepersian.def}
+% \begin{macrocode}
+\catcode`\﷼=3
+\catcode`‌=11
+\newcommand\eqcommand[2][]{\let#1=#2}
+\newcommand\eqenvironment[2][]{\newenvironment{#1}{\begin{#2}}{\end{#2}}}
+\define@key[zf]{options}{مقیاس}{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{MatchLowercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{5}%
+ \else
+ \edef\@tempb{MatchUppercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{8}%
+ \else
+ \edef\zf@scale{#1}%
+ \fi
+ \fi
+ \zf@update@family{+scale:\zf@scale}%
+ \edef\zf@scale{s*[\zf@scale]}}
+\input{commands-ltx.def}
+\input{commands-xepersian.def}
+\input{environments-ltx.def}
+\input{environments-xepersian.def}
+\input{misccommandsenvironments-ltx.def}
+% \end{macrocode}
+% \iffalse
+%</localise-xepersian.def>
+%<*commands-ltx.def>
+% \fi
+% \part{commands-ltx.def}
+% \begin{macrocode}
+\eqcommand[]{\abovedisplayshortskip}
+\eqcommand[]{\abovedisplayskip}
+\eqcommand[]{\abstractname}
+\eqcommand[]{\acute}
+\eqcommand[]{\addcontentsline}
+\eqcommand[]{\address}
+\eqcommand[]{\addtocontents}
+\eqcommand[]{\addtocounter}
+\eqcommand[]{\addtolength}
+\eqcommand[]{\addvspace}
+\eqcommand[]{\aleph}
+\eqcommand[]{\allowdisplaybreaks}
+\eqcommand[]{\Alph}
+\eqcommand[]{\alph}
+\eqcommand[]{\alpha}
+\eqcommand[]{\alsoname}
+\eqcommand[]{\amalg}
+\eqcommand[]{\and}
+\eqcommand[]{\angle}
+\eqcommand[]{\appendixname}
+\eqcommand[]{\approx}
+\eqcommand[]{\arabic}
+\eqcommand[]{\arccos}
+\eqcommand[]{\arcsin}
+\eqcommand[]{\arctan}
+\eqcommand[]{\arg}
+\eqcommand[]{\arraycolsep}
+\eqcommand[]{\arrayrulewidth}
+\eqcommand[]{\arraystretch}
+\eqcommand[]{\ast}
+\eqcommand[]{\asymp}
+\eqcommand[]{\AtBeginDocument}
+\eqcommand[]{\AtEndDocument}
+\eqcommand[]{\AtEndOfClass}
+\eqcommand[]{\AtEndOfPackage}
+\eqcommand[]{\author}
+\eqcommand[]{\backmatter}
+\eqcommand[]{\backslash}
+\eqcommand[]{\bar}
+\eqcommand[]{\baselineskip}
+\eqcommand[]{\baselinestretch}
+\eqcommand[]{\begin}
+\eqcommand[]{\belowdisplayshortskip}
+\eqcommand[]{\belowdisplayskip}
+\eqcommand[]{\beta}
+\eqcommand[]{\bfdefault}
+\eqcommand[]{\bfseries}
+\eqcommand[]{\bibitem}
+\eqcommand[]{\bibliography}
+\eqcommand[]{\bibliographystyle}
+\eqcommand[]{\bibname}
+\eqcommand[]{\big}
+\eqcommand[]{\Big}
+\eqcommand[]{\bigcap}
+\eqcommand[]{\bigcirc}
+\eqcommand[]{\bigcup}
+\eqcommand[]{\bigg}
+\eqcommand[]{\Bigg}
+\eqcommand[]{\bigodot}
+\eqcommand[]{\bigoplus}
+\eqcommand[]{\bigotimes}
+\eqcommand[]{\bigskip}
+\eqcommand[]{\bigskipamount}
+\eqcommand[]{\bigsqcup}
+\eqcommand[]{\bigtriangledown}
+\eqcommand[]{\bigtriangleup}
+\eqcommand[]{\biguplus}
+\eqcommand[]{\bigvee}
+\eqcommand[]{\bigwedge}
+\eqcommand[]{\binom}
+\eqcommand[]{\bmod}
+\eqcommand[]{\boldmath}
+\eqcommand[]{\boldsymbol}
+\eqcommand[]{\bot}
+\eqcommand[]{\botfigrule}
+\eqcommand[]{\bottomfraction}
+\eqcommand[]{\bowtie}
+\eqcommand[]{\Box}
+\eqcommand[]{\boxed}
+\eqcommand[]{\breve}
+\eqcommand[]{\bullet}
+\eqcommand[]{\cap}
+\eqcommand[]{\caption}
+\eqcommand[]{\cc}
+\eqcommand[]{\ccname}
+\eqcommand[]{\cdot}
+\eqcommand[]{\cdots}
+\eqcommand[]{\centering}
+\eqcommand[]{\centerline}
+\eqcommand[]{\cfrac}
+\eqcommand[]{\chapter}
+\eqcommand[]{\chapter*}
+\eqcommand[]{\chaptername}
+\eqcommand[]{\check}
+\eqcommand[]{\CheckCommand}
+\eqcommand[]{\chi}
+\eqcommand[]{\circ}
+\eqcommand[]{\circle}
+\eqcommand[]{\circle*}
+\eqcommand[]{\cite}
+\eqcommand[]{\citep}
+\eqcommand[]{\citet}
+\eqcommand[]{\ClassError}
+\eqcommand[]{\ClassInfo}
+\eqcommand[]{\ClassWarning}
+\eqcommand[]{\ClassWarningNoLine}
+\eqcommand[]{\cleardoublepage}
+\eqcommand[]{\clearpage}
+\eqcommand[]{\cline}
+\eqcommand[]{\closing}
+\eqcommand[]{\clubsuit}
+\eqcommand[]{\color}
+\eqcommand[]{\colorbox}
+\eqcommand[]{\columnsep}
+\eqcommand[]{\columnseprule}
+\eqcommand[]{\cong}
+\eqcommand[]{\contentsline}
+\eqcommand[]{\contentsname}
+\eqcommand[]{\coprod}
+\eqcommand[]{\copyright}
+\eqcommand[]{\cos}
+\eqcommand[]{\cosh}
+\eqcommand[]{\cot}
+\eqcommand[]{\coth}
+\eqcommand[]{\csc}
+\eqcommand[]{\cup}
+\eqcommand[]{\CurrentOption}
+\eqcommand[]{\dag}
+\eqcommand[]{\dagger}
+\eqcommand[]{\dashbox}
+\eqcommand[]{\dashv}
+\eqcommand[]{\date}
+\eqcommand[]{\dbinom}
+\eqcommand[]{\dblfigrule}
+\eqcommand[]{\dblfloatpagefraction}
+\eqcommand[]{\dblfloatsep}
+\eqcommand[]{\dbltextfloatsep}
+\eqcommand[]{\dbltopfraction}
+\eqcommand[]{\ddag}
+\eqcommand[]{\ddagger}
+\eqcommand[]{\dddot}
+\eqcommand[]{\ddddot}
+\eqcommand[]{\ddot}
+\eqcommand[]{\ddots}
+\eqcommand[]{\DeclareGraphicsExtensions}
+\eqcommand[]{\DeclareGraphicsRule}
+\eqcommand[]{\DeclareOption}
+\eqcommand[]{\DeclareOption*}
+\eqcommand[]{\DeclareRobustCommand}
+\eqcommand[]{\DeclareRobustCommand*}
+\eqcommand[]{\definecolor}
+\eqcommand[]{\deg}
+\eqcommand[]{\DeleteShortVerb}
+\eqcommand[]{\Delta}
+\eqcommand[]{\delta}
+\eqcommand[]{\depth}
+\eqcommand[]{\det}
+\eqcommand[]{\dfrac}
+\eqcommand[]{\Diamond}
+\eqcommand[]{\diamond}
+\eqcommand[]{\diamondsuit}
+\eqcommand[]{\dim}
+\eqcommand[]{\discretionary}
+\eqcommand[]{\displaybreak}
+\eqcommand[]{\displaystyle}
+\eqcommand[]{\div}
+\eqcommand[]{\documentclass}
+\eqcommand[]{\dot}
+\eqcommand[]{\doteq}
+\eqcommand[]{\dotfill}
+\eqcommand[]{\dots}
+\eqcommand[]{\dotsb}
+\eqcommand[]{\dotsc}
+\eqcommand[]{\dotsi}
+\eqcommand[]{\dotsm}
+\eqcommand[]{\doublebox}
+\eqcommand[]{\doublerulesep}
+\eqcommand[]{\Downarrow}
+\eqcommand[]{\downarrow}
+\eqcommand[]{\ell}
+\eqcommand[]{\em}
+\eqcommand[]{\emph}
+\eqcommand[]{\emptyset}
+\eqcommand[]{\encl}
+\eqcommand[]{\enclname}
+\eqcommand[]{\end}
+\eqcommand[]{\endfirsthead}
+\eqcommand[]{\endfoot}
+\eqcommand[]{\endhead}
+\eqcommand[]{\endlastfoot}
+\eqcommand[]{\enlargethispage}
+\eqcommand[]{\enlargethispage*}
+\eqcommand[]{\ensuremath}
+\eqcommand[]{\epsilon}
+\eqcommand[]{\eqref}
+\eqcommand[]{\equiv}
+\eqcommand[]{\eta}
+\eqcommand[]{\euro}
+\eqcommand[]{\EUR}
+\eqcommand[]{\evensidemargin}
+\eqcommand[]{\ExecuteOptions}
+\eqcommand[]{\exists}
+\eqcommand[]{\exp}
+\eqcommand[]{\extracolsep}
+\eqcommand[]{\fancypage}
+\eqcommand[]{\fbox}
+\eqcommand[]{\fboxrule}
+\eqcommand[]{\fboxsep}
+\eqcommand[]{\fcolorbox}
+\eqcommand[]{\figurename}
+\eqcommand[]{\fill}
+\eqcommand[]{\flat}
+\eqcommand[]{\floatpagefraction}
+\eqcommand[]{\floatsep}
+\eqcommand[]{\flushbottom}
+\eqcommand[]{\fnsymbol}
+\eqcommand[]{\fontfamily}
+\eqcommand[]{\fontseries}
+\eqcommand[]{\fontshape}
+\eqcommand[]{\fontsize}
+\eqcommand[]{\LTRfootnote}
+\eqcommand[]{\footnote}
+\eqcommand[]{\footnotemark}
+\eqcommand[]{\footnoterule}
+\eqcommand[]{\footnotesep}
+\eqcommand[]{\footnotesize}
+\eqcommand[]{\footnotetext}
+\eqcommand[]{\footskip}
+\eqcommand[]{\forall}
+\eqcommand[]{\frac}
+\eqcommand[]{\frame}
+\eqcommand[]{\framebox}
+\eqcommand[]{\frenchspacing}
+\eqcommand[]{\frontmatter}
+\eqcommand[]{\frown}
+\eqcommand[]{\fussy}
+\eqcommand[]{\Gamma}
+\eqcommand[]{\gamma}
+\eqcommand[]{\gcd}
+\eqcommand[]{\ge}
+\eqcommand[]{\genfrac}
+\eqcommand[]{\geq}
+\eqcommand[]{\gets}
+\eqcommand[]{\gg}
+\eqcommand[]{\glossary}
+\eqcommand[]{\glossaryentry}
+\eqcommand[]{\graphpaper}
+\eqcommand[]{\grave}
+\eqcommand[]{\guillemotleft}
+\eqcommand[]{\guillemotright}
+\eqcommand[]{\guilsinglleft}
+\eqcommand[]{\guilsinglright}
+\eqcommand[]{\hat}
+\eqcommand[]{\hbar}
+\eqcommand[]{\headheight}
+\eqcommand[]{\headsep}
+\eqcommand[]{\headtoname}
+\eqcommand[]{\heartsuit}
+\eqcommand[]{\height}
+\eqcommand[]{\hfill}
+\eqcommand[]{\hline}
+\eqcommand[]{\hoffset}
+\eqcommand[]{\hom}
+\eqcommand[]{\hookleftarrow}
+\eqcommand[]{\hookrightarrow}
+\eqcommand[]{\hrulefill}
+\eqcommand[]{\hspace}
+\eqcommand[]{\hspace*}
+\eqcommand[]{\huge}
+\eqcommand[]{\Huge}
+\eqcommand[]{\hyperlink}
+\eqcommand[]{\hypersetup}
+\eqcommand[]{\hypertarget}
+\eqcommand[]{\hyphenation}
+\eqcommand[]{\idotsint}
+\eqcommand[]{\iff}
+\eqcommand[]{\IfFileExists}
+\eqcommand[]{\ifthenelse}
+\eqcommand[]{\Im}
+\eqcommand[]{\imath}
+\eqcommand[]{\in}
+\eqcommand[]{\include}
+\eqcommand[]{\includegraphics}
+\eqcommand[]{\includegraphics*}
+\eqcommand[]{\includeonly}
+\eqcommand[]{\indent}
+\eqcommand[]{\index}
+\eqcommand[]{\indexentry}
+\eqcommand[]{\indexname}
+\eqcommand[]{\indexspace}
+\eqcommand[]{\inf}
+\eqcommand[]{\infty}
+\eqcommand[]{\input}
+\eqcommand[]{\InputIfFileExists}
+\eqcommand[]{\int}
+\eqcommand[]{\iint}
+\eqcommand[]{\iiint}
+\eqcommand[]{\iiiint}
+\eqcommand[]{\intertext}
+\eqcommand[]{\intertextsep}
+\eqcommand[]{\invisible}
+\eqcommand[]{\iota}
+\eqcommand[]{\itdefault}
+\eqcommand[]{\item}
+\eqcommand[]{\itemindent}
+\eqcommand[]{\itemsep}
+\eqcommand[]{\itshape}
+\eqcommand[]{\jmath}
+\eqcommand[]{\join}
+\eqcommand[]{\jot}
+\eqcommand[]{\kappa}
+\eqcommand[]{\ker}
+\eqcommand[]{\kill}
+\eqcommand[]{\label}
+\eqcommand[]{\labelenumi}
+\eqcommand[]{\labelenumii}
+\eqcommand[]{\labelenumiii}
+\eqcommand[]{\labelenumiv}
+\eqcommand[]{\labelitemi}
+\eqcommand[]{\labelitemii}
+\eqcommand[]{\labelitemiii}
+\eqcommand[]{\labelitemiv}
+\eqcommand[]{\labelsep}
+\eqcommand[]{\labelwidth}
+\eqcommand[]{\Lambda}
+\eqcommand[]{\lambda}
+\eqcommand[]{\langle}
+\eqcommand[]{\language}
+\eqcommand[]{\large}
+\eqcommand[]{\Large}
+\eqcommand[]{\LARGE}
+\eqcommand[]{\LaTeX}
+\eqcommand[]{\LaTeXe}
+\eqcommand[]{\lceil}
+\eqcommand[]{\ldots}
+\eqcommand[]{\le}
+\eqcommand[]{\leadsto}
+\eqcommand[]{\left}
+\eqcommand[]{\Leftarrow}
+\eqcommand[]{\leftarrow}
+\eqcommand[]{\lefteqn}
+\eqcommand[]{\leftharpoondown}
+\eqcommand[]{\leftharpoonup}
+\eqcommand[]{\leftmargin}
+\eqcommand[]{\Leftrightarrow}
+\eqcommand[]{\leftrightarrow}
+\eqcommand[]{\leftroot}
+\eqcommand[]{\leq}
+\eqcommand[]{\lfloor}
+\eqcommand[]{\lg}
+\eqcommand[]{\lhd}
+\eqcommand[]{\lim}
+\eqcommand[]{\liminf}
+\eqcommand[]{\limits}
+\eqcommand[]{\limsup}
+\eqcommand[]{\line}
+\eqcommand[]{\linebreak}
+\eqcommand[]{\linethickness}
+\eqcommand[]{\linewidth}
+\eqcommand[]{\listfigurename}
+\eqcommand[]{\listfiles}
+\eqcommand[]{\listoffigures}
+\eqcommand[]{\listoftables}
+\eqcommand[]{\listparindent}
+\eqcommand[]{\listtablename}
+\eqcommand[]{\ll}
+\eqcommand[]{\ln}
+\eqcommand[]{\LoadClass}
+\eqcommand[]{\LoadClassWithOptions}
+\eqcommand[]{\location}
+\eqcommand[]{\log}
+\eqcommand[]{\Longleftarrow}
+\eqcommand[]{\longleftarrow}
+\eqcommand[]{\Longleftrightarrow}
+\eqcommand[]{\longleftrightarrow}
+\eqcommand[]{\longmapsto}
+\eqcommand[]{\Longrightarrow}
+\eqcommand[]{\longrightarrow}
+\eqcommand[]{\lvert}
+\eqcommand[]{\lVert}
+\eqcommand[]{\mainmatter}
+\eqcommand[]{\makebox}
+\eqcommand[]{\makeglossary}
+\eqcommand[]{\makeindex}
+\eqcommand[]{\makelabel}
+\eqcommand[]{\makelabels}
+\eqcommand[]{\MakeLowercase}
+\eqcommand[]{\MakeShortVerb}
+\eqcommand[]{\maketitle}
+\eqcommand[]{\MakeUppercase}
+\eqcommand[]{\mapsto}
+\eqcommand[]{\marginpar}
+\eqcommand[]{\marginparpush}
+\eqcommand[]{\marginparsep}
+\eqcommand[]{\marginparwidth}
+\eqcommand[]{\markboth}
+\eqcommand[]{\markright}
+\eqcommand[]{\mathbf}
+\eqcommand[]{\mathcal}
+\eqcommand[]{\mathindent}
+\eqcommand[]{\mathit}
+\eqcommand[]{\mathnormal}
+\eqcommand[]{\mathring}
+\eqcommand[]{\mathrm}
+\eqcommand[]{\mathsf}
+\eqcommand[]{\mathtt}
+\eqcommand[]{\max}
+\eqcommand[]{\mbox}
+\eqcommand[]{\mddefault}
+\eqcommand[]{\mdseries}
+\eqcommand[]{\medskip}
+\eqcommand[]{\medskipamount}
+\eqcommand[]{\medspace}
+\eqcommand[]{\MessageBreak}
+\eqcommand[]{\mho}
+\eqcommand[]{\mid}
+\eqcommand[]{\min}
+\eqcommand[]{\mod}
+\eqcommand[]{\models}
+\eqcommand[]{\mp}
+\eqcommand[]{\mspace}
+\eqcommand[]{\mu}
+\eqcommand[]{\multicolumn}
+\eqcommand[]{\multiput}
+\eqcommand[]{\multlinegap}
+\eqcommand[]{\nabla}
+\eqcommand[]{\name}
+\eqcommand[]{\natural}
+\eqcommand[]{\nearrow}
+\eqcommand[]{\NeedsTeXFormat}
+\eqcommand[]{\neg}
+\eqcommand[]{\negmedspace}
+\eqcommand[]{\negthickspace}
+\eqcommand[]{\negthinspace}
+\eqcommand[]{\neq}
+\eqcommand[]{\newboolean}
+\eqcommand[]{\newcommand}
+\eqcommand[]{\newcommand*}
+\eqcommand[]{\newcounter}
+\eqcommand[]{\newenvironment}
+\eqcommand[]{\newenvironment*}
+\eqcommand[]{\newfont}
+\eqcommand[]{\newlength}
+\eqcommand[]{\newline}
+\eqcommand[]{\newpage}
+\eqcommand[]{\newsavebox}
+\eqcommand[]{\newtheorem}
+\eqcommand[]{\ni}
+\eqcommand[]{\nocite}
+\eqcommand[]{\nofiles}
+\eqcommand[]{\noindent}
+\eqcommand[]{\nolimits}
+\eqcommand[]{\nolinebreak}
+\eqcommand[]{\nonfrenchspacing}
+\eqcommand[]{\nonumber}
+\eqcommand[]{\nopagebreak}
+\eqcommand[]{\normalcolor}
+\eqcommand[]{\normalfont}
+\eqcommand[]{\normalmarginpar}
+\eqcommand[]{\normalsize}
+\eqcommand[]{\not}
+\eqcommand[]{\notag}
+\eqcommand[]{\notin}
+\eqcommand[]{\nu}
+\eqcommand[]{\numberwithin}
+\eqcommand[]{\nwarrow}
+\eqcommand[]{\oddsidemargin}
+\eqcommand[]{\odot}
+\eqcommand[]{\oint}
+\eqcommand[]{\Omega}
+\eqcommand[]{\omega}
+\eqcommand[]{\ominus}
+\eqcommand[]{\onecolumn}
+\eqcommand[]{\onlynotes}
+\eqcommand[]{\onlyslides}
+\eqcommand[]{\opening}
+\eqcommand[]{\oplus}
+\eqcommand[]{\OptionNotUsed}
+\eqcommand[]{\oslash}
+\eqcommand[]{\otimes}
+\eqcommand[]{\oval}
+\eqcommand[]{\ovalbox}
+\eqcommand[]{\Ovalbox}
+\eqcommand[]{\overbrace}
+\eqcommand[]{\overleftarrow}
+\eqcommand[]{\overleftrightarrow}
+\eqcommand[]{\overline}
+\eqcommand[]{\overrightarrow}
+\eqcommand[]{\overset}
+\eqcommand[]{\PackageError}
+\eqcommand[]{\PackageInfo}
+\eqcommand[]{\PackageWarning}
+\eqcommand[]{\PackageWarningNoLine}
+\eqcommand[]{\pagebreak}
+\eqcommand[]{\pagecolor}
+\eqcommand[]{\pagename}
+\eqcommand[]{\pagenumbering}
+\eqcommand[]{\pageref}
+\eqcommand[]{\pagestyle}
+\eqcommand[]{\paperheight}
+\eqcommand[]{\paperwidth}
+\eqcommand[]{\par}
+\eqcommand[]{\paragraph}
+\eqcommand[]{\paragraph*}
+\eqcommand[]{\parallel}
+\eqcommand[]{\parbox}
+\eqcommand[]{\parindent}
+\eqcommand[]{\parsep}
+\eqcommand[]{\parskip}
+\eqcommand[]{\part}
+\eqcommand[]{\part*}
+\eqcommand[]{\partial}
+\eqcommand[]{\partname}
+\eqcommand[]{\partopsep}
+\eqcommand[]{\PassOptionToClass}
+\eqcommand[]{\PassOptionToPackage}
+\eqcommand[]{\path}
+\eqcommand[]{\prep}
+\eqcommand[]{\Phi}
+\eqcommand[]{\phi}
+\eqcommand[]{\Pi}
+\eqcommand[]{\pi}
+\eqcommand[]{\pm}
+\eqcommand[]{\pmb}
+\eqcommand[]{\pmod}
+\eqcommand[]{\pod}
+\eqcommand[]{\poptabs}
+\eqcommand[]{\pounds}
+\eqcommand[]{\Pr}
+\eqcommand[]{\prec}
+\eqcommand[]{\preceq}
+\eqcommand[]{\prime}
+\eqcommand[]{\printindex}
+\eqcommand[]{\ProcessOptions}
+\eqcommand[]{\ProcessOptions*}
+\eqcommand[]{\prod}
+\eqcommand[]{\propto}
+\eqcommand[]{\protect}
+\eqcommand[]{\providecommand}
+\eqcommand[]{\providecommand*}
+\eqcommand[]{\ProvidesClass}
+\eqcommand[]{\ProvidesFile}
+\eqcommand[]{\ProvidesPackage}
+\eqcommand[]{\ps}
+\eqcommand[]{\Psi}
+\eqcommand[]{\psi}
+\eqcommand[]{\pushtabs}
+\eqcommand[]{\put}
+\eqcommand[]{\qbezier}
+\eqcommand[]{\qquad}
+\eqcommand[]{\quad}
+\eqcommand[]{\raggedbottom}
+\eqcommand[]{\raggedleft}
+\eqcommand[]{\raggedright}
+\eqcommand[]{\raisebox}
+\eqcommand[]{\raisetag}
+\eqcommand[]{\rangle}
+\eqcommand[]{\rceil}
+\eqcommand[]{\Re}
+\eqcommand[]{\ref}
+\eqcommand[]{\reflectbox}
+\eqcommand[]{\refname}
+\eqcommand[]{\refstepcounter}
+\eqcommand[]{\renewcommand}
+\eqcommand[]{\renewcommand*}
+\eqcommand[]{\renewenvironment}
+\eqcommand[]{\renewenvironment*}
+\eqcommand[]{\RequirePackage}
+\eqcommand[]{\RequirePackageWithOptions}
+\eqcommand[]{\resizebox}
+\eqcommand[]{\resizebox*}
+\eqcommand[]{\reversemarginpar}
+\eqcommand[]{\rfloor}
+\eqcommand[]{\rhd}
+\eqcommand[]{\rho}
+\eqcommand[]{\right}
+\eqcommand[]{\Rightarrow}
+\eqcommand[]{\rightarrow}
+\eqcommand[]{\rightharpoondown}
+\eqcommand[]{\rightharpoonup}
+\eqcommand[]{\rightleftharpoons}
+\eqcommand[]{\rightmargin}
+\eqcommand[]{\rmdefault}
+\eqcommand[]{\rmfamily}
+\eqcommand[]{\Roman}
+\eqcommand[]{\roman}
+\eqcommand[]{\rotatebox}
+\eqcommand[]{\rule}
+\eqcommand[]{\rvert}
+\eqcommand[]{\rVert}
+\eqcommand[]{\savebox}
+\eqcommand[]{\sbox}
+\eqcommand[]{\scalebox}
+\eqcommand[]{\scdefault}
+\eqcommand[]{\scriptscriptstyle}
+\eqcommand[]{\scriptsize}
+\eqcommand[]{\scripstyle}
+\eqcommand[]{\scshape}
+\eqcommand[]{\searrow}
+\eqcommand[]{\sec}
+\eqcommand[]{\section}
+\eqcommand[]{\section*}
+\eqcommand[]{\see}
+\eqcommand[]{\seealso}
+\eqcommand[]{\seename}
+\eqcommand[]{\selectfont}
+\eqcommand[]{\setboolean}
+\eqcommand[]{\setcounter}
+\eqcommand[]{\setlength}
+\eqcommand[]{\setminus}
+\eqcommand[]{\settodepth}
+\eqcommand[]{\settoheight}
+\eqcommand[]{\settowidth}
+\eqcommand[]{\sfdefault}
+\eqcommand[]{\sffamily}
+\eqcommand[]{\shadowbox}
+\eqcommand[]{\sharp}
+\eqcommand[]{\shortstack}
+\eqcommand[]{\sideset}
+\eqcommand[]{\Sigma}
+\eqcommand[]{\sigma}
+\eqcommand[]{\signature}
+\eqcommand[]{\sim}
+\eqcommand[]{\simeq}
+\eqcommand[]{\sin}
+\eqcommand[]{\sinh}
+\eqcommand[]{\sldefault}
+\eqcommand[]{\sloppy}
+\eqcommand[]{\slshape}
+\eqcommand[]{\small}
+\eqcommand[]{\smallskip}
+\eqcommand[]{\smallskipamount}
+\eqcommand[]{\smash}
+\eqcommand[]{\smile}
+\eqcommand[]{\spadesuit}
+\eqcommand[]{\sqcap}
+\eqcommand[]{\sqcup}
+\eqcommand[]{\sqrt}
+\eqcommand[]{\sqsubset}
+\eqcommand[]{\sqsubseteq}
+\eqcommand[]{\sqsupset}
+\eqcommand[]{\sqsupseteq}
+\eqcommand[]{\stackrel}
+\eqcommand[]{\star}
+\eqcommand[]{\stepcounter}
+\eqcommand[]{\stretch}
+\eqcommand[]{\subitem}
+\eqcommand[]{\subparagraph}
+\eqcommand[]{\subparagraph*}
+\eqcommand[]{\subsection}
+\eqcommand[]{\subsection*}
+\eqcommand[]{\substack}
+\eqcommand[]{\subsubitem}
+\eqcommand[]{\subsubsection}
+\eqcommand[]{\subsubsection*}
+\eqcommand[]{\subset}
+\eqcommand[]{\subseteq}
+\eqcommand[]{\succ}
+\eqcommand[]{\succeq}
+\eqcommand[]{\sum}
+\eqcommand[]{\sup}
+\eqcommand[]{\supressfloats}
+\eqcommand[]{\supset}
+\eqcommand[]{\supseteq}
+\eqcommand[]{\surd}
+\eqcommand[]{\swarrow}
+\eqcommand[]{\tabbingsep}
+\eqcommand[]{\tabcolsep}
+\eqcommand[]{\tableofcontents}
+\eqcommand[]{\tablename}
+\eqcommand[]{\tabularnewline}
+\eqcommand[]{\tag}
+\eqcommand[]{\tan}
+\eqcommand[]{\tanh}
+\eqcommand[]{\tau}
+\eqcommand[]{\tbinom}
+\eqcommand[]{\telephone}
+\eqcommand[]{\TeX}
+\eqcommand[]{\text}
+\eqcommand[]{\textbullet}
+\eqcommand[]{\textemdash}
+\eqcommand[]{\textendash}
+\eqcommand[]{\textexclamdown}
+\eqcommand[]{\textperiodcentered}
+\eqcommand[]{\textquestiondown}
+\eqcommand[]{\textquotedblleft}
+\eqcommand[]{\textquotedblright}
+\eqcommand[]{\textquoteleft}
+\eqcommand[]{\textquoteright}
+\eqcommand[]{\textvisiblespace}
+\eqcommand[]{\textasciicircum}
+\eqcommand[]{\textasciitilde}
+\eqcommand[]{\textbackslash}
+\eqcommand[]{\textbar}
+\eqcommand[]{\textgreater}
+\eqcommand[]{\textless}
+\eqcommand[]{\textbf}
+\eqcommand[]{\textcircled}
+\eqcommand[]{\textcolor}
+\eqcommand[]{\textcompwordmark}
+\eqcommand[]{\textfloatsep}
+\eqcommand[]{\textfraction}
+\eqcommand[]{\textheight}
+\eqcommand[]{\textit}
+\eqcommand[]{\textmd}
+\eqcommand[]{\textnormal}
+\eqcommand[]{\textregistered}
+\eqcommand[]{\textrm}
+\eqcommand[]{\textsc}
+\eqcommand[]{\textsf}
+\eqcommand[]{\textsl}
+\eqcommand[]{\textstyle}
+\eqcommand[]{\textsuperscript}
+\eqcommand[]{\texttrademark}
+\eqcommand[]{\texttt}
+\eqcommand[]{\textup}
+\eqcommand[]{\textwidth}
+\eqcommand[]{\tfrac}
+\eqcommand[]{\thanks}
+\eqcommand[]{\Theta}
+\eqcommand[]{\theta}
+\eqcommand[]{\thicklines}
+\eqcommand[]{\thickspace}
+\eqcommand[]{\thinlines}
+\eqcommand[]{\thinspace}
+\eqcommand[]{\thisfancypage}
+\eqcommand[]{\thispagestyle}
+\eqcommand[]{\tilde}
+\eqcommand[]{\tiny}
+\eqcommand[]{\times}
+\eqcommand[]{\title}
+\eqcommand[]{\to}
+\eqcommand[]{\today}
+\eqcommand[]{\top}
+\eqcommand[]{\topfigrule}
+\eqcommand[]{\topfraction}
+\eqcommand[]{\topmargin}
+\eqcommand[]{\topsep}
+\eqcommand[]{\topskip}
+\eqcommand[]{\totalheight}
+\eqcommand[]{\triangle}
+\eqcommand[]{\triangleleft}
+\eqcommand[]{\triangleright}
+\eqcommand[]{\ttdefault}
+\eqcommand[]{\ttfamily}
+\eqcommand[]{\twocolumn}
+\eqcommand[]{\typein}
+\eqcommand[]{\typeout}
+\eqcommand[]{\unboldmath}
+\eqcommand[]{\underbrace}
+\eqcommand[]{\underleftarrow}
+\eqcommand[]{\underleftrightarrow}
+\eqcommand[]{\underline}
+\eqcommand[]{\underrightarrow}
+\eqcommand[]{\underset}
+\eqcommand[]{\unitlength}
+\eqcommand[]{\unlhd}
+\eqcommand[]{\unrhd}
+\eqcommand[]{\Uparrow}
+\eqcommand[]{\uparrow}
+\eqcommand[]{\updefault}
+\eqcommand[]{\Updownarrow}
+\eqcommand[]{\updownarrow}
+\eqcommand[]{\uplus}
+\eqcommand[]{\upshape}
+\eqcommand[]{\Upsilon}
+\eqcommand[]{\upsilon}
+\eqcommand[]{\uproot}
+\eqcommand[]{\url}
+\eqcommand[]{\urlstyle}
+\eqcommand[]{\usebox}
+\eqcommand[]{\usecounter}
+\eqcommand[]{\usefont}
+\eqcommand[]{\usepackage}
+\eqcommand[]{\value}
+\eqcommand[]{\varepsilon}
+\eqcommand[]{\varinjlim}
+\eqcommand[]{\varliminf}
+\eqcommand[]{\varlimsup}
+\eqcommand[]{\varphi}
+\eqcommand[]{\varpi}
+\eqcommand[]{\varprojlim}
+\eqcommand[]{\varrho}
+\eqcommand[]{\varsigma}
+\eqcommand[]{\vartheta}
+\eqcommand[]{\vdash}
+\eqcommand[]{\vdots}
+\eqcommand[]{\vec}
+\eqcommand[]{\vector}
+\eqcommand[]{\vee}
+\eqcommand[]{\verb}
+\eqcommand[]{\verb*}
+\eqcommand[]{\vfill}
+\eqcommand[]{\visible}
+\eqcommand[]{\vline}
+\eqcommand[]{\voffset}
+\eqcommand[]{\vpageref}
+\eqcommand[]{\vref}
+\eqcommand[]{\vspace}
+\eqcommand[]{\vspace*}
+\eqcommand[]{\wedge}
+\eqcommand[]{\whiledo}
+\eqcommand[]{\widehat}
+\eqcommand[]{\widetilde}
+\eqcommand[]{\width}
+\eqcommand[]{\wp}
+\eqcommand[]{\wr}
+\eqcommand[]{\Xi}
+\eqcommand[]{\xi}
+\eqcommand[]{\xleftarrow}
+\eqcommand[]{\xrightarrow}
+\eqcommand[]{\zeta}
+% \end{macrocode}
+% \iffalse
+%</commands-ltx.def>
+%<*commands-xepersian.def>
+% \fi
+% \part{commands-xepersian.def}
+% \begin{macrocode}
+
+% \end{macrocode}
+% \iffalse
+%</commands-xepersian.def>
+%<*enumerate-xepersian.def>
+% \fi
+% \part{enumerate-xepersian.def}
+% \begin{macrocode}
+\def\@enloop@{%
+ \ifx ا\@entemp \def\@tempa{\@enLabel\harfi }\else
+ \ifx ی\@entemp \def\@tempa{\@enLabel\adadi }\else
+ \ifx ت\@entemp \def\@tempa{\@enLabel\tartibi }\else
+ \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else
+ \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else
+ \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else
+ \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else
+ \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else
+ \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else
+ \ifx \bgroup\@entemp \let\@tempa\@enGroup \else
+ \ifx \@enum@\@entemp \let\@tempa\@gobble \else
+ \let\@tempa\@enOther
+ \@enhook
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \@tempa}
+% \end{macrocode}
+% \iffalse
+%</enumerate-xepersian.def>
+%<*minitoc-xepersian.def>
+% \fi
+% \part{minitoc-xepersian.def}
+% \begin{macrocode}
+\def\ptctitle{\if@RTL فهرست مطالب\else Table of Contents\fi}%
+\def\plftitle{\if@RTL لیست تصاویر\else List of Figures\fi}%
+\def\plttitle{\if@RTL لیست جداول\else List of Tables\fi}%
+\def\mtctitle{\if@RTL عناوین\else Contents\fi}%
+\def\mlftitle{\if@RTL اشکال\else Figures\fi}%
+\def\mlttitle{\if@RTL جداول\else Tables\fi}%
+\def\stctitle{\if@RTL عناوین\else Contents\fi}%
+\def\slftitle{\if@RTL اشکال\else Figures\fi}%
+\def\slttitle{\if@RTL جداول\else Tables\fi}%
+% \end{macrocode}
+% \iffalse
+%</minitoc-xepersian.def>
+%<*environments-ltx.def>
+% \fi
+% \part{environments-ltx.def}
+% \begin{macrocode}
+\eqenvironment[]{abstract}
+\eqenvironment[]{align}
+\eqenvironment[]{alignat}
+\eqenvironment[]{aligned}
+\eqenvironment[]{appendix}
+\eqenvironment[]{array}
+\eqenvironment[]{center}
+\eqenvironment[]{alltt}
+\eqenvironment[]{bmatrix}
+\eqenvironment[]{Bmatrix}
+\eqenvironment[]{cases}
+\eqenvironment[]{description}
+\eqenvironment[]{displaymath}
+\eqenvironment[]{enumerate}
+\eqenvironment[]{eqnarray}
+\eqenvironment[]{eqnarray*}
+\eqenvironment[]{equation}
+\eqenvironment[]{equation*}
+\eqenvironment[]{falign}
+\eqenvironment[]{figure}
+\eqenvironment[]{figure*}
+\eqenvironment[]{filecontents}
+\eqenvironment[]{filecontents*}
+\eqenvironment[]{flushleft}
+\eqenvironment[]{flushright}
+\eqenvironment[]{gather}
+\eqenvironment[]{gathered}
+\eqenvironment[]{itemize}
+\eqenvironment[]{letter}
+\eqenvironment[]{list}
+\eqenvironment[]{longtable}
+\eqenvironment[]{lrbox}
+\eqenvironment[]{math}
+\eqenvironment[]{matrix}
+\eqenvironment[]{minipage}
+\eqenvironment[]{multicols}
+\eqenvironment[]{multline}
+\eqenvironment[]{note}
+\eqenvironment[]{overlay}
+\eqenvironment[]{picture}
+\eqenvironment[]{pmatrix}
+\eqenvironment[]{quotation}
+\eqenvironment[]{quote}
+\eqenvironment[]{slide}
+\eqenvironment[]{sloppypar}
+\eqenvironment[]{split}
+\eqenvironment[]{subarray}
+\eqenvironment[]{subequations}
+\eqenvironment[]{tabbing}
+\eqenvironment[]{table}
+\eqenvironment[]{table*}
+\eqenvironment[]{tabular}
+\eqenvironment[]{tabular*}
+\eqenvironment[]{thebibliography}
+\eqenvironment[]{theindex}
+\eqenvironment[]{titlepage}
+\eqenvironment[]{trivlist}
+\eqenvironment[]{verbatim}
+\eqenvironment[]{verbatim*}
+\eqenvironment[]{verse}
+\eqenvironment[]{vmatrix}
+\eqenvironment[]{Vmatrix}
+% \end{macrocode}
+% \iffalse
+%</environments-ltx.def>
+%<*environments-xepersian.def>
+% \fi
+% \part{environments-xepersian.def}
+% \begin{macrocode}
+
+% \end{macrocode}
+% \iffalse
+%</environments-xepersian.def>
+%<*extbook-xepersian.def>
+% \fi
+% \part{extbook-xepersian.def}
+% \begin{macrocode}
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</extbook-xepersian.def>
+%<*kashida-xepersian.def>
+% \fi
+% \part{kashida-xepersian.def}
+% \begin{macrocode}
+\chardef\zwj="200D % zero-width joiner
+\chardef\ksh="0640 % kashida
+
+\chardef\D=10 % dual-joiner class
+\chardef\L=11 % lam
+\chardef\R=12 % right-joiner
+\chardef\A=13 % alef
+\chardef\V=256 % vowel or other combining mark (to be ignored)
+
+\def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
+ \leaders\hrule height\ht0 \hskip0pt plus 0.5em \zwj}
+
+\def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}%
+ \expandafter\dosetclass\charlist,\end}
+\def\dosetclass#1,#2\end{%
+ \def\test{#1}\def\charlist{#2}%
+ \ifx\test\empty\let\next\finishsetclass
+ \else \XeTeXcharclass "\test = \theclass
+ \let\next\dosetclass \fi
+ \expandafter\next\charlist,,\end}
+\def\finishsetclass#1,,\end{}
+
+\setclass \A {0622,0623,0625,0627}
+\setclass \R {0624,0629,062F,0630,0631,0632,0648,0698}
+\setclass \D {0626,0628,062A,062B,062C,062D,062E}
+\setclass \D {0633,0634,0635,0636,0637,0638,0639,063A}
+\setclass \D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
+\setclass \D {067E,0686,06A9,06AF,06CC}
+\setclass \L {0644}
+\setclass \V {064B,064C,064D,064E,064F,0650,0651,0652}
+
+\XeTeXinterchartoks \D \D = {\kashida}
+\XeTeXinterchartoks \L \D = {\kashida}
+\XeTeXinterchartoks \D \L = {\kashida}
+\XeTeXinterchartoks \L \L = {\kashida}
+\XeTeXinterchartoks \D \R = {\kashida}
+\XeTeXinterchartoks \D \A = {\kashida}
+\XeTeXinterchartoks \L \R = {\kashida}
+\XeTeXinterchartoks \L \A = {}
+
+\XeTeXinterchartokenstate=1
+% \end{macrocode}
+% \iffalse
+%</kashida-xepersian.def>
+%<*listings-xepersian.def>
+% \fi
+% \part{listings-xepersian.def}
+% \begin{macrocode}
+\def\lstlistingname{برنامهٔ}
+\def\lstlistlistingname{فهرست برنامه‌ها}
+% \end{macrocode}
+% \iffalse
+%</listings-xepersian.def>
+%<*bidimemoir-xepersian.def>
+% \fi
+% \part{bidimemoir-xepersian.def}
+% \begin{macrocode}
+\renewcommand{\@memfront}{%
+ \@smemfront\pagenumbering{harfi}}
+\renewcommand{\setthesection}{\thechapter\@SepMark\harfi{section}}
+\renewcommand*{\thebook}{\@tartibi\c@book}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand{\appendix}{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \anappendixtrue}
+% \end{macrocode}
+% \iffalse
+%</bidimemoir-xepersian.def>
+%<*misccommandsenvironments-ltx.def>
+% \fi
+% \part{misccommandsenvironments-ltx.def}
+% \begin{macrocode}
+\eqcommand[\سند]{\document}
+\eqcommand[\endسند]{\enddocument}
+% \end{macrocode}
+% \iffalse
+%</misccommandsenvironments-ltx.def>
+%<*refrep-xepersian.def>
+% \fi
+% \part{refrep-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</refrep-xepersian.def>
+%<*report-xepersian.def>
+% \fi
+% \part{report-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering Persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</report-xepersian.def>
+%<*rapport3-xepersian.def>
+% \fi
+% \part{rapport3-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\thepart{\@tartibi\c@part}
+\renewcommand*\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}}
+% \end{macrocode}
+% \iffalse
+%</rapport3-xepersian.def>
+%<*scrartcl-xepersian.def>
+% \fi
+% \part{scrartcl-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+% \end{macrocode}
+% \iffalse
+%</scrartcl-xepersian.def>
+%<*scrbook-xepersian.def>
+% \fi
+% \part{scrbook-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*\frontmatter{%
+ \if@twoside\cleardoubleoddpage\else\clearpage\fi
+ \@mainmatterfalse\pagenumbering{harfi}%
+}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+% \end{macrocode}
+% \iffalse
+%</scrbook-xepersian.def>
+%<*scrreprt-xepersian.def>
+% \fi
+% \part{scrreprt-xepersian.def}
+% \begin{macrocode}
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+% \end{macrocode}
+% \iffalse
+%</scrreprt-xepersian.def>
+%<*tocloft-xepersian.def>
+% \fi
+% \part{tocloft-xepersian.def}
+% \begin{macrocode}
+\renewcommand*{\cftchapname}{\if@RTL فصل\else chapter\fi}
+\renewcommand*{\cftsecname}{\if@RTL قسمت\else section\fi}
+\renewcommand*{\cftsubsecname}{\if@RTL زیرقسمت\else subsection\fi}
+\renewcommand*{\cftsubsubsecname}{\if@RTL زیرزیرقسمت\else subsubsection\fi}
+\renewcommand*{\cftparaname}{\if@RTL پاراگراف\else paragraph\fi}
+\renewcommand*{\cftsubparaname}{\if@RTL زیرپاراگراف\else subparagraph\fi}
+\renewcommand*{\cftfigname}{\if@RTL شکل\else figure\fi}
+\renewcommand*{\cftsubfigname}{\if@RTL زیرشکل\else subfigure\fi}
+\renewcommand*{\cfttabname}{\if@RTL جدول\else table\fi}
+\renewcommand*{\cftsubtabname}{\if@RTL زیرجدول\else subtable\fi}
+% \end{macrocode}
+% \iffalse
+%</tocloft-xepersian.def>
+%<*xepersian-magazine.cls>
+% \fi
+% \part{xepersian-magazine.cls}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{xepersian-magazine}[2009/01/05 v0.1 Typesetting Persian magazines in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{ifthen}
+\newlength{\xepersian@imgsize}
+\newlength{\xepersian@coltitsize}
+\newlength{\xepersian@pageneed}
+\newlength{\xepersian@pageleft}
+\newlength{\xepersian@indexwidth}
+\newcommand{\xepersian@ncolumns}{0}
+\newlength{\columnlines}
+\setlength{\columnlines}{0 pt} % no lines by default
+\newboolean{xepersian@hyphenatedtitles}
+\setboolean{xepersian@hyphenatedtitles}{true}
+\newboolean{xepersian@ninepoints}
+\setboolean{xepersian@ninepoints}{false}
+\newboolean{xepersian@showgrid}
+\setboolean{xepersian@showgrid}{false}
+\newboolean{xepersian@a3paper}
+\setboolean{xepersian@a3paper}{false}
+\newboolean{xepersian@insidefrontpage}
+\setboolean{xepersian@insidefrontpage}{false}
+\newboolean{xepersian@insideweather}
+\setboolean{xepersian@insideweather}{false}
+\newboolean{xepersian@insideindex}
+\setboolean{xepersian@insideindex}{false}
+\newcount\xepersian@gridrows
+\newcount\xepersian@gridcolumns
+\xepersian@gridrows=40
+\xepersian@gridcolumns=50
+\newcount\minraggedcols
+\minraggedcols=5
+\DeclareOption{10pt}{\PassOptionsToClass{10pt}{article}}
+\DeclareOption{11pt}{\PassOptionsToClass{11pt}{article}}
+\DeclareOption{12pt}{\PassOptionsToClass{12pt}{article}}
+\DeclareOption{twocolumn}%
+{\ClassWarning{xepersian-magazine}{Option 'twocolumn' not available for xepersian-magazine.}}
+\DeclareOption{notitlepage}%
+{\ClassWarning{xepersian-magazine}{Option 'notitlepage' not available for xepersian-magazine.}}
+\DeclareOption{twoside}%
+{\ClassWarning{xepersian-magazine}{Option 'twoside' not available for xepersian-magazine.}}
+\DeclareOption{9pt}{\setboolean{xepersian@ninepoints}{true}}
+\DeclareOption{hyphenatedtitles}{\setboolean{xepersian@hyphenatedtitles}{false}}
+\DeclareOption{columnlines}{\setlength{\columnlines}{0.1 pt}}
+\DeclareOption{showgrid}{\setboolean{xepersian@showgrid}{true}}
+\DeclareOption{a3paper}{\setboolean{xepersian@a3paper}{true}}
+\ProcessOptions\relax
+\LoadClass[10pt, onecolumn, titlepage, a4paper]{article}
+\RequirePackage{ifxetex}
+\RequirePackage{multido}
+\RequirePackage{datetime}
+\RequirePackage{fmultico}
+\RequirePackage{fancyhdr}
+\RequirePackage{fancybox}
+\ifthenelse{\boolean{xepersian@a3paper}}{%
+\RequirePackage[a3paper,headsep=0.5cm,vmargin={2cm,2cm},hmargin={1.5cm,1.5cm}]{geometry}
+}{
+\RequirePackage[headsep=0.5cm,vmargin={2cm,2cm},hmargin={1.5cm,1.5cm}]{geometry}
+}
+\RequirePackage[absolute]{textpos} % absoulte positioning
+\RequirePackage{hyphenat} % when hyphenate
+\RequirePackage{lastpage} % to know the last page number
+\RequirePackage{setspace} % set space between lines
+\RequirePackage{ragged2e}
+\newcommand{\raggedFormat}{\RaggedLeft}
+\AtEndOfClass{\xepersianInit}
+\ifthenelse{\boolean{xepersian@showgrid}}{%
+\AtBeginDocument{
+\grid[show]{\xepersian@gridrows}{\xepersian@gridcolumns}}
+\advance\minraggedcols by -1
+}{%
+\AtBeginDocument{
+\grid[]{\xepersian@gridrows}{\xepersian@gridcolumns}}
+\advance\minraggedcols by -1
+}
+\ifthenelse{\boolean{xepersian@ninepoints}}{
+\renewcommand{\normalsize}{%
+ \@setfontsize{\normalsize}{9pt}{10pt}%
+ \setlength{\abovedisplayskip}{5pt plus 1pt minus .5pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{3pt plus 1pt minus 2pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\tiny}{\@setfontsize{\tiny}{5pt}{6pt}}
+
+\renewcommand{\scriptsize}{\@setfontsize{\scriptsize}{7pt}{8pt}}
+
+\renewcommand{\small}{%
+ \@setfontsize{\small}{8pt}{9pt}%
+ \setlength{\abovedisplayskip}{4pt plus 1pt minus 1pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\footnotesize}{%
+ \@setfontsize{\footnotesize}{8pt}{9pt}%
+ \setlength{\abovedisplayskip}{4pt plus 1pt minus .5pt}%
+ \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
+ \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
+
+\renewcommand{\large}{\@setfontsize{\large}{11pt}{13pt}}
+\renewcommand{\Large}{\@setfontsize{\Large}{14pt}{18pt}}
+\renewcommand{\LARGE}{\@setfontsize{\LARGE}{18pt}{20pt}}
+\renewcommand{\huge}{\@setfontsize{\huge}{20pt}{25pt}}
+\renewcommand{\Huge}{\@setfontsize{\Huge}{25pt}{30pt}}
+}{}
+\def\customwwwTxt#1{\gdef\@customwwwTxt{\lr{#1}}}
+\newcommand{\xepersian@wwwFormat}{\sffamily}
+\newcommand{\xepersian@www}{%
+\raisebox{-3pt}{{\xepersian@wwwFormat\@customwwwTxt}}
+}
+\newcommand{\xepersian@edition}{ویرایش من}
+\newcommand{\editionFormat}{\large\bfseries\texttt}
+\newcommand{\xepersian@editionLogo}{%
+\raisebox{-3pt}{%
+{\editionFormat\xepersian@edition}%
+}%
+}
+\newcommand{\indexFormat}{\large\bfseries}
+\newcommand{\xepersian@indexFrameTitle}[1]
+{\begin{flushright}{{\indexFormat #1}}\end{flushright}}
+
+\newcommand{\indexEntryFormat}{\normalsize}
+\newcommand{\xepersian@indexEntry}[1]{\begin{minipage}{13\TPHorizModule}%
+{\indexEntryFormat\noindent\ignorespaces{#1}}%
+\end{minipage}}
+\newcommand{\indexEntrySeparator}{\rule{\xepersian@indexwidth}{.1pt}}
+\newcommand{\indexEntryPageTxt}{صفحهٔ}
+\newcommand{\indexEntryPageFormat}{\footnotesize}
+\newcommand{\xepersian@indexEntryPage}[1]{%
+{\indexEntryPageFormat{\indexEntryPageTxt{}~#1}}%
+}
+\newcommand{\headDateTimeFormat}{}
+\newcommand{\xepersian@headDateTime}{%
+\headDateTimeFormat\date\hspace{5pt}$\parallel$\hspace{5pt}%
+\currenttime %
+}
+\newcommand{\weatherFormat}{\bfseries}
+\newcommand{\xepersian@weather}[1]{%
+\noindent{\weatherFormat #1}%
+}
+\newcommand{\weatherTempFormat}{\small}
+\newcommand{\weatherUnits}{\textdegree{}C}
+\newcommand{\xepersian@section}[0]{صفحهٔ جلو}
+\newcommand{\xepersian@headleft}{%
+{\small\bfseries \@custommagazinename}، \date
+}
+\newcommand{\xepersian@headcenter}{%
+\xepersian@section{}
+}
+\newcommand{\xepersian@headright}{%
+\small\xepersian@edition%
+\hspace*{5pt}\beginL\thepage\ / \pageref{LastPage}\endL
+}
+
+\newcommand{\heading}[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}}%
+}
+\newcommand{\xepersian@footcenter}{%
+}
+\newcommand{\xepersian@footleft}{%
+}
+
+\newcommand{\foot}[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]{%
+{%
+\begin{spacing}{2.0}{%
+\noindent\ignorespaces
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\firstTitleFormat #1}}%
+{{\firstTitleFormat #1}}%
+}%
+\end{spacing}%
+}%
+}
+\newcommand{\firstTextFormat}{}
+\newcommand{\xepersian@firstText}[1]{%
+{\noindent\ignorespaces\firstTextFormat #1}%
+}
+\newcommand{\secondTitleFormat}{\LARGE\bfseries}
+\newcommand{\xepersian@secondTitle}[1]{%
+\begin{spacing}{1.5}{%
+\noindent\ignorespaces\flushright
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\secondTitleFormat #1}}%
+{{\secondTitleFormat #1}}%
+}\end{spacing}%
+}
+\newcommand{\secondSubtitleFormat}{\large}
+\newcommand{\xepersian@secondSubtitle}[1]{%
+{\noindent\ignorespaces{\secondSubtitleFormat #1}}%
+}
+\newcommand{\secondTextFormat}{}
+\newcommand{\xepersian@secondText}[1]{%
+\begin{multicols}{2}
+{\noindent\ignorespaces\secondTextFormat #1}
+\end{multicols}
+}
+\newcommand{\thirdTitleFormat}{\Large\bfseries}
+\newcommand{\xepersian@thirdTitle}[1]{%
+\begin{spacing}{1.5}{%
+\noindent\ignorespaces\flushright
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\thirdTitleFormat #1}}%
+{{\thirdTitleFormat #1}}%
+}\end{spacing}%
+}
+\newcommand{\thirdSubtitleFormat}{\large}
+\newcommand{\xepersian@thirdSubtitle}[1]%
+{{\noindent\ignorespaces\thirdSubtitleFormat #1}}
+\newcommand{\thirdTextFormat}{}
+\newcommand{\xepersian@thirdText}[1]{{\thirdTextFormat #1}}
+\newcommand{\pictureCaptionFormat}{\small\bfseries}
+\newcommand{\xepersian@pictureCaption}[1]{%
+{\noindent\pictureCaptionFormat #1}%
+}
+\newcommand{\pagesFormat}{\bfseries\footnotesize}
+\newcommand{\xepersian@pages}[1]%
+{\noindent{\pagesFormat\MakeUppercase{#1}}}
+\newcommand{\innerTitleFormat}{\Huge}
+\newcommand{\xepersian@innerTitle}[1]{%
+\begin{flushright}{%
+\noindent
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}%
+{\nohyphens{\innerTitleFormat #1}}%
+{{\innerTitleFormat #1}}%
+}%
+\\%
+\end{flushright}%
+}
+\newcommand{\innerSubtitleFormat}{\large}
+\newcommand{\xepersian@innerSubtitle}[1]{{\innerSubtitleFormat #1}}
+\newcommand{\timestampTxt}{}
+\newcommand{\timestampSeparator}{|}
+\newcommand{\timestampFormat}{\small}
+\newcommand{\timestamp}[1]{%
+{\timestampFormat%
+#1~\timestampTxt{}%
+}~\timestampSeparator{}%
+}
+\newcommand{\innerAuthorFormat}{\footnotesize}
+\newcommand{\innerPlaceFormat}{\footnotesize\bfseries}
+\newcommand{\innerTextFinalMark}{\rule{0.65em}{0.65em}}
+\newcommand{\editorialTitleFormat}{\LARGE\textit}
+\newcommand{\xepersian@editorialTitle}[1]{\editorialTitleFormat{#1}}
+\newcommand{\editorialAuthorFormat}{\textsc}
+\newcommand{\shortarticleTitleFormat}{\LARGE\bfseries}
+\newcommand{\xepersian@shortarticleTitle}[1]{{\shortarticleTitleFormat #1}}
+\newcommand{\shortarticleSubtitleFormat}{\Large}
+\newcommand{\xepersian@shortarticleSubtitle}[1]{{\shortarticleSubtitleFormat #1}}
+\newcommand{\shortarticleItemTitleFormat}{\large\bfseries}
+\newcommand{\xepersian@shortarticleItemTitle}[1]{{\shortarticleItemTitleFormat #1}}
+\renewcommand{\maketitle}{\begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \null\vfil
+ \vskip 60\p@
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 1em%
+ {\LARGE «\xepersian@edition» \par}%
+ \vskip 3em%
+ {\large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1.5em%
+ {\large \@date \par}%
+ \end{center}\par
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+}
+\newcommand{\xepersian@say}[1]{\typeout{#1}}
+\newsavebox{\xepersian@fmbox}
+\newenvironment{xepersian@fmpage}[1]
+ {\begin{lrbox}{\xepersian@fmbox}\begin{minipage}{#1}}
+ {\end{minipage}\end{lrbox}\fbox{\usebox{\xepersian@fmbox}}}
+\newcommand{\image}[2]{
+\vspace{5pt}
+\setlength{\fboxsep}{1pt}
+\addtolength{\xepersian@imgsize}{\columnwidth}
+\addtolength{\xepersian@imgsize}{-1\columnsep}
+\ifxetex
+\setlength{\xepersian@pageneed}{1.5\xepersian@imgsize}
+\addtolength{\xepersian@pageneed}{50pt}
+\ClassWarning{xepersian-magazine}{%
+Image #1 needs: \the\xepersian@pageneed \space %
+and there is left: \the\page@free\space%
+}
+\ifdim \xepersian@pageneed < \page@free
+
+{\centering\fbox{%
+\includegraphics[width = \xepersian@imgsize,
+height = \xepersian@imgsize,
+keepaspectratio ]{#1}}}
+\xepersian@pictureCaption{#2}
+
+\vspace{5pt}
+\else
+\ClassWarning{Image #1 needs more space!%
+ It was not inserted!}
+\fi
+\fi
+}
+\textblockorigin{1cm}{1cm}
+\newdimen\xepersian@dx
+\newdimen\xepersian@dy
+\newcount\xepersian@cx
+\newcount\xepersian@cy
+\newcommand{\grid}[3][]{
+\xepersian@dx=\textwidth%
+\xepersian@dy=\textheight%
+\xepersian@cx=#3% %columns
+\xepersian@cy=#2% %rows
+
+\count1=#3%
+\advance\count1 by 1
+
+\count2=#2%
+\advance\count2 by 1
+
+\divide\xepersian@dx by #3
+\divide\xepersian@dy by #2
+
+\setlength{\TPHorizModule}{\xepersian@dx}
+\setlength{\TPVertModule}{\xepersian@dy}
+
+\ifthenelse{\equal{#1}{show}}{
+\multido{\xepersian@nrow=0+1}{\count2}{
+\begin{textblock}{\xepersian@cx}(0,\xepersian@nrow)
+\rule[0pt]{\textwidth}{.1pt}
+\end{textblock}
+}
+
+\multido{\xepersian@ncol=0+1}{\count1}{
+\begin{textblock}{\xepersian@cy}(\xepersian@ncol,0)
+\rule[0pt]{.1pt}{\textheight}
+\end{textblock}
+}
+}{}
+}
+\newcommand{\xepersianInit}{
+\setlength{\headheight}{14pt}
+\renewcommand{\headrulewidth}{0.4pt}
+
+\pagestyle{fancy}
+
+\setlength{\columnseprule}{\columnlines}
+\setlength{\fboxrule}{0.1 pt}
+
+}
+
+\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
+
+\vspace*{-3pt}
+
+{\Large\bfseries \@customlogo}
+\hrulefill
+\hspace{10pt}\xepersian@headDateTime
+
+}
+\newcommand{\minilogo}[0]{
+{\large\bfseries \@customminilogo}
+
+\vspace*{5pt}
+}
+\newcommand{\mylogo}[1]{
+{\beginR#1\endR}
+
+\noindent
+\xepersian@editionLogo\hspace{5pt}
+\hrulefill
+\hspace{5pt}\xepersian@headDateTime
+}
+\newcommand{\edition}[1]{\renewcommand{\xepersian@edition}{#1}}
+\newenvironment{frontpage}[0]
+{
+\setboolean{xepersian@insidefrontpage}{true}
+\thispagestyle{empty}
+%\pdfbookmark[1]{صفحهٔ اول}{\thepage}
+\logo
+
+}%
+{
+\thispagestyle{empty}
+\clearpage
+\newpage
+\fancyhead{}
+ \fancyfoot{}
+\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}
+
+}
+\newcommand{\firstarticle}[3]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\ifthenelse{\boolean{xepersian@hyphenatedtitles}}{%
+\begin{textblock}{24}(22,5)
+}
+{
+\begin{textblock}{28}(22,5)
+}
+\vspace{-7pt}
+\xepersian@firstTitle{#1}
+\end{textblock}
+\begin{textblock}{29}(22,10)
+\vspace{5pt plus 2pt minus 2pt}
+
+\xepersian@firstText{\timestamp{#3}~#2}
+
+\end{textblock}
+
+\begin{textblock}{50}(0,15)
+\rule{50\TPHorizModule}{.3pt}
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\firstarticle\space in a wrong place.\MessageBreak
+\protect\firstarticle\space may only appear inside frontpage environment.
+}{%
+\protect\firstarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\secondarticle}[5]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{33}(2,16)
+\xepersian@pages{#4}
+\vspace{-5pt}
+\xepersian@secondTitle{#1}
+
+\vspace*{5pt}
+
+\xepersian@secondSubtitle{#2}
+
+\vspace*{-7pt}
+
+\xepersian@secondText{\timestamp{#5}~#3}
+
+\end{textblock}
+
+\begin{textblock}{33}(2,25)
+\vspace{5pt plus 2pt minus 2pt}
+
+\noindent\ignorespaces\rule{33\TPHorizModule}{.3pt}
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\secondarticle\space in a wrong place.\MessageBreak
+\protect\secondarticle\space may only appear inside frontpage environment.
+}{%
+\protect\secondarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\thirdarticle}[6]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{32}(2,26)
+\xepersian@pages{#5}
+\vspace{-5pt}
+\setlength{\fboxsep}{1pt}
+\xepersian@thirdTitle{#1}
+
+\vspace*{5pt}
+
+\xepersian@thirdSubtitle{#2}
+
+\vspace*{5pt}
+
+{\noindent\ignorespaces %
+\ifthenelse{\equal{#4}{}}{}
+
+\xepersian@thirdText{\timestamp{#6}~#3}
+
+}
+
+\vspace*{5pt}
+
+\end{textblock}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\thirdarticle\space in a wrong place.\MessageBreak
+\protect\thirdarticle\space may only appear inside frontpage environment.
+}{%
+\protect\thirdarticle\space may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\firstimage}[2]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{18}(2,5)
+\setlength{\fboxsep}{1pt}
+\ifxetex % only in PDF
+\noindent\fbox{\includegraphics[width = 18\TPHorizModule ]{#1}}
+\fi
+
+\xepersian@pictureCaption{#2}
+\end{textblock}%
+}
+{\ClassError{xepersian-magazine}{%
+\protect\firstimage\space in a wrong place.\MessageBreak
+\protect\firstimage\space may only appear inside frontpage environment.
+}{%
+\protect\firstimage\space may only appear inside frontpage environment.
+}}
+}%
+\newcommand{\weatheritem}[5]{%
+\ifthenelse{\boolean{xepersian@insideweather}}{
+\begin{minipage}{45pt}
+\ifxetex
+\includegraphics[width=40pt]{#1}
+\fi
+\end{minipage}
+\begin{minipage}{50pt}
+\weatherTempFormat
+#2\\
+\beginL#3 $\|$ #4 \lr{\weatherUnits{}}\endL\\
+#5
+\end{minipage}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\weatheritem\space in a wrong place.\MessageBreak
+\protect\weatheritem\space may only appear inside weatherblock environment.
+}{%
+\protect\weatheritem\space may only appear inside weatherblock environment.\MessageBreak
+weatherblock environment may only appear inside frontpage environment.
+}%
+}
+}
+\newenvironment{weatherblock}[1]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\setboolean{xepersian@insideweather}{true}
+\begin{textblock}{32}(2,38)
+\vspace*{-15pt}
+
+\xepersian@weather{\beginR#1\endR}
+
+\vspace*{5pt}
+
+\noindent\begin{xepersian@fmpage}{32\TPHorizModule}
+\begin{minipage}{32\TPHorizModule}
+\hspace{5pt}
+
+}{%
+\ClassError{xepersian-magazine}{%
+weatherblock in a wrong place.\MessageBreak
+weatherblock may only appear inside frontpage environment.
+}{%
+weatherblock may only appear inside frontpage environment.
+}
+}
+}%
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+\setboolean{xepersian@insideweather}{false}
+}
+\newenvironment{authorblock}[0]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\begin{textblock}{15}(36,35)
+\setlength{\fboxsep}{5pt}
+\begin{xepersian@fmpage}{13\TPHorizModule}
+\begin{minipage}{13\TPHorizModule}
+\centering
+\minilogo
+
+}{%else
+\ClassError{xepersian-magazine}{%
+authorblock in a wrong place.\MessageBreak
+authorblock may only appear inside frontpage environment.
+}{%
+authorblock may only appear inside frontpage environment.
+}
+}
+}
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+}
+\newenvironment{indexblock}[1]
+{
+\ifthenelse{\boolean{xepersian@insidefrontpage}}{%
+\setboolean{xepersian@insideindex}{true}%let's in
+\begin{textblock}{15}(36,16)
+\setlength{\xepersian@indexwidth}{13\TPHorizModule}
+\xepersian@indexFrameTitle{#1}
+
+\setlength{\fboxsep}{5pt} %espacio entre el frame y la imagen
+\begin{xepersian@fmpage}{\xepersian@indexwidth}
+\begin{minipage}{\xepersian@indexwidth}
+\vspace*{10pt}
+}{%else
+\ClassError{xepersian-magazine}{%
+indexblock in a wrong place.\MessageBreak
+indexblock may only appear inside frontpage environment.
+}{%
+indexblock may only appear inside frontpage environment.
+}
+}
+}%
+{
+\end{minipage}
+\end{xepersian@fmpage}
+\end{textblock}
+\setboolean{xepersian@insideindex}{false}%let's out
+}
+\newcommand{\indexitem}[2]
+{
+\ifthenelse{\boolean{xepersian@insideindex}}{
+\xepersian@indexEntry{#1، \xepersian@indexEntryPage{\pageref{#2}}}
+
+\vspace{0.5cm}
+
+\noindent\ignorespaces\indexEntrySeparator{}
+}{%else
+\ClassError{xepersian-magazine}{%
+\protect\indexitem\space in a wrong place.\MessageBreak
+\protect\indexitem\space may only appear inside indexblock environment.
+}{%
+\protect\indexitem\space may only appear inside indexblock environment.\MessageBreak
+indexblock environment may only appear inside frontpage environment.
+}%
+}
+}
+\newcommand{\xepersian@inexpandedtitle}[1]{
+\begin{minipage}{.95\textwidth}
+\begin{center}
+\noindent\Large\textbf{\beginR#1\endR}
+\end{center}
+\end{minipage}
+}
+\newcommand{\expandedtitle}[2]{
+\end{multicols}
+
+\begin{center}
+\setlength{\fboxsep}{5pt}
+\setlength{\shadowsize}{2pt}
+\ifthenelse{\equal{#1}{shadowbox}}{%
+\shadowbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{doublebox}}{%
+\doublebox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{ovalbox}}{%
+\ovalbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{Ovalbox}}{%
+\Ovalbox{%
+\xepersian@inexpandedtitle{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{lines}}{
+\hrule
+\vspace*{8pt}
+\begin{center}
+\noindent\Large\textbf{#2}
+\end{center}
+\vspace*{8pt}
+\hrule
+}{}
+\end{center}
+
+\begin{multicols}{\xepersian@ncolumns{}}
+\ifnum \xepersian@ncolumns > \minraggedcols
+\raggedFormat
+\fi
+}
+\newcommand{\xepersian@incolumntitle}[2]{
+\begin{minipage}{#1}
+\begin{center}
+\noindent\normalsize\textbf{#2}
+\end{center}
+\end{minipage}
+}
+
+\newcommand{\columntitle}[2]{
+\vspace*{5pt}
+\begin{center}
+\setlength{\fboxsep}{5pt}
+\setlength{\shadowsize}{2pt}
+\addtolength{\xepersian@coltitsize}{\columnwidth}
+\addtolength{\xepersian@coltitsize}{-1\columnsep}
+\addtolength{\xepersian@coltitsize}{-5pt}
+\addtolength{\xepersian@coltitsize}{-1\shadowsize}
+\ifthenelse{\equal{#1}{shadowbox}}{%
+\shadowbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{doublebox}}{%
+\doublebox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{ovalbox}}{%
+\ovalbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{Ovalbox}}{%
+\Ovalbox{%
+\xepersian@incolumntitle{\xepersian@coltitsize}{#2}%
+}%
+}{}
+\ifthenelse{\equal{#1}{lines}}{
+\hrule
+\vspace*{5pt}
+\begin{center}
+\noindent\normalsize\textbf{#2}
+\end{center}
+\vspace*{5pt}
+\hrule
+}{}
+\end{center}
+}
+\renewcommand{\date}{%
+\longdate{\today}%
+}
+\newcommand{\authorandplace}[2]{%
+\rightline{%
+{\innerAuthorFormat #1},\space{}{\innerPlaceFormat #2}%
+}%
+\par %
+}
+\newcommand{\newsection}[1]{
+%\pdfbookmark[0]{#1}{\thepage} %bookmark para el pdf
+\renewcommand{\xepersian@section}{#1}
+}
+\newenvironment{article}[5]
+{
+\xepersian@say{Adding a new piece of article}
+\renewcommand{\xepersian@ncolumns}{#1}
+\begin{multicols}{#1}[
+\xepersian@pages{#4}
+\xepersian@innerTitle{#2}%
+\xepersian@innerSubtitle{#3}%
+][4cm]%
+\label{#5}
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{~\innerTextFinalMark{}
+\end{multicols}
+}
+\newcommand{\articlesep}{%
+\setlength{\xepersian@pageneed}{16000pt}
+\setlength\xepersian@pageleft{\pagegoal}
+\addtolength\xepersian@pageleft{-\pagetotal}
+
+\xepersian@say{How much left \the\xepersian@pageleft}
+
+\ifdim \xepersian@pageneed < \xepersian@pageleft
+\xepersian@say{Not enough space}
+\else
+\xepersian@say{Adding sep line between articles}
+\vspace*{10pt plus 10pt minus 5pt}
+\hrule
+\vspace*{10pt plus 5pt minus 5pt}
+\fi
+
+}
+\newcommand{\xepersian@editorialTit}[2]{
+\setlength{\arrayrulewidth}{.1pt}
+\begin{center}
+\begin{tabular}{c}
+\noindent
+\xepersian@editorialTitle{#1}
+\vspace{2pt plus 1pt minus 1pt}
+\\
+\hline
+\vspace{2pt plus 1pt minus 1pt}
+\\
+\editorialAuthorFormat{#2}
+\end{tabular}
+\end{center}
+}
+\newenvironment{editorial}[4]
+{
+\xepersian@say{Adding a new editorial}
+\begin{multicols}{#1}[%
+\xepersian@editorialTit{#2}{#3}%
+][4cm]
+\label{#4}
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{
+\end{multicols}
+}
+\newcommand{\xepersian@shortarticleTit}[2]{
+\begin{center}
+\vbox{%
+\noindent
+\xepersian@shortarticleTitle{#1}
+\vspace{4pt plus 2pt minus 2pt}
+\hrule
+\vspace{4pt plus 2pt minus 2pt}
+\xepersian@shortarticleSubtitle{#2}
+}
+\end{center}
+}
+\newenvironment{shortarticle}[4]
+{
+\xepersian@say{Adding a short article block}
+\begin{multicols}{#1}[\xepersian@shortarticleTit{#2}{#3}][4cm] %
+ \label{#4}
+\par %
+\ifnum #1 > \minraggedcols
+\raggedFormat
+\fi
+}
+{
+\end{multicols}
+}
+\newcommand{\shortarticleitem}[2]{
+\goodbreak
+\vspace{5pt plus 3pt minus 3pt}
+{\vbox{\noindent\xepersian@shortarticleItemTitle{#1}}}
+\vspace{5pt plus 3pt minus 3pt}
+{\noindent #2}\\
+}
+% \end{macrocode}
+% \iffalse
+%</xepersian-magazine.cls>
+%<*xepersian-mathsdigitspec.sty>
+% \fi
+% \part{xepersian-mathsdigitspec.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-mathsdigitspec}
+ [2009/04/22 v1.0.1 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)]
+\@zf@mathfalse
+\def\@preamblecmds{}
+\newcommand\not@onlypreamble[1]{{%
+ \def\do##1{\ifx#1##1\else\noexpand\do\noexpand##1\fi}%
+ \xdef\@preamblecmds{\@preamblecmds}}}
+\def\gm@notprerr{ can be used only in preamble (\on@line)}
+\AtBeginDocument{%
+ \def\do#1{\noexpand\do\noexpand#1}%
+ \edef\@preamblecmds{%
+ \def\noexpand\do##1{%
+ \def##1{\noexpand\PackageError{gmutils/LaTeX}%
+ {\noexpand\string##1 \noexpand\gm@notprerr}\noexpand\@eha}}%
+ \@preamblecmds}}
+\def\nocite#1{%
+ \@bsphack{\setbox0=\hbox{\cite{#1}}}\@esphack}
+\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}}
+\newcommand\SetMathCode[4]{%
+ \XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\newcommand\SetMathCharDef[4]{%
+ \XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\newcommand\setdigitfont[2][]{%
+ \let\glb@currsize\relax
+ \setkeys*[xepersian-mathsdigitspec]{options}{#1}%
+ \edef\@tempa{\noexpand\zf@fontspec{%
+ \XKV@rm}{#2}}\@tempa
+ \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
+ \DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n}
+ \SetSymbolFont{OPERATORS}{bold}{EU1}{\zf@family} {bx}{n}
+ \DeclareMathAlphabet {\mathit}{EU1}{\zf@family}{m}{it}
+ \DeclareSymbolFontAlphabet{\mathrm} {OPERATORS}
+ \DeclareMathAlphabet {\mathbf}{EU1}{\zf@family}{bx}{n}
+ \SetMathCode{`0}{\mathalpha}{OPERATORS}{"06F0}
+ \SetMathCode{`1}{\mathalpha}{OPERATORS}{"06F1}
+ \SetMathCode{`2}{\mathalpha}{OPERATORS}{"06F2}
+ \SetMathCode{`3}{\mathalpha}{OPERATORS}{"06F3}
+ \SetMathCode{`4}{\mathalpha}{OPERATORS}{"06F4}
+ \SetMathCode{`5}{\mathalpha}{OPERATORS}{"06F5}
+ \SetMathCode{`6}{\mathalpha}{OPERATORS}{"06F6}
+ \SetMathCode{`7}{\mathalpha}{OPERATORS}{"06F7}
+ \SetMathCode{`8}{\mathalpha}{OPERATORS}{"06F8}
+ \SetMathCode{`9}{\mathalpha}{OPERATORS}{"06F9}
+ \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}
+}
+\ifx\newcommand\undefined\else
+ \newcommand{\ZifferAn}{}
+\fi
+\mathchardef\ziffer@DotOri="013A
+{\ZifferAn
+ \catcode`\.=\active\gdef.{\begingroup\obeyspaces\futurelet\n\ziffer@dcheck}}
+\def\ziffer@dcheck{\ziffer@check\ZifferLeer\ziffer@DotOri}
+\def\ziffer@check#1#2{%
+ \ifx\n1\endgroup#1\else
+ \ifx\n2\endgroup#1\else
+ \ifx\n3\endgroup#1\else
+ \ifx\n4\endgroup#1\else
+ \ifx\n5\endgroup#1\else
+ \ifx\n6\endgroup#1\else
+ \ifx\n7\endgroup#1\else
+ \ifx\n8\endgroup#1\else
+ \ifx\n9\endgroup#1\else
+ \ifx\n0\endgroup#1\else
+ \endgroup#2%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+\mathcode`.="8000\relax
+\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi}
+% \end{macrocode}
+% \iffalse
+%</xepersian-mathsdigitspec.sty>
+%<*xepersian-multiplechoice.sty>
+% \fi
+% \part{xepersian-multiplechoice.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-multiplechoice}[2009/03/21 v0.1
+ Multiple Choice Questionnaire class for Persian in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{pifont}
+\RequirePackage{fullpage}
+\RequirePackage{ifthen}
+\RequirePackage{calc}
+\RequirePackage{verbatim}
+\RequirePackage{fmultico}
+\def\@headerfont{\bfseries}
+\newcommand\headerfont[1]{\gdef\@headerfont{#1}}
+\def\@X{X}
+\newcommand\X[1]{\gdef\@X{#1}}
+\def\pbs#1{\let\tmp=\\#1\let\\=\tmp}
+\newcommand\makeform@nocorrection{%
+ \addtocontents{frm}{\protect\end{tabular}}
+ \@starttoc{frm}}
+\newcommand\makeform@correction{%
+ \addtocontents{frm}{\protect\end{tabular}}}
+\newcommand\makemask@nocorrection{%
+ \addtocontents{msk}{\protect\end{tabular}}
+ \@starttoc{msk}}
+\newcommand\makemask@correction{%
+ \addtocontents{msk}{\protect\end{tabular}}}
+\newlength\questionspace
+\setlength\questionspace{0pt}
+\newcommand\answerstitle[1]{\gdef\@answerstitle{#1}}
+\def\@answerstitlefont{\bfseries}
+\newcommand\answerstitlefont[1]{\gdef\@answerstitlefont{#1}}
+\def\@answernumberfont{\bfseries}
+\newcommand\answernumberfont[1]{\gdef\@answernumberfont{#1}}
+\newcounter{question}\stepcounter{question}
+\newcounter{@choice}
+\def\@initorcheck{%
+ \xdef\@choices{\the@choice}%
+ \setcounter{@choice}{1}%
+ \gdef\@arraydesc{|l||}%
+ \gdef\@headerline{}%
+ \whiledo{\not{\value{@choice}>\@choices}}{
+ \xdef\@arraydesc{\@arraydesc c|}
+ \def\@appendheader{\g@addto@macro\@headerline}
+ \@appendheader{&\protect\@headerfont}
+ \edef\@the@choice{{\alph{@choice}}}
+ \expandafter\@appendheader\@the@choice
+ \stepcounter{@choice}}%
+ \addtocontents{frm}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \addtocontents{msk}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \gdef\@initorcheck{%
+ \ifthenelse{\value{@choice} = \@choices}{}{%
+ \ClassError{xepersian-multiplechoice}{Question \thequestion: wrong number of choices
+ (\the@choice\space instead of \@choices)}{%
+ Questions must all have the same number of proposed answers.%
+ \MessageBreak
+ Type X <return> to quit, fix your MCQ (multiple choice question) and rerun XeLaTeX.}}}}
+\newenvironment{question}[1]{%
+ %% \begin{question}
+ \begin{minipage}{\textwidth}
+ \xdef\@formanswerline{\@questionheader}%
+ \xdef\@maskanswerline{\@questionheader}%
+ \fbox{\parbox[c]{\linewidth}{#1}}
+ \vspace\questionspace\par
+ {\@answerstitlefont\@answerstitle}
+\begin{multicols}{4}
+ \begin{list}{\@answernumberfont\alph{@choice})~}{\usecounter{@choice}}}{%
+ %% \end{question}
+ \end{list}
+\end{multicols}
+ \@initorcheck%
+ \addtocontents{frm}{\@formanswerline\protect\\\protect\hline}%
+ \addtocontents{msk}{\@maskanswerline\protect\\\protect\hline}%
+ \end{minipage}
+ \stepcounter{question}}
+\def\@truesymbol{\ding{52}~}
+\def\@falsesymbol{\ding{56}~}
+\newcommand\truesymbol[1]{\gdef\@truesymbol{#1}}
+\newcommand\falsesymbol[1]{\gdef\@falsesymbol{#1}}
+\def\@true@nocorrection{\item}
+\def\@false@nocorrection{\item}
+\def\@true@correction{\item[\@truesymbol\refstepcounter{@choice}]}
+\def\@false@correction{\item[\@falsesymbol\refstepcounter{@choice}]}
+\newcommand\true{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&\@X}%
+ \@true}%
+\newcommand\false{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&}%
+ \@false}%
+\def\@correctionstyle{\itshape}
+\newcommand\correctionstyle[1]{\gdef\@correctionstyle{#1}}
+\newenvironment{@correction}{\@correctionstyle}{}
+ \def\@questionheader{سؤال \thequestion}
+ \answerstitle{جوابهای ممکن:}
+\DeclareOption{nocorrection}{%
+ \let\@true\@true@nocorrection
+ \let\@false\@false@nocorrection
+ \let\correction\comment
+ \let\endcorrection\endcomment
+ \def\makeform{\makeform@nocorrection}
+ \def\makemask{\makemask@nocorrection}}
+\DeclareOption{correction}{%
+ \let\@true\@true@correction
+ \let\@false\@false@correction
+ \let\correction\@correction
+ \let\endcorrection\end@correction
+ \def\makeform{\makeform@correction}
+ \def\makemask{\makemask@correction}}
+\ExecuteOptions{nocorrection}
+\newcommand\questiontitle[1]{\gdef\@questiontitle{#1}}
+\def\@questiontitlefont{\bfseries}
+\newcommand\questiontitlefont[1]{\gdef\@questiontitlefont{#1}}
+\newlength\questiontitlespace
+\setlength\questiontitlespace{5pt}
+\newlength\questionsepspace
+\setlength\questionsepspace{20pt}
+\gdef\@questionsepspace{0pt}
+\let\old@question\question
+\let\old@endquestion\endquestion
+\renewenvironment{question}[1]{%
+ %% \begin{question}
+ \vspace\@questionsepspace
+ \fbox{\parbox[c]{0.25\linewidth}{\@questiontitlefont\@questiontitle}}
+ \nopagebreak\vspace\questiontitlespace\par
+ \old@question{#1}}{%
+ %% \end{question}
+ \old@endquestion
+ \gdef\@questionsepspace{\questionsepspace}}
+ \questiontitle{سؤال \thequestion:}
+\ProcessOptions
+% \end{macrocode}
+% \iffalse
+%</xepersian-multiplechoice.sty>
+%<*xepersian-persiancal.sty>
+% \fi
+% \part{xepersian-persiancal.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-persiancal}
+
+\newif\ifXePersian@leap \newif\ifXePersian@kabiseh
+\newcount\XePersian@i \newcount\XePersian@y \newcount\XePersian@m \newcount\XePersian@d
+\newcount\XePersian@latini \newcount\XePersian@persiani
+\newcount\XePersian@latinii \newcount\XePersian@persianii
+\newcount\XePersian@latiniii \newcount\XePersian@persianiii
+\newcount\XePersian@latiniv \newcount\XePersian@persianiv
+\newcount\XePersian@latinv \newcount\XePersian@persianv
+\newcount\XePersian@latinvi \newcount\XePersian@persianvi
+\newcount\XePersian@latinvii \newcount\XePersian@persianvii
+\newcount\XePersian@latinviii \newcount\XePersian@persianviii
+\newcount\XePersian@latinix \newcount\XePersian@persianix
+\newcount\XePersian@latinx \newcount\XePersian@persianx
+\newcount\XePersian@latinxi \newcount\XePersian@persianxi
+\newcount\XePersian@latinxii \newcount\XePersian@persianxii
+ \newcount\XePersian@persianxiii
+
+\newcount\XePersian@temp
+\newcount\XePersian@temptwo
+\newcount\XePersian@tempthree
+\newcount\XePersian@yModHundred
+\newcount\XePersian@thirtytwo
+\newcount\XePersian@dn
+\newcount\XePersian@sn
+\newcount\XePersian@mminusone
+
+\def\persiantoday{%
+\XePersian@y=\year \XePersian@m=\month \XePersian@d=\day
+%
+\XePersian@temp=\XePersian@y
+\divide\XePersian@temp by 100\relax
+\multiply\XePersian@temp by 100\relax
+\XePersian@yModHundred=\XePersian@y
+\advance\XePersian@yModHundred by -\XePersian@temp\relax
+%
+\ifodd\XePersian@yModHundred
+ \XePersian@leapfalse
+\else
+ \XePersian@temp=\XePersian@yModHundred
+ \divide\XePersian@temp by 2\relax
+ \ifodd\XePersian@temp\XePersian@leapfalse
+ \else
+ \ifnum\XePersian@yModHundred=0%
+ \XePersian@temp=\XePersian@y
+ \divide\XePersian@temp by 400\relax
+ \multiply\XePersian@temp by 400\relax
+ \ifnum\XePersian@y=\XePersian@temp\XePersian@leaptrue\else\XePersian@leapfalse\fi
+ \else\XePersian@leaptrue
+ \fi
+ \fi
+\fi
+%
+\XePersian@latini=31\relax
+\ifXePersian@leap
+ \XePersian@latinii = 29\relax
+\else
+ \XePersian@latinii = 28\relax
+\fi
+\XePersian@latiniii = 31\relax
+\XePersian@latiniv = 30\relax
+\XePersian@latinv = 31\relax
+\XePersian@latinvi = 30\relax
+\XePersian@latinvii = 31\relax
+\XePersian@latinviii = 31\relax
+\XePersian@latinix = 30\relax
+\XePersian@latinx = 31\relax
+\XePersian@latinxi = 30\relax
+\XePersian@latinxii = 31\relax
+%
+\XePersian@thirtytwo=32\relax
+%
+\XePersian@temp=\XePersian@y
+\advance\XePersian@temp by -17\relax
+\XePersian@temptwo=\XePersian@temp
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\ifnum\XePersian@temp=\XePersian@thirtytwo\XePersian@kabisehfalse
+\else
+ \XePersian@temptwo=\XePersian@temp
+ \divide\XePersian@temptwo by 4\relax
+ \multiply\XePersian@temptwo by 4\relax
+ \advance\XePersian@temp by -\XePersian@temptwo
+ \ifnum\XePersian@temp=\z@\XePersian@kabisehtrue\else\XePersian@kabisehfalse\fi
+\fi
+%
+% In fact persiani is equal to the Leap years from a fixed year to the last
+% year minus the Kabise years from a fixed year to the last year plus a const.
+%
+\XePersian@tempthree=\XePersian@y % Number of Leap years
+\advance\XePersian@tempthree by -1
+\XePersian@temp=\XePersian@tempthree % T := (MY-1) div 4
+\divide\XePersian@temp by 4\relax
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((MY-1) div 100)
+\divide\XePersian@temptwo by 100\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree % T := T + ((MY-1) div 400)
+\divide\XePersian@temptwo by 400\relax
+\advance\XePersian@temp by \XePersian@temptwo
+\advance\XePersian@tempthree by -611 % Number of Kabise years
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 8\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree %
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@tempthree by -\XePersian@temptwo
+\ifnum\XePersian@tempthree=32\advance\XePersian@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\XePersian@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\XePersian@temp by -\XePersian@tempthree
+\advance\XePersian@temp by -137 % T := T - 137 Adjust the value
+\XePersian@persiani=31
+\advance\XePersian@persiani by -\XePersian@temp % now 31 - T is the persiani
+%
+\XePersian@persianii = 30\relax
+\ifXePersian@kabiseh
+ \XePersian@persianiii = 30\relax
+\else
+ \XePersian@persianiii = 29\relax
+\fi
+\XePersian@persianiv = 31\relax
+\XePersian@persianv = 31\relax
+\XePersian@persianvi = 31\relax
+\XePersian@persianvii = 31\relax
+\XePersian@persianviii= 31\relax
+\XePersian@persianix = 31\relax
+\XePersian@persianx = 30\relax
+\XePersian@persianxi = 30\relax
+\XePersian@persianxii = 30\relax
+\XePersian@persianxiii= 30\relax
+%
+\XePersian@dn= 0\relax
+\XePersian@sn= 0\relax
+\XePersian@mminusone=\XePersian@m
+\advance\XePersian@mminusone by -1\relax
+%
+\XePersian@i=0\relax
+\ifnum\XePersian@i < \XePersian@mminusone
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@dn by \csname XePersian@latin\romannumeral\the\XePersian@i\endcsname
+\ifnum\XePersian@i<\XePersian@mminusone \repeat
+\fi
+\advance \XePersian@dn by \XePersian@d
+%
+\XePersian@i=1\relax
+\XePersian@sn = \XePersian@persiani
+\ifnum \XePersian@sn<\XePersian@dn
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@sn by \csname XePersian@persian\romannumeral\the\XePersian@i\endcsname
+\ifnum \XePersian@sn<\XePersian@dn \repeat
+\fi
+\ifnum \XePersian@i < 4
+ \XePersian@m = 9 \advance\XePersian@m by \XePersian@i
+ \advance \XePersian@y by -622\relax
+\else
+ \XePersian@m = \XePersian@i \advance \XePersian@m by -3\relax
+ \advance \XePersian@y by -621\relax
+\fi
+\advance\XePersian@sn by -\csname XePersian@persian\romannumeral\the\XePersian@i%
+\endcsname
+\ifnum\XePersian@i = 1
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by 30 \advance\XePersian@d by -\XePersian@persiani
+\else
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by -\XePersian@sn
+\fi
+\beginL\number\XePersian@d\endL\space%
+\persianmonth{\XePersian@m}\space\beginL\number\XePersian@y\endL%
+}
+\def\persianmonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or
+خرداد\or تیر\or
+مرداد\or
+شهریور\or مهر\or
+آبان\or آذر\or
+دی\or بهمن\or
+اسفند\fi}
+% \end{macrocode}
+% \iffalse
+%</xepersian-persiancal.sty>
+%<*xepersian-thesis.cls>
+% \fi
+% \part{xepersian-thesis.cls}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{xepersian-thesis}
+ [2009/01/05 v0.1
+ Persian thesis document class in XeLaTeX]
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
+\ProcessOptions
+\LoadClass{report}
+\def\university#1{\gdef\@university{#1}}
+\def\department#1{\gdef\@department{#1}}
+\def\degree#1{\gdef\@degree{#1}}
+\def\thesisdate#1{\gdef\@thesisdate{#1}}
+\def\supervisor#1{\gdef\@supervisor{#1}}
+\def\city#1{\gdef\@city{#1}}
+
+\def\latintitle#1{\gdef\@latintitle{#1}}
+\def\latinauthor#1{\gdef\@latinauthor{#1}}
+\def\latindegree#1{\gdef\@latindegree{#1}}
+\def\latindepartment#1{\gdef\@latindepartment{#1}}
+\def\latinthesisdate#1{\gdef\@latinthesisdate{#1}}
+\def\latinsupervisor#1{\gdef\@latinsupervisor{#1}}
+\def\latincity#1{\gdef\@latincity{#1}}
+\def\latinuniversity#1{\gdef\@latinuniversity{#1}}
+
+\def\maketitle{\begin{titlepage}
+{\includegraphics{logo}}
+\vskip 1.5cm
+{\Huge\bfseries \@title}\par
+\vskip 1cm
+{\large%
+ \by}\par
+{\Large\bfseries \@author}\par
+\vskip 5mm
+{\large\bfseries\writtenfor
+\par
+\@degree}
+\par
+\vskip 1cm
+{\large
+ \undersupervision\par
+\Large\bfseries \@supervisor}
+\par
+\vskip 1cm
+{\large \@thesisdate}
+\par
+\vskip 1cm
+{\large\bfseries\departmentof\space\@department}
+\par
+{\large\bfseries\universityof\space\@university \par\@city}
+\vfill
+\end{titlepage}%
+}
+
+\def\abstractpage{\newpage
+\thispagestyle{empty}
+\vskip 15mm
+\begin{center}{\large{\bfseries \@title} \\}
+\end{center}
+\par
+\begin{abstract}}
+\def\endabstractpage{\end{abstract}
+\newpage
+}
+
+\def\latinabstract{\newpage
+\thispagestyle{empty}
+\vskip 15mm
+\begin{center}{\Large\bfseries \@latintitle \\[5mm]}
+{\bfseries Abstract}
+\end{center}
+\vspace{5mm}}
+
+\def\endlatinabstract{\newpage}
+
+\def\acknowledgementpage{\newpage
+\thispagestyle{empty}
+\centerline{\Large \bfseries\acknowledgementname}
+\vspace{1cm}
+\par\noindent}
+\def\endacknowledgementpage{\newpage}
+
+\def\titlepage{\newpage\centering
+ \thispagestyle{empty}
+ \parindent 0pt \parskip 10pt plus 1fil minus 1fil
+ \def\baselinestretch{1}\@normalsize\vbox to \vsize\bgroup\vbox to 9in\bgroup}
+\def\endtitlepage{\par\kern 0pt\egroup\vss\egroup\newpage}
+
+\def\signature#1#2{\par\noindent#1\dotfill\null\\*
+ {\raggedright #2\par}}
+
+\def\abstract{\subsection*{\abstractname}\small
+\@normalsize}
+\def\endabstract{\par}
+
+\pagenumbering{harfi}
+\let\ol@chapter\@chapter
+\def\@chapter{%
+ \ifnum\c@chapter=0 \pagenumbering{arabic}\setcounter{page}{1}\fi
+ \ol@chapter}
+
+
+
+\def\keywords#1{\par \vspace{5mm}
+{\textbf{واژه‌های کلیدی:}} {\textit{ #1}}}
+
+\def\latinkeywords#1{\par \vspace{5mm}
+\noindent {\textbf{Keywords:}} {\textit{ #1}}}
+
+\font\titlefont=cmssbx10 scaled 2074
+\font\supervisorfont=cmbxti10
+\def\makelatintitle{\begin{titlepage}
+{\includegraphics{logo}}
+\vskip 1.5cm
+\addtolength{\baselineskip}{5mm}
+{\titlefont \@latintitle} \par
+\addtolength{\baselineskip}{-5mm}
+\vskip 1cm
+{\bfseries\latinby}\par
+{\Large\bfseries \@latinauthor}\par
+\vskip 5mm
+{\latinwrittenfor\par
+\large\@latindegree}
+\par
+\vskip 1cm
+Under supervision of \\
+{\supervisorfont\@latinsupervisor}
+\par
+\vskip 1cm
+{\@latinthesisdate}
+\par
+\vskip 1cm
+\large\bfseries
+\@latindepartment\space Department
+\par
+\@latinuniversity \par\@latincity
+\vfill
+\end{titlepage}%
+}
+
+
+\def\acknowledgementname{قدردانی}
+\def\by{توسط}
+\def\writtenfor{ رسالهٔ ارائه شده به عنوان بخشی از ملزومات برای دریافت درجهٔ}
+\def\undersupervision{زیر نظر}
+\def\departmentof{دانشکدهٔ}
+\def\universityof{دانشگاه}
+\def\latinby{by}
+\def\latinwrittenfor{Submitted in Partial Fulfillment\\ of the Requirements\\ for the Degree of}
+\def\latinundersupervision{Under supervision of}
+% \end{macrocode}
+% \iffalse
+%</xepersian-thesis.cls>
+%<*xepersian-thesis-xepersian.def>
+% \fi
+% \part{xepersian-thesis-xepersian.def}
+% \begin{macrocode}
+\renewcommand \thepart {\@tartibi\c@part}
+%to make appendix numbering persian
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+% \end{macrocode}
+% \iffalse
+%</xepersian-thesis-xepersian.def>
+%<*acm-fa.bst>
+% \fi
+% \part{acm-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "acm-fa", Persian (farsi) version of acm.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%% NOTE: Its output for English references may has a bit difference with acm.bst, for pure English texts please use acm.bst
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright of acm.bst
+% ACM Transactions bibliography style (24-Jan-88 version)
+% A lot like abbrv.bst, but names come out "Last, initials", and in \sc.
+% Some dates are parenthesized.
+
+% History of acm-fa.bst
+% 2009/02/12, The initial release was a combination of acm.bst and plain-fa.bst
+% \textsc is used here instead of \sc.
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- acm-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. thesis" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+FUNCTION {emphasizeic}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "\/}" * }
+ if$
+}
+
+FUNCTION {scapify}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{ " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { t "others" =
+ { "," bbl.etal * * }
+ { "," bbl.and * * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% For names inside entries (e.g., editors of an "In ...");
+% this is exactly ABBRV.BST's `format.names' function.
+FUNCTION {format.innames}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {fa.isPersianLanguage
+ {s nameptr "{ff}{vv~}{ll}{, jj}" format.name$ 't :=}
+ {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names scapify}
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names scapify
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.ineditors}
+{ editor empty$
+ { "" }
+ { editor format.innames
+ editor num.names$ #1 >
+ { ", " * bbl.editors *}
+ { ", " * bbl.editor *}
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages n.dashify }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pp.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.journal.vol.num.date}
+{ journal empty$
+ { "empty journal in " cite$ * warning$
+ ""
+ }
+ { journal
+ volume empty$
+ 'skip$
+ { " " * volume * }
+ if$
+ number empty$
+ 'emphasizeic
+ { emphasize ", " * number * }
+ if$
+ year empty$
+ { "empty year in " cite$ * warning$ }
+ { " (" * format.date * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pp.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pp.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ {bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { ", " * format.ineditors * }
+ if$
+ }
+ if$
+}
+
+% The proceedings title (it's on the stack) gets an (address, date) appended
+FUNCTION {format.proc.date}
+{ duplicate$ empty$
+ { pop$ "" }
+ { year empty$
+ { "empty year in " cite$ * warning$
+ address empty$
+ 'emphasize
+ { emphasizeic
+ " (" * address * ")" *
+ }
+ if$
+ }
+ { emphasizeic
+ " (" *
+ address empty$
+ 'skip$
+ { address * ", " * }
+ if$
+ format.date *
+ ")" *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.proc.date}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle format.proc.date * }
+ if$
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.journal.vol.num.date output
+ format.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pp.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.edition output
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ }
+ if$
+ format.chapter.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.proc.date "booktitle" output.check
+ format.ineditors output
+ format.bvolume output
+ format.number.series output
+ organization output
+ publisher output
+ }
+ { format.incoll.inproc.crossref output.nonnull }
+ if$
+ format.pp.pages output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization scapify output }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.edition output
+ author empty$
+ { address new.block.checka }
+ { organization address new.block.checkb
+ organization output
+ }
+ if$
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization scapify output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ title format.proc.date "title" output.check
+ format.bvolume output
+ format.number.series output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+
+MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
+
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Programming"}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Gr."}
+
+
+MACRO {toms} {"ACM Trans. Math. Softw."}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+
+MACRO {toplas} {"ACM Trans. Program. Lang. Syst."}
+
+MACRO {tcs} {"Theoretical Comput. Sci."}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</acm-fa.bst>
+%<*ieeetr-fa.bst>
+% \fi
+% \part{ieeetr-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "ieeetr-fa", Persian (farsi) version of ieeetr.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/12
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+% IEEE Transactions bibliography style (29-Jan-88 version)
+% numeric labels, order-of-reference, IEEE abbreviations,
+% quotes around article titles, commas separate all fields
+% except after book titles and before "notes". Otherwise,
+% much like the "plain" family, from which this is adapted.
+%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.quote after.sentence
+ after.quoted.block after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.3" }
+FUNCTION{bst.file.date} { "2009/02/12" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- ieeetr-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.quote :=
+ #3 'after.sentence :=
+ #4 'after.quoted.block :=
+ #5 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.quote =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { output.state after.quoted.block =
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {blank.sep}
+{ after.quote 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ output.state after.quoted.block =
+ 'skip$
+ 'add.period$
+ if$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { output.state after.quote =
+ { after.quoted.block 'output.state := }
+ { after.block 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { %s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ fa.isPersianLanguage
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=}
+ { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=}
+ if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " {\em" * bbl.etal * "}" * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title.p}
+{ title empty$
+ { "" }
+ { fa.isPersianLanguage
+ { "''" title * ",``" * }
+ { "``" title "t" change.case$ * ",''" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume *
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify * }
+ { bbl.page pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.volume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume * }%M.Amintoosi "vol.~"
+ if$
+}
+
+FUNCTION {format.number}
+{ number empty$
+ { "" }
+ { bbl.number number * }%M.Amintoosi "no.~"
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { bbl.in booktitle emphasize *
+ editor empty$
+ 'skip$
+ { " (" * format.editors * ")" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ output.state after.block =
+ { type "t" change.case$ }
+ { type "l" change.case$ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "l" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.addr.pub}
+{ publisher empty$
+ { "" }
+ { address empty$
+ { "" }
+ { address ": " * }
+ if$
+ publisher *
+ }
+ if$
+}
+
+FUNCTION {format.paddress}
+{ address empty$
+ { "" }
+ { "(" address * ")" * }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " {\em" * bbl.etal * "}" * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " {\em" bbl.etal * "}" * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in "{\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.volume output
+ month empty$
+ { format.number output }
+ 'skip$
+ if$
+ format.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { "empty title in " cite$ * warning$
+ howpublished new.sentence.checka
+ }
+ { howpublished empty$ not
+ address empty$ month empty$ year empty$ and and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.addr.pub "publisher" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ format.addr.pub "publisher" output.check
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ format.pages output
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title empty$
+ { howpublished new.sentence.checka }
+ { howpublished empty$ not
+ month empty$ year empty$ and
+ or
+ { format.title.p output.nonnull }
+ { format.title output.nonnull }
+ if$
+ blank.sep
+ }
+ if$
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ format.paddress output
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title "title" output.check
+ blank.sep
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.title.p "title" output.check
+ blank.sep
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications ACM"}
+
+MACRO {ibmjrd} {"IBM J. Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Trans. Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Computer-Aided Design"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM J. Computing"}
+
+MACRO {tocs} {"ACM Trans. Computer Systems"}
+
+MACRO {tods} {"ACM Trans. Database Systems"}
+
+MACRO {tog} {"ACM Trans. Graphics"}
+
+MACRO {toms} {"ACM Trans. Mathematical Software"}
+
+MACRO {toois} {"ACM Trans. Office Information Systems"}
+
+MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</ieeetr-fa.bst>
+%<*plain-fa.bst>
+% \fi
+% \part{plain-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "plain-fa", Persian (farsi) version of plain.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+% BibTeX standard bibliography style `plain'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+%History
+% 2009/02/11, Copy and made the necessary changes from unsrt-fa.bst
+% Changing the sortify function so that it does nothing for persian entries
+% 2009/02/12, Chaniging format.names so that prints last name and then first names,
+% also it uses only one character of latin first names and whole persian first names
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator}% bbl.formatnames}
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.2" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- plain-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " Eds." 'bbl.editors :=
+ " Ed." 'bbl.editor :=
+ " Ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+ %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{
+ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ %fa.isPersianLanguage
+ % {s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff~}{vv~}{ll}{, jj}
+ % }
+ % {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
+ %t "t" change.case$ 't := %I wrote it to lower the letters of latin last names, but it also affected the first name
+ %}
+ %if$
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =%"{ff }{vv }{ll}{ jj}"
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{
+ fa.isPersianLanguage
+ { "l" change.case$}
+ {purify$ "l" change.case$}
+ if$
+ %duplicate$ write$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { bbl.etal * }
+ %{ t write$ t sortify * t write$ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by plain-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</plain-fa.bst>
+%<*unsrt-fa.bst>
+% \fi
+% \part{unsrt-fa.bst}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bib. style "usrt-fa", Persian (farsi) version of unsrt.bst
+%%
+%% by: Mahmood Amintoosi and Mostafa Vahedi
+%% For XePersian, a Persian Typsetting Package in XeTeX, Developed by:
+%% Vafa Khalighi, Mehdi Omidali and Mostafa Vahedi
+%% 2009/02/09
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either this version
+%% of this license or (at your option) any later version.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Original Copyright
+% BibTeX standard bibliography style `unsrt'
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+%%%%%%%%%%% History:
+% 2009/02/07: v.1, First Release
+% 2009/02/08: v.2, Some bugs fixed
+% 2009/02/09: v.21, I have to check the persian language in format.edition, because in Persian, "edition" lies before the edition number.
+% 2009/02/09: v.22, I added a field Translator for translated books
+
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ language
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ translator
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
+ bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
+ bbl.translator }
+FUNCTION {is.print.banners.to.terminal} { #1 }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FILE VERSION AND BANNER %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION{bst.file.version} { "0.22" }
+FUNCTION{bst.file.date} { "2009/02/09" }
+FUNCTION{bst.file.website} { "http://developer.berlios.de/projects/xepersian" }
+FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
+
+FUNCTION {banner.message}
+{ is.print.banners.to.terminal
+ { "-- unsrt-fa.bst version" " " * bst.file.version *
+ " (" * bst.file.date * ") " * %"by " * bst.file.authors *
+ top$
+ "-- This is a BibTeX style for XePersian: " bst.file.website *
+ %top$
+ %"-- See the " quote$ * "xepersian_bibtex_userguide.pdf" * quote$ * " manual for usage information." *
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+FUNCTION {completed.message}
+{ is.print.banners.to.terminal
+ { ""
+ top$
+ "Done."
+ top$
+ }
+ { skip$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {fa.isPersianLanguage}
+{
+ language missing$
+ {#0}
+ {language "l" change.case$ "persian" =}
+ if$
+}
+
+FUNCTION {keywords.fa}
+{
+ " و " 'bbl.and :=
+ " و دیگران" 'bbl.etal :=
+ " ویراستاران " 'bbl.editors :=
+ " ویراسته‌ی " 'bbl.editor :=
+ " ویرایش " 'bbl.edition :=
+ " جلد " 'bbl.volume :=
+ " از " 'bbl.of :=
+ " شماره " 'bbl.number :=
+ " در " 'bbl.in :=
+ " صفحات " 'bbl.pages :=
+ " ص." 'bbl.page :=
+ " فصل " 'bbl.chapter :=
+ " سری " 'bbl.series :=
+ " گزارش طرح تحقیقی" 'bbl.techrep :=
+ " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
+ " پایان‌نامه دکترا" 'bbl.phdthesis :=
+ " ترجمه‌ی " 'bbl.translator :=
+}
+
+FUNCTION {keywords.en}
+{
+ " and " 'bbl.and :=
+ " et~al." 'bbl.etal :=
+ " eds." 'bbl.editors :=
+ " ed." 'bbl.editor :=
+ " ed." 'bbl.edition :=
+ " Vol." 'bbl.volume :=
+ " of " 'bbl.of :=
+ " No." 'bbl.number :=
+ " In " 'bbl.in :=
+ " pp." 'bbl.pages :=
+ " p." 'bbl.page :=
+ " Ch." 'bbl.chapter :=
+ " Ser." 'bbl.series :=
+ " Tech. Rep." 'bbl.techrep :=
+ " Master's thesis" 'bbl.mthesis :=
+ " Ph.D. disseration" 'bbl.phdthesis :=
+ " Translator " 'bbl.translator :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% End of Persian Functions %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { ", " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ fa.isPersianLanguage
+ { keywords.fa
+ "\Persian" write$
+ newline$ }
+ { keywords.en
+ "\Latin" write$
+ newline$ }
+ if$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := %{ff}{vv~}{ll}{, jj}
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ editor num.names$ #1 >
+ {bbl.editors editor format.names * }
+ {bbl.editor editor format.names * }
+ if$
+ }
+ {
+ editor format.names
+ editor num.names$ #1 >
+ { ", " bbl.editors * *}
+ { ", " bbl.editor * *}
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.translators}
+{ translator empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.translator translator format.names *
+ }
+ {
+ translator format.names
+ ", " bbl.translator * *
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { bbl.of * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number "t" change.case$ }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { fa.isPersianLanguage
+ {
+ bbl.edition edition *
+ }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ bbl.edition * }
+ { edition "t" change.case$ bbl.edition * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { bbl.pages pages n.dashify tie.or.space.connect }
+ { bbl.page pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{
+ booktitle empty$
+ { "" }
+ { editor empty$
+ { bbl.in booktitle emphasize * }
+ { bbl.in format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { bbl.techrep }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { bbl.in "{\em " * journal * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$ #2 >
+ { pop$ bbl.etal * }
+ { #2 < 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ bbl.in
+ }
+ { bbl.volume volume tie.or.space.connect
+ bbl.of *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { bbl.in " {\em " * booktitle * "\/}" * }
+ if$
+ }
+ { bbl.in key * }
+ if$
+ }
+ { bbl.in format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ fa.isPersianLanguage
+ {
+ format.authors output
+ new.block
+ format.btitle "title" output.check
+ new.block
+ format.translators output
+ format.editors output
+ }
+ { author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ }
+ if$
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.chapter.pages output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ bbl.mthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ bbl.phdthesis
+ format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {banner.message}
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{
+ "% Generated by unsrt-fa.bst, version: " bst.file.version * " (" * bst.file.date * "), for XePersian Package" *
+ write$ newline$
+ "% Authors: " bst.file.authors *
+ write$ newline$
+ "\providecommand{\noopsort}[1]{}"
+ write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+ "\Persian" write$ newline$
+}
+
+EXECUTE {end.bib}
+EXECUTE{completed.message}
+% \end{macrocode}
+% \iffalse
+%</unsrt-fa.bst>
+% \fi
+% \clearpage
+% \PrintChanges
+% \Finale
+%
+% \iffalse
+%<*parsidigits.map>
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "ParsiDigits"
+
+pass(Unicode)
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
+%</parsidigits.map>
+%<*txt2maths.map>
+; Vafa Khalighi ...
+LHSName "Digits"
+RHSName "txt2maths"
+
+Pass(Unicode)
+U+002E <> U+066B ; convert dot to Persian decimal separator
+U+002D <> U+2212 ; convert hyphen to minus sign
+U+0030 <> U+06F0 ;
+U+0031 <> U+06F1 ;
+U+0032 <> U+06F2 ;
+U+0033 <> U+06F3 ;
+U+0034 <> U+06F4 ;
+U+0035 <> U+06F5 ;
+U+0036 <> U+06F6 ;
+U+0037 <> U+06F7 ;
+U+0038 <> U+06F8 ;
+U+0039 <> U+06F9 ;
+
+U+0644 U+0651 U+064E U+0627 <> U+0644 U+0627 U+0651 U+064E ; lam shadda fatha alif -> lam alif shadda fatha
+U+0644 U+0651 U+0627 <> U+0644 U+0627 U+0651 ; lam shadda alif -> lam alif shadda
+U+0644 U+0652 U+0622 <> U+0644 U+0622 U+0652 ; lam sukun alifmadda -> lam alifmadda sukun
+U+0644 U+0652 U+0623 <> U+0644 U+0623 U+0652 ; lam sukun alifhamzaabove -> lam alifhamzaabove sukun
+U+0644 U+0652 U+0625 <> U+0644 U+0625 U+0652 ; lam sukun alifhamzabelow -> lam alifhamzabelow sukun
+U+0644 U+0651 U+064B U+0627 <> U+0644 U+0627 U+0651 U+064b ; lam shadda fathatan alif -> lam alif shadda fathatan
+U+0644 U+064B U+0627 <> U+0644 U+0627 U+064B ; lam fathatan alif -> lam alif fathatan
+
+U+002C <> U+060C ; comma ­> arabic comma
+U+003F <> U+061F ; question mark -> arabic qm
+U+003B <> U+061B ; semicolon -> arabic semicolon
+
+; ligatures from Knuth's original CMR fonts
+U+002D U+002D <> U+2013 ; -- -> en dash
+U+002D U+002D U+002D <> U+2014 ; --- -> em dash
+
+U+0027 <> U+2019 ; ' -> right single quote
+U+0027 U+0027 <> U+201D ; '' -> right double quote
+U+0022 > U+201D ; " -> right double quote
+
+U+0060 <> U+2018 ; ` -> left single quote
+U+0060 U+0060 <> U+201C ; `` -> left double quote
+
+U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
+U+003F U+0060 <> U+00BF ; ?` -> inverted question
+
+; additions supported in T1 encoding
+U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
+U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
+U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
+%</txt2maths.map>
+%<*thesis-sample.tex>
+\documentclass[a4paper,11pt]{xepersian-thesis}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{XB Zar}
+
+
+
+
+\begin{document}
+\title{اعداد مرکب}
+\author{وفا خلیقی}
+\degree{کارشناسی ریاضیات محض}
+\supervisor{محمد قدسی}
+\department{ریاضی}
+\university{تهران}
+\city{تهران}
+\thesisdate{\today}
+\maketitle
+\begin{acknowledgementpage}
+در اینجا دوست دارم از همه تشکر کنم
+\end{acknowledgementpage}
+\begin{abstractpage}
+اینجا هم باید مطلبی نوشت...
+\keywords{ریاضی محض، هندسه و توپولوژی}
+\end{abstractpage}
+\tableofcontents
+\listoftables
+\chapter{مجموعه اعداد}
+در اینجا لازم می‌دانم تا نگاهی روی مجموعهٔ اعداد اندازیم تا متوجه خصلت‌های آن شویم
+\begin{equation}
+(a+b)^2=a^2+2ab+b^3
+\end{equation}
+\newpage
+این صفحهٔ جدید است که ما در این صفحه به نوشتن مقالات دیگری مشغول هستیم.
+\section{مقدمه}
+
+\newpage
+این هم یک صفحهٔ جدید دیگر
+\chapter{دوم}
+\chapter{سوم}
+\appendix
+\chapter{اول}
+\chapter{دوم}
+\chapter{سوم}
+\bibliographystyle{unsrt}
+\begin{thebibliography}{99}
+\end{thebibliography}
+%\printindex
+\begin{latin}
+\latintitle{Pure Mathematics}
+\latinauthor{Vafa Khalighi}
+\latindegree{Bachelor of Pure Mathematics}
+\latinthesisdate{\latintoday}
+\latinsupervisor{Mohammad Ghodsi}
+\latindepartment{Computer Science}
+\latinuniversity{Iran University of Science \& Technology}
+\latincity{Tehran}
+\begin{latinabstract}
+\noindent This is our abstract written in English and This thesis is written very very very carefully so that we can keep an eye on the beauty of typesetting.
+\latinkeywords{Mathematics, topology, geometry and category theory.}
+\end{latinabstract}
+\makelatintitle
+\end{latin}
+\end{document}
+%</thesis-sample.tex>
+%<*magazine-sample.tex>
+\documentclass[12pt,twoside]{xepersian-magazine}
+\usepackage{graphicx}
+\usepackage{xepersian}
+\usepackage{xunicode}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Junicode}
+\setdigitfont{XB Zar}
+\pagestyle{fancy}
+\title{مجلهٔ زی‌پرشین}
+\author{وفا خلیقی}
+\edition{جلد اول}
+\customlogo{مجلهٔ زی‌پرشین}
+\customminilogo{مجلهٔ زی‌پرشین}
+\custommagazinename{مجلهٔ زی‌پرشین}
+\customwwwTxt{http://developer.berlios.de/projects/xepersian}
+\begin{document}
+\begin{frontpage}
+\firstimage{img/ireland.jpg}{این زیرنویس تصویر اصلی در صفحهٔ اول است.}
+\firstarticle{این تیتر مقالهٔ اول است.}
+ {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+ {۱۲:۳۴}
+\secondarticle{این هم سر تیتر مقالهٔ دوم است.}%
+ {این هم زیر تیتر مقالهٔ دوم است که آن را در اینجا می‌نویسیم.}%
+ {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد.}%
+ {قسمت الف}%
+ {۱۰:۲۳}
+
+\thirdarticle{این سرتیتر مقالهٔ سوم است.}%
+ {این هم زیرتیتر مقالهٔ سوم است که ما آن را در اینجا قرار می‌دهیم.}%
+ {خوب این قسمت کوچکی از مقالهٔ اول است که ما در حال نوشتن آن هستم. باید یک مقدار بنویسیم تا مقداری این قسمت پر شود تا بتوانیم چیز قشنگی داشته باشیم. دقت کنیم که بصورت انتخابی حتی می‌توانیم زمان را هم درج کنیم که در سمت راست قرار می‌گیرد. و همانطور که می‌بینید من مطلبی برای گفتن ندارم فقط متن علکی می‌نویسم تا کمی صفحه را پر کرده باشم. اما در قسمتهای بعدی مقداری از سهراب سپهری خواهم نوشت.}%
+
+ {قسمت ب}%
+ {۱۰:۰۲}
+
+\begin{indexblock}{نمایه (فهرست مطالب) اصلی}
+\indexitem{۱- مقاله اول}{1}
+
+\indexitem{۲- مقاله دوم}{3}
+
+\indexitem{۳- مقاله سوم}{3}
+
+\indexitem{۴- مقاله چهارم}{5}
+\end{indexblock}
+
+\begin{weatherblock}{وضع آب و هوا}
+\weatheritem{img/weather/rain.jpg}{امروز}{13}{9}{}
+\weatheritem{img/weather/sun.jpg}{فردا}{15}{1}{}
+\weatheritem{img/weather/clouds.jpg}{جمعه}{12}{6}{}
+\end{weatherblock}
+
+
+\begin{authorblock}
+\textbf{ویرایشگران}
+
+وفا خلیقی، مهدی امیدعلی و مصطفی واحدی
+
+\texttt{vafa@users.berlios.de\\[5pt]
+http://developer.berlios.de/projects/xepersian}\\
+\end{authorblock}
+\end{frontpage}
+\newsection{قسمت الف}
+\begin{article}{2}
+ {این تیتر این مقاله است.}
+ {این هم زیرتیتر این مقاله هست.}
+ {قسمت الف}
+ {1}
+\authorandplace{نام نویسنده}{مکان}
+
+
+
+
+\noindent\timestamp{۸:۲۵}
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+\footnote{این یک زیرنویس فارسی است.}\LTRfootnote{This is an English footnote.}
+\begin{equation}
+(a+b)^3=a^3+3a^2b+3ab^2+b^3\label{eq-1}
+\end{equation}
+این معادلهٔ \eqref{eq-1} است.
+\columntitle{lines}{این را برای مهم یا نشان دادن حرفی مهم در این مجله انجام می‌دهیم.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\begin{article}{2}
+ {این تیتر این مقاله است.}
+ {این هم زیرتیتر این مقاله هست.}
+ {قسمت الف}
+ {1}
+\authorandplace{نام نویسنده}{مکان}
+
+\noindent\timestamp{08:25}
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+\LTRfootnote{This is an English footnote.}\footnote{این یک زیرنویس فارسی است.}
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+\expandedtitle{doublebox}{این هم مطلی است مهم یا چیزی که از خلاصهٔ این مقاله ما متوجه شده‌ایم و این برای ما و خوانندگان خیلی مهم است.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+\newsection{قسمت ب}
+
+
+\begin{article}{2}
+ {این یک تیتر کوتاه است.وفا خلیقی}
+ {این هم مثل همیشه زیرتیتر است که ما آن را در اینجا قرار می‌دهیم.}
+ {قسمت ب}
+ {3}
+
+\authorandplace{نام نویسنده}{مکان}
+
+
+
+\noindent\timestamp{08:25} et ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+
+\expandedtitle{lines}{این هم دوباره مطلب مهمی است که ما آن را از لابلای این مقاله برای خواننده درست کرده‌ایم.}
+
+ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{article}
+
+\articlesep
+
+
+\begin{editorial}{1}{این یک مثال از مقاله‌ای از طرف ویرایشگر است.}{نام و نام خانوادگی}{4}
+يژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.
+
+اما معماری همتابه‌همتا ويژگی‌های ديگری نيز دارد که آن را هم برای فراهم‌کنندگان کاربردها و هم برای استفاده‌کنندگان جذاب‌تر می‌کند. از آن‌جا که شبکه‌های همتابه‌همتا از همان زيرساخت‌های اينترنت استفاده می‌کنند ونيازی به راه‌اندازی سرورها ندارند، ساخت اين شبكه‌ها بسيار ارزان‌تر از ايجاد زير ساخت‌های لازم برای راه‌اندازی شبكه‌های مشتری/خدمت‌گزار است. هم‌چنين با زياد شدن تعداد کاربران چون درعمل تعداد گره‌های ارائه کننده‌ی خدمات هم بالا می‌رود، نه تنها عملكرد شبكه افت پيدا نمی‌كند بلكه انتظار بهبود عملکرد نيز می‌رود. گذشته از اين موارد، مالكيت اين شبكه‌ها به صورت اشتراكی بين تمام کاربران پخش شده و هيچ شخص يا شركتی نمی‌تواند سياست‌های دلخواه خود را در اين نوع شبكه‌ها اعمال کند.
+
+اماهيچ چيزی بی‌ بها به دست نمی‌آید. نبود سرور مرکزی اگر چه ويژگی‌های جذابی به شبکه‌های همتابه‌همتا می‌بخشد اما از طرف ديگر آن‌ها را با دشواری‌هايی نيز روبه‌رو می‌کند. عدم وجود يك هماهنگ كننده مركزی در شبكه، انجام بسياری از امور و ارائه خدمات را دچار مشكل می‌کند. از يک طرف، تغيير و رفت‌وآمد زیاد کاربران از ويژگی‌های ذاتی اين شبکه‌ها است و از طرف ديگر در اين شبكه‌ها، ديگر اين گره‌های معمولی هستند كه عهده‌دار تمامی وظايف هستند. به همين دلیل يکی از مشکلات اصلی فراروی اين شبكه‌ها، مقابله با تغييرات لحظه‌ای و فراهم آوردن ثبات در ارائه خدمات در بستری از بی‌ثباتی است.
+\end{editorial}
+
+\articlesep
+
+
+\begin{shortarticle}{4}{محیط مقالهٔ کوتاه}{محیط مقالهٔ کوتاه داخل مجلهٔ زی‌پرشین}{5}
+\shortarticleitem{این یک تیتر کوتاه است}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\shortarticleitem{یک تیتر کوتاه دیگر}{ويژگی اصلی که اين معماری را متمايز کرده و در دنيای اينترنت آن‌ها در مقابل معماری قبلی شبكه‌ها قرار داده است، امكان ايجاد ارتباط مستقيم بين كامپيوترهای مختلف بدون نياز به دخالت سرورهای قدرتمند در بين راه است. نام‌ اين نوع معماری هم در واقع بر گرفته شده از همین ارتباط مستقیم بين گره‌ها است. در واقع در اين نوع شبكه‌ها اثری از سرورها نيست و تمامی گره‌های معمولی موجود در شبكه، بايد وظايفی را که قبلا بر عهده‌ی سرورها بود، خود انجام دهند. بنابراين در اين نوع معماری گره‌های معمولی در ضمن اين‌که از خدمات شبکه بهره‌مند می‌شود بايد نقش خدمت‌گزار را هم ايفا کنند . در اين نوع شبکه‌ها گره‌های معمولی به كمك روش‌ها و پروتكل‌های توزيع شده، تمامی وظايف مسير يابی در شبكه، جستجوی منابع، امنيت شبكه و شناسايی هويت استفاده كننده‌ها و هم‌چنين مقابله با حملات احتمالی مهاجمان را بر عهده دارند.}
+\end{shortarticle}
+
+\articlesep
+
+\end{document}
+%</magazine-sample.tex>
+%<*test-correction.tex>
+\documentclass{article}
+\usepackage[correction]{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+
+\end{document}
+%</test-correction.tex>
+%<*test-empty-form.tex>
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+\bigskip
+
+\begin{center}
+\makeform
+\end{center}
+\end{document}
+%</test-empty-form.tex>
+%<*test-question-only.tex>
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+
+\end{document}
+%</test-question-only.tex>
+%<*test-solution-form.tex>
+\documentclass{article}
+\usepackage{xepersian-multiplechoice}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=1]{Linux Libertine}
+\setdigitfont[Scale=1]{Parsi Digits}
+\begin{document}
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\false $\{(3,2),(3,3)\} $
+\true $\{(2,2),(2,3)\} $
+\false $\{(2,3),(3,3)\} $
+\false $\{(2,2),(3,2)\} $
+\end{question}
+
+\begin{question}{اگر ‎$A=\{ 1,2\} $‎ و ‎$B=\{ 2,3\} $‎ آنگاه حاصل $B^2-A\times B$ کدام است.}
+\true $x$
+\false $y$
+\false $z$
+\false $t$
+\end{question}
+
+\begin{question}{مجموعه‎ $(B-A^{'})^{'}$ ‎برابر است با:}
+\false $B^{'}\bigcap A$
+\false $B'\bigcup A' $
+\true $A$
+\false هیچکدام.
+\end{question}
+
+\begin{question}{صورت متعارفی عدد مختلط ‎$\frac{7+i}{1-i}$‎ کدام است.}
+\false $4+4i$
+\false $4-3i$
+\false $3+4i$
+\true $3-3i$
+\end{question}
+\begin{correction}
+جواب درست یکی از اینها است.
+\end{correction}
+
+\bigskip
+\begin{center}
+\makemask
+\end{center}
+\end{document}
+%</test-solution-form.tex>
+%<*acm-fa-output.tex>
+\documentclass[11pt,a4paper]{article}
+
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{acm-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+\nocite{*}
+\bibliographystyle{acm-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+
+\end{document}
+%</acm-fa-output.tex>
+%<*bibtex-example.tex>
+\documentclass[11pt,a4paper]{article}
+% محمود امین‌طوسی، http://webpages.iust.ac.ir/mamintoosi
+% فایل حاضر مثالی برای استفاده از سبک‌های فارسی در زی‌پرشین می‌باشد.
+% توجه نمایید که برای استفاده از این مثال باید به صورت زیر عمل نمایید:
+% xelatex filename (در نوت‌پد++ F6 یا Ctrl+F6) - با توجه به راهنمای زی‌پرشین
+% bibtex filename (تایپ دستور در خط فرمان نوت‌پد++)
+% xelatex filename (در نوت‌پد++ F6)
+% xelatex filename (در نوت‌پد++ F6 یا Ctrl+F6)
+% در این مثال به جای filename باید bibtex_example قرار دهید.
+% برای ویرایش مدخل‌ها فایل MyReferences.bib را باز کنید. در صورت تغییر این فایل بایستی دو مرحله‌ی میانی را پس از ذخیره‌ی آن اجرا نمایید.
+% در صورت تغییر در ارجاعات در این فایل باید هر چهار مرحله انجام شوند.
+
+% به جای unsrt می‌توانید سایر سبک‌ها را قرار داده و نتیجه را مشاهده نمایید. (plain-fa, acm-fa, ieeetr-fa, persia)
+
+\usepackage{verbatim}
+\usepackage{backref}
+\def\backrefpagesname{}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Times New latin}
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با استیل فارسی \lr{unsrt-fa} برای \lr{BibTeX} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+مرجع \cite{امیدعلی82دکترا} یک نمونه پروژه دکترا و مرجع\cite{واحدی87} یک نمونه مقاله مجله فارسی است.
+مرجع \cite{Baker02limits} یک نمونه مقاله انگلیسی است که در بین مراجع فارسی قرار گرفته است، مرجع \cite{Amintoosi87using} یک نمونه مقاله کنفرانس فارسی و
+مرجع \cite{استالینگ۸۰کتاب} یک نمونه کتاب فارسی با ذکر مترجمان و ویراستاران فارسی است. مرجع \cite{Khalighi07MscThesis} یک نمونه پروژه کارشناسی ارشد انگلیسی و
+\cite{خلیقی۸۷زی‌پرشین} هم یک نمونه متفرقه می‌باشند.
+
+%\nocite{*}
+{\small
+\bibliographystyle{unsrt-fa}%{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+}
+
+\end{document}
+%</bibtex-example.tex>
+%<*ieeetr-fa-output.tex>
+\documentclass[11pt,a4paper]{article}
+% محمود امین‌طوسی، http://webpages.iust.ac.ir/mamintoosi
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{Parsi Digits}
+
+\title{نمونه خروجی با سبک فارسی \lr{ieeetr-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{ieeetr-fa}%{persia}%
+\bibliography{MyReferences}
+
+
+\end{document}
+%</ieeetr-fa-output.tex>
+%<*MyReferences.bib>
+@article{Baker02limits,
+ author = {Baker,, Simon and Kanade,, Takeo},
+ title = {Limits on Super-Resolution and How to Break Them},
+ journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
+ volume = {24},
+ number = {9},
+ year = {2002},
+ issn = {0162-8828},
+ pages = {1167--1183},
+ publisher = {IEEE Computer Society},
+ address = {Washington, DC, USA}
+ }
+
+@CONFERENCE{Amintoosi87using,
+ AUTHOR = {\noopsort{امین‌طوسی,محمود}{امین‌طوسی,محمود} and others},
+ TITLE = {استفاده از تجزیه ماتریس در وضوح برتر},
+ BOOKTITLE = {پنجمین کنفرانس بینائی ماشین},
+ YEAR = {1387},
+ ORGANIZATION = {دانشگاه تبریز},
+ ADDRESS = {تبریز، ایران},
+ PAGES = {172-178},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{پورموسی۸۸ارشد,
+ AUTHOR = {\noopsort{بپورموسی, امیرمسعود}{پورموسی, امیرمسعود}},
+ TITLE = {یک موضوع فیزیک},
+ SCHOOL = {دانشکده فیزیک، دانشگاه صنعتی‌شریف},
+ YEAR = {۱۳۸۸},
+ MONTH = {مرداد},
+ NOTE = {(در حال انجام)},
+ LANGUAGE = {Persian}
+}
+
+@MASTERSTHESIS{Khalighi07MscThesis,
+ AUTHOR = {Vafa Khalighi},
+ TITLE = {Category Theory},
+ SCHOOL = {Sydny Univ.},
+ YEAR = {2007},
+ MONTH = {April}
+}
+
+@PHDTHESIS{امیدعلی82دکترا,
+ AUTHOR = {\noopsort{امیدعلی, مهدی}{امیدعلی, مهدی}},
+ TITLE = {تابع هیلبرت},
+ SCHOOL = {دانشکده ریاضی، دانشگاه امیرکبیر},
+ YEAR = {1382},
+ MONTH = {تیر},
+ LANGUAGE = {Persian}
+}
+
+@MISC{خلیقی۸۷زی‌پرشین,
+ AUTHOR = {\noopsort{خلیقی,وفا}{خلیقی,وفا} and امیدعلی, مهدی and واحدی,مصطفی.},
+ TITLE = {زی‌پرشین (\lr{\XePersian}): بسته فارسی برای حروف‌چینی در \lr{\LaTeX2e}},
+ HOWPUBLISHED = {\lr{http://developer.berlios.de/projects/xepersian}},
+ YEAR = {۱۳۸۷},
+ LANGUAGE = {Persian}
+ }
+
+@BOOK{استالینگ۸۰کتاب,
+ AUTHOR = {\noopsort{استالینگ, ویلیام}{استالینگ, ویلیام}},
+ EDITOR = {برنجکوب, محمود},
+ translator = { صدیقی‌ مشکنانی, محسن and پدرام,حسین },
+ TITLE = {اصول طراحی و ویژگیهای داخلی سیستم‌های عامل},
+ PUBLISHER = {نشر شیخ بهایی},
+ YEAR = {۱۳۸۰},
+ ADDRESS = {اصفهان},
+ edition = {سوم},
+ MONTH = {بهار},
+ LANGUAGE = {Persian}
+}
+
+@ARTICLE{واحدی87,
+ AUTHOR = {\noopsort{واحدی, مصطفی}{واحدی, مصطفی}},
+ TITLE = {موضوعی جدید در هندسه محاسباتی},
+ JOURNAL = {مجله فارسی نمونه},
+ VOLUME = {1},
+ YEAR = {1387},
+ NUMBER = {2},
+ MONTH = {آبان},
+ PAGES = {22-30},
+ LANGUAGE = {Persian}
+}
+
+@CONFERENCE{Amintoosi09regional,
+ author = {Mahmood Amintoosi and Mahmood Fathy and Nasser Mozayani},
+ title = {Regional Varying Image Super-Resolution},
+ booktitle = {(CSO 2009) The 2009 IEEE International Joint Conference on Computational Sciences and Optimization},
+ year = {2009},
+ month = {24-26 April},
+ organization = {City University},
+ address = {Sanya, Hainan, China},
+ pages = {101-105}
+}
+
+@PHDTHESIS{Farsiu05thesis,
+ AUTHOR = {Sina Farsiu},
+ TITLE = {A Fast and Robust Framework for Image Fusion and Enhancement},
+ SCHOOL = {Electrical Engineeting},
+ YEAR = {2005},
+ ADDRESS = {UC Santa Cruz},
+ MONTH = {December}
+}
+
+
+@BOOK{Gonzalez02book,
+ AUTHOR = {Gonzalez,, Rafael C. and Woods,, Richard E.},
+ TITLE = {Digital Image Processing},
+ PUBLISHER = {Prentice-Hall, Inc.},
+ YEAR = {2006},
+ ISBN = {013168728X},
+ EDITION = {3rd},
+ ADDRESS = {Upper Saddle River, NJ, USA},
+}
+%</MyReferences.bib>
+%<*plain-fa-output.tex>
+\documentclass[11pt,a4paper]{article}
+% محمود امین‌طوسی، http://webpages.iust.ac.ir/mamintoosi
+
+\usepackage{verbatim}
+\usepackage{xepersian}
+\settextfont[Scale=1]{XB Zar}%{XB Zar}
+\setlatintextfont[Scale=.95]{Linux Libertine}%{Arial}%
+\setdigitfont{XB Zar}
+
+\title{نمونه خروجی با سبک فارسی \lr{plain-fa} در زی‌پرشین}
+\author{}\date{}
+\begin{document}
+\maketitle
+
+\nocite{*}
+
+\bibliographystyle{plain-fa}%{ieeetr-fa}%{persia}%
+\bibliography{MyReferences1}
+
+
+\end{document}
+%</plain-fa-output.tex>
+% \fi
+%
+% \typeout{*************************************************************}
+% \typeout{*}
+% \typeout{* To finish the installation you have to move the following}
+% \typeout{* file into a directory searched by TeX:}
+% \typeout{*}
+% \typeout{* \space\space\space all *.cls, *.sty and *.def files}
+% \typeout{* You also need to compile the *.map files with teckit_compile}
+% \typeout{* and place the resulting *.tec files under}
+% \typeout{* .../fonts/misc/xetex/fontmapping/xepersian}
+% \typeout{*}
+% \typeout{*************************************************************}
+\endinput
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/algorithm-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/algorithm-xepersian.def
new file mode 100644
index 00000000000..f1bcebdd26d
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/algorithm-xepersian.def
@@ -0,0 +1,32 @@
+%%
+%% This is file `algorithm-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `algorithm-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\ALG@name{\if@RTL الگوریتم\else Algorithm\fi}
+\def\ALGS@name{الگوریتم‌ها}
+\def\listalgorithmname{\if@RTL لیست \ALGS@name\else List of \ALG@name s\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `algorithm-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/algorithmic-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/algorithmic-xepersian.def
new file mode 100644
index 00000000000..3a73b6afd02
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/algorithmic-xepersian.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `algorithmic-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `algorithmic-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\algorithmicrequire{\if@RTL\textbf{ورودی:}\else\textbf{Require:}\fi}
+\def\algorithmicensure{\if@RTL\textbf{خروجی:}\else\textbf{Ensure:}\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `algorithmic-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/amsart-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/amsart-xepersian.def
new file mode 100644
index 00000000000..9c741464de5
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/amsart-xepersian.def
@@ -0,0 +1,34 @@
+%%
+%% This is file `amsart-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `amsart-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `amsart-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/amsbook-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/amsbook-xepersian.def
new file mode 100644
index 00000000000..04376bfd4f8
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/amsbook-xepersian.def
@@ -0,0 +1,37 @@
+%%
+%% This is file `amsbook-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `amsbook-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\frontmatter{\cleardoublepage\pagenumbering{harfi}}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `amsbook-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/article-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/article-xepersian.def
new file mode 100644
index 00000000000..afc406ba099
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/article-xepersian.def
@@ -0,0 +1,34 @@
+%%
+%% This is file `article-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `article-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `article-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def
new file mode 100644
index 00000000000..1b7b9c5a011
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `backref-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `backref-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\backrefpagesname{\if@RTL صفحات\else pages\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `backref-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty b/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty
deleted file mode 100644
index 73af315036c..00000000000
--- a/Master/texmf-dist/tex/xelatex/xepersian/beamerthemexepersian-JLTree.sty
+++ /dev/null
@@ -1,123 +0,0 @@
-%% This is beamerthemexepersian-JLTree.sty (Modified version of beamerthemeJLTree.sty)
-%%
-%% Copyright 2009 by Vafa Khalighi
-%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%%
-%%%% this is versin 1.1 2006/11/18
-%%%%
-%% Copyright Jerome LELONG <jerome.lelong@gmail.com> 2006
-%% This program can be redistributed and/or modified under the terms
-%% of the GNU Public License, version 2 or later.
-\ProvidesPackage{beamerthemexepersian-JLTree}
-
-\newif\ifbeamer@tree@showhooks
-\beamer@tree@showhookstrue
-
-\DeclareOptionBeamer{hooks}[true]{\csname beamer@tree@showhooks#1\endcsname}
-
-\ProcessOptionsBeamer
-\mode
-<presentation>
-
-\setbeamertemplate{navigation symbols}{}
-\usecolortheme{rose}
-\useinnertheme[shadow=true]{rounded}% les block
-
-
-\defbeamertemplate*{footline}{xepersian-JLTree theme}
-{
- \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
- \end{beamercolorbox}
- \hbox{%
- \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{date in head/foot}%
- \usebeamerfont{date in head/foot}
- \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}\beginR\hspace*{2ex}\insertauthor \hspace*{1ex} (\insertshortinstitute) \hspace*{2ex} \insertdate\endR
- \end{beamercolorbox}}%
-}
-
-
-\defbeamertemplate*{sidebar right}{xepersian-JLTree theme}{}
-
-\usesectionheadtemplate
-{\hfil\insertsectionhead}
-{\hfill\color{fg!50!bg}\insertsectionhead}
-
-
-\usesubsectionheadtemplate
-{\hfil\insertsubsectionhead}
-{\hfill\color{fg!50!bg}\insertsubsectionhead}
-
-
-
-\defbeamertemplate*{headline}{xepersian-JLTree theme}
-{%
- \leavevmode%
- \begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{upper separation line head}
- \end{beamercolorbox}
- \@tempdimb=3.625ex% 2.4375ex%
- \multiply\@tempdimb by\beamer@sectionmax%
-%% \advance\@tempdimb by 1.125ex%
- \advance\@tempdimb by -1.125ex%
- \ifdim\@tempdimb<10.9ex% 3*(2.5+1.125)
- \@tempdimb=10.9ex%
- \fi
- \begin{beamercolorbox}[wd=.45\paperwidth, ht=\@tempdimb]{left block}%
- \usebeamerfont{section in head/foot}%
- \vbox to\@tempdimb{\vfill\insertsectionnavigation{.45\paperwidth}\vfill}%
- \end{beamercolorbox}%
- \begin{beamercolorbox}[wd=1.125ex,ht=\@tempdimb,dp=1.125ex]{middle separation line head}%
- \end{beamercolorbox}%
- \begin{beamercolorbox}[wd=.44\paperwidth]{middle block}%
- \vbox to\@tempdimb{\vfill%
- \begin{beamercolorbox}[wd=.44\paperwidth,ht=2.5ex,dp=1.125ex,%
- leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
- \usebeamerfont{title in head/foot}\insertshorttitle
- \end{beamercolorbox}
- \begin{beamercolorbox}[wd=.44\paperwidth,ht=2.5ex,dp=1.125ex,%
- leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}
- \usebeamerfont{section in head/foot}%
- \ifbeamer@tree@showhooks
- \setbox\beamer@tempbox=\hbox{\insertsectionhead}%
- \ifdim\wd\beamer@tempbox>1pt%
- \hskip2pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}%
- \hskip1pt%
- \fi%
- \else%
- \hskip6pt%
- \fi%
- \insertsectionhead
- \end{beamercolorbox}
- \begin{beamercolorbox}[wd=.44\paperwidth,ht=2.5ex,dp=1.125ex,%
- leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
- \usebeamerfont{subsection in head/foot}%
- \ifbeamer@tree@showhooks
- \setbox\beamer@tempbox=\hbox{\insertsubsectionhead}%
- \ifdim\wd\beamer@tempbox>1pt%
- \hskip9.4pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}%
- \hskip1pt%
- \fi%
- \else%
- \hskip12pt%
- \fi%
- \insertsubsectionhead
- \end{beamercolorbox}%
- \vfill}%
- \end{beamercolorbox}%
- \begin{beamercolorbox}[wd=.1\paperwidth,ht=\@tempdimb,right]{right block}%
- \vbox to\@tempdimb{\vfill\insertlogo\vfill}
- \end{beamercolorbox}
- \vfill
- \begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{lower separation line head}
- \end{beamercolorbox}
-}
-\setbeamercolor{separation line}{use=structure,bg=structure.fg!50!bg}
-
-
-\mode
-<all>
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/bidibeamer-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/bidibeamer-xepersian.def
new file mode 100644
index 00000000000..c556ccd3347
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/bidibeamer-xepersian.def
@@ -0,0 +1,45 @@
+%%
+%% This is file `bidibeamer-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bidibeamer-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\familydefault{\rmdefault}
+\def\latin{\bgroup\LatinAlphs\par\raggedright\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\raggedleft\@RTLtrue\@RTL@footnotetrue\persianfont}
+\def\endpersian{\par\egroup}
+\def\biditheoremname{قضیه}
+\def\bidicorollaryname{نتیجه}
+\def\bidifactname{حقیقت}
+\def\bidilemmaname{لم}
+\def\bidiproblemname{مسئله}
+\def\bidisolutionname{پاسخ}
+\def\bididefinitionname{تعریف}
+\def\bididefinitionsname{تعریف‌ها}
+\def\bidiexamplename{مثال}
+\def\bidiexamplesname{مثال‌ها}
+\def\bidiproofname{اثبات}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidibeamer-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/bidimemoir-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/bidimemoir-xepersian.def
new file mode 100644
index 00000000000..289686745a8
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/bidimemoir-xepersian.def
@@ -0,0 +1,40 @@
+%%
+%% This is file `bidimemoir-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bidimemoir-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand{\@memfront}{%
+ \@smemfront\pagenumbering{harfi}}
+\renewcommand{\setthesection}{\thechapter\@SepMark\harfi{section}}
+\renewcommand*{\thebook}{\@tartibi\c@book}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand{\appendix}{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \anappendixtrue}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidimemoir-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/bidimoderncv-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/bidimoderncv-xepersian.def
new file mode 100644
index 00000000000..38e65837ca3
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/bidimoderncv-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `bidimoderncv-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bidimoderncv-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\refname{تألیفات}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidimoderncv-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/book-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/book-xepersian.def
new file mode 100644
index 00000000000..b555567e5ac
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/book-xepersian.def
@@ -0,0 +1,44 @@
+%%
+%% This is file `book-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `book-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `book-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/bookest-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/bookest-xepersian.def
new file mode 100644
index 00000000000..ff5a679666f
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/bookest-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `bookest-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `bookest-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bookest-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/commands-ltx.def b/Master/texmf-dist/tex/xelatex/xepersian/commands-ltx.def
new file mode 100644
index 00000000000..2b3bf59a5e4
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/commands-ltx.def
@@ -0,0 +1,841 @@
+%%
+%% This is file `commands-ltx.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `commands-ltx.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\eqcommand[]{\abovedisplayshortskip}
+\eqcommand[]{\abovedisplayskip}
+\eqcommand[]{\abstractname}
+\eqcommand[]{\acute}
+\eqcommand[]{\addcontentsline}
+\eqcommand[]{\address}
+\eqcommand[]{\addtocontents}
+\eqcommand[]{\addtocounter}
+\eqcommand[]{\addtolength}
+\eqcommand[]{\addvspace}
+\eqcommand[]{\aleph}
+\eqcommand[]{\allowdisplaybreaks}
+\eqcommand[]{\Alph}
+\eqcommand[]{\alph}
+\eqcommand[]{\alpha}
+\eqcommand[]{\alsoname}
+\eqcommand[]{\amalg}
+\eqcommand[]{\and}
+\eqcommand[]{\angle}
+\eqcommand[]{\appendixname}
+\eqcommand[]{\approx}
+\eqcommand[]{\arabic}
+\eqcommand[]{\arccos}
+\eqcommand[]{\arcsin}
+\eqcommand[]{\arctan}
+\eqcommand[]{\arg}
+\eqcommand[]{\arraycolsep}
+\eqcommand[]{\arrayrulewidth}
+\eqcommand[]{\arraystretch}
+\eqcommand[]{\ast}
+\eqcommand[]{\asymp}
+\eqcommand[]{\AtBeginDocument}
+\eqcommand[]{\AtEndDocument}
+\eqcommand[]{\AtEndOfClass}
+\eqcommand[]{\AtEndOfPackage}
+\eqcommand[]{\author}
+\eqcommand[]{\backmatter}
+\eqcommand[]{\backslash}
+\eqcommand[]{\bar}
+\eqcommand[]{\baselineskip}
+\eqcommand[]{\baselinestretch}
+\eqcommand[]{\begin}
+\eqcommand[]{\belowdisplayshortskip}
+\eqcommand[]{\belowdisplayskip}
+\eqcommand[]{\beta}
+\eqcommand[]{\bfdefault}
+\eqcommand[]{\bfseries}
+\eqcommand[]{\bibitem}
+\eqcommand[]{\bibliography}
+\eqcommand[]{\bibliographystyle}
+\eqcommand[]{\bibname}
+\eqcommand[]{\big}
+\eqcommand[]{\Big}
+\eqcommand[]{\bigcap}
+\eqcommand[]{\bigcirc}
+\eqcommand[]{\bigcup}
+\eqcommand[]{\bigg}
+\eqcommand[]{\Bigg}
+\eqcommand[]{\bigodot}
+\eqcommand[]{\bigoplus}
+\eqcommand[]{\bigotimes}
+\eqcommand[]{\bigskip}
+\eqcommand[]{\bigskipamount}
+\eqcommand[]{\bigsqcup}
+\eqcommand[]{\bigtriangledown}
+\eqcommand[]{\bigtriangleup}
+\eqcommand[]{\biguplus}
+\eqcommand[]{\bigvee}
+\eqcommand[]{\bigwedge}
+\eqcommand[]{\binom}
+\eqcommand[]{\bmod}
+\eqcommand[]{\boldmath}
+\eqcommand[]{\boldsymbol}
+\eqcommand[]{\bot}
+\eqcommand[]{\botfigrule}
+\eqcommand[]{\bottomfraction}
+\eqcommand[]{\bowtie}
+\eqcommand[]{\Box}
+\eqcommand[]{\boxed}
+\eqcommand[]{\breve}
+\eqcommand[]{\bullet}
+\eqcommand[]{\cap}
+\eqcommand[]{\caption}
+\eqcommand[]{\cc}
+\eqcommand[]{\ccname}
+\eqcommand[]{\cdot}
+\eqcommand[]{\cdots}
+\eqcommand[]{\centering}
+\eqcommand[]{\centerline}
+\eqcommand[]{\cfrac}
+\eqcommand[]{\chapter}
+\eqcommand[]{\chapter*}
+\eqcommand[]{\chaptername}
+\eqcommand[]{\check}
+\eqcommand[]{\CheckCommand}
+\eqcommand[]{\chi}
+\eqcommand[]{\circ}
+\eqcommand[]{\circle}
+\eqcommand[]{\circle*}
+\eqcommand[]{\cite}
+\eqcommand[]{\citep}
+\eqcommand[]{\citet}
+\eqcommand[]{\ClassError}
+\eqcommand[]{\ClassInfo}
+\eqcommand[]{\ClassWarning}
+\eqcommand[]{\ClassWarningNoLine}
+\eqcommand[]{\cleardoublepage}
+\eqcommand[]{\clearpage}
+\eqcommand[]{\cline}
+\eqcommand[]{\closing}
+\eqcommand[]{\clubsuit}
+\eqcommand[]{\color}
+\eqcommand[]{\colorbox}
+\eqcommand[]{\columnsep}
+\eqcommand[]{\columnseprule}
+\eqcommand[]{\cong}
+\eqcommand[]{\contentsline}
+\eqcommand[]{\contentsname}
+\eqcommand[]{\coprod}
+\eqcommand[]{\copyright}
+\eqcommand[]{\cos}
+\eqcommand[]{\cosh}
+\eqcommand[]{\cot}
+\eqcommand[]{\coth}
+\eqcommand[]{\csc}
+\eqcommand[]{\cup}
+\eqcommand[]{\CurrentOption}
+\eqcommand[]{\dag}
+\eqcommand[]{\dagger}
+\eqcommand[]{\dashbox}
+\eqcommand[]{\dashv}
+\eqcommand[]{\date}
+\eqcommand[]{\dbinom}
+\eqcommand[]{\dblfigrule}
+\eqcommand[]{\dblfloatpagefraction}
+\eqcommand[]{\dblfloatsep}
+\eqcommand[]{\dbltextfloatsep}
+\eqcommand[]{\dbltopfraction}
+\eqcommand[]{\ddag}
+\eqcommand[]{\ddagger}
+\eqcommand[]{\dddot}
+\eqcommand[]{\ddddot}
+\eqcommand[]{\ddot}
+\eqcommand[]{\ddots}
+\eqcommand[]{\DeclareGraphicsExtensions}
+\eqcommand[]{\DeclareGraphicsRule}
+\eqcommand[]{\DeclareOption}
+\eqcommand[]{\DeclareOption*}
+\eqcommand[]{\DeclareRobustCommand}
+\eqcommand[]{\DeclareRobustCommand*}
+\eqcommand[]{\definecolor}
+\eqcommand[]{\deg}
+\eqcommand[]{\DeleteShortVerb}
+\eqcommand[]{\Delta}
+\eqcommand[]{\delta}
+\eqcommand[]{\depth}
+\eqcommand[]{\det}
+\eqcommand[]{\dfrac}
+\eqcommand[]{\Diamond}
+\eqcommand[]{\diamond}
+\eqcommand[]{\diamondsuit}
+\eqcommand[]{\dim}
+\eqcommand[]{\discretionary}
+\eqcommand[]{\displaybreak}
+\eqcommand[]{\displaystyle}
+\eqcommand[]{\div}
+\eqcommand[]{\documentclass}
+\eqcommand[]{\dot}
+\eqcommand[]{\doteq}
+\eqcommand[]{\dotfill}
+\eqcommand[]{\dots}
+\eqcommand[]{\dotsb}
+\eqcommand[]{\dotsc}
+\eqcommand[]{\dotsi}
+\eqcommand[]{\dotsm}
+\eqcommand[]{\doublebox}
+\eqcommand[]{\doublerulesep}
+\eqcommand[]{\Downarrow}
+\eqcommand[]{\downarrow}
+\eqcommand[]{\ell}
+\eqcommand[]{\em}
+\eqcommand[]{\emph}
+\eqcommand[]{\emptyset}
+\eqcommand[]{\encl}
+\eqcommand[]{\enclname}
+\eqcommand[]{\end}
+\eqcommand[]{\endfirsthead}
+\eqcommand[]{\endfoot}
+\eqcommand[]{\endhead}
+\eqcommand[]{\endlastfoot}
+\eqcommand[]{\enlargethispage}
+\eqcommand[]{\enlargethispage*}
+\eqcommand[]{\ensuremath}
+\eqcommand[]{\epsilon}
+\eqcommand[]{\eqref}
+\eqcommand[]{\equiv}
+\eqcommand[]{\eta}
+\eqcommand[]{\euro}
+\eqcommand[]{\EUR}
+\eqcommand[]{\evensidemargin}
+\eqcommand[]{\ExecuteOptions}
+\eqcommand[]{\exists}
+\eqcommand[]{\exp}
+\eqcommand[]{\extracolsep}
+\eqcommand[]{\fancypage}
+\eqcommand[]{\fbox}
+\eqcommand[]{\fboxrule}
+\eqcommand[]{\fboxsep}
+\eqcommand[]{\fcolorbox}
+\eqcommand[]{\figurename}
+\eqcommand[]{\fill}
+\eqcommand[]{\flat}
+\eqcommand[]{\floatpagefraction}
+\eqcommand[]{\floatsep}
+\eqcommand[]{\flushbottom}
+\eqcommand[]{\fnsymbol}
+\eqcommand[]{\fontfamily}
+\eqcommand[]{\fontseries}
+\eqcommand[]{\fontshape}
+\eqcommand[]{\fontsize}
+\eqcommand[]{\LTRfootnote}
+\eqcommand[]{\footnote}
+\eqcommand[]{\footnotemark}
+\eqcommand[]{\footnoterule}
+\eqcommand[]{\footnotesep}
+\eqcommand[]{\footnotesize}
+\eqcommand[]{\footnotetext}
+\eqcommand[]{\footskip}
+\eqcommand[]{\forall}
+\eqcommand[]{\frac}
+\eqcommand[]{\frame}
+\eqcommand[]{\framebox}
+\eqcommand[]{\frenchspacing}
+\eqcommand[]{\frontmatter}
+\eqcommand[]{\frown}
+\eqcommand[]{\fussy}
+\eqcommand[]{\Gamma}
+\eqcommand[]{\gamma}
+\eqcommand[]{\gcd}
+\eqcommand[]{\ge}
+\eqcommand[]{\genfrac}
+\eqcommand[]{\geq}
+\eqcommand[]{\gets}
+\eqcommand[]{\gg}
+\eqcommand[]{\glossary}
+\eqcommand[]{\glossaryentry}
+\eqcommand[]{\graphpaper}
+\eqcommand[]{\grave}
+\eqcommand[]{\guillemotleft}
+\eqcommand[]{\guillemotright}
+\eqcommand[]{\guilsinglleft}
+\eqcommand[]{\guilsinglright}
+\eqcommand[]{\hat}
+\eqcommand[]{\hbar}
+\eqcommand[]{\headheight}
+\eqcommand[]{\headsep}
+\eqcommand[]{\headtoname}
+\eqcommand[]{\heartsuit}
+\eqcommand[]{\height}
+\eqcommand[]{\hfill}
+\eqcommand[]{\hline}
+\eqcommand[]{\hoffset}
+\eqcommand[]{\hom}
+\eqcommand[]{\hookleftarrow}
+\eqcommand[]{\hookrightarrow}
+\eqcommand[]{\hrulefill}
+\eqcommand[]{\hspace}
+\eqcommand[]{\hspace*}
+\eqcommand[]{\huge}
+\eqcommand[]{\Huge}
+\eqcommand[]{\hyperlink}
+\eqcommand[]{\hypersetup}
+\eqcommand[]{\hypertarget}
+\eqcommand[]{\hyphenation}
+\eqcommand[]{\idotsint}
+\eqcommand[]{\iff}
+\eqcommand[]{\IfFileExists}
+\eqcommand[]{\ifthenelse}
+\eqcommand[]{\Im}
+\eqcommand[]{\imath}
+\eqcommand[]{\in}
+\eqcommand[]{\include}
+\eqcommand[]{\includegraphics}
+\eqcommand[]{\includegraphics*}
+\eqcommand[]{\includeonly}
+\eqcommand[]{\indent}
+\eqcommand[]{\index}
+\eqcommand[]{\indexentry}
+\eqcommand[]{\indexname}
+\eqcommand[]{\indexspace}
+\eqcommand[]{\inf}
+\eqcommand[]{\infty}
+\eqcommand[]{\input}
+\eqcommand[]{\InputIfFileExists}
+\eqcommand[]{\int}
+\eqcommand[]{\iint}
+\eqcommand[]{\iiint}
+\eqcommand[]{\iiiint}
+\eqcommand[]{\intertext}
+\eqcommand[]{\intertextsep}
+\eqcommand[]{\invisible}
+\eqcommand[]{\iota}
+\eqcommand[]{\itdefault}
+\eqcommand[]{\item}
+\eqcommand[]{\itemindent}
+\eqcommand[]{\itemsep}
+\eqcommand[]{\itshape}
+\eqcommand[]{\jmath}
+\eqcommand[]{\join}
+\eqcommand[]{\jot}
+\eqcommand[]{\kappa}
+\eqcommand[]{\ker}
+\eqcommand[]{\kill}
+\eqcommand[]{\label}
+\eqcommand[]{\labelenumi}
+\eqcommand[]{\labelenumii}
+\eqcommand[]{\labelenumiii}
+\eqcommand[]{\labelenumiv}
+\eqcommand[]{\labelitemi}
+\eqcommand[]{\labelitemii}
+\eqcommand[]{\labelitemiii}
+\eqcommand[]{\labelitemiv}
+\eqcommand[]{\labelsep}
+\eqcommand[]{\labelwidth}
+\eqcommand[]{\Lambda}
+\eqcommand[]{\lambda}
+\eqcommand[]{\langle}
+\eqcommand[]{\language}
+\eqcommand[]{\large}
+\eqcommand[]{\Large}
+\eqcommand[]{\LARGE}
+\eqcommand[]{\LaTeX}
+\eqcommand[]{\LaTeXe}
+\eqcommand[]{\lceil}
+\eqcommand[]{\ldots}
+\eqcommand[]{\le}
+\eqcommand[]{\leadsto}
+\eqcommand[]{\left}
+\eqcommand[]{\Leftarrow}
+\eqcommand[]{\leftarrow}
+\eqcommand[]{\lefteqn}
+\eqcommand[]{\leftharpoondown}
+\eqcommand[]{\leftharpoonup}
+\eqcommand[]{\leftmargin}
+\eqcommand[]{\Leftrightarrow}
+\eqcommand[]{\leftrightarrow}
+\eqcommand[]{\leftroot}
+\eqcommand[]{\leq}
+\eqcommand[]{\lfloor}
+\eqcommand[]{\lg}
+\eqcommand[]{\lhd}
+\eqcommand[]{\lim}
+\eqcommand[]{\liminf}
+\eqcommand[]{\limits}
+\eqcommand[]{\limsup}
+\eqcommand[]{\line}
+\eqcommand[]{\linebreak}
+\eqcommand[]{\linethickness}
+\eqcommand[]{\linewidth}
+\eqcommand[]{\listfigurename}
+\eqcommand[]{\listfiles}
+\eqcommand[]{\listoffigures}
+\eqcommand[]{\listoftables}
+\eqcommand[]{\listparindent}
+\eqcommand[]{\listtablename}
+\eqcommand[]{\ll}
+\eqcommand[]{\ln}
+\eqcommand[]{\LoadClass}
+\eqcommand[]{\LoadClassWithOptions}
+\eqcommand[]{\location}
+\eqcommand[]{\log}
+\eqcommand[]{\Longleftarrow}
+\eqcommand[]{\longleftarrow}
+\eqcommand[]{\Longleftrightarrow}
+\eqcommand[]{\longleftrightarrow}
+\eqcommand[]{\longmapsto}
+\eqcommand[]{\Longrightarrow}
+\eqcommand[]{\longrightarrow}
+\eqcommand[]{\lvert}
+\eqcommand[]{\lVert}
+\eqcommand[]{\mainmatter}
+\eqcommand[]{\makebox}
+\eqcommand[]{\makeglossary}
+\eqcommand[]{\makeindex}
+\eqcommand[]{\makelabel}
+\eqcommand[]{\makelabels}
+\eqcommand[]{\MakeLowercase}
+\eqcommand[]{\MakeShortVerb}
+\eqcommand[]{\maketitle}
+\eqcommand[]{\MakeUppercase}
+\eqcommand[]{\mapsto}
+\eqcommand[]{\marginpar}
+\eqcommand[]{\marginparpush}
+\eqcommand[]{\marginparsep}
+\eqcommand[]{\marginparwidth}
+\eqcommand[]{\markboth}
+\eqcommand[]{\markright}
+\eqcommand[]{\mathbf}
+\eqcommand[]{\mathcal}
+\eqcommand[]{\mathindent}
+\eqcommand[]{\mathit}
+\eqcommand[]{\mathnormal}
+\eqcommand[]{\mathring}
+\eqcommand[]{\mathrm}
+\eqcommand[]{\mathsf}
+\eqcommand[]{\mathtt}
+\eqcommand[]{\max}
+\eqcommand[]{\mbox}
+\eqcommand[]{\mddefault}
+\eqcommand[]{\mdseries}
+\eqcommand[]{\medskip}
+\eqcommand[]{\medskipamount}
+\eqcommand[]{\medspace}
+\eqcommand[]{\MessageBreak}
+\eqcommand[]{\mho}
+\eqcommand[]{\mid}
+\eqcommand[]{\min}
+\eqcommand[]{\mod}
+\eqcommand[]{\models}
+\eqcommand[]{\mp}
+\eqcommand[]{\mspace}
+\eqcommand[]{\mu}
+\eqcommand[]{\multicolumn}
+\eqcommand[]{\multiput}
+\eqcommand[]{\multlinegap}
+\eqcommand[]{\nabla}
+\eqcommand[]{\name}
+\eqcommand[]{\natural}
+\eqcommand[]{\nearrow}
+\eqcommand[]{\NeedsTeXFormat}
+\eqcommand[]{\neg}
+\eqcommand[]{\negmedspace}
+\eqcommand[]{\negthickspace}
+\eqcommand[]{\negthinspace}
+\eqcommand[]{\neq}
+\eqcommand[]{\newboolean}
+\eqcommand[]{\newcommand}
+\eqcommand[]{\newcommand*}
+\eqcommand[]{\newcounter}
+\eqcommand[]{\newenvironment}
+\eqcommand[]{\newenvironment*}
+\eqcommand[]{\newfont}
+\eqcommand[]{\newlength}
+\eqcommand[]{\newline}
+\eqcommand[]{\newpage}
+\eqcommand[]{\newsavebox}
+\eqcommand[]{\newtheorem}
+\eqcommand[]{\ni}
+\eqcommand[]{\nocite}
+\eqcommand[]{\nofiles}
+\eqcommand[]{\noindent}
+\eqcommand[]{\nolimits}
+\eqcommand[]{\nolinebreak}
+\eqcommand[]{\nonfrenchspacing}
+\eqcommand[]{\nonumber}
+\eqcommand[]{\nopagebreak}
+\eqcommand[]{\normalcolor}
+\eqcommand[]{\normalfont}
+\eqcommand[]{\normalmarginpar}
+\eqcommand[]{\normalsize}
+\eqcommand[]{\not}
+\eqcommand[]{\notag}
+\eqcommand[]{\notin}
+\eqcommand[]{\nu}
+\eqcommand[]{\numberwithin}
+\eqcommand[]{\nwarrow}
+\eqcommand[]{\oddsidemargin}
+\eqcommand[]{\odot}
+\eqcommand[]{\oint}
+\eqcommand[]{\Omega}
+\eqcommand[]{\omega}
+\eqcommand[]{\ominus}
+\eqcommand[]{\onecolumn}
+\eqcommand[]{\onlynotes}
+\eqcommand[]{\onlyslides}
+\eqcommand[]{\opening}
+\eqcommand[]{\oplus}
+\eqcommand[]{\OptionNotUsed}
+\eqcommand[]{\oslash}
+\eqcommand[]{\otimes}
+\eqcommand[]{\oval}
+\eqcommand[]{\ovalbox}
+\eqcommand[]{\Ovalbox}
+\eqcommand[]{\overbrace}
+\eqcommand[]{\overleftarrow}
+\eqcommand[]{\overleftrightarrow}
+\eqcommand[]{\overline}
+\eqcommand[]{\overrightarrow}
+\eqcommand[]{\overset}
+\eqcommand[]{\PackageError}
+\eqcommand[]{\PackageInfo}
+\eqcommand[]{\PackageWarning}
+\eqcommand[]{\PackageWarningNoLine}
+\eqcommand[]{\pagebreak}
+\eqcommand[]{\pagecolor}
+\eqcommand[]{\pagename}
+\eqcommand[]{\pagenumbering}
+\eqcommand[]{\pageref}
+\eqcommand[]{\pagestyle}
+\eqcommand[]{\paperheight}
+\eqcommand[]{\paperwidth}
+\eqcommand[]{\par}
+\eqcommand[]{\paragraph}
+\eqcommand[]{\paragraph*}
+\eqcommand[]{\parallel}
+\eqcommand[]{\parbox}
+\eqcommand[]{\parindent}
+\eqcommand[]{\parsep}
+\eqcommand[]{\parskip}
+\eqcommand[]{\part}
+\eqcommand[]{\part*}
+\eqcommand[]{\partial}
+\eqcommand[]{\partname}
+\eqcommand[]{\partopsep}
+\eqcommand[]{\PassOptionToClass}
+\eqcommand[]{\PassOptionToPackage}
+\eqcommand[]{\path}
+\eqcommand[]{\prep}
+\eqcommand[]{\Phi}
+\eqcommand[]{\phi}
+\eqcommand[]{\Pi}
+\eqcommand[]{\pi}
+\eqcommand[]{\pm}
+\eqcommand[]{\pmb}
+\eqcommand[]{\pmod}
+\eqcommand[]{\pod}
+\eqcommand[]{\poptabs}
+\eqcommand[]{\pounds}
+\eqcommand[]{\Pr}
+\eqcommand[]{\prec}
+\eqcommand[]{\preceq}
+\eqcommand[]{\prime}
+\eqcommand[]{\printindex}
+\eqcommand[]{\ProcessOptions}
+\eqcommand[]{\ProcessOptions*}
+\eqcommand[]{\prod}
+\eqcommand[]{\propto}
+\eqcommand[]{\protect}
+\eqcommand[]{\providecommand}
+\eqcommand[]{\providecommand*}
+\eqcommand[]{\ProvidesClass}
+\eqcommand[]{\ProvidesFile}
+\eqcommand[]{\ProvidesPackage}
+\eqcommand[]{\ps}
+\eqcommand[]{\Psi}
+\eqcommand[]{\psi}
+\eqcommand[]{\pushtabs}
+\eqcommand[]{\put}
+\eqcommand[]{\qbezier}
+\eqcommand[]{\qquad}
+\eqcommand[]{\quad}
+\eqcommand[]{\raggedbottom}
+\eqcommand[]{\raggedleft}
+\eqcommand[]{\raggedright}
+\eqcommand[]{\raisebox}
+\eqcommand[]{\raisetag}
+\eqcommand[]{\rangle}
+\eqcommand[]{\rceil}
+\eqcommand[]{\Re}
+\eqcommand[]{\ref}
+\eqcommand[]{\reflectbox}
+\eqcommand[]{\refname}
+\eqcommand[]{\refstepcounter}
+\eqcommand[]{\renewcommand}
+\eqcommand[]{\renewcommand*}
+\eqcommand[]{\renewenvironment}
+\eqcommand[]{\renewenvironment*}
+\eqcommand[]{\RequirePackage}
+\eqcommand[]{\RequirePackageWithOptions}
+\eqcommand[]{\resizebox}
+\eqcommand[]{\resizebox*}
+\eqcommand[]{\reversemarginpar}
+\eqcommand[]{\rfloor}
+\eqcommand[]{\rhd}
+\eqcommand[]{\rho}
+\eqcommand[]{\right}
+\eqcommand[]{\Rightarrow}
+\eqcommand[]{\rightarrow}
+\eqcommand[]{\rightharpoondown}
+\eqcommand[]{\rightharpoonup}
+\eqcommand[]{\rightleftharpoons}
+\eqcommand[]{\rightmargin}
+\eqcommand[]{\rmdefault}
+\eqcommand[]{\rmfamily}
+\eqcommand[]{\Roman}
+\eqcommand[]{\roman}
+\eqcommand[]{\rotatebox}
+\eqcommand[]{\rule}
+\eqcommand[]{\rvert}
+\eqcommand[]{\rVert}
+\eqcommand[]{\savebox}
+\eqcommand[]{\sbox}
+\eqcommand[]{\scalebox}
+\eqcommand[]{\scdefault}
+\eqcommand[]{\scriptscriptstyle}
+\eqcommand[]{\scriptsize}
+\eqcommand[]{\scripstyle}
+\eqcommand[]{\scshape}
+\eqcommand[]{\searrow}
+\eqcommand[]{\sec}
+\eqcommand[]{\section}
+\eqcommand[]{\section*}
+\eqcommand[]{\see}
+\eqcommand[]{\seealso}
+\eqcommand[]{\seename}
+\eqcommand[]{\selectfont}
+\eqcommand[]{\setboolean}
+\eqcommand[]{\setcounter}
+\eqcommand[]{\setlength}
+\eqcommand[]{\setminus}
+\eqcommand[]{\settodepth}
+\eqcommand[]{\settoheight}
+\eqcommand[]{\settowidth}
+\eqcommand[]{\sfdefault}
+\eqcommand[]{\sffamily}
+\eqcommand[]{\shadowbox}
+\eqcommand[]{\sharp}
+\eqcommand[]{\shortstack}
+\eqcommand[]{\sideset}
+\eqcommand[]{\Sigma}
+\eqcommand[]{\sigma}
+\eqcommand[]{\signature}
+\eqcommand[]{\sim}
+\eqcommand[]{\simeq}
+\eqcommand[]{\sin}
+\eqcommand[]{\sinh}
+\eqcommand[]{\sldefault}
+\eqcommand[]{\sloppy}
+\eqcommand[]{\slshape}
+\eqcommand[]{\small}
+\eqcommand[]{\smallskip}
+\eqcommand[]{\smallskipamount}
+\eqcommand[]{\smash}
+\eqcommand[]{\smile}
+\eqcommand[]{\spadesuit}
+\eqcommand[]{\sqcap}
+\eqcommand[]{\sqcup}
+\eqcommand[]{\sqrt}
+\eqcommand[]{\sqsubset}
+\eqcommand[]{\sqsubseteq}
+\eqcommand[]{\sqsupset}
+\eqcommand[]{\sqsupseteq}
+\eqcommand[]{\stackrel}
+\eqcommand[]{\star}
+\eqcommand[]{\stepcounter}
+\eqcommand[]{\stretch}
+\eqcommand[]{\subitem}
+\eqcommand[]{\subparagraph}
+\eqcommand[]{\subparagraph*}
+\eqcommand[]{\subsection}
+\eqcommand[]{\subsection*}
+\eqcommand[]{\substack}
+\eqcommand[]{\subsubitem}
+\eqcommand[]{\subsubsection}
+\eqcommand[]{\subsubsection*}
+\eqcommand[]{\subset}
+\eqcommand[]{\subseteq}
+\eqcommand[]{\succ}
+\eqcommand[]{\succeq}
+\eqcommand[]{\sum}
+\eqcommand[]{\sup}
+\eqcommand[]{\supressfloats}
+\eqcommand[]{\supset}
+\eqcommand[]{\supseteq}
+\eqcommand[]{\surd}
+\eqcommand[]{\swarrow}
+\eqcommand[]{\tabbingsep}
+\eqcommand[]{\tabcolsep}
+\eqcommand[]{\tableofcontents}
+\eqcommand[]{\tablename}
+\eqcommand[]{\tabularnewline}
+\eqcommand[]{\tag}
+\eqcommand[]{\tan}
+\eqcommand[]{\tanh}
+\eqcommand[]{\tau}
+\eqcommand[]{\tbinom}
+\eqcommand[]{\telephone}
+\eqcommand[]{\TeX}
+\eqcommand[]{\text}
+\eqcommand[]{\textbullet}
+\eqcommand[]{\textemdash}
+\eqcommand[]{\textendash}
+\eqcommand[]{\textexclamdown}
+\eqcommand[]{\textperiodcentered}
+\eqcommand[]{\textquestiondown}
+\eqcommand[]{\textquotedblleft}
+\eqcommand[]{\textquotedblright}
+\eqcommand[]{\textquoteleft}
+\eqcommand[]{\textquoteright}
+\eqcommand[]{\textvisiblespace}
+\eqcommand[]{\textasciicircum}
+\eqcommand[]{\textasciitilde}
+\eqcommand[]{\textbackslash}
+\eqcommand[]{\textbar}
+\eqcommand[]{\textgreater}
+\eqcommand[]{\textless}
+\eqcommand[]{\textbf}
+\eqcommand[]{\textcircled}
+\eqcommand[]{\textcolor}
+\eqcommand[]{\textcompwordmark}
+\eqcommand[]{\textfloatsep}
+\eqcommand[]{\textfraction}
+\eqcommand[]{\textheight}
+\eqcommand[]{\textit}
+\eqcommand[]{\textmd}
+\eqcommand[]{\textnormal}
+\eqcommand[]{\textregistered}
+\eqcommand[]{\textrm}
+\eqcommand[]{\textsc}
+\eqcommand[]{\textsf}
+\eqcommand[]{\textsl}
+\eqcommand[]{\textstyle}
+\eqcommand[]{\textsuperscript}
+\eqcommand[]{\texttrademark}
+\eqcommand[]{\texttt}
+\eqcommand[]{\textup}
+\eqcommand[]{\textwidth}
+\eqcommand[]{\tfrac}
+\eqcommand[]{\thanks}
+\eqcommand[]{\Theta}
+\eqcommand[]{\theta}
+\eqcommand[]{\thicklines}
+\eqcommand[]{\thickspace}
+\eqcommand[]{\thinlines}
+\eqcommand[]{\thinspace}
+\eqcommand[]{\thisfancypage}
+\eqcommand[]{\thispagestyle}
+\eqcommand[]{\tilde}
+\eqcommand[]{\tiny}
+\eqcommand[]{\times}
+\eqcommand[]{\title}
+\eqcommand[]{\to}
+\eqcommand[]{\today}
+\eqcommand[]{\top}
+\eqcommand[]{\topfigrule}
+\eqcommand[]{\topfraction}
+\eqcommand[]{\topmargin}
+\eqcommand[]{\topsep}
+\eqcommand[]{\topskip}
+\eqcommand[]{\totalheight}
+\eqcommand[]{\triangle}
+\eqcommand[]{\triangleleft}
+\eqcommand[]{\triangleright}
+\eqcommand[]{\ttdefault}
+\eqcommand[]{\ttfamily}
+\eqcommand[]{\twocolumn}
+\eqcommand[]{\typein}
+\eqcommand[]{\typeout}
+\eqcommand[]{\unboldmath}
+\eqcommand[]{\underbrace}
+\eqcommand[]{\underleftarrow}
+\eqcommand[]{\underleftrightarrow}
+\eqcommand[]{\underline}
+\eqcommand[]{\underrightarrow}
+\eqcommand[]{\underset}
+\eqcommand[]{\unitlength}
+\eqcommand[]{\unlhd}
+\eqcommand[]{\unrhd}
+\eqcommand[]{\Uparrow}
+\eqcommand[]{\uparrow}
+\eqcommand[]{\updefault}
+\eqcommand[]{\Updownarrow}
+\eqcommand[]{\updownarrow}
+\eqcommand[]{\uplus}
+\eqcommand[]{\upshape}
+\eqcommand[]{\Upsilon}
+\eqcommand[]{\upsilon}
+\eqcommand[]{\uproot}
+\eqcommand[]{\url}
+\eqcommand[]{\urlstyle}
+\eqcommand[]{\usebox}
+\eqcommand[]{\usecounter}
+\eqcommand[]{\usefont}
+\eqcommand[]{\usepackage}
+\eqcommand[]{\value}
+\eqcommand[]{\varepsilon}
+\eqcommand[]{\varinjlim}
+\eqcommand[]{\varliminf}
+\eqcommand[]{\varlimsup}
+\eqcommand[]{\varphi}
+\eqcommand[]{\varpi}
+\eqcommand[]{\varprojlim}
+\eqcommand[]{\varrho}
+\eqcommand[]{\varsigma}
+\eqcommand[]{\vartheta}
+\eqcommand[]{\vdash}
+\eqcommand[]{\vdots}
+\eqcommand[]{\vec}
+\eqcommand[]{\vector}
+\eqcommand[]{\vee}
+\eqcommand[]{\verb}
+\eqcommand[]{\verb*}
+\eqcommand[]{\vfill}
+\eqcommand[]{\visible}
+\eqcommand[]{\vline}
+\eqcommand[]{\voffset}
+\eqcommand[]{\vpageref}
+\eqcommand[]{\vref}
+\eqcommand[]{\vspace}
+\eqcommand[]{\vspace*}
+\eqcommand[]{\wedge}
+\eqcommand[]{\whiledo}
+\eqcommand[]{\widehat}
+\eqcommand[]{\widetilde}
+\eqcommand[]{\width}
+\eqcommand[]{\wp}
+\eqcommand[]{\wr}
+\eqcommand[]{\Xi}
+\eqcommand[]{\xi}
+\eqcommand[]{\xleftarrow}
+\eqcommand[]{\xrightarrow}
+\eqcommand[]{\zeta}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `commands-ltx.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def
new file mode 100644
index 00000000000..62b7995cba6
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `commands-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `commands-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `commands-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/enumerate-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/enumerate-xepersian.def
new file mode 100644
index 00000000000..6f1998fd675
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/enumerate-xepersian.def
@@ -0,0 +1,45 @@
+%%
+%% This is file `enumerate-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `enumerate-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\@enloop@{%
+ \ifx ا\@entemp \def\@tempa{\@enLabel\harfi }\else
+ \ifx ی\@entemp \def\@tempa{\@enLabel\adadi }\else
+ \ifx ت\@entemp \def\@tempa{\@enLabel\tartibi }\else
+ \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else
+ \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else
+ \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else
+ \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else
+ \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else
+ \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else
+ \ifx \bgroup\@entemp \let\@tempa\@enGroup \else
+ \ifx \@enum@\@entemp \let\@tempa\@gobble \else
+ \let\@tempa\@enOther
+ \@enhook
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \@tempa}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `enumerate-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/environments-ltx.def b/Master/texmf-dist/tex/xelatex/xepersian/environments-ltx.def
new file mode 100644
index 00000000000..996ce5b3047
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/environments-ltx.def
@@ -0,0 +1,91 @@
+%%
+%% This is file `environments-ltx.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `environments-ltx.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\eqenvironment[]{abstract}
+\eqenvironment[]{align}
+\eqenvironment[]{alignat}
+\eqenvironment[]{aligned}
+\eqenvironment[]{appendix}
+\eqenvironment[]{array}
+\eqenvironment[]{center}
+\eqenvironment[]{alltt}
+\eqenvironment[]{bmatrix}
+\eqenvironment[]{Bmatrix}
+\eqenvironment[]{cases}
+\eqenvironment[]{description}
+\eqenvironment[]{displaymath}
+\eqenvironment[]{enumerate}
+\eqenvironment[]{eqnarray}
+\eqenvironment[]{eqnarray*}
+\eqenvironment[]{equation}
+\eqenvironment[]{equation*}
+\eqenvironment[]{falign}
+\eqenvironment[]{figure}
+\eqenvironment[]{figure*}
+\eqenvironment[]{filecontents}
+\eqenvironment[]{filecontents*}
+\eqenvironment[]{flushleft}
+\eqenvironment[]{flushright}
+\eqenvironment[]{gather}
+\eqenvironment[]{gathered}
+\eqenvironment[]{itemize}
+\eqenvironment[]{letter}
+\eqenvironment[]{list}
+\eqenvironment[]{longtable}
+\eqenvironment[]{lrbox}
+\eqenvironment[]{math}
+\eqenvironment[]{matrix}
+\eqenvironment[]{minipage}
+\eqenvironment[]{multicols}
+\eqenvironment[]{multline}
+\eqenvironment[]{note}
+\eqenvironment[]{overlay}
+\eqenvironment[]{picture}
+\eqenvironment[]{pmatrix}
+\eqenvironment[]{quotation}
+\eqenvironment[]{quote}
+\eqenvironment[]{slide}
+\eqenvironment[]{sloppypar}
+\eqenvironment[]{split}
+\eqenvironment[]{subarray}
+\eqenvironment[]{subequations}
+\eqenvironment[]{tabbing}
+\eqenvironment[]{table}
+\eqenvironment[]{table*}
+\eqenvironment[]{tabular}
+\eqenvironment[]{tabular*}
+\eqenvironment[]{thebibliography}
+\eqenvironment[]{theindex}
+\eqenvironment[]{titlepage}
+\eqenvironment[]{trivlist}
+\eqenvironment[]{verbatim}
+\eqenvironment[]{verbatim*}
+\eqenvironment[]{verse}
+\eqenvironment[]{vmatrix}
+\eqenvironment[]{Vmatrix}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `environments-ltx.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def
new file mode 100644
index 00000000000..86e1256ccc4
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def
@@ -0,0 +1,30 @@
+%%
+%% This is file `environments-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `environments-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `environments-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/extbook-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/extbook-xepersian.def
new file mode 100644
index 00000000000..298e9fe9186
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/extbook-xepersian.def
@@ -0,0 +1,44 @@
+%%
+%% This is file `extbook-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `extbook-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{harfi}}
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `extbook-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/footnote-bidi-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/footnote-bidi-xepersian.def
new file mode 100644
index 00000000000..e71891a73be
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/footnote-bidi-xepersian.def
@@ -0,0 +1,113 @@
+%%
+%% This is file `footnote-bidi-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `footnote-bidi-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\long\def\@footnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@RTLfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLtrue\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\persianfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@LTRfootnotetext#1{%
+ \begingroup
+ \setbox\footins
+ \vbox{\@RTLfalse\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \bidi@footnotetext@dir{#1}%
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces\latinfont #1\strut}}%
+ \bidi@footnotetext@after
+ \insert\footins{\unvbox\footins}%
+ \endgroup}
+\long\def\@mpfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpRTLfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLtrue
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\persianfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+\long\def\@mpLTRfootnotetext#1{
+ \global\setbox\@mpfootins\vbox{\@RTLfalse
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}
+ \color@begingroup
+ \bidi@footnotetext@dir{#1}
+ \if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi
+ \@makefntext{
+ \rule\z@\footnotesep\ignorespaces\latinfont#1\@finalstrut\strutbox}
+ \color@endgroup}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `footnote-bidi-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/img/ireland.jpg b/Master/texmf-dist/tex/xelatex/xepersian/img/ireland.jpg
new file mode 100755
index 00000000000..bacd5b97700
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/img/ireland.jpg
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/img/weather/clouds.jpg b/Master/texmf-dist/tex/xelatex/xepersian/img/weather/clouds.jpg
new file mode 100755
index 00000000000..b4073a07231
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/img/weather/clouds.jpg
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/img/weather/rain.jpg b/Master/texmf-dist/tex/xelatex/xepersian/img/weather/rain.jpg
new file mode 100755
index 00000000000..f33b75e7a0c
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/img/weather/rain.jpg
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/img/weather/sun.jpg b/Master/texmf-dist/tex/xelatex/xepersian/img/weather/sun.jpg
new file mode 100755
index 00000000000..1e823100386
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/img/weather/sun.jpg
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
new file mode 100644
index 00000000000..76325f1a653
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
@@ -0,0 +1,70 @@
+%%
+%% This is file `kashida-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `kashida-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\chardef\zwj="200D % zero-width joiner
+\chardef\ksh="0640 % kashida
+
+\chardef\D=10 % dual-joiner class
+\chardef\L=11 % lam
+\chardef\R=12 % right-joiner
+\chardef\A=13 % alef
+\chardef\V=256 % vowel or other combining mark (to be ignored)
+
+\def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
+ \leaders\hrule height\ht0 \hskip0pt plus 0.5em \zwj}
+
+\def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}%
+ \expandafter\dosetclass\charlist,\end}
+\def\dosetclass#1,#2\end{%
+ \def\test{#1}\def\charlist{#2}%
+ \ifx\test\empty\let\next\finishsetclass
+ \else \XeTeXcharclass "\test = \theclass
+ \let\next\dosetclass \fi
+ \expandafter\next\charlist,,\end}
+\def\finishsetclass#1,,\end{}
+
+\setclass \A {0622,0623,0625,0627}
+\setclass \R {0624,0629,062F,0630,0631,0632,0648,0698}
+\setclass \D {0626,0628,062A,062B,062C,062D,062E}
+\setclass \D {0633,0634,0635,0636,0637,0638,0639,063A}
+\setclass \D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
+\setclass \D {067E,0686,06A9,06AF,06CC}
+\setclass \L {0644}
+\setclass \V {064B,064C,064D,064E,064F,0650,0651,0652}
+
+\XeTeXinterchartoks \D \D = {\kashida}
+\XeTeXinterchartoks \L \D = {\kashida}
+\XeTeXinterchartoks \D \L = {\kashida}
+\XeTeXinterchartoks \L \L = {\kashida}
+\XeTeXinterchartoks \D \R = {\kashida}
+\XeTeXinterchartoks \D \A = {\kashida}
+\XeTeXinterchartoks \L \R = {\kashida}
+\XeTeXinterchartoks \L \A = {}
+
+\XeTeXinterchartokenstate=1
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `kashida-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/listings-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/listings-xepersian.def
new file mode 100644
index 00000000000..5963ea43195
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/listings-xepersian.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `listings-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `listings-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\lstlistingname{برنامهٔ}
+\def\lstlistlistingname{فهرست برنامه‌ها}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `listings-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/localise-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/localise-xepersian.def
new file mode 100644
index 00000000000..a5fdd4d44a0
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/localise-xepersian.def
@@ -0,0 +1,53 @@
+%%
+%% This is file `localise-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `localise-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\catcode`\﷼=3
+\catcode`‌=11
+\newcommand\eqcommand[2][]{\let#1=#2}
+\newcommand\eqenvironment[2][]{\newenvironment{#1}{\begin{#2}}{\end{#2}}}
+\define@key[zf]{options}{مقیاس}{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{MatchLowercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{5}%
+ \else
+ \edef\@tempb{MatchUppercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{8}%
+ \else
+ \edef\zf@scale{#1}%
+ \fi
+ \fi
+ \zf@update@family{+scale:\zf@scale}%
+ \edef\zf@scale{s*[\zf@scale]}}
+\input{commands-ltx.def}
+\input{commands-xepersian.def}
+\input{environments-ltx.def}
+\input{environments-xepersian.def}
+\input{misccommandsenvironments-ltx.def}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `localise-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/minitoc-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/minitoc-xepersian.def
new file mode 100644
index 00000000000..67ff92b9753
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/minitoc-xepersian.def
@@ -0,0 +1,38 @@
+%%
+%% This is file `minitoc-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `minitoc-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\ptctitle{\if@RTL فهرست مطالب\else Table of Contents\fi}%
+\def\plftitle{\if@RTL لیست تصاویر\else List of Figures\fi}%
+\def\plttitle{\if@RTL لیست جداول\else List of Tables\fi}%
+\def\mtctitle{\if@RTL عناوین\else Contents\fi}%
+\def\mlftitle{\if@RTL اشکال\else Figures\fi}%
+\def\mlttitle{\if@RTL جداول\else Tables\fi}%
+\def\stctitle{\if@RTL عناوین\else Contents\fi}%
+\def\slftitle{\if@RTL اشکال\else Figures\fi}%
+\def\slttitle{\if@RTL جداول\else Tables\fi}%
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `minitoc-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/misccommandsenvironments-ltx.def b/Master/texmf-dist/tex/xelatex/xepersian/misccommandsenvironments-ltx.def
new file mode 100644
index 00000000000..305d8903472
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/misccommandsenvironments-ltx.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `misccommandsenvironments-ltx.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `misccommandsenvironments-ltx.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\eqcommand[\سند]{\document}
+\eqcommand[\endسند]{\enddocument}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `misccommandsenvironments-ltx.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty b/Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty
deleted file mode 100644
index 43de9c1be5c..00000000000
--- a/Master/texmf-dist/tex/xelatex/xepersian/persianpoem.sty
+++ /dev/null
@@ -1,217 +0,0 @@
-%% Copyright(C) 2002, 2004 Behdad Esfahbod <behdad@farsitex.org>
-%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.2
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.2 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
-%%
-%% TODO: Add some penalties and whistles to newpoem
-%%
-\ifx\fmtname{LaTeX2e}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{persianpoem}%
- [2004/09/27 Environments for Setting Persian Poetry]
-\else
- \typeout{2004/09/27 Environments for Setting Persian Poetry}
-\fi
-
-\def\poemcolsepskip{.1\versewidth plus .1\versewidth minus .05\versewidth}
-\def\poemmarginskip{1em plus 1fil minus 1em}
-\def\poemextrabaselineskip{0\baselineskip}
-\def\poemskip{\medskip}
-\def\poemblocksep{\quad$\Box$}
-
-%% oldpoem environment
-
-\newdimen\versewidth
-
-\def\poem@verse#1{%
- \ifdim\wd#1>\new@poem@width
- \xdef\new@poem@width{\the\wd#1}%
- \ifdim\new@poem@width>\poem@width
- \xdef\poem@width{\new@poem@width}%
- \global\let\poem@needrun\relax
- \fi
- \fi
- \hbox to\poem@width{\unhbox#1}%
-}
-\def\poem@linebegin{\vadjust{}\hskip\@flushglue\hskip\poemmarginskip\relax}
-\def\poem@lineend{\nobreak\hskip\poemmarginskip\hskip\@flushglue\vadjust{}}
-\def\poem@lineversesep{%
- \nobreak
- \hskip\z@ plus 1filll%
- \penalty600%
- \hskip\poemcolsepskip
- \hskip\z@ plus -2filll%
- \vadjust{}%
- \nobreak
- \hskip\z@ plus 1filll%
-}
-
-\def\poem@lineparsebegin{%
- \halign\bgroup
- \global\setbox\verse@i=\hbox{\ignorespaces##\unskip}&&
- \global\setbox\verse@ii=\hbox{\ignorespaces##\unskip}
- \cr
-}
-\def\poem@lineparseend{%
- \crcr\egroup
- \vskip-\baselineskip
-}
-\def\oldpoem@cr{%
- \cr\poem@line
-}
-
-\newbox\verse@i
-\newbox\verse@ii
-\newif\ifpoem@started
-
-\def\poem@line{%
- \poem@lineparseend
-%
- \ifdim\wd\verse@i>\z@\global\poem@startedtrue\fi
- \ifdim\wd\verse@ii>\z@\global\poem@startedtrue\fi
- \ifpoem@started
- \ifdim\wd\verse@ii>\z@\else
- \nopagebreak[3]
- \fi
- \leavevmode
- \poem@linebegin
- \poem@verse\verse@i
- \ifdim\wd\verse@ii>\z@
- \poem@lineversesep
- \poem@verse\verse@ii
- \fi
- \poem@lineend
- \nopagebreak
- \endgraf
- \vskip\poemextrabaselineskip
- \fi
-%
- \poem@lineparsebegin
-}
-\def\@oldpoem{%
- \stepcounter{poem@no}
- \ifnum\max@poem@no<\number\c@poem@no%
- \xdef\poem@width{\z@}%
- \else
- \xdef\poem@width{\poem@prop{poem@width}}%
- \fi
- \xdef\new@poem@width{\z@}%
- \global\versewidth=\poem@width
- \poemskip\leavevmode\par
- \begingroup
- \tabskip=\z@
- \parskip=\z@
- \parindent=\z@
- \parfillskip=\z@
- \rightskip=\z@
- \leftskip=\z@
- \widowpenalty=10000% No break between verses of the same line.
- \clubpenalty=10000% Same as above. Not really needed.
- \def\newblock{\hfil\poemblocksep\hfil\null}%
- \def\par{\oldpoem@cr}% Redefine \par for possible \obeylines
- \def\\{\global\poem@startedtrue\oldpoem@cr}%
- \global\poem@startedfalse
- \csname poem@obeylines\endcsname
- \let\poem@obeylines\relax
- \poem@lineparsebegin
-}
-\def\@endoldpoem{%
- \cr
- \ifdim\wd\verse@i>\z@\poem@line\else\ifdim\wd\verse@ii>\z@\poem@line\else
- \noalign{%
- \skip0=\poemextrabaselineskip
- \vskip-\skip0
- \vskip-\baselineskip
- }%
- \fi\fi
- \poem@lineparseend
- \endgroup
- \par
- \vskip\baselineskip
- \poemskip
- \ifdim\new@poem@width<\poem@width
- \global\let\poem@needrun\relax
- \fi
- \poem@write@aux{poem@width@\romannumeral\c@poem@no}{\new@poem@width}%
- \ifx\AtEndDocument\undefined\poem@finish\fi
-}
-\newenvironment{oldpoem}{\@oldpoem}{\@endoldpoem}
-
-\expandafter\def\csname oldpoem*\endcsname{\let\poem@obeylines=\obeylines\oldpoem}
-\expandafter\def\csname endoldpoem*\endcsname{\endoldpoem}
-
-
-\def\poem@finish{%
- \poem@write@aux{max@poem@no}{\number\c@poem@no}%
- \ifx\poem@needrun\relax
- \@@warning{Unjustified poetry. Rerun to get poems right}%
- \global\let\poem@needrun\undefined
- \fi
-}
-\ifx\AtEndDocument\undefined\else\AtEndDocument\poem@finish\fi
-
-\newcounter{poem@no}\setcounter{poem@no}{\z@}
-\ifx\max@poem@no\undefined
- \def\max@poem@no{0}%
-\fi
-
-\newcommand{\poem@prop}[1]{\@nameuse{#1@\romannumeral\c@poem@no}}
-
-\newcommand{\poem@write@aux}[2]{%
- \def\@x{\immediate\write\@auxout{\global\noexpand\@namedef{#1}{#2}}}%
- \@x
-}
-
-%% newpoem environment
-
-\def\@newpoem{%
- \par
- \begingroup
- \parskip=\z@
- \parindent=\z@
- \def\[{\@settab\@tabplus\ignorespaces}%
- \def\]{\@tabminus\ignorespaces}%
- \def\newblock{\poemblocksep}%
- \let\newpoem@tabcr\@tabcr
- \def\par{% Redefine \par for possible \obeylines
- \ifpoem@started\else
- \ifdim\wd\@curline>\z@\global\poem@startedtrue\else
- \@stopfield
- \ifdim\wd\@curfield>\z@\global\poem@startedtrue\fi
- \@contfield
- \fi
- \fi
- \ifpoem@started\newpoem@tabcr\fi}%
- \def\@tabcr{\global\poem@startedtrue\newpoem@tabcr}%
- \global\poem@startedfalse
- \csname poem@obeylines\endcsname
- \let\poem@obeylines\relax
- \begin{tabbing}%
-}
-\def\@endnewpoem{%
- \global\poem@startedfalse
- \ifdim\wd\@curline>\z@\global\poem@startedtrue\else
- \@stopfield
- \ifdim\wd\@curfield>\z@\global\poem@startedtrue\fi
- \@contfield
- \fi
- \ifpoem@started\else\let\@stopline\@stopfield\fi
- \end{tabbing}%
- \endgroup
- \par
-}
-
-\newenvironment{newpoem}{\@newpoem}{\@endnewpoem}
-
-\expandafter\def\csname newpoem*\endcsname{\let\poem@obeylines=\obeylines\newpoem}
-\expandafter\def\csname endnewpoem*\endcsname{\endnewpoem}
-
-
-\endinput
-
-
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/rapport3-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/rapport3-xepersian.def
new file mode 100644
index 00000000000..c4f35c6a5f6
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/rapport3-xepersian.def
@@ -0,0 +1,35 @@
+%%
+%% This is file `rapport3-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `rapport3-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\thepart{\@tartibi\c@part}
+\renewcommand*\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `rapport3-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/refrep-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/refrep-xepersian.def
new file mode 100644
index 00000000000..7c34218c196
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/refrep-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `refrep-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `refrep-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `refrep-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/report-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/report-xepersian.def
new file mode 100644
index 00000000000..d88e4ece981
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/report-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `report-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `report-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `report-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def
new file mode 100644
index 00000000000..beafd08bf27
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def
@@ -0,0 +1,64 @@
+%%
+%% This is file `scrartcl-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `scrartcl-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@harfi\c@section}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `scrartcl-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def
new file mode 100644
index 00000000000..eb621e8468b
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def
@@ -0,0 +1,69 @@
+%%
+%% This is file `scrbook-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `scrbook-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*\frontmatter{%
+ \if@twoside\cleardoubleoddpage\else\clearpage\fi
+ \@mainmatterfalse\pagenumbering{harfi}%
+}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `scrbook-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/scrreprt-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/scrreprt-xepersian.def
new file mode 100644
index 00000000000..ce36d9f3d8c
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/scrreprt-xepersian.def
@@ -0,0 +1,65 @@
+%%
+%% This is file `scrreprt-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `scrreprt-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*\descfont{\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\DeclareOldFontCommand{\sf}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\if@RTL\persianttfamily\else\ttfamily\fi}{\mathtt}
+\DeclareOldFontCommand{\sfb}{\normalfont\if@RTL\persiansffamily\else\sffamily\fi\bfseries}{%
+ \@nomath\sfb}
+\renewcommand*\sectfont{\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\bfseries}
+\newkomafont{dictum-xepersian}{\normalfont\normalcolor\if@RTL\persiansffamily\else\sffamily\fi\small}
+\renewcommand*{\thepart}{\@tartibi\c@part}
+\renewcommand*\appendix{\par%
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}%
+ \csname appendixmore\endcsname
+}
+\renewcommand*{\@@maybeautodot}[1]{%
+ \ifx #1\@stop\let\@@maybeautodot\relax
+ \else
+ \ifx #1\harfi \@autodottrue\fi
+ \ifx #1\adadi \@autodottrue\fi
+ \ifx #1\tartibi \@autodottrue\fi
+ \ifx #1\Alph \@autodottrue\fi
+ \ifx #1\alph \@autodottrue\fi
+ \ifx #1\Roman \@autodottrue\fi
+ \ifx #1\roman \@autodottrue\fi
+ \ifx #1\@harfi \@autodottrue\fi
+ \ifx #1\@adadi \@autodottrue\fi
+ \ifx #1\@tartibi \@autodottrue\fi
+ \ifx #1\@Alph \@autodottrue\fi
+ \ifx #1\@alph \@autodottrue\fi
+ \ifx #1\@Roman \@autodottrue\fi
+ \ifx #1\@roman \@autodottrue\fi
+ \ifx #1\romannumeral \@autodottrue\fi
+ \fi
+ \@@maybeautodot
+}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `scrreprt-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/tocloft-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/tocloft-xepersian.def
new file mode 100644
index 00000000000..72821e6cae7
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/tocloft-xepersian.def
@@ -0,0 +1,39 @@
+%%
+%% This is file `tocloft-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `tocloft-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand*{\cftchapname}{\if@RTL فصل\else chapter\fi}
+\renewcommand*{\cftsecname}{\if@RTL قسمت\else section\fi}
+\renewcommand*{\cftsubsecname}{\if@RTL زیرقسمت\else subsection\fi}
+\renewcommand*{\cftsubsubsecname}{\if@RTL زیرزیرقسمت\else subsubsection\fi}
+\renewcommand*{\cftparaname}{\if@RTL پاراگراف\else paragraph\fi}
+\renewcommand*{\cftsubparaname}{\if@RTL زیرپاراگراف\else subparagraph\fi}
+\renewcommand*{\cftfigname}{\if@RTL شکل\else figure\fi}
+\renewcommand*{\cftsubfigname}{\if@RTL زیرشکل\else subfigure\fi}
+\renewcommand*{\cfttabname}{\if@RTL جدول\else table\fi}
+\renewcommand*{\cftsubtabname}{\if@RTL زیرجدول\else subtable\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `tocloft-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls
index e7a1e9889f8..f17eec1b48f 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-magazine.cls
@@ -1,10 +1,17 @@
-%% This file is xepersian-magazine.cls
%%
-%% Copyright 2009 by Vafa Khalighi
+%% This is file `xepersian-magazine.cls',
+%% generated with the docstrip utility.
%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-magazine.cls')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{xepersian-magazine}[2009/01/05 v0.1 Typesetting Persian magazines in XeLaTeX (Author: Vafa Khalighi)]
\RequirePackage{ifthen}
@@ -413,7 +420,6 @@ keepaspectratio ]{#1}}}
{
\setboolean{xepersian@insidefrontpage}{true}
\thispagestyle{empty}
-%\pdfbookmark[1]{صفحهٔ اول}{\thepage}
\logo
}%
@@ -778,7 +784,6 @@ indexblock environment may only appear inside frontpage environment.
\par %
}
\newcommand{\newsection}[1]{
-%\pdfbookmark[0]{#1}{\thepage} %bookmark para el pdf
\renewcommand{\xepersian@section}{#1}
}
\newenvironment{article}[5]
@@ -876,4 +881,18 @@ indexblock environment may only appear inside frontpage environment.
\vspace{5pt plus 3pt minus 3pt}
{\noindent #2}\\
}
-\endinput
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-magazine.cls'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty
index b2f5b4ec1b2..845b7398b75 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty
@@ -1,72 +1,63 @@
-%% This file is xepersian-mathsdigitspec.sty
%%
-%% Copyright 2009 by Vafa Khalighi
+%% This is file `xepersian-mathsdigitspec.sty',
+%% generated with the docstrip utility.
%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-mathsdigitspec.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xepersian-mathsdigitspec}
- [2009/01/05 v0.2 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)]
+ [2009/04/22 v1.0.1 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)]
\@zf@mathfalse
-\newif\if@um@fontspec@feature
-\def\um@Loop#1\um@Pool{#1\um@Loop#1\um@Pool}
-\def\um@Break#1\um@Pool{}
-\long\def\um@FOR#1=[#2:#3]\do#4{%
- #1=#2\relax
- \um@Loop #4%
- \advance#1\@ne
- \ifnum#1>#3\relax
- \expandafter\um@Break
- \fi
- \um@Pool}
-\newcommand\um@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}}
-\def\um@usv@num{`\0}
+\def\@preamblecmds{}
+\newcommand\not@onlypreamble[1]{{%
+ \def\do##1{\ifx#1##1\else\noexpand\do\noexpand##1\fi}%
+ \xdef\@preamblecmds{\@preamblecmds}}}
+\def\gm@notprerr{ can be used only in preamble (\on@line)}
+\AtBeginDocument{%
+ \def\do#1{\noexpand\do\noexpand#1}%
+ \edef\@preamblecmds{%
+ \def\noexpand\do##1{%
+ \def##1{\noexpand\PackageError{gmutils/LaTeX}%
+ {\noexpand\string##1 \noexpand\gm@notprerr}\noexpand\@eha}}%
+ \@preamblecmds}}
+\def\nocite#1{%
+ \@bsphack{\setbox0=\hbox{\cite{#1}}}\@esphack}
+\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}}
\newcommand\SetMathCode[4]{%
\XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
\newcommand\SetMathCharDef[4]{%
\XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
\newcommand\setdigitfont[2][]{%
- \csname S@\f@size\endcsname
- \def\um@ScriptFeatures{ScriptStyle}%
- \def\um@ScriptScriptFeatures{ScriptScriptStyle}%
- \def\um@ScriptFont{#2}%
- \def\um@ScriptScriptFont{#2}%
- \setkeys*[um]{options}{#1}%
+ \let\glb@currsize\relax
+ \setkeys*[xepersian-mathsdigitspec]{options}{#1}%
\edef\@tempa{\noexpand\zf@fontspec{%
- Mapping=parsidigits,SizeFeatures={%
- {Size=\tf@size-},%
- {Size=\sf@size-\tf@size,%
- Font=\um@ScriptFont,%
- \um@ScriptFeatures},%
- {Size=-\sf@size,%
- Font=\um@ScriptScriptFont,%
- \um@ScriptScriptFeatures}},%
\XKV@rm}{#2}}\@tempa
- \def\um@digitfont{um@digitfont}%
- \um@PackageInfo{Defining the default Persian maths digits font as '#2'}%
- \DeclareSymbolFont{momayez}{EU1}{\zf@family}{m}{n}%
- \SetMathCharDef{\momayez}{\mathpunct}{momayez}{"066B}%
-\DeclareSymbolFont{\um@digitfont}
- {\encodingdefault}{\zf@family}{\mddefault}{\updefault}%
-\um@def@numbers
+ \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
+ \DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n}
+ \SetSymbolFont{OPERATORS}{bold}{EU1}{\zf@family} {bx}{n}
+ \DeclareMathAlphabet {\mathit}{EU1}{\zf@family}{m}{it}
+ \DeclareSymbolFontAlphabet{\mathrm} {OPERATORS}
+ \DeclareMathAlphabet {\mathbf}{EU1}{\zf@family}{bx}{n}
+ \SetMathCode{`0}{\mathalpha}{OPERATORS}{"06F0}
+ \SetMathCode{`1}{\mathalpha}{OPERATORS}{"06F1}
+ \SetMathCode{`2}{\mathalpha}{OPERATORS}{"06F2}
+ \SetMathCode{`3}{\mathalpha}{OPERATORS}{"06F3}
+ \SetMathCode{`4}{\mathalpha}{OPERATORS}{"06F4}
+ \SetMathCode{`5}{\mathalpha}{OPERATORS}{"06F5}
+ \SetMathCode{`6}{\mathalpha}{OPERATORS}{"06F6}
+ \SetMathCode{`7}{\mathalpha}{OPERATORS}{"06F7}
+ \SetMathCode{`8}{\mathalpha}{OPERATORS}{"06F8}
+ \SetMathCode{`9}{\mathalpha}{OPERATORS}{"06F9}
+ \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}
}
-\newcommand\um@zf@feature[2]{%
- \define@key[zf]{options}{#1}[]{%
- \if@um@fontspec@feature
- #2
- \fi}}
-\um@zf@feature{ScriptStyle}{%
- \zf@update@ff{+ssty=0}}
-\um@zf@feature{ScriptScriptStyle}{%
- \zf@update@ff{+ssty=1}}
-\newcommand\um@setmathcode[3][1]{%
- \@for\um@inp:=#2\do{%
- \um@FOR\@tempcnta=[1:#1]\do{%
- \SetMathCode{\numexpr\um@inp+\@tempcnta-1\relax}
- {\mathalpha}{\um@digitfont}{\numexpr#3+\@tempcnta-1\relax}}}}
-\newcommand\um@def@numbers{%
- \um@setmathcode[10]{\um@usv@num}{\um@usv@num}}
\ifx\newcommand\undefined\else
\newcommand{\ZifferAn}{}
\fi
@@ -97,5 +88,19 @@
\fi
\fi}
\mathcode`.="8000\relax
-\def\ZifferLeer{\ifx\momayez\undefied .\else \momayez\fi}
-\endinput
+\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-mathsdigitspec.sty'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
new file mode 100644
index 00000000000..226ccacf409
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
@@ -0,0 +1,164 @@
+%%
+%% This is file `xepersian-multiplechoice.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-multiplechoice.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-multiplechoice}[2009/03/21 v0.1
+ Multiple Choice Questionnaire class for Persian in XeLaTeX (Author: Vafa Khalighi)]
+\RequirePackage{pifont}
+\RequirePackage{fullpage}
+\RequirePackage{ifthen}
+\RequirePackage{calc}
+\RequirePackage{verbatim}
+\RequirePackage{fmultico}
+\def\@headerfont{\bfseries}
+\newcommand\headerfont[1]{\gdef\@headerfont{#1}}
+\def\@X{X}
+\newcommand\X[1]{\gdef\@X{#1}}
+\def\pbs#1{\let\tmp=\\#1\let\\=\tmp}
+\newcommand\makeform@nocorrection{%
+ \addtocontents{frm}{\protect\end{tabular}}
+ \@starttoc{frm}}
+\newcommand\makeform@correction{%
+ \addtocontents{frm}{\protect\end{tabular}}}
+\newcommand\makemask@nocorrection{%
+ \addtocontents{msk}{\protect\end{tabular}}
+ \@starttoc{msk}}
+\newcommand\makemask@correction{%
+ \addtocontents{msk}{\protect\end{tabular}}}
+\newlength\questionspace
+\setlength\questionspace{0pt}
+\newcommand\answerstitle[1]{\gdef\@answerstitle{#1}}
+\def\@answerstitlefont{\bfseries}
+\newcommand\answerstitlefont[1]{\gdef\@answerstitlefont{#1}}
+\def\@answernumberfont{\bfseries}
+\newcommand\answernumberfont[1]{\gdef\@answernumberfont{#1}}
+\newcounter{question}\stepcounter{question}
+\newcounter{@choice}
+\def\@initorcheck{%
+ \xdef\@choices{\the@choice}%
+ \setcounter{@choice}{1}%
+ \gdef\@arraydesc{|l||}%
+ \gdef\@headerline{}%
+ \whiledo{\not{\value{@choice}>\@choices}}{
+ \xdef\@arraydesc{\@arraydesc c|}
+ \def\@appendheader{\g@addto@macro\@headerline}
+ \@appendheader{&\protect\@headerfont}
+ \edef\@the@choice{{\alph{@choice}}}
+ \expandafter\@appendheader\@the@choice
+ \stepcounter{@choice}}%
+ \addtocontents{frm}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \addtocontents{msk}{%
+ \protect\begin{tabular}{\@arraydesc}
+ \protect\hline
+ \@headerline\protect\\\protect\hline\protect\hline}%
+ \gdef\@initorcheck{%
+ \ifthenelse{\value{@choice} = \@choices}{}{%
+ \ClassError{xepersian-multiplechoice}{Question \thequestion: wrong number of choices
+ (\the@choice\space instead of \@choices)}{%
+ Questions must all have the same number of proposed answers.%
+ \MessageBreak
+ Type X <return> to quit, fix your MCQ (multiple choice question) and rerun XeLaTeX.}}}}
+\newenvironment{question}[1]{%
+ %% \begin{question}
+ \begin{minipage}{\textwidth}
+ \xdef\@formanswerline{\@questionheader}%
+ \xdef\@maskanswerline{\@questionheader}%
+ \fbox{\parbox[c]{\linewidth}{#1}}
+ \vspace\questionspace\par
+ {\@answerstitlefont\@answerstitle}
+\begin{multicols}{4}
+ \begin{list}{\@answernumberfont\alph{@choice})~}{\usecounter{@choice}}}{%
+ %% \end{question}
+ \end{list}
+\end{multicols}
+ \@initorcheck%
+ \addtocontents{frm}{\@formanswerline\protect\\\protect\hline}%
+ \addtocontents{msk}{\@maskanswerline\protect\\\protect\hline}%
+ \end{minipage}
+ \stepcounter{question}}
+\def\@truesymbol{\ding{52}~}
+\def\@falsesymbol{\ding{56}~}
+\newcommand\truesymbol[1]{\gdef\@truesymbol{#1}}
+\newcommand\falsesymbol[1]{\gdef\@falsesymbol{#1}}
+\def\@true@nocorrection{\item}
+\def\@false@nocorrection{\item}
+\def\@true@correction{\item[\@truesymbol\refstepcounter{@choice}]}
+\def\@false@correction{\item[\@falsesymbol\refstepcounter{@choice}]}
+\newcommand\true{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&\@X}%
+ \@true}%
+\newcommand\false{%
+ \xdef\@formanswerline{\@formanswerline&}%
+ \xdef\@maskanswerline{\@maskanswerline&}%
+ \@false}%
+\def\@correctionstyle{\itshape}
+\newcommand\correctionstyle[1]{\gdef\@correctionstyle{#1}}
+\newenvironment{@correction}{\@correctionstyle}{}
+ \def\@questionheader{سؤال \thequestion}
+ \answerstitle{جوابهای ممکن:}
+\DeclareOption{nocorrection}{%
+ \let\@true\@true@nocorrection
+ \let\@false\@false@nocorrection
+ \let\correction\comment
+ \let\endcorrection\endcomment
+ \def\makeform{\makeform@nocorrection}
+ \def\makemask{\makemask@nocorrection}}
+\DeclareOption{correction}{%
+ \let\@true\@true@correction
+ \let\@false\@false@correction
+ \let\correction\@correction
+ \let\endcorrection\end@correction
+ \def\makeform{\makeform@correction}
+ \def\makemask{\makemask@correction}}
+\ExecuteOptions{nocorrection}
+\newcommand\questiontitle[1]{\gdef\@questiontitle{#1}}
+\def\@questiontitlefont{\bfseries}
+\newcommand\questiontitlefont[1]{\gdef\@questiontitlefont{#1}}
+\newlength\questiontitlespace
+\setlength\questiontitlespace{5pt}
+\newlength\questionsepspace
+\setlength\questionsepspace{20pt}
+\gdef\@questionsepspace{0pt}
+\let\old@question\question
+\let\old@endquestion\endquestion
+\renewenvironment{question}[1]{%
+ %% \begin{question}
+ \vspace\@questionsepspace
+ \fbox{\parbox[c]{0.25\linewidth}{\@questiontitlefont\@questiontitle}}
+ \nopagebreak\vspace\questiontitlespace\par
+ \old@question{#1}}{%
+ %% \end{question}
+ \old@endquestion
+ \gdef\@questionsepspace{\questionsepspace}}
+ \questiontitle{سؤال \thequestion:}
+\ProcessOptions
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-multiplechoice.sty'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-persiancal.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-persiancal.sty
new file mode 100644
index 00000000000..c3ed422f0d6
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-persiancal.sty
@@ -0,0 +1,197 @@
+%%
+%% This is file `xepersian-persiancal.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-persiancal.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xepersian-persiancal}
+
+\newif\ifXePersian@leap \newif\ifXePersian@kabiseh
+\newcount\XePersian@i \newcount\XePersian@y \newcount\XePersian@m \newcount\XePersian@d
+\newcount\XePersian@latini \newcount\XePersian@persiani
+\newcount\XePersian@latinii \newcount\XePersian@persianii
+\newcount\XePersian@latiniii \newcount\XePersian@persianiii
+\newcount\XePersian@latiniv \newcount\XePersian@persianiv
+\newcount\XePersian@latinv \newcount\XePersian@persianv
+\newcount\XePersian@latinvi \newcount\XePersian@persianvi
+\newcount\XePersian@latinvii \newcount\XePersian@persianvii
+\newcount\XePersian@latinviii \newcount\XePersian@persianviii
+\newcount\XePersian@latinix \newcount\XePersian@persianix
+\newcount\XePersian@latinx \newcount\XePersian@persianx
+\newcount\XePersian@latinxi \newcount\XePersian@persianxi
+\newcount\XePersian@latinxii \newcount\XePersian@persianxii
+ \newcount\XePersian@persianxiii
+
+\newcount\XePersian@temp
+\newcount\XePersian@temptwo
+\newcount\XePersian@tempthree
+\newcount\XePersian@yModHundred
+\newcount\XePersian@thirtytwo
+\newcount\XePersian@dn
+\newcount\XePersian@sn
+\newcount\XePersian@mminusone
+
+\def\persiantoday{%
+\XePersian@y=\year \XePersian@m=\month \XePersian@d=\day
+\XePersian@temp=\XePersian@y
+\divide\XePersian@temp by 100\relax
+\multiply\XePersian@temp by 100\relax
+\XePersian@yModHundred=\XePersian@y
+\advance\XePersian@yModHundred by -\XePersian@temp\relax
+\ifodd\XePersian@yModHundred
+ \XePersian@leapfalse
+\else
+ \XePersian@temp=\XePersian@yModHundred
+ \divide\XePersian@temp by 2\relax
+ \ifodd\XePersian@temp\XePersian@leapfalse
+ \else
+ \ifnum\XePersian@yModHundred=0%
+ \XePersian@temp=\XePersian@y
+ \divide\XePersian@temp by 400\relax
+ \multiply\XePersian@temp by 400\relax
+ \ifnum\XePersian@y=\XePersian@temp\XePersian@leaptrue\else\XePersian@leapfalse\fi
+ \else\XePersian@leaptrue
+ \fi
+ \fi
+\fi
+\XePersian@latini=31\relax
+\ifXePersian@leap
+ \XePersian@latinii = 29\relax
+\else
+ \XePersian@latinii = 28\relax
+\fi
+\XePersian@latiniii = 31\relax
+\XePersian@latiniv = 30\relax
+\XePersian@latinv = 31\relax
+\XePersian@latinvi = 30\relax
+\XePersian@latinvii = 31\relax
+\XePersian@latinviii = 31\relax
+\XePersian@latinix = 30\relax
+\XePersian@latinx = 31\relax
+\XePersian@latinxi = 30\relax
+\XePersian@latinxii = 31\relax
+\XePersian@thirtytwo=32\relax
+\XePersian@temp=\XePersian@y
+\advance\XePersian@temp by -17\relax
+\XePersian@temptwo=\XePersian@temp
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\ifnum\XePersian@temp=\XePersian@thirtytwo\XePersian@kabisehfalse
+\else
+ \XePersian@temptwo=\XePersian@temp
+ \divide\XePersian@temptwo by 4\relax
+ \multiply\XePersian@temptwo by 4\relax
+ \advance\XePersian@temp by -\XePersian@temptwo
+ \ifnum\XePersian@temp=\z@\XePersian@kabisehtrue\else\XePersian@kabisehfalse\fi
+\fi
+\XePersian@tempthree=\XePersian@y % Number of Leap years
+\advance\XePersian@tempthree by -1
+\XePersian@temp=\XePersian@tempthree % T := (MY-1) div 4
+\divide\XePersian@temp by 4\relax
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((MY-1) div 100)
+\divide\XePersian@temptwo by 100\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree % T := T + ((MY-1) div 400)
+\divide\XePersian@temptwo by 400\relax
+\advance\XePersian@temp by \XePersian@temptwo
+\advance\XePersian@tempthree by -611 % Number of Kabise years
+\XePersian@temptwo=\XePersian@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 8\relax
+\advance\XePersian@temp by -\XePersian@temptwo
+\XePersian@temptwo=\XePersian@tempthree %
+\divide\XePersian@temptwo by 33\relax
+\multiply\XePersian@temptwo by 33\relax
+\advance\XePersian@tempthree by -\XePersian@temptwo
+\ifnum\XePersian@tempthree=32\advance\XePersian@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\XePersian@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\XePersian@temp by -\XePersian@tempthree
+\advance\XePersian@temp by -137 % T := T - 137 Adjust the value
+\XePersian@persiani=31
+\advance\XePersian@persiani by -\XePersian@temp % now 31 - T is the persiani
+\XePersian@persianii = 30\relax
+\ifXePersian@kabiseh
+ \XePersian@persianiii = 30\relax
+\else
+ \XePersian@persianiii = 29\relax
+\fi
+\XePersian@persianiv = 31\relax
+\XePersian@persianv = 31\relax
+\XePersian@persianvi = 31\relax
+\XePersian@persianvii = 31\relax
+\XePersian@persianviii= 31\relax
+\XePersian@persianix = 31\relax
+\XePersian@persianx = 30\relax
+\XePersian@persianxi = 30\relax
+\XePersian@persianxii = 30\relax
+\XePersian@persianxiii= 30\relax
+\XePersian@dn= 0\relax
+\XePersian@sn= 0\relax
+\XePersian@mminusone=\XePersian@m
+\advance\XePersian@mminusone by -1\relax
+\XePersian@i=0\relax
+\ifnum\XePersian@i < \XePersian@mminusone
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@dn by \csname XePersian@latin\romannumeral\the\XePersian@i\endcsname
+\ifnum\XePersian@i<\XePersian@mminusone \repeat
+\fi
+\advance \XePersian@dn by \XePersian@d
+\XePersian@i=1\relax
+\XePersian@sn = \XePersian@persiani
+\ifnum \XePersian@sn<\XePersian@dn
+\loop
+\advance \XePersian@i by 1\relax
+\advance\XePersian@sn by \csname XePersian@persian\romannumeral\the\XePersian@i\endcsname
+\ifnum \XePersian@sn<\XePersian@dn \repeat
+\fi
+\ifnum \XePersian@i < 4
+ \XePersian@m = 9 \advance\XePersian@m by \XePersian@i
+ \advance \XePersian@y by -622\relax
+\else
+ \XePersian@m = \XePersian@i \advance \XePersian@m by -3\relax
+ \advance \XePersian@y by -621\relax
+\fi
+\advance\XePersian@sn by -\csname XePersian@persian\romannumeral\the\XePersian@i%
+\endcsname
+\ifnum\XePersian@i = 1
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by 30 \advance\XePersian@d by -\XePersian@persiani
+\else
+ \XePersian@d = \XePersian@dn \advance \XePersian@d by -\XePersian@sn
+\fi
+\beginL\number\XePersian@d\endL\space%
+\persianmonth{\XePersian@m}\space\beginL\number\XePersian@y\endL%
+}
+\def\persianmonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or
+خرداد\or تیر\or
+مرداد\or
+شهریور\or مهر\or
+آبان\or آذر\or
+دی\or بهمن\or
+اسفند\fi}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-persiancal.sty'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-presentation.cls b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-presentation.cls
deleted file mode 100644
index 97866df4bb3..00000000000
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-presentation.cls
+++ /dev/null
@@ -1,86 +0,0 @@
-%% This file is xepersian-presentation.cls
-%%
-%% Copyright 2009 by Vafa Khalighi
-%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{xepersian-presentation}[2009/01/05 class for plain Persian electronic presentations in XeLaTeX (Author: Vafa Khalighi)]
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
-\ProcessOptions\relax
-\LoadClass{article}
-
-\RequirePackage[foot=10.2pt,head=0pt,paperwidth=128mm,paperheight=96mm,left=5mm,top=5mm,right=7mm,bottom=8mm]{geometry}
-
-\RequirePackage{fancyhdr}
-\renewcommand{\headrulewidth}{0mm}
-
-
-\renewcommand{\maketitle}%
- {\ClassError{xepersian-presentation}{Caution: ``maketitle'' command not supported}%
- {Please use ``titlepage'' environment instead}%
-}
-
-\fancypagestyle{pres}{%
-\fancyhf{}%
-\fancyfoot[RO,LE]{\footnotesize \thepage}%
-}
-
-\pagestyle{pres}
-
-\newcommand{\distance}[1]{\vspace*{\stretch{#1}}}
-\newcommand{\abstand}[1]{\vspace*{\stretch{#1}}}
-
-\setlength{\parskip}{0.6ex}
-\setlength{\parindent}{0mm}
-
-\newenvironment{plainslide}[1][]%
- {{\raggedleft \large\bfseries #1\par}\par\vspace*{\stretch{1}}}%
- {\par\vspace*{\stretch{1}}\newpage}
-
-
-\newenvironment{rawslide}{}{\newpage}%
-
-
-\def\itemize{%
- \ifnum \@itemdepth >\thr@@\@toodeep\else
- \advance\@itemdepth\@ne
- \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
- \expandafter
- \list
- \csname\@itemitem\endcsname
- {\def\makelabel##1{\hss\llap{##1}}}%
- \fi
- \setlength{\itemsep}{0ex}%
- \setlength{\parskip}{0.1ex}%
- \setlength{\parsep}{0ex}%
- }%
-\let\enditemize =\endlist
-
-
-\def\enumerate{%
- \ifnum \@enumdepth >\thr@@\@toodeep\else
- \advance\@enumdepth\@ne
- \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
- \expandafter
- \list
- \csname label\@enumctr\endcsname
- {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}%
- \fi
- \setlength{\itemsep}{0ex}%
- \setlength{\parskip}{0.1ex}%
- \setlength{\parsep}{0ex}%
- }%
-\let\endenumerate =\endlist
-
-
-\renewenvironment{description}
- {\list{}{\labelwidth\z@ \itemindent-\leftmargin
- \let\makelabel\descriptionlabel}
- \setlength{\itemsep}{0ex}%
- \setlength{\parskip}{0.1ex}%
- \setlength{\parsep}{0ex}}
- {\endlist}
-
-\endinput
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis-xepersian.def
new file mode 100644
index 00000000000..2c416f9af98
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis-xepersian.def
@@ -0,0 +1,36 @@
+%%
+%% This is file `xepersian-thesis-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian-thesis-xepersian.def')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\renewcommand \thepart {\@tartibi\c@part}
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@harfi\c@chapter}
+}%end appendix
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-thesis-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis.cls b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis.cls
index e3913cabbc2..f80b47ebc52 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis.cls
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-thesis.cls
@@ -1,764 +1,24 @@
-%% This file is xepersian-thesis.cls (Modified version of report.cls)
%%
-%% Copyright 2009 by Vafa Khalighi
-%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%%
-%%
-%%
-%%
-%% This is file `report.cls',
+%% This is file `xepersian-thesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
-%% classes.dtx (with options: `report')
-%%
-%% This is a generated file.
-%%
-%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006
-%% The LaTeX3 Project and any individual authors listed elsewhere
-%% in this file.
-%%
-%% This file was generated from file(s) of the LaTeX base system.
-%% --------------------------------------------------------------
+%% xepersian.dtx (with options: `xepersian-thesis.cls')
%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
%%
-%% This file has the LPPL maintenance status "maintained".
+%% License information appended.
%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% base system. You may however distribute the LaTeX base system without
-%% such generated files.
%%
-%% The list of all files belonging to the LaTeX base distribution is
-%% given in the file `manifest.txt'. See also `legal.txt' for additional
-%% information.
-%%
-%% The list of derived (unpacked) files belonging to the distribution
-%% and covered by LPPL is defined by the unpacking scripts (with
-%% extension .ins) which are part of the distribution.
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{xepersian-thesis}
[2009/01/05 v0.1
- Persian thesis document class in XeLaTeX (Author: Vafa Khalighi)]
-\newcommand\@ptsize{}
-\newif\if@restonecol
-\newif\if@titlepage
-\@titlepagetrue
-\newif\if@openright
-\if@compatibility\else
-\DeclareOption{a4paper}
- {\setlength\paperheight {297mm}%
- \setlength\paperwidth {210mm}}
-\DeclareOption{a5paper}
- {\setlength\paperheight {210mm}%
- \setlength\paperwidth {148mm}}
-\DeclareOption{b5paper}
- {\setlength\paperheight {250mm}%
- \setlength\paperwidth {176mm}}
-\DeclareOption{letterpaper}
- {\setlength\paperheight {11in}%
- \setlength\paperwidth {8.5in}}
-\DeclareOption{legalpaper}
- {\setlength\paperheight {14in}%
- \setlength\paperwidth {8.5in}}
-\DeclareOption{executivepaper}
- {\setlength\paperheight {10.5in}%
- \setlength\paperwidth {7.25in}}
-\DeclareOption{landscape}
- {\setlength\@tempdima {\paperheight}%
- \setlength\paperheight {\paperwidth}%
- \setlength\paperwidth {\@tempdima}}
-\fi
-\if@compatibility
- \renewcommand\@ptsize{0}
-\else
-\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
-\fi
-\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
-\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
-\if@compatibility\else
-\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
-\fi
-\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
-\DeclareOption{draft}{\setlength\overfullrule{5pt}}
-\if@compatibility\else
-\DeclareOption{final}{\setlength\overfullrule{0pt}}
-\fi
-\DeclareOption{titlepage}{\@titlepagetrue}
-\if@compatibility\else
-\DeclareOption{notitlepage}{\@titlepagefalse}
-\fi
-\if@compatibility
-\else
-\DeclareOption{openright}{\@openrighttrue}
-\DeclareOption{openany}{\@openrightfalse}
-\fi
-\if@compatibility\else
-\DeclareOption{onecolumn}{\@twocolumnfalse}
-\fi
-\DeclareOption{twocolumn}{\@twocolumntrue}
-\DeclareOption{leqno}{\input{leqno.clo}}
-\DeclareOption{fleqn}{\input{fleqn.clo}}
-\DeclareOption{openbib}{%
- \AtEndOfPackage{%
- \renewcommand\@openbib@code{%
- \advance\leftmargin\bibindent
- \itemindent -\bibindent
- \listparindent \itemindent
- \parsep \z@
- }%
- \renewcommand\newblock{\par}}%
-}
-\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany}
+ Persian thesis document class in XeLaTeX]
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions
-\input{size1\@ptsize.clo}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\renewcommand\baselinestretch{}
-\setlength\parskip{0\p@ \@plus \p@}
-\@lowpenalty 51
-\@medpenalty 151
-\@highpenalty 301
-\setcounter{topnumber}{2}
-\renewcommand\topfraction{.7}
-\setcounter{bottomnumber}{1}
-\renewcommand\bottomfraction{.3}
-\setcounter{totalnumber}{3}
-\renewcommand\textfraction{.2}
-\renewcommand\floatpagefraction{.5}
-\setcounter{dbltopnumber}{2}
-\renewcommand\dbltopfraction{.7}
-\renewcommand\dblfloatpagefraction{.5}
-\if@twoside
- \def\ps@headings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\rl\thepage\hfil\rl\leftmark}%
- \def\@oddhead{\rl\rightmark\hfil\rl\thepage}%
- \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markboth {\MakeUppercase{%
- \ifnum \c@secnumdepth >\m@ne
- \rl{\@chapapp\ \thechapter. \ }%
- \fi
- \rl{##1}}}{}}%
- \def\sectionmark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\z@
- \rl{\thesection. \ }%
- \fi
- \rl{##1}}}}}
-\else
- \def\ps@headings{%
- \let\@oddfoot\@empty
- \def\@oddhead{\rl\rightmark\hfil\rl\thepage}%
- \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\m@ne
- \rl{\@chapapp\ \thechapter. \ }%
- \fi
- \rl{##1}}}}}
-\fi
-\def\ps@myheadings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\rl\thepage\hfil\rl\leftmark}%
- \def\@oddhead{rl\rightmark\hfil\rl\thepage}%
- \let\@mkboth\@gobbletwo
- \let\chaptermark\@gobble
- \let\sectionmark\@gobble
- }
- \if@titlepage
- \newcommand\maketitle{\begin{titlepage}%
- \let\footnotesize\small
- \let\footnoterule\relax
- \let \footnote \thanks
- \null\vfil
- \vskip 60\p@
- \begin{center}%
- {\LARGE \@title \par}%
- \vskip 3em%
- {\large
- \lineskip .75em%
- \begin{tabular}[t]{c}%
- \@author
- \end{tabular}\par}%
- \vskip 1.5em%
- {\large \@date \par}% % Set date in \large size.
- \end{center}\par
- \@thanks
- \vfil\null
- \end{titlepage}%
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@author\@empty
- \global\let\@date\@empty
- \global\let\@title\@empty
- \global\let\title\relax
- \global\let\author\relax
- \global\let\date\relax
- \global\let\and\relax
-}
-\else
-\newcommand\maketitle{\par
- \begingroup
- \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
- \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
- \long\def\@makefntext##1{\parindent 1em\noindent
- \hb@xt@1.8em{%
- \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
- \if@twocolumn
- \ifnum \col@number=\@ne
- \@maketitle
- \else
- \twocolumn[\@maketitle]%
- \fi
- \else
- \newpage
- \global\@topnum\z@ % Prevents figures from going at top of page.
- \@maketitle
- \fi
- \thispagestyle{plain}\@thanks
- \endgroup
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@author\@empty
- \global\let\@date\@empty
- \global\let\@title\@empty
- \global\let\title\relax
- \global\let\author\relax
- \global\let\date\relax
- \global\let\and\relax
-}
-\def\@maketitle{%
- \newpage
- \null
- \vskip 2em%
- \begin{center}%
- \let \footnote \thanks
- {\LARGE \@title \par}%
- \vskip 1.5em%
- {\large
- \lineskip .5em%
- \begin{tabular}[t]{c}%
- \@author
- \end{tabular}\par}%
- \vskip 1em%
- {\large \@date}%
- \end{center}%
- \par
- \vskip 1.5em}
-\fi
-\newcommand*\chaptermark[1]{}
-\setcounter{secnumdepth}{2}
-\newcounter {part}
-\newcounter {chapter}
-\newcounter {section}[chapter]
-\newcounter {subsection}[section]
-\newcounter {subsubsection}[subsection]
-\newcounter {paragraph}[subsubsection]
-\newcounter {subparagraph}[paragraph]
-\renewcommand \thepart {\@tartibi\c@part}
-\renewcommand \thechapter {\@arabic\c@chapter}
-\renewcommand \thesection {\thechapter.\@arabic\c@section}
-\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
-\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}
-\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
-\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
-\newcommand\@chapapp{\chaptername}
-\newcommand\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \thispagestyle{plain}%
- \if@twocolumn
- \onecolumn
- \@tempswatrue
- \else
- \@tempswafalse
- \fi
- \null\vfil
- \secdef\@part\@spart}
-
-\def\@part[#1]#2{%
- \ifnum \c@secnumdepth >-2\relax
- \refstepcounter{part}%
- \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
- \else
- \addcontentsline{toc}{part}{#1}%
- \fi
- \markboth{}{}%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \ifnum \c@secnumdepth >-2\relax
- \huge\bfseries \partname\nobreakspace\thepart
- \par
- \vskip 20\p@
- \fi
- \Huge \bfseries #2\par}%
- \@endpart}
-\def\@spart#1{%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \Huge \bfseries #1\par}%
- \@endpart}
-\def\@endpart{\vfil\newpage
- \if@twoside
- \if@openright
- \null
- \thispagestyle{empty}%
- \newpage
- \fi
- \fi
- \if@tempswa
- \twocolumn
- \fi}
-\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
- \thispagestyle{plain}%
- \global\@topnum\z@
- \@afterindentfalse
- \secdef\@chapter\@schapter}
-\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}#1}%
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi}
-\def\@makechapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedright \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\def\@schapter#1{\if@twocolumn
- \@topnewpage[\@makeschapterhead{#1}]%
- \else
- \@makeschapterhead{#1}%
- \@afterheading
- \fi}
-\def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedright
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\newcommand\section{\@startsection {section}{1}{\z@}%
- {-3.5ex \@plus -1ex \@minus -.2ex}%
- {2.3ex \@plus.2ex}%
- {\normalfont\Large\bfseries}}
-\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\large\bfseries}}
-\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}
-\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
- {3.25ex \@plus1ex \@minus.2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}
-\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}
-\if@twocolumn
- \setlength\leftmargini {2em}
-\else
- \setlength\leftmargini {2.5em}
-\fi
-\leftmargin \leftmargini
-\setlength\leftmarginii {2.2em}
-\setlength\leftmarginiii {1.87em}
-\setlength\leftmarginiv {1.7em}
-\if@twocolumn
- \setlength\leftmarginv {.5em}
- \setlength\leftmarginvi {.5em}
-\else
- \setlength\leftmarginv {1em}
- \setlength\leftmarginvi {1em}
-\fi
-\setlength \labelsep {.5em}
-\setlength \labelwidth{\leftmargini}
-\addtolength\labelwidth{-\labelsep}
-\@beginparpenalty -\@lowpenalty
-\@endparpenalty -\@lowpenalty
-\@itempenalty -\@lowpenalty
-\renewcommand\theenumi{\@arabic\c@enumi}
-\renewcommand\theenumii{\@alph\c@enumii}
-\renewcommand\theenumiii{\@roman\c@enumiii}
-\renewcommand\theenumiv{\@Alph\c@enumiv}
-\newcommand\labelenumi{\theenumi.}
-\newcommand\labelenumii{(\theenumii)}
-\newcommand\labelenumiii{\theenumiii.}
-\newcommand\labelenumiv{\theenumiv.}
-\renewcommand\p@enumii{\theenumi}
-\renewcommand\p@enumiii{\theenumi(\theenumii)}
-\renewcommand\p@enumiv{\p@enumiii\theenumiii}
-\newcommand\labelitemi{\textbullet}
-\newcommand\labelitemii{\normalfont\bfseries \textendash}
-\newcommand\labelitemiii{\textasteriskcentered}
-\newcommand\labelitemiv{\textperiodcentered}
-\newenvironment{description}
- {\list{}{\labelwidth\z@ \itemindent-\leftmargin
- \let\makelabel\descriptionlabel}}
- {\endlist}
-\newcommand*\descriptionlabel[1]{\hspace\labelsep
- \normalfont\bfseries #1}
-\if@titlepage
- \newenvironment{abstract}{%
- \titlepage
- \null\vfil
- \@beginparpenalty\@lowpenalty
- \begin{center}%
- \bfseries \abstractname
- \@endparpenalty\@M
- \end{center}}%
- {\par\vfil\null\endtitlepage}
-\else
- \newenvironment{abstract}{%
- \if@twocolumn
- \section*{\abstractname}%
- \else
- \small
- \begin{center}%
- {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
- \end{center}%
- \quotation
- \fi}
- {\if@twocolumn\else\endquotation\fi}
-\fi
-\newenvironment{verse}
- {\let\\\@centercr
- \list{}{\itemsep \z@
- \itemindent -1.5em%
- \listparindent\itemindent
- \rightmargin \leftmargin
- \advance\leftmargin 1.5em}%
- \item\relax}
- {\endlist}
-\newenvironment{quotation}
- {\list{}{\listparindent 1.5em%
- \itemindent \listparindent
- \rightmargin \leftmargin
- \parsep \z@ \@plus\p@}%
- \item\relax}
- {\endlist}
-\newenvironment{quote}
- {\list{}{\rightmargin\leftmargin}%
- \item\relax}
- {\endlist}
-\if@compatibility
-\newenvironment{titlepage}
- {%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse\newpage
- \fi
- \thispagestyle{empty}%
- \setcounter{page}\z@
- }%
- {\if@restonecol\twocolumn \else \newpage \fi
- }
-\else
-\newenvironment{titlepage}
- {%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse\newpage
- \fi
- \thispagestyle{empty}%
- \setcounter{page}\@ne
- }%
- {\if@restonecol\twocolumn \else \newpage \fi
- \if@twoside\else
- \setcounter{page}\@ne
- \fi
- }
-\fi
-\newcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@Alph\c@chapter}}
-\setlength\arraycolsep{5\p@}
-\setlength\tabcolsep{6\p@}
-\setlength\arrayrulewidth{.4\p@}
-\setlength\doublerulesep{2\p@}
-\setlength\tabbingsep{\labelsep}
-\skip\@mpfootins = \skip\footins
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
-\@addtoreset {equation}{chapter}
-\renewcommand\theequation
- {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
-\newcounter{figure}[chapter]
-\renewcommand \thefigure
- {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
-\def\fps@figure{tbp}
-\def\ftype@figure{1}
-\def\ext@figure{lof}
-\def\fnum@figure{\figurename\nobreakspace\thefigure}
-\newenvironment{figure}
- {\@float{figure}}
- {\end@float}
-\newenvironment{figure*}
- {\@dblfloat{figure}}
- {\end@dblfloat}
-\newcounter{table}[chapter]
-\renewcommand \thetable
- {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
-\def\fps@table{tbp}
-\def\ftype@table{2}
-\def\ext@table{lot}
-\def\fnum@table{\tablename\nobreakspace\thetable}
-\newenvironment{table}
- {\@float{table}}
- {\end@float}
-\newenvironment{table*}
- {\@dblfloat{table}}
- {\end@dblfloat}
-\newlength\abovecaptionskip
-\newlength\belowcaptionskip
-\setlength\abovecaptionskip{10\p@}
-\setlength\belowcaptionskip{0\p@}
-\long\def\@makecaption#1#2{%
- \vskip\abovecaptionskip
- \sbox\@tempboxa{#1: #2}%
- \ifdim \wd\@tempboxa >\hsize
- #1: #2\par
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}
-\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
-\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
-\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
-\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
-\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
-\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
-\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
-\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
-\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
-\newcommand\@pnumwidth{1.55em}
-\newcommand\@tocrmarg{2.55em}
-\newcommand\@dotsep{4.5}
-\setcounter{tocdepth}{2}
-\newcommand\tableofcontents{%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse
- \fi
- \chapter*{\contentsname
- \@mkboth{%
- \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
- \@starttoc{toc}%
- \if@restonecol\twocolumn\fi
- }
-\newcommand*\l@part[2]{%
- \ifnum \c@tocdepth >-2\relax
- \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
- \setlength\@tempdima{3em}%
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- {\leavevmode
- \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
- \nobreak
- \global\@nobreaktrue
- \everypar{\global\@nobreakfalse\everypar{}}%
- \endgroup
- \fi}
-\newcommand*\l@chapter[2]{%
- \ifnum \c@tocdepth >\m@ne
- \addpenalty{-\@highpenalty}%
- \vskip 1.0em \@plus\p@
- \setlength\@tempdima{1.5em}%
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode \bfseries
- \advance\leftskip\@tempdima
- \hskip -\leftskip
- #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
- \penalty\@highpenalty
- \endgroup
- \fi}
-\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
-\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
-\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
-\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}}
-\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}
-\newcommand\listoffigures{%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse
- \fi
- \chapter*{\listfigurename}%
- \@mkboth{\MakeUppercase\listfigurename}%
- {\MakeUppercase\listfigurename}%
- \@starttoc{lof}%
- \if@restonecol\twocolumn\fi
- }
-\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
-\newcommand\listoftables{%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse
- \fi
- \chapter*{\listtablename}%
- \@mkboth{%
- \MakeUppercase\listtablename}%
- {\MakeUppercase\listtablename}%
- \@starttoc{lot}%
- \if@restonecol\twocolumn\fi
- }
-\let\l@table\l@figure
-\newdimen\bibindent
-\setlength\bibindent{1.5em}
-\newenvironment{thebibliography}[1]
- {\chapter*{\bibname}%
- \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\@biblabel{#1}}%
- \leftmargin\labelwidth
- \advance\leftmargin\labelsep
- \@openbib@code
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
-\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
-\let\@openbib@code\@empty
-\newenvironment{theindex}
- {\if@twocolumn
- \@restonecolfalse
- \else
- \@restonecoltrue
- \fi
- \twocolumn[\@makeschapterhead{\indexname}]%
- \@mkboth{\MakeUppercase\indexname}%
- {\MakeUppercase\indexname}%
- \thispagestyle{plain}\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
- \columnseprule \z@
- \columnsep 35\p@
- \let\item\@idxitem}
- {\if@restonecol\onecolumn\else\clearpage\fi}
-\newcommand\@idxitem{\par\hangindent 40\p@}
-\newcommand\subitem{\@idxitem \hspace*{20\p@}}
-\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
-\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
-\renewcommand\footnoterule{%
- \kern-3\p@
- \hrule\@width.4\columnwidth
- \kern2.6\p@}
-\@addtoreset{footnote}{chapter}
-\newcommand\@makefntext[1]{%
- \parindent 1em%
- \noindent
- \hb@xt@1.8em{\hss\@makefnmark}#1}
-\newcommand\contentsname{فهرست مطالب}
-\newcommand\listfigurename{لیست تصاویر}
-\newcommand\listtablename{لیست جداول}
-\newcommand\bibname{کتاب‌نامه}
-\newcommand\indexname{نمایه}
-\newcommand\figurename{شکل}
-\newcommand\tablename{جدول}
-\newcommand\partname{قسمت}
-\newcommand\chaptername{فصل}
-\newcommand\appendixname{پیوست}
-\newcommand\abstractname{چکیده}
-\def\today{\ifcase\month\or
- January\or February\or March\or April\or May\or June\or
- July\or August\or September\or October\or November\or December\fi
- \space\number\day, \number\year}
-\setlength\columnsep{10\p@}
-\setlength\columnseprule{0\p@}
-\pagestyle{plain}
-\pagenumbering{arabic}
-\if@twoside
-\else
- \raggedbottom
-\fi
-\if@twocolumn
- \twocolumn
- \sloppy
- \flushbottom
-\else
- \onecolumn
-\fi
-
-
-
-
-
+\LoadClass{report}
\def\university#1{\gdef\@university{#1}}
\def\department#1{\gdef\@department{#1}}
\def\degree#1{\gdef\@degree{#1}}
@@ -766,40 +26,40 @@
\def\supervisor#1{\gdef\@supervisor{#1}}
\def\city#1{\gdef\@city{#1}}
-\def\romantitle#1{\gdef\@romantitle{#1}}
-\def\romanauthor#1{\gdef\@romanauthor{#1}}
-\def\romandegree#1{\gdef\@romandegree{#1}}
-\def\romandepartment#1{\gdef\@romandepartment{#1}}
-\def\romanthesisdate#1{\gdef\@romanthesisdate{#1}}
-\def\romansupervisor#1{\gdef\@romansupervisor{#1}}
-\def\romancity#1{\gdef\@romancity{#1}}
-\def\romanuniversity#1{\gdef\@romanuniversity{#1}}
+\def\latintitle#1{\gdef\@latintitle{#1}}
+\def\latinauthor#1{\gdef\@latinauthor{#1}}
+\def\latindegree#1{\gdef\@latindegree{#1}}
+\def\latindepartment#1{\gdef\@latindepartment{#1}}
+\def\latinthesisdate#1{\gdef\@latinthesisdate{#1}}
+\def\latinsupervisor#1{\gdef\@latinsupervisor{#1}}
+\def\latincity#1{\gdef\@latincity{#1}}
+\def\latinuniversity#1{\gdef\@latinuniversity{#1}}
\def\maketitle{\begin{titlepage}
{\includegraphics{logo}}
\vskip 1.5cm
-{\Huge\bf \@title}\par
+{\Huge\bfseries \@title}\par
\vskip 1cm
{\large%
\by}\par
-{\Large\bf \@author}\par
+{\Large\bfseries \@author}\par
\vskip 5mm
-{\large\bf\writtenfor
+{\large\bfseries\writtenfor
\par
\@degree}
\par
\vskip 1cm
{\large
\undersupervision\par
-\Large\bf \@supervisor}
+\Large\bfseries \@supervisor}
\par
\vskip 1cm
{\large \@thesisdate}
\par
\vskip 1cm
-{\large\bf\departmentof\space\@department}
+{\large\bfseries\departmentof\space\@department}
\par
-{\large\bf\universityof\space\@university \par\@city}
+{\large\bfseries\universityof\space\@university \par\@city}
\vfill
\end{titlepage}%
}
@@ -807,7 +67,7 @@
\def\abstractpage{\newpage
\thispagestyle{empty}
\vskip 15mm
-\begin{center}{\large{\bf \@title} \\}
+\begin{center}{\large{\bfseries \@title} \\}
\end{center}
\par
\begin{abstract}}
@@ -815,19 +75,19 @@
\newpage
}
-\def\romanabstract{\newpage
+\def\latinabstract{\newpage
\thispagestyle{empty}
\vskip 15mm
-\begin{center}{\Large\bf \@romantitle \\[5mm]}
-{\bf Abstract}
+\begin{center}{\Large\bfseries \@latintitle \\[5mm]}
+{\bfseries Abstract}
\end{center}
\vspace{5mm}}
-\def\endromanabstract{\newpage}
+\def\endlatinabstract{\newpage}
\def\acknowledgementpage{\newpage
\thispagestyle{empty}
-\centerline{\Large \bf\acknowledgementname}
+\centerline{\Large \bfseries\acknowledgementname}
\vspace{1cm}
\par\noindent}
\def\endacknowledgementpage{\newpage}
@@ -840,65 +100,75 @@
\def\signature#1#2{\par\noindent#1\dotfill\null\\*
{\raggedright #2\par}}
-\def\abstract{\subsection*{\abstractname}\small\def\baselinestretch{1}
+
+\def\abstract{\subsection*{\abstractname}\small
\@normalsize}
\def\endabstract{\par}
-
-
\pagenumbering{harfi}
\let\ol@chapter\@chapter
\def\@chapter{%
\ifnum\c@chapter=0 \pagenumbering{arabic}\setcounter{page}{1}\fi
\ol@chapter}
-
-
\def\keywords#1{\par \vspace{5mm}
{\textbf{واژه‌های کلیدی:}} {\textit{ #1}}}
-\def\romankeywords#1{\par \vspace{5mm}
+\def\latinkeywords#1{\par \vspace{5mm}
\noindent {\textbf{Keywords:}} {\textit{ #1}}}
\font\titlefont=cmssbx10 scaled 2074
\font\supervisorfont=cmbxti10
-\def\makeromantitle{\begin{titlepage}
+\def\makelatintitle{\begin{titlepage}
{\includegraphics{logo}}
\vskip 1.5cm
\addtolength{\baselineskip}{5mm}
-{\titlefont \@romantitle} \par
+{\titlefont \@latintitle} \par
\addtolength{\baselineskip}{-5mm}
\vskip 1cm
-{\bf\romanby}\par
-{\Large\bf \@romanauthor}\par
+{\bfseries\latinby}\par
+{\Large\bfseries \@latinauthor}\par
\vskip 5mm
-{\romanwrittenfor\par
-\large\@romandegree}
+{\latinwrittenfor\par
+\large\@latindegree}
\par
\vskip 1cm
Under supervision of \\
-{\supervisorfont\@romansupervisor}
+{\supervisorfont\@latinsupervisor}
\par
\vskip 1cm
-{\@romanthesisdate}
+{\@latinthesisdate}
\par
\vskip 1cm
-\large\bf
-\@romandepartment\space Department
+\large\bfseries
+\@latindepartment\space Department
\par
-\@romanuniversity \par\@romancity
+\@latinuniversity \par\@latincity
\vfill
\end{titlepage}%
}
-
\def\acknowledgementname{قدردانی}
\def\by{توسط}
\def\writtenfor{ رسالهٔ ارائه شده به عنوان بخشی از ملزومات برای دریافت درجهٔ}
\def\undersupervision{زیر نظر}
\def\departmentof{دانشکدهٔ}
\def\universityof{دانشگاه}
-\def\romanby{by}
-\def\romanwrittenfor{Submitted in Partial Fulfillment\\ of the Requirements\\ for the Degree of}
-\def\romanundersupervision{Under supervision of}
-\endinput
+\def\latinby{by}
+\def\latinwrittenfor{Submitted in Partial Fulfillment\\ of the Requirements\\ for the Degree of}
+\def\latinundersupervision{Under supervision of}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian-thesis.cls'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-user.cls b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-user.cls
deleted file mode 100644
index d5d9f2c00c8..00000000000
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-user.cls
+++ /dev/null
@@ -1,799 +0,0 @@
-%% This file is xepersian-user.cls
-%%
-%% Copyright 2009 by Vafa Khalighi
-%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{xepersian-user}[2009/01/05 Class for XePersian User's Guide (Author: Vafa Khalighi)]
-\TeXXeTstate=1
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
-\ProcessOptions\relax
-\LoadClass{article}
-\RequirePackage{pstcol}
-\RequirePackage{pst-coil}
-\RequirePackage{pst-plot}
-\RequirePackage{pst-tree}
-\RequirePackage{fancybox}
-\RequirePackage{fancyvrb}
-\RequirePackage{geometry}
-\RequirePackage{fontspec}
-\RequirePackage{xltxtra}
-\RequirePackage{url}
-\RequirePackage[hyperfootnotes=false,colorlinks=true,bookmarks=true]
- {hyperref}
-\RequirePackage{pifont}
-\def\thetitle{\XePersian : User's Guide}
-\newcommand*\setPersianFont[2][]{%
-\newfontfamily\PersianFont[Script=Arabic,#1]{#2}
-}
-\def\PersianTxt#1{\begingroup\beginR\PersianFont#1\endR\endgroup}
-\let\theheadertitle\thetitle
-\let\fileversion\Version
-\let\filedate\Date
-\parindent 0pt
-\parskip 7pt plus 1pt minus 1pt
-\oddsidemargin 5cm
-\evensidemargin 5cm
-\textwidth 11.5cm
-\topmargin\z@
-\textheight 8.8in
-\footskip .625in
-\headheight 0pt
-\headsep 0pt
-\marginparwidth 3.5cm
-\marginparsep .5cm
-\reversemarginpar
-\ifdim\paperwidth=210mm \papersizeadjust\fi
-\def\arraystretch{1.2}
-\hfuzz 1pt
-\def\twosideclearpage{%
- \clearpage
- \if@twoside
- \ifodd\c@page\else
- \thispagestyle{empty}%
- \null\leavevmode
- \clearpage
- \fi
- \fi}
-\setlength{\parindent}{0pt}
-\setlength{\parskip}{7pt plus 1pt minus 1pt}
-\def\@listI{%
- \leftmargin\leftmargini
- \parsep 5\p@ plus2.5\p@ minus\p@
- \topsep 5\p@ plus2\p@ minus2\p@
- \itemsep 5\p@ plus2.5\p@ minus\p@}
-\let\@listi\@listI
-\@listi
-\def\@listii{%
- \leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
- \topsep 2\p@ plus.5\p@ minus\p@
- \parsep 2.5\p@ plus\p@ minus\p@
- \itemsep \parsep}
-\def\@listiii{%
- \leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
- \topsep 1\p@ plus.2\p@ minus.2\p@
- \parsep \z@
- \partopsep \p@ plus\z@ minus\p@
- \itemsep \topsep}
-\skip\footins 20pt plus 4pt minus 2pt
-\newcounter{faq}[section]
-\def\thefaq{\arabic{faq}}
-\let\l@faq\@gobbletwo
-\def\faq{\@startsection{faq}{2}{\z@}%
- {3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}{\faqfont}}
-\def\faqfont{\normalsize\sffamily}
-\def\faqmark#1{}
-\def\error{\vskip 2ex\noindent}
-\def\section{\@startsection{section}{1}{\sechang}%
- {-3ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\secfont}}
-\def\subsection{\@startsection{subsection}{2}{\subsechang}%
- {-2.75ex plus -1ex minus -.2ex}{1.25ex plus .2ex}{\subsecfont}}
-\newdimen\sechang
-\newdimen\subsechang
-\sechang=-.75in
-\subsechang=-.375in
-\def\secfont{\sffamily\LARGE\bfseries}
-\def\subsecfont{\sffamily\Large\bfseries}
-\def\ps@docheadings{%
- \let\@mkboth\markboth
- \def\@oddhead{}%
- \let\@evenhead\@oddhead%
- \def\@oddfoot{%
- \small\sffamily
- \rightmark
- \hfil
- \thepage}%
- \def\@evenfoot{%
- \small\sffamily
- \thepage
- \hfil
- \theheadertitle}%
- \def\sectionmark##1{\markright {##1}}}%
-\pagestyle{docheadings}
-\newskip\tempskip
-\def\TOCshrink{.5}
-\def\TableOfContents{%
- \begin{quote}
- \begin{center} \Large\bf Contents \end{center}
- \def\numberline##1{\hbox to 0pt{\hss##1\hskip 1em}}%
- \let\oldaddvspace\addvspace
- \def\addvspace##1{%
- \tempskip##1\relax
- \oldaddvspace{\TOCshrink\tempskip}}
- \@starttoc{toc}%
- \end{quote}}
-\def\tableofcontents{%
- \clearpage
- \markright{CONTENTS}%
- \TableOfContents
- \clearpage}
-\def\expanddate#1/#2/#3/{%
- \number#3{}
- \month=#2
- \ifcase\month\or
- January \or February \or March \or April \or May \or June \or
- July \or August \or September \or October \or November \or December
- \fi
- 20#1}
-\def\thefiledate{\expandafter\expanddate\Date/}
-\date{\thefiledate}
-\def\NotNested{\def\begin##1{%
- \@latexerr{Bad nesting of environments.
- Perhaps missing \end{\@currenvir}}\@eha
- \end{\@currenvir}%
- \begin{##1}}}
-\def\Ex{%
- \NotNested
- \list{}{}\item[]%
- \if@minipage\else\vskip\parskip\fi
- \leftskip\@totalleftmargin
- \rightskip\z@
- \parindent\z@
- \parskip\z@
- \parfillskip\@flushglue
- \hfuzz 1pt
- \@@par
- \global\@inlabelfalse}
-\def\endEx{\endlist}
-\begingroup
- \catcode`\{=12 \catcode`\}=12
- \catcode`\(=1 \catcode`\)=2
- \catcode`\+=0 \catcode`\\=12
- +gdef+|(\) % \| = character \
- +gdef+{({) % \{ = character {
- +gdef+}(}) % \} = character }
-+endgroup
-\def\Backslash{\protect\|}
-\def\times@scale{.96}
-\def\helv@scale{.82}
-\def\courier@scale{.985}
-\def\AmS{AMS}
-\def\symchar#1{%
- \mbox{%
- \kern .3pt
- \Pisymbol{psy}{#1}
- \kern .3pt}}
-
-\def\lt{\symchar{'074}}
-\def\gt{\symchar{'076}}
-\def\leq{\symchar{'243}}
-\def\geq{\symchar{'263}}
-\def\bullet{\symchar{'267}}
-\def\ldots{\symchar{'274}}
-\mathcode`\-="20B1
-\renewcommand{\ttdefault}{\sfdefault}
-\def\MainFont{\ttfamily\bfseries\large}
-\def\UsageFont{\ttfamily\bfseries}
-\def\InlineFont{\ttfamily}
-\def\MetaFont{\sffamily\slshape}
-\def\OpArgFont{\normalfont}
-\begingroup
- \catcode`\<=\active
- \gdef\ShortMeta{%
- \catcode`\<=\active
- \def<##1>{{\MetaFont ##1\/}}}
-\endgroup
-\def\DeleteShortMeta{\catcode`\<=12\relax}
-\ShortMeta
-\def\x#1{{\MetaFont x#1\/}}
-\def\y#1{{\MetaFont y#1\/}}
-\def\c#1{{\InlineFont(\x{#1},\kern 1pt\y{#1})}}
-\def\cn{\c{n}}
-\def\FV@SetupFont{%
- \FV@BaseLineStretch
- \FV@FontSize
- \FV@FontFamily
- \FV@FontSeries
- \FV@FontShape
- \selectfont
-}
-\def\FV@GetLine{\expandafter\FV@CheckScan\FancyVerbGetLine}
-\AtBeginDocument{\DefineShortVerb{\"}}
-
-\VerbatimFootnotes
-
-\fvset{gobble=2,commentchar=\",codes={\catcode`\<=12},fontfamily=helvetica,
- frame=single,numbers=left,numbersep=1mm}
-
-\DefineVerbatimEnvironment{LVerb}{LVerbatim}{fontsize=\small}
-\DefineVerbatimEnvironment{LVerb*}{LVerbatim}%
- {fontsize=\small,codes={\catcode`\<=13}}
-
-\def\FV@Space{\ \ }
-
-% Verbatim items:
-
-\newcommand{\vitem}{\SaveVerb[codes={\catcode`\<=13},
- aftersave={\item[\UseVerb{item}]}]{item}}
-
-
-\newcommand{\BeginExample}{%
- \VerbatimEnvironment
- \catcode`\<=12\relax
- \catcode`\"=9\relax
- \begin{VerbatimOut}[commentchar=none,codes={\catcode`\"=12}]{\jobname.tmp}}
-
-\newcommand{\EndExample}{%
- \end{VerbatimOut}
- \fvset{gobble=0,fontsize=\small}}
-
-\newenvironment{example}{\BeginExample}{%
- \EndExample
- \LVerbatimInput{\jobname.tmp}%
- \begin{center}\leavevmode\input{\jobname.tmp}\end{center}}
-
-\newenvironment{example*}{\BeginExample}{%
- \EndExample\LVerbatimInput{\jobname.tmp}\input{\jobname.tmp}}
-
-\newenvironment{example**}{\BeginExample}{%
- \EndExample\SideBySideEx{\input{\jobname.tmp}}}
-
-\newif\ifgrid
-\newpsobject{usergrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=7pt}
-
-\def\MEx{\@ifnextchar[{\@MEx}{\@MEx[0,0]}}
-\def\@MEx[#1,#2](#3,#4){%
- \def\PictureSize{(#1,#2)(#3,#4)}%
- \BeginExample}
-\def\endMEx{%
- \EndExample
- \SideBySideEx{%
- \expandafter\pspicture\PictureSize
- \ifgrid\usergrid\fi\relax
- \input{\jobname.tmp}%
- \endpspicture}}
-
-\def\SideBySideEx#1{%
- \trivlist\item[]%
- \leavevmode\kern-\@totalleftmargin
- \hbox{\valign{%
- \vfil##\vfil\cr
- \hbox to \z@{\hss#1}\cr
- \hbox to \leftmargini{\hss}\cr
- \@tempdimc=\textwidth
- \advance\@tempdimc-\leftmargini
- \advance\@tempdimc-\psframesep
- \advance\@tempdimc-\psframesep
- \advance\@tempdimc-\pslinewidth
- \advance\@tempdimc-\pslinewidth
- \hbox{\psframebox{\BVerbatimInput[frame=none,numbersep=2mm,
- boxwidth=\@tempdimc]{\jobname.tmp}}}\cr}}%
- \endtrivlist}
-
-\@namedef{MEx*}{\gridtrue\MEx}
-\@namedef{endMEx*}{\endMEx}
-
-
-\def\FV@BProcessLine#1{%
-\hbox\ifx\FV@boxwidth\relax\else to\FV@boxwidth\fi{%
-\FV@LeftListNumber
-\FV@LeftListFrame
-\FancyVerbFormatLine{#1}\hss
-\FV@RightListFrame
-\FV@RightListNumber}}
-
-\def\BUseVerbatim{\FV@Command{}{BNumbersUseVerbatim}}
-
-\def\FVC@BNumbersUseVerbatim#1{\FV@CheckIfSaved{#1}{\FV@BNumbersUseVerbatim}}
-
-\def\FV@BNumbersUseVerbatim#1{\FV@BNumbersVerbatimBegin#1\FV@BVerbatimEnd}
-
-\def\FV@BNumbersVerbatimBegin{%
- \begingroup
- \FV@UseKeyValues
- \FV@BeginVBox
- \let\FV@ProcessLine\FV@BNumbersProcessLine
- \FV@FormattingPrep
- \FV@ObeyTabsInit}%
-
-\def\FV@BNumbersProcessLine#1{%
-\global\advance\FV@CodeLineNo\@ne
-\FV@StepLineNo
-\FV@BProcessLine{#1}}
-
-
-%%%%%%%%%%%%%%%%%%%% Logos %%%%%%%%%%%%%%%%%%%%
-
-\def\b@LaTeX{%
- \begingroup
- \csname reset@font\endcsname
- \rmfamily\bfseries
- L\kern-.32em
- \raise.36ex\hbox{%
- \ifx\@currsize\Huge\LARGE\else
- \ifx\@currsize\huge\Large\else
- \ifx\@currsize\LARGE\large\else
- \ifx\@currsize\Large\normalsize\else
- \ifx\@currsize\large\small\else
- \ifx\@currsize\normalsize\footnotesize\else
- \ifx\@currsize\small\scriptsize\else
- \ifx\@currsize\footnotesize\scriptscriptsize
- \fi\fi\fi\fi\fi\fi\fi\fi
- \textbf{A}}%
- \kern-.15em
- T\kern-.1667em
- \lower.7ex\hbox{E}\kern-.125em
- X%
- \endgroup}
-\def\bLaTeX{\b@LaTeX}
-
-
-\@ifundefined{BibTeX}
- {\def\BibTeX{{\rmfamily B\kern-.05em{\sc i\kern-.025em b}\kern-.08em%
- T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
-\@ifundefined{ConTeXt}
- {\def\ConTeXt{{\rmfamily Con\TeX t}}}{}
-%DG \@ifundefined{SliTeX}
-%DG {\def\SliTeX{{\rmfamily S\kern-.06emL\kern-.18em\raise.32ex\hbox
-%DG \textsc{i}\kern -.03em\TeX}}}{}
-\@ifundefined{PlainTeX}{\def\PlainTeX{\textsc{Plain}\kern2pt\TeX}}{}
-
-\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}}$}
-
-%%%%%%%%%%%%%%%%%%%% Quick reference %%%%%%%%%%%%%%%%%%%%
-
-
-
-% An entry in \quickref is of the form: \qentry{type}{entry}
-\def\quickref{}
-\long\def\addtoquickref#1#2{%
- \expandafter\gdef\expandafter\quickref\expandafter{%
- \quickref\qentry{#1}{#2}}}
-\def\qentry#1{\@nameuse{qr@#1}}
-
-\long\def\addtoquickref#1#2{}
-
-\def\MakeQuickRef{%
- \long\def\addtoquickref##1##2{%
- \wlog{}%
- \toks@{\qentry{##1}{##2}}%
- \message{\the\toks@}%
- \wlog{}%
- \let\MakeQuickRef\relax}}
-
-%% For switching into landscape mode for the Quick Reference:
-\let\NormalShipout\shipout
-\newbox\OutputBox
-\def\LandscapeMode{%
- \long\def\shipout##1##2{%
- \setbox\OutputBox=\hbox{\rput[tl]{90}{\vbox{##2}}}%
- \NormalShipout\box\OutputBox}%
- \voffset 9in}
-
-% This makes the Quick Reference:
-\def\QuickReference{%
- \begin{Landscape}{\paperwidth}{\paperheight}{\rotateleft}
- \oddsidemargin 0pt
- \evensidemargin 0pt
- \topmargin -.5in
- \textheight 6.5in
- \textwidth 9in
- \columnsep 60pt
- \footskip 0pt
- \footheight 0pt
- \headheight 15pt
- \headsep 40pt
- \parskip 4pt plus 1pt minus 1pt
- \UsePageParameters
- \twocolumn
- \def\label##1{}
- \subsechang=-.25in
- \pagenumbering{Roman}
- \pagestyle{quickref}
- \MacroDefCodes
- \let\Main\string
- \let\MainFont\UsageFont
- \MainFont
- \quickref
- \end{Landscape}}
-\let\QuickReference\relax
-
-\def\ps@quickref{%
- \def\@oddhead{%
- \large\bfseries\sffamily
- \hbox to .5\textwidth{\XePersian\ v\Version\hfill}%
- \hbox to \z@{\hss Quick Reference\hss}%
- \hbox to .5\textwidth{\hfill\thepage}}
- \let\@evenhead\@oddhead
- \def\@oddfoot{}\def\@evenfoot{}}
-
-% For page numbering in the QR:
-\setbox\pst@boxg=\hbox{\UsageFont 99}
-\newdimen\refnumdim
-\refnumdim=\wd\pst@boxg
-\def\refnum#1{\hbox to \refnumdim{\hss\rmfamily\bfseries\pageref{#1}}}
-
-% Section commands that add an entry to the QR:
-\def\Section#1{\addtoquickref{section}{#1}\@checksec\section{#1}}
-\def\Subsection#1{\addtoquickref{section}{#1}\subsection{#1}}
-
-% This is just an error checker:
-\def\@checksec{%
- \def\@tempa{document}%
- \ifx\@tempa\@currenvir\else
- \@latexerr{\string\Section\space occurred inside
- \@currenvir\space environment}\@ehc
- \expandafter\end\expandafter{\@currenvir}%
- \expandafter\@checksec
- \fi}
-
-% The qr@ definitions:
-\def\qr@@object#1{\mbox{\begingroup\escapechar`\+%
- \refnum{\string#1}\endgroup\hskip 1em\string#1}}
-\def\qr@object#1{\qr@@object#1\par}
-\def\qr@@param#1=#2\@nil{\refnum{\string#1}}
-\def\qr@param#1{\leavevmode\hbox to\hsize{\qr@@param#1\@nil\hskip 1em#1}\par}
-\def\qr@section#1{\subsection*{#1}}
-\long\def\qr@center#1{\begin{center}#1\end{center}}
-
-%%%%%%%%%%%%%%%%%%%% Parts %%%%%%%%%%%%%%%%%%%%
-
-\font\bighelv=phvb at 88bp
-
-
-\def\part{\clearpage\leavevmode\@ifstar{\part@ii}{\part@i}}
-\def\part@i#1{%
- \refstepcounter{part}%
- \addcontentsline{toc}{part}{\protect\pnumberline{\thepart}#1}%
- \lower 20pt\hbox to \z@{\hss{\bighelv\Roman{part}}\hskip 2em}%
- \part@iii{#1}}
-\def\part@ii#1{\addcontentsline{toc}{part}{#1}\part@iii{#1}}
-\def\part@iii#1{%
-\markright{#1}{\sffamily\Huge\bfseries#1}\par\vskip 2cm\@afterheading}
-\def\thepart{\Roman{part}}
-\def\pnumberline#1{Part #1\hspace{1cm}}
-
-\def\l@part#1#2{%
- \addpenalty{\@secpenalty}%
- \addvspace{\lpartskip}%
- \begingroup
- \@tempdima 1em
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- {\large\bfseries\leavevmode#1\hfil \hbox to\@pnumwidth{\hss #2}}\par
- \nobreak
- \endgroup}
-\newskip\lpartskip
-\lpartskip 1.25em plus 1pt minus 1pt
-
-%%%%%%%%%%%%%%%%%%%% Parameter definitions and indexing %%%%%%%%%%%%%%%%%%%%
-
-% Like \MainEnvIndex, etc., but for parameters:
-\def\MainParIndex{\SpecialIndex{parameter}{main}}
-\def\UsageParIndex{\SpecialIndex{parameter}{usage}}
-
-% Like \MainPar, but for parameters. Can optionally include =foo.
-\def\MainPar#1{\@MainPar#1==\@nil}
-\def\@MainPar#1=#2=#3\@nil{%
- \MainParIndex{#1}%
- \label{#1}%
- {\MainFont #1\ifx#3=\relax=\MetaFont#2\fi}}
-
-% Analogous to \n, but optionally argument can include =foo.
-\def\p#1{\@p#1==\@nil}
-\def\@p#1=#2=#3\@nil{%
- \UsageParIndex{#1}%
- {\UsageFont #1\ifx#3=\relax=#2\fi}}
-
-% For listing parameter definitions in a {description} environment:
-\def\pitem[#1]{\@ifnextchar({\@pitem#1}{\@@pitem#1\@nil}}
-\def\@pitem#1=#2(#3){%
- \item[\MainFont#1=\MetaFont#2]% % Set the definition in \MainFont
- \MainParIndex{#1}%
- \label{#1}%
- \addtoquickref{param}{#1={\MetaFont #2}\hfill {\rmfamily Default:} #3}%
- \hfill {\MainFont {\rmfamily Default:} #3}\par}
-\def\@@pitem#1=#2\@nil{%
- \@ifundefined{default@#1}%
- {\@warning{Parameter `#1' default not defined.}\@eha\@pitem#1=#2()}
- {\@pitem#1=#2(\csname default@#1\endcsname)}}
-
-
-\begingroup
- \catcode`\@=12
- \catcode`\{=12
- \catcode`\}=12
- \catcode`\&=1
- \catcode`\^=2
- \def\psset@&%
- \begingroup
- \catcode`\\=12
- \pssetxx^
- \def\pssetxx#1{#2}&%
- \expandafter\gdef\csname default@#1\endcsname&#2^%
- \endgroup^
- \csname @input\endcsname&defaults.pst^
-\endgroup
-
-% For putting parameter definitions in an Ex environment:
-\def\Par#1{\@ifnextchar({\@Par#1}{\@@Par#1\@nil}}
-\def\@Par#1=#2(#3){%
- \leavevmode
- \MainParIndex{#1}%
- \label{#1}%
- \addtoquickref{param}{#1={\MetaFont #2}\hfill {\rmfamily Default:} #3}%
- \hbox to\linewidth{%
- \MainFont #1={\MetaFont#2}\hfill {\rmfamily Default:} #3}\par}
-\def\@@Par#1=#2\@nil{%
- \@ifundefined{default@#1}%
- {\@warning{Parameter `#1' default not defined.}\@Par#1=#2()}
- {\@Par#1=#2(\csname default@#1\endcsname)}}
-
-
-
-
-\begingroup
- \catcode`\(=13
- \catcode`\,=13
- \catcode`\==13
- \gdef\MacroDefCodes{%
- \@MD
- \catcode`\(13
- \catcode`\^^M12
- \catcode`\`13
- \catcode`\,13
- \catcode`\!1
- \catcode`\@2
- \def~{}%
- \def={{\fontshape{n}\selectfont\string=}}%
- \def,{{\fontshape{n}\selectfont\string,}}%
- \def(##1){\string({\MetaFont ##1})}}
-\endgroup
-
-\begingroup
- \catcode`\`=13 \gdef`#1'{{\OpArgFont #1}}
-\endgroup
-
-\begingroup
- \catcode`\^^M=12\relax%
- \gdef\GetMacroDef#1{\begingroup\MacroDefCodes\@GetMacroDef{#1}}%
- \gdef\@GetMacroDef#1#2^^M{#1{#2}\endgroup}%
-\endgroup
-
-% For listing macro definitions in a "description" environment:
-\def\mitem{\GetMacroDef\@mitem}
-\def\@mitem#1{%
- \item[{\MainFont\Main#1}]%
- \addtoquickref{object}{#1}%
- \leavevmode\par}
-
-% For listing graphics object definitions in a {description} environment:
-% The optional *[par] is inserted automatically.
-\def\oitem{\GetMacroDef\@oitem}
-\def\@oitem#1{\@@oitem#1\@nil}
-\def\@@oitem#1#2\@nil{\@mitem{#1{\OpArgFont*[{\MetaFont par}]}#2}}
-
-% For generic macro definition, usually to be put in a displayed env.
-\def\object{\GetMacroDef\@object}
-\def\@object#1{\addtoquickref{object}{#1}{\MainFont\Main#1\@@par}}
-
-% For a single displayed macro definition:
-\def\Mac{\GetMacroDef\@Mac}
-\def\@Mac#1{\begin{Ex}\@object{#1}\end{Ex}}
-
-
-%% We must hack the generation of indexes modified by `hyperref'
-\def\@@wrindex#1|#2|#3\\{%
- \ifx\\#2\\%
- \protected@write\@indexfile{}{%
-% \string\indexentry{#1|hyperpage}{\thepage}%
- \string\indexentry{#1}{\thepage}%
- }%
- \else
- \def\Hy@temp@A{#2}%
- \ifcase0\ifx\Hy@temp@A\HyInd@ParenLeft 1\fi
- \ifx\Hy@temp@A\HyInd@ParenRight 1\fi
- \relax
- \protected@write\@indexfile{}{%
- \string\indexentry{#1|#2}{\thepage}%
- }%
- \else
- \protected@write\@indexfile{}{%
- \string\indexentry{#1|#2hyperpage}{\thepage}%
- }%
- \fi
- \fi
- \endgroup
- \@esphack
-}
-
-%%%%%%%%%%%%%%%%%%%% Indexes %%%%%%%%%%%%%%%%%%%%
-
-\def\PrintUserIndex{%
- \clearpage
- \columnsep=20pt
- \advance\oddsidemargin\sechang
- \advance\evensidemargin\sechang
- \advance\textwidth-\sechang
- \sechang=0pt
- \onecolumn
- \@input{\jobname.ind}}
-
-%%%%%%%%%%%%%%%%%%%% Special indexing for User's Guides %%%%%%%%%%%%%%%%%%%%
-
-\@ifundefined{actualchar}{\def\actualchar{@}}{}
-\@ifundefined{quotechar}{\def\quotechar{"}}{}
-\@ifundefined{levelchar}{\def\levelchar{!}}{}
-\@ifundefined{encapchar}{\def\encapchar{|}}{}
-\@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
-
-%% These are the indexing commands:
-
-%% Commands: \MainIndex \UsageIndex
-%% Environments: \MainEnvIndex \UsageEnvIndex
-%% Style options: \MainOptionIndex \UsageOptionIndex
-%% Counters: \MainCntIndex \UsageCntIndex
-
-\def\@Index#1{\@bsphack\index{#1}\@esphack}
-\def\Index#1#2{%
- \@bsphack
- \index{\expandafter\@gobble\string#2\actualchar\string
- \verb\quotechar*\verbatimchar\string#2\verbatimchar
- \encapchar #1}}
-{\catcode`\!=0 !catcode`!\=12!gdef!special@gobble#1{!if\#1!else#1!fi}}
-\def\MainIndex{\Index{main}}
-\def\UsageIndex{\Index{usage}}
-\def\SpecialIndex#1#2#3{%
- \@Index{#3\actualchar{\ttfamily #3} (#1)\encapchar #2}%
- \@Index{#1s:\levelchar{\ttfamily #3}\encapchar #2}}
-\def\MainEnvIndex{\SpecialIndex{environment}{main}}
-\def\UsageEnvIndex{\SpecialIndex{environment}{usage}}
-\def\MainOptionIndex{\SpecialIndex{option}{main}}
-\def\UsageOptionIndex{\SpecialIndex{option}{usage}}
-\def\MainCntIndex{\SpecialIndex{counter}{main}}
-\def\UsageCntIndex{\SpecialIndex{counter}{usage}}
-
-%% Font for index page numbers:
-\def\main#1{\textbf{\hyperpage{#1}}}
-\def\usage#1{\hyperpage{#1}}
-
-%% These combine various functions:
-
-%% Commands: \Main \Usage
-%% Environments: \MainEnv \UsageEnv
-%% Style options: \MainOption \UsageOption
-%% Counters: \MainCnt \UsageCnt
-
-%% The "Main" ones
-%% * Index argument.
-%% * Print argument with \MainFont
-%% * Create label +foo, e+foo or o+foo.
-
-%% The "Usage" ones
-%% * Index argument.
-%% * Print argument with \UsageFont.
-
-\def\SpecialLabel#1#2+{\label{+#2}}
-\def\LabelIndex#1{\MainIndex{#1}\expandafter\SpecialLabel\string#1+}
-\def\Main#1{%
- \MainIndex{#1}%
- \expandafter\SpecialLabel\string#1+%
- {\MainFont\string#1}}
-\def\Usage#1{\UsageIndex{#1}{\UsageFont\string#1}}
-\def\MainEnv#1{%
- \MainEnvIndex{#1}%
- \label{e+#1}%
- {\MainFont #1}}
-\def\UsageEnv#1{\UsageEnvIndex{#1}{\UsageFont #1}}
-\def\MainOption#1{%
- \MainOptionIndex{#1}%
- \label{o+#1}%
- {\MainFont #1}}
-\def\UsageOption#1{\UsageOptionIndex{#1}{\UsageFont #1}}
-\def\MainCnt#1{%
- \MainCntIndex{#1}%
- \label{c+#1}%
- {\MainFont #1}}
-\def\UsageCnt#1{\UsageCntIndex{#1}{\UsageFont #1}}
-
-%% These are abbreviations.
-\def\N{\Main}
-\def\n{\Usage}
-\def\E{\MainEnv}
-\def\e{\UsageEnv}
-\def\O{\MainOption}
-\def\o{\UsageOption}
-\def\C{\MainCnt}
-% The \c macro was already defined for coordinates
-%\def\c{\UsageCnt}
-
-
-%% User's guide and documented code have different index prologue.
-\def\PrintUserIndex{{\let\ps@plain\@empty\@input{\jobname.ind}}}
-
-%% This is for listing commands in a description environment.
-\def\xitem#1{\item[\Main{#1}]}
-
-\begingroup
- \catcode`\<=1 \catcode`\>=2
- \catcode`\{=13 \catcode`\}=12
- \catcode`\[=13
- \gdef\@MD<%
- \catcode`\{=13 \catcode`\}=12 \catcode`\[=13
- \def{##1}<\{<\MetaFont ##1\/>\}>%
- \def[##1]<\string[<\MetaFont ##1\/>]>>
-\endgroup
-\def\MD{%
- \NotNested
- \Ex
- \begingroup
- \@MD
- \def\end{\par\endgroup\end}%
- \def\\{\@centercr\Main}%
- \MainFont
- \Main}
-\def\endMD{\endEx}
-
-%%%%%%%%%%%%%%%%%%%% Framed warnings %%%%%%%%%%%%%%%%%%%%
-
-\newbox\bombbox
-\setbox\bombbox=\hbox to\z@{%
- \hss
- \rput[r](-1.5cm,0){%
- \psset{unit=7pt}
- \begin{pspicture}(-4,-4)(4,4)
- \pscircle[fillcolor=gray,fillstyle=solid]{4}
- \rput{45}{\psscaleboxto(6,0){\textsf{XE}\kern-1pt}}
- \psellipse*(0,3.8)(1,.2)
- \psellipse*(0,5.5)(1,.2)
- \psframe*(-1,3.8)(1,5.5)
- \psbezier(0,5.5)(0,7)(1,8)(3.5,8)
- \multido{\r=-0+40}{9}{\rput{\r}(3.5,8){\psline(0,0)(.4,0)}}
- \end{pspicture}}}
-
-\def\Warning{%
- \trivlist\item[]
- \leavevmode\kern\@totalleftmargin
- \valign\bgroup%
- \vfil##\vfil\cr
- \copy\bombbox\cr
- \minipage{\textwidth}
- \quote
- \emph{Warning:}\hskip 1em
- \ignorespaces}
-\def\endWarning{\endquote\endminipage\cr\egroup\endtrivlist}
-
-\newbox\filebox
-\setbox\filebox=\hbox{%
- \pspicture(-1,-.5)(1,.7)
- \pspolygon[linearc=2pt,shadow=true,shadowangle=45,xunit=1.1]%
- (-1,-.55)(-1,.5)(-.8,.5)(-.8,.65)(-.2,.65)(-.2,.5)(1,.5)(1,-.55)
- \endpspicture}
-\def\File#1{%
- \leavevmode
- \marginpar{%
- \leavevmode\lower 20pt\hbox{%
- \hbox to0pt{\hbox to \linewidth{\hss\copy\filebox\hss}\hss}%
- \raise 10pt\hbox to \linewidth{\hss\large\bfseries\sffamily #1\hss}}}%
- \ignorespaces}
-\def\drivers{\noindent\small Driver notes:\hskip 1em\ignorespaces}
-\endinput
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
index c74d4a8723b..e20fb9e707d 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
@@ -1,229 +1,70 @@
-%% This file is xepersian.sty
%%
-%% Copyright 2009 by Vafa Khalighi
+%% This is file `xepersian.sty',
+%% generated with the docstrip utility.
%%
-%%%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian.sty')
+%%
+%% __________________________________
+%% Copyright © 2008-2009 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{xepersian}[2009/02/20 v1
- Persian typesetting in XeLaTeX (Author: Vafa Khalighi)]
-\AtBeginDocument{\special{pdf: docinfo <<
- /Creator (XePersian v1 (Author: Vafa Khalighi))
- >>}}
-\RequirePackage{graphicx}
-\RequirePackage{amssymb}
-\RequirePackage{amsmath}
-\RequirePackage{amsthm}
+\def\xepersianversion{v1.0.1}
+\def\xepersianrevision{revision 88}
+\def\xepersiandate{2009/07/15}
+\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space <\xepersianrevision>
+Persian typesetting in XeLaTeX]
+\DeclareOption{Kashida}{\input{kashida-xepersian.def}}
+\DeclareOption{localise}{\input{localise-xepersian.def}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{bidi}}
+\ProcessOptions\relax
+\newcommand\xepersian@isloaded[2][]{
+ \expandafter\ifx\csname if@xepersian@#2loaded@\endcsname\relax
+ \expandafter\newif\csname if@xepersian@#2loaded@\endcsname
+ \fi
+ \@ifpackageloaded{#2}
+ {\csname @xepersian@#2loaded@true\endcsname #1}
+ {\csname @xepersian@#2loaded@false\endcsname}}
+\xepersian@isloaded{xunicode}
+\AtBeginDocument{
+ \if@xepersian@xunicodeloaded@
+ \xepersian@isloaded[\PackageError{xepersian}{Oops! you have loaded package xunicode before xepersian package. Please load package xunicode after xepersian package, and then try to run xelatex on your document again}{}]{xunicode}
+ \fi%
+}
+\AtBeginDocument{\ifdefined\persianfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the main text of the document. Please specify a font for the main text of the document by using \settextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\latinfont\relax\else%
+\PackageError{xepersian}{Oops! you have not specified any font for the Latin texts of the document. Please specify a font for the Latin texts of the document by using \setlatintextfont\space CS, and then try to run xelatex on your document again}%
+\fi}
+\AtBeginDocument{\ifdefined\decimalseparator\relax\else%
+\PackageWarning{xepersian}{“You have not specified any font for the digits in maths mode and so the digits in maths mode will appear Latin. If you would like to have Persian digits in maths mode, then please specify a font for the digits in maths mode by using \setdigitfont\space CS, and then try to run xelatex on your document again”}%
+\fi}
+\RequirePackage[RTLdocument]{bidi}
\RequirePackage{fontspec}
-\RequirePackage{etoolbox}
+\RequirePackage{xepersian-persiancal}
\RequirePackage{xepersian-mathsdigitspec}
-\RequirePackage{xunicode}
+\RequirePackage{etoolbox}
+\AtBeginDocument{\special{pdf: docinfo <<
+/Creator (X∃Persian \xepersianversion\space <\xepersianrevision> Copyright © 2008-2009 Vafa Khalighi)
+ >>}}
\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.%
+ Oops! either you have done something wrong or it is a xepersian bug. 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}%
- \ifx\@tempa\@tempb
- \def\@tempa{\Gin@iii[#1][}%
- \expandafter\@tempa
- \else
- \begingroup
- \@tempswafalse
- \toks@{\beginL\Ginclude@graphics{#2}\endL}%
- \setkeys{Gin}{#1}%
- \Gin@esetsize
- \the\toks@
- \endgroup
- \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}}
-}{}
+\def\prq{«}
+\def\plq{»}
\newfontscript{Persian}{arab}
\newfontlanguage{Persian}{ARA}
\newcommand*\settextfont[2][]{%
@@ -231,8 +72,11 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil%
\let\rmdefault\zf@family
\normalfont
}
-\newcommand*\setromantextfont[2][]{%
-\newfontfamily\rmfamily[Mapping=tex-text,#1]{#2}
+\newcommand*\settxtmathfont[2][]{%
+\newfontfamily\TXTmath[Mapping=txt2maths,#1]{#2}
+}
+\newcommand*\setlatintextfont[2][]{%
+\newfontfamily\latinfont[Mapping=tex-text,#1]{#2}
}
\newcommand*\defpersianfont[1]{%
\@ifnextchar[{\defpersianfont@i#1}{\defpersianfont@i#1[]}}
@@ -242,250 +86,104 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil%
\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{%
+\newcommand*\deflatinfont[1]{%
+ \@ifnextchar[{\deflatinfont@i#1}{\deflatinfont@i#1[]}}
+\def\deflatinfont@i#1[#2]#3{%
\zf@fontspec{Mapping=tex-text,#2}{#3}%
\edef\@tempa{%
\noexpand\DeclareRobustCommand\noexpand#1
{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
\@tempa}
-\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}
+\newcommand\persiansfdefault{}
+\newcommand\persianttdefault{}
+\newcommand\navardefault{}
+\newcommand\pookdefault{}
+\newcommand\sayehdefault{}
+\DeclareRobustCommand\persiansffamily
+ {\not@math@alphabet\persiansffamily\mathpersiansf
+ \fontfamily\persiansfdefault\selectfont}
+\DeclareRobustCommand\persianttfamily
+ {\not@math@alphabet\persianttfamily\mathpersiantt
+ \fontfamily\persianttdefault\selectfont}
+\DeclareRobustCommand\navarfamily
+ {\not@math@alphabet\navarfamily\mathnavar
+ \fontfamily\navardefault\selectfont}
+\DeclareRobustCommand\pookfamily
+ {\not@math@alphabet\pookfamily\mathpook
+ \fontfamily\pookdefault\selectfont}
+\DeclareRobustCommand\sayehfamily
+ {\not@math@alphabet\sayehfamily\mathsayeh
+ \fontfamily\sayehdefault\selectfont}
+\DeclareTextFontCommand{\textpersiansf}{\persiansffamily}
+\DeclareTextFontCommand{\textpersiantt}{\persianttfamily}
+\DeclareTextFontCommand{\textnavar}{\navarfamily}
+\DeclareTextFontCommand{\textpook}{\pookfamily}
+\DeclareTextFontCommand{\textsayeh}{\sayehfamily}
+\newcommand*\setpersiansansfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persiansfdefault\zf@family
+ \normalfont}
+\newcommand*\setpersianmonofont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\persianttdefault\zf@family
+ \normalfont}
+\newcommand*\setnavarfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\navardefault\zf@family
+ \normalfont}
+\newcommand*\setpookfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\pookdefault\zf@family
+ \normalfont}
+\newcommand*\setsayehfont[2][]{%
+ \zf@fontspec{Script=Persian,Mapping=parsidigits,#1}{#2}%
+ \let\sayehdefault\zf@family
+ \normalfont}
+\def\lr#1{\begingroup\beginL\latinfont#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\latin{\bgroup\LatinAlphs\par\@RTLfalse\@RTL@footnotefalse\latinfont}
+\def\endlatin{\par\egroup}
+\def\persian{\bgroup\PersianAlphs\par\@RTLtrue\@RTL@footnotetrue\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
-\newcount\FT@latini \newcount\FT@persiani
-\newcount\FT@latinii \newcount\FT@persianii
-\newcount\FT@latiniii \newcount\FT@persianiii
-\newcount\FT@latiniv \newcount\FT@persianiv
-\newcount\FT@latinv \newcount\FT@persianv
-\newcount\FT@latinvi \newcount\FT@persianvi
-\newcount\FT@latinvii \newcount\FT@persianvii
-\newcount\FT@latinviii \newcount\FT@persianviii
-\newcount\FT@latinix \newcount\FT@persianix
-\newcount\FT@latinx \newcount\FT@persianx
-\newcount\FT@latinxi \newcount\FT@persianxi
-\newcount\FT@latinxii \newcount\FT@persianxii
- \newcount\FT@persianxiii
-
-\newcount\FT@temp
-\newcount\FT@temptwo
-\newcount\FT@tempthree
-\newcount\FT@yModHundred
-\newcount\FT@thirtytwo
-\newcount\FT@dn
-\newcount\FT@sn
-\newcount\FT@mminusone
-
-\def\ftoday{%
-\FT@y=\year \FT@m=\month \FT@d=\day
-%
-\FT@temp=\FT@y
-\divide\FT@temp by 100\relax
-\multiply\FT@temp by 100\relax
-\FT@yModHundred=\FT@y
-\advance\FT@yModHundred by -\FT@temp\relax
-%
-\ifodd\FT@yModHundred
- \FT@leapfalse
-\else
- \FT@temp=\FT@yModHundred
- \divide\FT@temp by 2\relax
- \ifodd\FT@temp\FT@leapfalse
- \else
- \ifnum\FT@yModHundred=0%
- \FT@temp=\FT@y
- \divide\FT@temp by 400\relax
- \multiply\FT@temp by 400\relax
- \ifnum\FT@y=\FT@temp\FT@leaptrue\else\FT@leapfalse\fi
- \else\FT@leaptrue
- \fi
- \fi
-\fi
-%
-\FT@latini=31\relax
-\ifFT@leap
- \FT@latinii = 29\relax
-\else
- \FT@latinii = 28\relax
-\fi
-\FT@latiniii = 31\relax
-\FT@latiniv = 30\relax
-\FT@latinv = 31\relax
-\FT@latinvi = 30\relax
-\FT@latinvii = 31\relax
-\FT@latinviii = 31\relax
-\FT@latinix = 30\relax
-\FT@latinx = 31\relax
-\FT@latinxi = 30\relax
-\FT@latinxii = 31\relax
-%
-\FT@thirtytwo=32\relax
-%
-\FT@temp=\FT@y
-\advance\FT@temp by -17\relax
-\FT@temptwo=\FT@temp
-\divide\FT@temptwo by 33\relax
-\multiply\FT@temptwo by 33\relax
-\advance\FT@temp by -\FT@temptwo
-\ifnum\FT@temp=\FT@thirtytwo\FT@kabisehfalse
-\else
- \FT@temptwo=\FT@temp
- \divide\FT@temptwo by 4\relax
- \multiply\FT@temptwo by 4\relax
- \advance\FT@temp by -\FT@temptwo
- \ifnum\FT@temp=\z@\FT@kabisehtrue\else\FT@kabisehfalse\fi
-\fi
-%
-% --BE
-% In fact persiani is equal to the Leap years from a fixed year to the last
-% year minus the Kabise years from a fixed year to the last year plus a const.
-%
-\FT@tempthree=\FT@y % Number of Leap years
-\advance\FT@tempthree by -1
-\FT@temp=\FT@tempthree % T := (MY-1) div 4
-\divide\FT@temp by 4\relax
-\FT@temptwo=\FT@tempthree % T := T - ((MY-1) div 100)
-\divide\FT@temptwo by 100\relax
-\advance\FT@temp by -\FT@temptwo
-\FT@temptwo=\FT@tempthree % T := T + ((MY-1) div 400)
-\divide\FT@temptwo by 400\relax
-\advance\FT@temp by \FT@temptwo
-\advance\FT@tempthree by -611 % Number of Kabise years
-\FT@temptwo=\FT@tempthree % T := T - ((SY+10) div 33) * 8
-\divide\FT@temptwo by 33\relax
-\multiply\FT@temptwo by 8\relax
-\advance\FT@temp by -\FT@temptwo
-\FT@temptwo=\FT@tempthree %
-\divide\FT@temptwo by 33\relax
-\multiply\FT@temptwo by 33\relax
-\advance\FT@tempthree by -\FT@temptwo
-\ifnum\FT@tempthree=32\advance\FT@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
-\divide\FT@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
-\advance\FT@temp by -\FT@tempthree
-\advance\FT@temp by -137 % T := T - 137 Adjust the value
-\FT@persiani=31
-\advance\FT@persiani by -\FT@temp % now 31 - T is the persiani
-%
-\FT@persianii = 30\relax
-\ifFT@kabiseh
- \FT@persianiii = 30\relax
-\else
- \FT@persianiii = 29\relax
-\fi
-\FT@persianiv = 31\relax
-\FT@persianv = 31\relax
-\FT@persianvi = 31\relax
-\FT@persianvii = 31\relax
-\FT@persianviii= 31\relax
-\FT@persianix = 31\relax
-\FT@persianx = 30\relax
-\FT@persianxi = 30\relax
-\FT@persianxii = 30\relax
-\FT@persianxiii= 30\relax
-%
-\FT@dn= 0\relax
-\FT@sn= 0\relax
-\FT@mminusone=\FT@m
-\advance\FT@mminusone by -1\relax
-%
-\FT@i=0\relax
-\ifnum\FT@i < \FT@mminusone
-\loop
-\advance \FT@i by 1\relax
-\advance\FT@dn by \csname FT@latin\romannumeral\the\FT@i\endcsname
-\ifnum\FT@i<\FT@mminusone \repeat
-\fi
-\advance \FT@dn by \FT@d
-%
-\FT@i=1\relax
-\FT@sn = \FT@persiani
-\ifnum \FT@sn<\FT@dn
-\loop
-\advance \FT@i by 1\relax
-\advance\FT@sn by \csname FT@persian\romannumeral\the\FT@i\endcsname
-\ifnum \FT@sn<\FT@dn \repeat
-\fi
-\ifnum \FT@i < 4
- \FT@m = 9 \advance\FT@m by \FT@i
- \advance \FT@y by -622\relax
-\else
- \FT@m = \FT@i \advance \FT@m by -3\relax
- \advance \FT@y by -621\relax
-\fi
-\advance\FT@sn by -\csname FT@persian\romannumeral\the\FT@i%
-\endcsname
-\ifnum\FT@i = 1
- \FT@d = \FT@dn \advance \FT@d by 30 \advance\FT@d by -\FT@persiani
-\else
- \FT@d = \FT@dn \advance \FT@d by -\FT@sn
-\fi
-\beginL\number\FT@d\endL\space%
-%Changedc from here YJ
-\persianmonth{\FT@m}\space\beginL\number\FT@y\endL%
-}
-% added \persianmonth YJ
-\def\persianmonth#1{\ifcase#1\or فروردین\or
-اردیبهشت\or
-خرداد\or تیر\or
-مرداد\or
-شهریور\or مهر\or
-آبان\or آذر\or
-دی\or بهمن\or
-اسفند\fi}
+\def\Latin{\if@RTL\par\LatinAlphs\@RTLfalse\@RTL@footnotefalse\latinfont\fi}
+\def\Persian{\if@RTL\relax\else\par\PersianAlphs\@RTLtrue\@RTL@footnotetrue\persianfont\fi}
\let\originaltoday=\today
\def\today{\lr{\originaltoday}}
-\let\romantoday\today
-\def\today{\rl{\ftoday}}
+\let\latintoday\today
+\def\today{\rl{\persiantoday}}
\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\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}}$}
-\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\XePersian{\lr{\leavevmode$\smash{\hbox{X\lower.5ex
+ \hbox{\kern-.125em\reflect{E}}Persian}}$}}
+\def\TeX{\lr{\@@TeX}}
+\def\LaTeX{\lr{\@@LaTeX}}
+\def\LaTeXe{\lr{\@@LaTeXe}}
+\let\origin@XeTeX\XeTeX
+\def\XeTeX{\lr{\origin@XeTeX}}
+\let\origin@XeLaTeX\XeLaTeX
+\def\XeLaTeX{\lr{\origin@XeLaTeX}}
+\def\figurename{\if@RTL شکل\else Figure\fi}
+\def\tablename{\if@RTL جدول\else Table\fi}
+\def\contentsname{\if@RTL فهرست مطالب\else Contents\fi}
+\def\listfigurename{\if@RTL لیست تصاویر\else List of Figures\fi}
+\def\listtablename{\if@RTL لیست جداول\else List of Tables\fi}
+\def\appendixname{\if@RTL پیوست\else Appendix\fi}
+\def\indexname{\if@RTL نمایه\else Index\fi}
+\def\refname{\if@RTL مراجع\else References\fi}
+\def\abstractname{\if@RTL چکیده\else Abstract\fi}
+\def\partname{\if@RTL بخش\else Part\fi}
+\def\datename{\if@RTL تاریخ:\else Date:\fi}
+\def\@@and{\if@RTL و\else and\fi}
+\def\bibname{\if@RTL کتاب‌نامه\else Bibliography\fi}
+\def\chaptername{\if@RTL فصل\else Chapter\fi}
+\def\ccname{\if@RTL رونوشت\else cc\fi}
+\def\enclname{\if@RTL پیوست\else encl\fi}
+\def\pagename{\if@RTL صفحه\else Page\fi}
+\def\headtoname{\if@RTL به\else To\fi}
+\def\proofname{\if@RTL اثبات\else Proof\fi}
\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 ی\else\@ctrerr\fi}
@@ -494,1105 +192,9 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil%
\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}%
- \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
- \else
- \addcontentsline{toc}{part}{#1}%
- \fi
- {\parindent \z@ \raggedleft
- \interlinepenalty \@M
- \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \Large\bfseries \partname\nobreakspace\thepart
- \par\nobreak
- \fi
- \huge \bfseries #2%
- \markboth{}{}\par}%
- \nobreak
- \vskip 3ex
- \@afterheading}
- \def\ps@plain{\ps@empty
- \def\@oddfoot{\hfil\thepage\hfil}%
- \let\@evenfoot\@oddfoot
-}
-\renewenvironment{thebibliography}[1]
- {\section*{\refname}%
- \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\@biblabel{#1}}%
- \rightmargin\labelwidth \advance\rightmargin\labelsep
- \@openbib@code
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
-\if@twoside
- \def\ps@headings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \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
- \beginR##1\endR}}{}}%
- \def\subsectionmark##1{%
- \markright {%
- \ifnum \c@secnumdepth >\@ne
- \beginR\thesubsection\quad\endR
- \fi
- \beginR##1\endR}}}
-\else
- \def\ps@headings{%
- \let\@oddfoot\@empty
- \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}%
- \let\@mkboth\markboth
- \def\sectionmark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\m@ne
- \beginR\thesection\quad\endR
- \fi
- \beginR##1\endR}}}}
-\fi
-\def\ps@myheadings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \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
- }
-\pagestyle{plain}
-\renewcommand \thepart {\@tartibi\c@part}
-\renewcommand\appendix{\par
- \setcounter{section}{0}%
- \setcounter{subsection}{0}%
- \gdef\thesection{\@harfi\c@section}}
-}{}
-
-
-
-\@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}}
-\renewenvironment{thebibliography}[1]{%
- \@bibtitlestyle
- \normalfont\bibliofont\labelsep .5em\relax
- \renewcommand\theenumiv{\arabic{enumiv}}\let\p@enumiv\@empty
- \list{\@biblabel{\theenumiv}}{\settowidth\labelwidth{\@biblabel{#1}}%
- \leftmargin\labelwidth \advance\leftmargin\labelsep
- \rightmargin\labelwidth \advance\rightmargin\labelsep
- \usecounter{enumiv}}%
- \sloppy \clubpenalty\@M \widowpenalty\clubpenalty
- \sfcode`\.=\@m
-}{%
- \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
- \endlist
-}
-\renewcommand \thepart {\@tartibi\c@part}
-\renewcommand\appendix{\par
- \setcounter{section}{0}%
- \setcounter{subsection}{0}%
- \gdef\thesection{\@harfi\c@section}}
-}{}
-
-
-
-\@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
- \ifnum \c@secnumdepth >\m@ne
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedleft
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\renewenvironment{thebibliography}[1]
- {\chapter*{\bibname}%
- \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\@biblabel{#1}}%
- \rightmargin\labelwidth
- \advance\rightmargin\labelsep
- \@openbib@code
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
-\if@twoside
- \def\ps@headings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \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
- \beginR\@chapapp\ \thechapter. \ \endR%
- \fi
- \beginR##1\endR}}{}}%
- \def\sectionmark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\z@
- \beginR\thesection. \ \endR%
- \fi
- \beginR##1\endR}}}}
-\else
- \def\ps@headings{%
- \let\@oddfoot\@empty
- \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
- \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\m@ne
- \beginR\@chapapp\ \thechapter. \ \endR%
- \fi
- \beginR##1\endR}}}}
-\fi
-\def\ps@myheadings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \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
- }
-\pagestyle{plain}
-\renewcommand \thepart {\@tartibi\c@part}
-%to make appendix numbering Persian
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@harfi\c@chapter}
-}%end appendix
-}{}
-
-
-
-\@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
- \ifnum \c@secnumdepth >\m@ne
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedleft
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\renewenvironment{thebibliography}[1]
- {\chapter*{\bibname}%
- \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\@biblabel{#1}}%
- \rightmargin\labelwidth
- \advance\rightmargin\labelsep
- \@openbib@code
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
-\if@twoside
- \def\ps@headings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \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
- \beginR\@chapapp\ \thechapter. \ \endR%
- \fi
- \beginR##1\endR}}{}}%
- \def\sectionmark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\z@
- \beginR\thesection. \ \endR%
- \fi
- \beginR##1\endR}}}}
-\else
- \def\ps@headings{%
- \let\@oddfoot\@empty
- \def\@oddhead{\sl\beginR\rightmark\endR\hfil\thepage}%
- \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markright {\MakeUppercase{%
- \ifnum \c@secnumdepth >\m@ne
- \beginR\@chapapp\ \thechapter. \ \endR%
- \fi
- \beginR##1\endR}}}}
-\fi
-\def\ps@myheadings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \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
- }
-\pagestyle{plain}
-\renewcommand \thepart {\@tartibi\c@part}
-%to make appendix numbering persian
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@harfi\c@chapter}
-}%end appendix
-}{}
-
-
-
-\@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
- \renewcommand\theenumiv{\arabic{enumiv}}\let\p@enumiv\@empty
- \list{\@biblabel{\theenumiv}}{\settowidth\labelwidth{\@biblabel{#1}}%
- \rightmargin\labelwidth \advance\rightmargin\labelsep
- \leftmargin\labelwidth \advance\leftmargin\labelsep
- \usecounter{enumiv}}%
- \sloppy \clubpenalty\@M \widowpenalty\clubpenalty
- \sfcode`\.=\@m
-}{%
- \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
- \endlist
-}
-\def\frontmatter{\cleardoublepage\pagenumbering{harfi}}
-\renewcommand \thepart {\@tartibi\c@part}
-%to make appendix numbering persian
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@harfi\c@chapter}
-}%end appendix
-\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
-\columnseprule\z@ \columnsep 35\p@
-\@indextitlestyle
-\thispagestyle{plain}%
-\let\item\@idxitem
-\parindent\z@ \parskip\z@\@plus.3\p@\relax
-\raggedleft
-\hyphenpenalty\@M
-\footnotesize}
-
-\def\@idxitem{\par\hangindent -2em}
-\def\subitem{\par\hangindent -2em\hspace*{1em}}
-\def\subsubitem{\par\hangindent -3em\hspace*{2em}}
-}{}
-
-
-
-\@ifclassloaded{bookest}{%
-\AtBeginDocument{
-\def\@makechapterhead#1{%
- \vspace*{20\p@}
- {\parindent \z@ \raggedleft \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- {\colorA\huge\scshape \@chapapp\space \thechapter}
- \par\nobreak
- \vskip 10\p@
- \fi
- \fi
- \interlinepenalty\@M
- {\colorB\hrule}
- \vskip 15\p@
- \begin{flushleft}
- {\colorA\Huge \bfseries #1}\par\nobreak
- \end{flushleft}
- \vskip 5\p@
- {\colorB\hrule}
- \vskip 30\p@
- }}
-\def\@makeschapterhead#1{%
- \vspace*{20\p@}
- {\parindent \z@ \raggedright \normalfont
- {\colorB\hrule}
- \vskip 15\p@
- \begin{center}
- {\colorA\Huge \bfseries #1}\par\nobreak
- \end{center}
- \vskip 5\p@
- {\colorB\hrule}
- \vskip 30\p@
- }}
-\renewcommand{\setevenhead}[1]{\def\@evenhead{#1}}
-\renewcommand{\setoddhead}[1]{\def\@oddhead{#1}}
-\renewcommand{\setevenfoot}[1]{\def\@evenfoot{#1}}
-\renewcommand{\setoddfoot}[1]{\def\@oddfoot{#1}}
-\renewcommand{\oddheadtext}{{\colorA{\slshape\rightmark}\hfill\thepage}}
-\renewcommand{\setoddheadtext}[1]{\renewcommand{\oddheadtext}{#1}}
-\renewcommand{\evenheadtext}{\oddheadtext}
-\renewcommand{\setevenheadtext}[1]{\renewcommand{\evenheadtext}{#1}}
-\renewcommand{\evenfoottext}{}
-\renewcommand{\setevenfoottext}[1]{\renewcommand{\evenfoottext}{#1}}
-\renewcommand{\oddfoottext}{}
-\renewcommand{\setoddfoottext}[1]{\renewcommand{\oddfoottext}{#1}}
-\renewcommand{\setleftmark}[1]{\renewcommand{\leftmark}{#1}}
-\renewcommand{\setrightmark}[1]{\renewcommand{\rightmark}{#1}}
-\renewcommand{\makeheadrule}{{\colorB\hrule\@width\textwidth \@height 0.4pt \vskip-0.4pt}}
-\renewcommand{\makefootrule}{\makeheadrule}
-\if@twoside
- \setevenheadtext{{\colorA\thepage\hfill\slshape\leftmark}}
-\fi
-\setevenhead{\vbox{\evenheadtext \vskip 5\p@ \makeheadrule}}
-\setoddhead{\vbox{\oddheadtext \vskip 5\p@ \makeheadrule}}
-\let\UCase\MakeUppercase
-\renewcommand{\MakeUppercase}{}
-\def\ps@plain{%
- \def\@oddfoot{{\hfil\colorA\thepage\hfil}}
- \def\@evenfoot{{\hfil\colorA\thepage\hfil}}
- \let\@oddhead\@empty
- \let\@evenhead\@empty
-}
-}
-\NoHyper
-\renewcommand \thepart {\@tartibi\c@part}
-%to make appendix numbering persian
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@harfi\c@chapter}
-}%end appendix
-}{}
-
-
-\@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
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
- \fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedleft
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\renewenvironment{thebibliography}[1]
- {\chapter*{\bibname}%
- \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\@biblabel{#1}}%
- \rightmargin\labelwidth
- \advance\rightmargin\labelsep
- \@openbib@code
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
-\renewcommand\frontmatter{%
- \cleardoublepage
- \@mainmatterfalse
- \pagenumbering{harfi}}
-\renewcommand\mainmatter{%
- \cleardoublepage
- \@mainmattertrue
- \pagenumbering{arabic}}
-\renewcommand\backmatter{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \@mainmatterfalse}
-
-\if@twoside
- \def\ps@headings{%
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- \def\@evenhead{\sl\beginR\rightmark\endR\hfil\thepage}%
- \def\@oddhead{\sl\thepage\hfil\beginR\leftmark\endR}%
- \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markboth {\MakeUppercase{%
- \beginR\@chapapp\ \thechapter.\,\,\endR%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \beginR##1\endR
- \fi
- \fi
- }}{}}%
- \def\ps@plain{\ps@empty
- \def\@oddfoot{\hfil\thepage\hfil}%
- \let\@evenfoot\@oddfoot
-}
- \def\sectionmark##1{%
- \markright {\MakeUppercase{%
- \beginR\thesection\endR\,
- \ifnum \c@secnumdepth >\z@
- \beginR##1\endR \ %
- \fi
- }}}}
-\else
- \def\ps@headings{%
- \let\@oddfoot\@empty
- \def\@oddhead{\sl\thepage\hfil\beginR\rightmark\endR}%
- \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markright {\MakeUppercase{%
- \beginR\@chapapp\ \thechapter. \endR %
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \beginR##1\endR
- \fi
- \fi
- }}}}
-
-\fi
-\pagestyle{headings}
-
-
-\renewcommand \thepart {\@tartibi\c@part}
-%to make appendix numbering Persian
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@harfi\c@chapter}
-}%end appendix
-\def\@idxitem{\par\hangindent -40\p@}
-}{}
-
-
-\@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
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@harfi\c@chapter}
-}%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\@RTLfalse}
-\def\endLTR{\par\egroup}
-\def\RTL{\bgroup\par\raggedleft\@RTLtrue}
-\def\endRTL{\par\egroup}
-\def\roman{\bgroup\par\raggedright\@RTLfalse\rmfamily}
-\def\endroman{\par\egroup}
-\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{\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{%
- \ifhmode\unskip\unskip\par\fi
- \normalfont
- \let\thmheadnl\relax
- \let\thm@swap\@gobble
- \thm@headpunct{.}% add period after heading
- \thm@space@setup
- #1% style overrides
- \def\inserttheoremname{#3}
- \def\inserttheorempunctuation{\the\thm@headpunct}
- \def\@tempa{#2}%
- \ifx\@empty\@tempa
- \def\inserttheoremnumber{}
- \else
- \refstepcounter{#2}%
- \expandafter\def\expandafter\inserttheoremnumber\expandafter{ \csname the#2\endcsname}
- \fi
- \beamer@begintheorem%
-\raggedleft\@RTLtrue
-}
- \ifbeamer@countsect
- \newtheorem{قضیه}{\raggedleft قضیه}[section]
- \else
- \newtheorem{قضیه}{\raggedleft قضیه}
- \fi
- \newtheorem{نتیجه}[theorem]{\raggedleft نتیجه}
- \newtheorem{حقیقت}[theorem]{\raggedleft حقیقت}
- \newtheorem{لم}[theorem]{\raggedleft لم}
- \newtheorem{مسئله}[theorem]{\raggedleft مسئله}
- \newtheorem{پاسخ}[theorem]{\raggedleft پاسخ}
-\theoremstyle{definition}
- \newtheorem{تعریف}[theorem]{\raggedleft تعریف}
- \newtheorem{تعریفها}[theorem]{\raggedleft تعریف‌ها}
-\theoremstyle{example}
- \newtheorem{مثال}[theorem]{\raggedleft مثال}
- \newtheorem{مثالها}[theorem]{\raggedleft مثال‌ها}
-\newenvironment<>{اثبات}[1][\raggedleft اثبات]{%
- \par
- \def\insertproofname{#1\@addpunct{}}%
- \pushQED{\qed}
- \usebeamertemplate{proof begin}\@RTLtrue#2}
-{\popQED\usebeamertemplate{proof end}}
- \newenvironment<>{بلوک}[1]{%
- \begin{actionenv}#2%
- \def\insertblocktitle{\raggedleft#1}%
- \par%
- \usebeamertemplate{block begin}\raggedleft\@RTLtrue}
- {\par%
- \usebeamertemplate{block end}%
- \end{actionenv}}
- \newenvironment<>{بلوک‌هشدار}[1]{%
- \begin{actionenv}#2%
- \def\insertblocktitle{\raggedleft#1}%
- \par%
- \mode<presentation>{%\usebeamerfont{block}%
- \setbeamercolor{local structure}{parent=alerted text}}%
- \usebeamertemplate{block alerted begin}\raggedleft\@RTLtrue}
- {\par%
- \usebeamertemplate{block alerted end}%
- \end{actionenv}}
- \newenvironment<>{بلوک‌مثال}[1]{%
- \begin{actionenv}#2%
- \def\insertblocktitle{\raggedleft#1}%
- \par%
- \mode<presentation>{%\usebeamerfont{block}%
- \setbeamercolor{local structure}{parent=example text}}%
- \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}%
- \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
- \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
- \expandafter
- \list
- {\usebeamertemplate{\beamer@enumtempl}}
- {\usecounter\@enumctr%
- \def\makelabel##1{{\hss\llap{{%
- \usebeamerfont*{enumerate \beameritemnestingprefix item}%
- \usebeamercolor[fg]{enumerate \beameritemnestingprefix item}##1}}}}}%
- \beamer@cramped%
- \raggedleft%
- \beamer@firstlineitemizeunskip%
-}
-\renewcommand{\itemize}[1][]{%
- \beamer@ifempty{#1}{}{\def\beamer@defaultospec{#1}}%
- \ifnum \@itemdepth >2\relax\@toodeep\else
- \advance\@itemdepth\@ne
- \beamer@computepref\@itemdepth% sets \beameritemnestingprefix
- \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
- \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
- \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
- \list
- {\usebeamertemplate{itemize \beameritemnestingprefix item}}
- {\def\makelabel##1{%
- {%
- \hss\llap{{%
- \usebeamerfont*{itemize \beameritemnestingprefix item}%
- \usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%
- }%
- }%
- }
- \fi%
- \beamer@cramped%
- \raggedleft%
- \beamer@firstlineitemizeunskip%
-}
-\def\@@description{%
- \advance\beamer@descdefault by \labelsep%
- \list
- {}
- {\labelwidth\beamer@descdefault\leftmargin\beamer@descdefault\let\makelabel\beamer@descriptionitem}%
- \beamer@cramped%
- \raggedleft\rightskip=6em
- \beamer@firstlineitemizeunskip%
-}
-\AtBeginDocument{\@RTLfalse}
-\renewenvironment{beamer@frameslide}{%
- \ifbeamer@autobreak\else%
- \ifx\beamer@againname\@empty%
- {\let\@elt\beamer@restorecounter\beamer@overlaycounterresets}%
- \else%
- {\let\@elt\beamer@labelrestorecounter\beamer@overlaycounterresets}%
- \fi%
- \fi%
- \global\c@beamerpauses=1\relax%
- \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{%
- \refstepcounter{subsectionslide}%
- \xdef\beamer@framestartpage{\the\c@page}% only first time
- }{\clearpage\beamer@notesactions}% cleanup from previous slide
- \hypersetup{pdfpagetransition=R}%
- \hypersetup{pdfpageduration=}%
- \xdef\beamer@frameendpage{\the\c@page}% every time
- \beamer@setuplinks%
- \beamer@displaybreak%
- \global\setbox\beamer@zoombox=\box\voidb@x%
- \def\beamer@zoomer{}%
- \beamer@slidehaszoomfalse%
- \gdef\insertframetitle{}%
- \gdef\insertframesubtitle{}%
- \gdef\beamer@frametitle{}%
- \gdef\beamer@shortframetitle{}%
- \gdef\beamer@framesubtitle{}%
- \let\beamer@startcomment=\beamer@startcommentinframe%
- % Start slide:
- \beamer@framenotesbegin\@RTLtrue%
- \global\setbox\beamer@framebox=\vbox\bgroup%
- \beamer@inframetrue%
- \let\frame=\framelatex% inside frames, use LaTeX's \frame command
- \begin{beamer@framepauses}%
- \ifbeamer@shrink%
- \hsize=\beamer@shrinkfactorinv\hsize%
- \textwidth=\beamer@shrinkfactorinv\textwidth%
- \linewidth=\beamer@shrinkfactorinv\linewidth%
- \fi%
- % Insert labels if necessary:
- \ifx\beamer@againname\@empty\else%
- \nointerlineskip\vbox to0pt{\vss%
- \label<\the\beamer@slideinframe>{\beamer@againname<\the\beamer@slideinframe>}%
- \ifnum\beamer@slideinframe=1\relax%
- \label<1>{\beamer@againname}%
- \fi%
- }\nointerlineskip%
- \fi%
- \ifx\beamer@framehypertargets\@empty\else%
- \nointerlineskip\vbox to0pt{\vss%
- \beamer@framehypertargets%
- \global\let\beamer@framehypertargets\@empty%
- }\nointerlineskip%
- \fi%
- \vskip-\parskip\vbox{}%
- \beamer@initfirstlineunskip%
- \ifbeamer@plainframe\nointerlineskip\fi%
- \beamer@checkframetitle}%
- {\end{beamer@framepauses}%
- \egroup%
- \ifx\beamer@frametitle\@empty%
- \setbox\beamer@frametitlebox=\box\voidb@x%
- \else%
- \setbox\beamer@frametitlebox=\vbox{%
- \vbox{}%
- {\parskip0pt\usebeamertemplate***{frametitle}\vskip0.25em}%
- }%
- \fi%
- \ifbeamer@plainframe%
- \beamer@frametextheight=\paperheight%
- \else%
- \beamer@frametextheight=\textheight%
- \fi%
- \advance\beamer@frametextheight by-\ht\beamer@frametitlebox%
- \advance\beamer@frametextheight by-\dp\beamer@frametitlebox%
- \advance\beamer@frametextheight by-\beamer@frametopskip%
- \ifbeamer@shrink%
- \beamer@shrinkframebox%
- \fi%
- \ifx\beamer@zoomer\@empty
- \setbox\beamer@framebox=\vbox{%
- \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%
- \nointerlineskip\unvbox\beamer@frametitlebox%
- \nobreak%
- \ifbeamer@autobreak%
- \vskip\beamer@frametopskipautobreak%
- \else%
- \vskip\beamer@frametopskip%
- \fi%
- \nobreak%
- \nointerlineskip\box\beamer@zoombox\nointerlineskip%
- \nobreak%
- \ifbeamer@slidehaszoom\box\beamer@framebox\else\unvbox\beamer@framebox\fi%
- % bottom skip is added in autobreakframebox
- }%
- \beamer@autobreakframebox%
- \else%
- \beamer@zoomer%
- \fi%
- \beamer@undolabels%
- \beamer@framenotesend%
- \box\beamer@framebox}
-\long\def\beamer@title[#1]#2{%
- \def\inserttitle{\beginR#2\endR}%
- \def\beamer@shorttitle{\beginR#1\endR}%
- }
-\long\def\beamer@subtitle[#1]#2{%
- \def\insertsubtitle{\beginR#2\endR}%
- \def\beamer@shortsubtitle{\beginR#1\endR}%
- }
-\long\def\beamer@date[#1]#2{%
- \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}\beginR#2\endR}%
- \def\beamer@shortauthor{\beginR#1\endR}%
- \ifbeamer@autopdfinfo%
- \def\beamer@andstripped{}%
- \beamer@stripands#2 \and\relax
- {\let\inst=\@gobble\let\thanks=\@gobble\def\and{, }\hypersetup{pdfauthor={\beamer@andstripped}}}
- \fi%
-}
-\long\def\beamer@institute[#1]#2{%
- \def\beamer@temp{\beginR#2\endR}%
- \ifx\beamer@temp\@empty
- \def\insertinstitute{}
- \else
- \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}\beginR#2\endR}%
- \fi
- \def\beamer@shortinstitute{\beginR#1\endR}}
-\renewenvironment{thebibliography}[1]
-{%\leavevmode\unskip%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\beamer@biblabeltemplate{\@biblabel{#1}}}%
- \leftmargin\labelwidth
- \advance\leftmargin\labelsep
- \itemsep=0pt%
- \partopsep=0pt%
- \topsep=0pt%
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}
- \let\makelabel\beamer@biblabeltemplate}%
- \sloppy\raggedleft
- \clubpenalty10000
- \@clubpenalty \clubpenalty
- \widowpenalty10000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \ifhmode\unskip\fi\endlist}
-\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%
- {
- \beamer@saveanother%
- \gdef\beamer@todo{}%
- \beamer@slideinframe=#1\relax%
- \expandafter\only\beamer@tocsections{\gdef\beamer@todo{%
- \ifbeamer@pausesubsections\pause\fi%
- \beamer@tempcount=#6%
- \advance\beamer@tempcount by\beamer@sectionadjust%
- \edef\inserttocsectionnumber{\the\beamer@tempcount}%
- \def\inserttocsubsectionnumber{#2}%
- \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{\\}%
- \beamer@tocact{\ifnum\c@section=#1\ifnum\c@subsection=#2\beamer@toc@css\else\beamer@toc@oss\fi\else\beamer@toc@ooss\fi}
- {subsection in toc}%
- }%
- }}%
- \beamer@restoreanother%
- }
- \beamer@todo%
- \fi\fi%
-}
-\long\def\beamer@subsubsectionintoc#1#2#3#4#5#6#7{%
- \ifnum\c@tocdepth>2%
- \ifnum#1=\beamer@showpartnumber%
- {
- \beamer@saveanother%
- \gdef\beamer@todo{}%
- \beamer@slideinframe=#2\relax%
- \expandafter\only\beamer@tocsections{\gdef\beamer@todo{%
- \ifbeamer@pausesubsections\pause\fi%
- \beamer@tempcount=#6%
- \advance\beamer@tempcount by\beamer@sectionadjust%
- \edef\inserttocsectionnumber{\the\beamer@tempcount}%
- \def\inserttocsubsectionnumber{#3}%
- \def\inserttocsubsubsectionnumber{#4}%
- \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{\\}%
- \beamer@tocact{\ifnum\c@section=#2\ifnum\c@subsection=#3\beamer@toc@css\else\beamer@toc@oss\fi\else\beamer@toc@ooss\fi}
- {subsubsection in toc}%
- }%
- }}%
- \beamer@restoreanother%
- }
- \beamer@todo%
- \fi\fi%
-}
-\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 \@minipagefalse
- \hb@xt@\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}%
- \fi
- \nobreak\vskip\belowcaptionskip\nobreak}
-}{}
-
\providecommand*{\xpg@warning}[1]{%
\PackageWarning{XePersian}%
- {#1}}
+ {#1}}
\ifcsdef{abjad}{}{%
\def\abjad#1{%
\ifnum#1>1999 \xpg@warning{Illegal value (#1) for abjad numeral} {#1}
@@ -1630,168 +232,53 @@ to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil%
\ifcase#1\or غ\fi
\ifnum#1=\z@\fi\abj@num@iii}
}
-
\let\@latinalph\@alph%
\let\@latinAlph\@Alph%
+\def\PersianAlphs{%
\let\@alph\abjad%
\let\@Alph\abjad%
-
-
-
-
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % %
- % footnote setup %
- % %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\ifx \CatEscape\undefined
- \chardef\CatEscape=0
- \chardef\CatOpen=1
- \chardef\CatClose=2
- \chardef\CatIgnore=9
- \chardef\CatLetter=11
- \chardef\CatOther=12
- \chardef\CatActive=13 % is defined in Plain already
-
- \chardef\CatUsCode=\catcode`\_
-\fi
-
-\catcode`\_=\CatLetter % top level macro file
-
-
-\def\r@fn{%
- \hbox to \columnwidth
- {\beginR \vbox{\kern -3\p@
- \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
-\def\l@fn{%
- \hrule width .4\columnwidth\kern 2.6\p@}
-
-
-\def\@makefnmark{\hbox{$^{\hbox{\scriptsize\@thefnmark}}\m@th$}}
-
-
-\def\leftfootnoterule{\global\def\footnoterule{\l@fn}}
-\def\rightfootnoterule{\global\def\footnoterule{\r@fn}}
-\leftfootnoterule
-
-%%% \beginprog
-\newread\old_foot_file
-\newwrite\foot_file
-\def\foot_file_name{\jobname.fot\relax}
-\def\init_footnote{%
- \openin\old_foot_file\foot_file_name
- \ifeof\old_foot_file \closein\old_foot_file
- \else \closein\old_foot_file
- \read_foot_file
- \fi
- \immediate\openout\foot_file\foot_file_name
- \immediate\write\foot_file{\relax}%
- \global\let\init_footnote\relax
- }
-
-\newcount\foot_name_no % for generating footnote mark names
-
-
-
-
-
-\newcount\autofootnote
-\def\fnpp_next_footnote{%
- \init_footnote
- \global\advance\foot_name_no\@ne
- \global\advance\c@footnote\@ne
- \edef\do_write{%
- \immediate\write\foot_file{%
- \string\advance\autofootnote\@ne
- \string\expandafter\xdef
- \string\csname\space f@\number\foot_name_no \endcsname{%
- \string\number\autofootnote
- }%
- }%
- }%
- \do_write
- \global\autofootnote 0\csname f@\number\foot_name_no \endcsname \relax
- }
-
-\def\read_foot_file{%
- \begingroup
- \catcode`\@\CatLetter \catcode`\^^M\CatIgnore
- \input \foot_file_name
- \endgroup
- }
-
-\let\fnpp_orig_outputpage=\@outputpage
-\def\@outputpage{%
- \ifx \init_footnote\relax
- \immediate\write\foot_file{\autofootnote\z@}%
- \fi
- \fnpp_orig_outputpage
- }
-
-\let\FnppOrigFootnote=\footnote % save original bindings
-\let\FnppOrigFootnotemark=\footnotemark
-
-\def\footnote{%
- \@ifnextchar[% % ] (Emacs)
- \@xfootnote
- {\fnpp_next_footnote \ifnum\autofootnote=1\rightfootnoterule\fi \@xfootnote[\the\c@footnote] %
-}%
- }
-\def\footnotemark{%
- \@ifnextchar[% % ] (Emacs)
- \@xfootnotemark
- {\fnpp_next_footnote \ifnum\autofootnote=1\rightfootnoterule\fi \@xfootnotemark[\the\c@footnote]}%
- }
-
-
-
-
-\def\footnotemarkLR{%
- \@ifnextchar[% % ] (Emacs)
- \@xfootnotemark
- {\fnpp_next_footnote \ifnum\autofootnote=1\leftfootnoterule\fi\@xfootnotemark[\the\c@footnote]}%
- }
-
-\newif\if@RomanFootNum
-\providerobustcmd{\Footnote}[1]{%
-\bgroup
-\footnotemarkLR%
-\renewcommand{\thefootnote}{\if@RomanFootNum\rmfamily{\@arabic\c@footnote}\else\@arabic\c@footnote\fi}%
-\@RTLfalse\footnotetext{\rmfamily#1}%
-\egroup
}
-\@RomanFootNumfalse
-\def\PersianFootNum{\@RomanFootNumfalse}
-\def\RomanFootNum{\@RomanFootNumtrue}
-\DeclareOption{RomanFootNum}{\@RomanFootNumtrue}
-\ProcessOptions
-
-
-
-\ifx \@minipagerestore\relax
- \let\@minipagerestore\@empty
-\fi
-
-\g@addto@macro\@minipagerestore{%
- \let\footnote\FnppOrigFootnote
- }
-
-\let\fnpp_orig_maketitle=\maketitle
-\def\maketitle{%
- \begingroup
- \let\footnotemark\FnppOrigFootnotemark
- \fnpp_orig_maketitle
- \endgroup
- }
-
-\catcode`\_=\CatUsCode
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % %
- % End of footnote setup %
- % %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\endinput
+\def\LatinAlphs{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+\PersianAlphs
+\@ifpackageloaded{listings}{\input{listings-xepersian.def}}{}
+\@ifpackageloaded{algorithmic}{\input{algorithmic-xepersian.def}}{}
+\@ifpackageloaded{algorithm}{\input{algorithm-xepersian.def}}{}
+\@ifpackageloaded{backref}{\input{backref-xepersian.def}}{}
+\@ifpackageloaded{bidi}{\input{footnote-bidi-xepersian.def}}{}
+\@ifpackageloaded{enumerate}{\input{enumerate-xepersian.def}}{}
+\@ifpackageloaded{minitoc}{\input{minitoc-xepersian.def}}{}
+\@ifpackageloaded{tocloft}{\input{tocloft-xepersian.def}}{}
+\@ifclassloaded{article}{\input{article-xepersian.def}}{}
+\@ifclassloaded{amsart}{\input{amsart-xepersian.def}}{}
+\@ifclassloaded{bidimoderncv}{\input{bidimoderncv-xepersian.def}}{}
+\@ifclassloaded{report}{\input{report-xepersian.def}}{}
+\@ifclassloaded{rapport3}{\input{rapport3-xepersian.def}}{}
+\@ifclassloaded{scrartcl}{\input{scrartcl-xepersian.def}}{}
+\@ifclassloaded{scrbook}{\input{scrbook-xepersian.def}}{}
+\@ifclassloaded{scrreprt}{\input{scrreprt-xepersian.def}}{}
+\@ifclassloaded{xepersian-thesis}{\input{xepersian-thesis-xepersian.def}}{}
+\@ifclassloaded{amsbook}{\input{amsbook-xepersian.def}}{}
+\@ifclassloaded{bookest}{\input{bookest-xepersian.def}}{}
+\@ifclassloaded{extbook}{\input{extbook-xepersian.def}}{}
+\@ifclassloaded{book}{\input{book-xepersian.def}}{}
+\@ifclassloaded{refrep}{\input{refrep-xepersian.def}}{}
+\@ifclassloaded{bidibeamer}{\input{bidibeamer-xepersian.def}}{}
+\@ifclassloaded{bidimemoir}{\input{bidimemoir-xepersian.def}}{}
+%%
+%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `xepersian.sty'.
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 68e22fdf73c..88125d07c3c 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -777,6 +777,7 @@ $standardsourcefmt='latex';
'vaucanson-g', 'generic',
'vertex', 'plain',
'wasy2', 'plain',
+ 'xepersian', 'xelatex',
'xetex-def', 'xelatex',
'xetexfontinfo','xetex',
'xltxtra', 'xelatex',
@@ -1107,6 +1108,7 @@ $standardtex='\.(cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$';
'voss-de', 'german',
'wasy2', 'fonts',
'wsuipa', 'generic',
+ 'xepersian', 'xelatex',
'xetexfontinfo','xetex',
'xltxtra', 'xelatex',
'xq', 'fonts',