summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/texnegar
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-08-30 21:12:39 +0000
committerKarl Berry <karl@freefriends.org>2020-08-30 21:12:39 +0000
commit5474b1b43c3b0b1c86af620a938589c42e9cd01e (patch)
tree39b0ee71d1b1d6891b5cd7c58adab853ac565f18 /Master/texmf-dist/doc/latex/texnegar
parent9fbec9a9d124a7b55050150eb52e1e3239597579 (diff)
texnegar (30aug20)
git-svn-id: svn://tug.org/texlive/trunk@56215 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/texnegar')
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/INSTALL.txt49
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/README.txt27
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdfbin0 -> 13133 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdfbin0 -> 10116 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdfbin0 -> 63437 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdfbin0 -> 62967 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdfbin0 -> 65544 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx601
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdfbin0 -> 3145482 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdfbin0 -> 1105890 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex87
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdfbin0 -> 325838 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex87
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdfbin0 -> 174805 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex87
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdfbin0 -> 157987 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex91
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdfbin0 -> 212554 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex91
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdfbin0 -> 156628 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex91
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdfbin0 -> 156633 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex89
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdfbin0 -> 194659 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex89
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdfbin0 -> 155933 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex89
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/texnegar.pdfbin0 -> 534937 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdfbin0 -> 106734 bytes
-rw-r--r--Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex81
30 files changed, 1559 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt b/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt
new file mode 100644
index 00000000000..cac38811d90
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt
@@ -0,0 +1,49 @@
+ texnegar -- INSTALL
+======================
+
+ Source: texnegar.dtx (2020-08-30 v0.1b)
+ Author: Hossein Movahhedian
+ Info: filecontents + macro + verbatim
+ License: LPPL 1.3c
+ Copyright (C) 2020 Hossein Movahedian.
+ <dma8hm1334 AT gmail DOT com>
+
+- To extract the package and at the same time produce the
+ documentation, execute: xelatex thrice on texnegar.dtx.
+
+Files should then be moved to appropriate locations.
+
+-- *.dtx -> TEXMF/source/xelatex/texnegar/
+-- *.ins -> TEXMF/source/xelatex/texnegar/
+
+-- *.sty -> TEXMF/tex/xelatex/texnegar/
+-- *.lua -> TEXMF/tex/xelatex/texnegar/
+-- texnegar-ini.tex -> TEXMF/tex/xelatex/texnegar/
+-- texnegar-xetex-kashida.tex -> TEXMF/tex/xelatex/texnegar/
+-- texnegar-common-kashida.tex -> TEXMF/tex/xelatex/texnegar/
+
+-- *.pdf -> TEXMF/doc/xelatex/texnegar/
+-- *.tex -> TEXMF/doc/xelatex/texnegar/
+-- *.ltx -> TEXMF/doc/xelatex/texnegar/
+-- *.txt -> TEXMF/doc/xelatex/texnegar/
+
+Don't forget to run 'texconfig rehash' afterwards.
+
+The example files
+
+ texnegar-luatex-glyph.tex
+ texnegar-luatex-leaders-glyph.tex
+ texnegar-luatex-leaders-hrule.tex
+ texnegar-xetex-bidi-glyph.tex
+ texnegar-xetex-bidi-leaders-glyph.tex
+ texnegar-xetex-bidi-leaders-hrule.tex
+ texnegar-xetex-xepersian-glyph.tex
+ texnegar-xetex-xepersian-leaders-glyph.tex
+ texnegar-xetex-xepersian-leaders-hrule.tex
+ xepersian-XB.tex
+
+illustrate some features of the package and are an addendum to the
+user documentation texnegar-doc.pdf and the source documentation
+texnegar.pdf.
+
+That's it.
diff --git a/Master/texmf-dist/doc/latex/texnegar/README.txt b/Master/texmf-dist/doc/latex/texnegar/README.txt
new file mode 100644
index 00000000000..04d74db5a84
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/README.txt
@@ -0,0 +1,27 @@
+The TEXNEGAR package
+------------------------
+
+In some cursive scripts such as Persian or Arabic, kashida is used to create
+justification. In this type of justification characters are elongated rather
+than expanding spaces between words.
+
+The kashida justification in 'xepersian' has many bugs. Also it has problems
+with some fonts such as 'HM Series' available at
+'https://dma8hm1334.bitbucket.io' and 'X Series 2' available at
+'http://wiki.irmug.com/index.php/X_Series_2'. The 'xepersian-hm' package was
+the first attempt to fix these bugs in 'xepersian' which uses the xetex
+engine.
+
+This package extends the kashida justification to be used with the luatex
+engine too.
+
+The files 'texnegar-*.tex' in the directory 'texmf-dist/doc/xelatex/texnegar/'
+can be used as simple examples of the usage of the package.
+
+Please use the Bitbucket issue tracker:
+'https://bitbucket.org/dma8hm1334/texnegar/issues' to report a bug, request
+a feature or if you have a comment.
+
+I will do my best to fix all the bugs you report, but, unfortunately, time is a
+big hurdle to overcome; so, my apologies in advance for those which I cannot
+make time to fix.
diff --git a/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf b/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf
new file mode 100644
index 00000000000..824d833e3a1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf b/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf
new file mode 100644
index 00000000000..85a25c35d51
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf
new file mode 100644
index 00000000000..2db6e61796e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf b/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf
new file mode 100644
index 00000000000..f1a806958d0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf b/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf
new file mode 100644
index 00000000000..a1da3663559
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx b/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx
new file mode 100644
index 00000000000..d3da27ee43f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx
@@ -0,0 +1,601 @@
+%%
+%% This is file `texnegar-doc.tex'
+%%
+%% Copyright (c) Hossein Movahhedian 2020
+%%
+%% It may be distributed and/or modified 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
+%%
+
+\documentclass{ltxdoc}
+\usepackage{fontspec}
+\usepackage{graphicx}
+\usepackage{pdfpages}
+\usepackage{longtable}
+\usepackage[colorlinks]{hyperref}
+\usepackage{hologo}
+\usepackage{xcolor}
+\usepackage{iftex}
+
+\setfontfamily\PeFont[Script=Arabic,Language=Persian]{HM XKayhan}
+
+\def\TeXNegar{\TeX Negar}
+
+\usepackage{multicol,makeidx}
+\makeindex %%%
+
+% Partly adapted from the code provided by Maroš Beťko in:
+% https://tex.stackexchange.com/questions/404820/create-2-column-index-in-1-column-document-on-the-same-page
+% Redefine theindex enviroment so it won't place index on new page
+% This also makes the index 1 columns, which I don't want
+\makeatletter
+\renewenvironment{theindex}
+ {\section*{\indexname}\begin{multicols}{2}%
+ \@mkboth{\MakeUppercase\indexname}%
+ {\MakeUppercase\indexname}%
+ \thispagestyle{plain}\parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \columnseprule \z@
+ \columnsep 35\p@
+ \let\item\@idxitem}
+ {\end{multicols}}
+\makeatother
+
+\ifluatex
+ \def\RtoL#1{\PeFont\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT #1}
+\fi
+\ifxetex
+ \def\RtoL#1{\PeFont\TeXXeTstate=1 \beginR #1 \endR}
+\fi
+
+\title{
+ The \TeXNegar{} package\\Kashida justification in LuaTeX and XeTeX\\User Documentation
+}
+
+\author{
+ Hossein Movahhedian\thanks
+ {
+ E-mail:
+ \href{mailto:dma8hm1334@gmail.com}
+ {\textsf{dma8hm1334@gmail.com}}
+ }
+}
+
+\date{Released \quad 2020-08-30 \quad v0.1b}
+
+\definecolor{HMhighlightBlueI}{rgb}{0,0,1}
+\definecolor{HMhighlightbgYellowII}{rgb}{1,1,1}
+\definecolor{HMhighlightbgPinkI}{rgb}{1,1,1}
+\definecolor{HMhighlightbgPinkII}{rgb}{1,1,1}
+\definecolor{HMhighlightbgPinkIII}{rgb}{1,1,1}
+
+\definecolor{HMcitecolor}{rgb}{1,0,1}
+
+\definecolor{HMnotecolor}{rgb}{0.6,0,0}
+
+\def\indexterm#1#2{{\color{HMhighlightBlueI} #2}\index{#1@#2}}
+\def\indextermsub#1#2#3{{\color{HMhighlightBlueI} #3}\index{#1@#2!#3}}
+\def\indextermsubsub#1#2#3#4{{\color{HMhighlightBlueI} #4}\index{#1@#2!#3!#4}}
+\def\ccsterm#1{{\color{HMhighlightBlueI}\tt \textbackslash #1}\index{#1@\tt \textbackslash #1}}
+\def\ccstermsub#1#2#3{{\color{HMhighlightBlueI}\tt \textbackslash #3}\index{#1@#2!\tt \textbackslash #3}}
+
+\begin{document}
+
+\maketitle
+
+\vskip 50mm
+\newbox\hnegar
+\setbox\hnegar\hbox{\texttt{Negar:}}
+\newbox\vnegar
+\setbox\vnegar\vbox{
+\hbox{\leaders\hrule\hskip \the\wd\hnegar}
+\hbox to -\the\wd\hnegar{\texttt{Negar:}}\vskip-0.6em
+\hbox{\leaders\hrule\hskip \the\wd\hnegar}}
+\unvbox\vnegar
+\vskip -\the\baselineskip
+\hskip 3em
+\begin{minipage}{0.65\linewidth}
+ \textit{\noindent
+ Negar, in Persian, is the present stem of negaashtan meaning to design; to paint;
+ to write; and as a noun it means ``sweetheart, idol, beloved, figuratively refering
+ to a beautiful woman, pattern, painting, and artistic design''
+ }
+\end{minipage}
+
+% \vskip 15mm
+% \begin{center}\begin{minipage}{0.65\linewidth}\parskip 15pt
+% \textit{
+% Negar, in Persian, is the present stem of negaashtan meaning to design; to paint;
+% to write; and as a noun it means ``sweetheart, idol, beloved, figuratively refering
+% to a beautiful woman, pattern, painting, and artistic design''
+% }
+% \end{minipage}\end{center}
+
+\newpage
+
+\tableofcontents
+
+\newpage
+
+\section{Introduction}
+
+\indexterm{Kashida}{Kashida} is used in Persian and Arabic typography to justify the text regardless
+of the number of the words on the line by elongating characters at certain
+points instead of expanding spaces between words or individual letters.
+
+One of the packages that implements kashida feature in Persian typesetting is
+\hyperref[HM:Brief-outline-of-the-issues]{\indexterm{xepersian}{\textsf{xepersian}} which
+ unfortunately has many bugs}. In addition kashida feature in
+\textsf{xepersian} has problems with some fonts such as \mbox{\textsf{HM Series}}
+available at\linebreak[4]
+\href{https://dma8hm1334.bitbucket.io}{\texttt{https://dma8hm1334.bitbucket.io}}
+and \mbox{\textsf{X Series 2}} available at\linebreak[4]
+\href{http://wiki.irmug.com/index.php/X_Series_2}{\texttt{http://wiki.irmug.com/index.php/X\_Series\_2}}.
+
+The \indexterm{texnegar}{\TeXNegar} package implements kashida justification in LuaTeX and XeTeX
+and fixes known bugs in \textsf{xepersian}.
+
+The following files in the directory \texttt{texmf-dist/doc/xelatex/texnegar/} can be used as simple
+examples of the usage of the package:
+\newcounter{beanx}
+\begin{list}{\arabic{beanx}.}{\usecounter{beanx}\setlength{\rightmargin}{\leftmargin}}
+ \item \texttt{texnegar-luatex-glyph.tex} \\
+ See pages 26 -- 35 for PDF output.
+ \item \texttt{texnegar-luatex-leaders-glyph.tex} \\
+ See pages 36 -- 45 for PDF output.
+ \item \texttt{texnegar-luatex-leaders-hrule.tex} \\
+ See pages 46 -- 55 for PDF output.
+ \item \texttt{texnegar-xetex-bidi-glyph.tex} \\
+ See pages 56 -- 65 for PDF output.
+ \item \texttt{texnegar-xetex-bidi-leaders-glyph.tex} \\
+ See pages 66 -- 75 for PDF output.
+ \item \texttt{texnegar-xetex-bidi-leaders-hrule.tex} \\
+ See pages 76 -- 85 for PDF output.
+ \item \texttt{texnegar-xetex-xepersian-glyph.tex} \\
+ See pages 86 -- 95 for PDF output.
+ \item \texttt{texnegar-xetex-xepersian-leaders-glyph.tex} \\
+ See pages 96 -- 105 for PDF output.
+ \item \texttt{texnegar-xetex-xepersian-leaders-hrule.tex} \\
+ See pages 106 -- 115 for PDF output.
+ % \item \texttt{xepersian-XB.tex} \\
+ % See pages 14 -- 23 for PDF output.
+\end{list}
+
+Please use the Bitbucket issue tracker:
+\href{https://bitbucket.org/dma8hm1334/texnegar/issues}{\textsf{https://bitbucket.org/dma8hm1334/\linebreak[4]texnegar/issues}}
+to report a bug, request a feature or if you have a comment.
+
+I will do my best to fix all the bugs you report, but, unfortunately,
+time is a big hurdle to overcome; so, my apologies in advance for those
+which I cannot make time to fix.
+
+\section{Brief outline of the issues}\label{HM:Brief-outline-of-the-issues}
+
+Kashida is one of the most important features that must be included in any
+Persian typesetter. In \textsf{xepersian} this feature is implemented but with some
+problems. See pages 14 -- 23 for pictorial illustrations for various font styles.
+These problems along with the fixes in \TeXNegar{} are briefly:
+
+\newcounter{bean}
+ \begin{list}{P-\Roman{bean}}{\usecounter{bean}\setlength{\rightmargin}{\leftmargin}}
+ \item In \textsf{xepersian} \indexterm{overlapping of glyphs}{overlapping of glyphs} occurs in letter
+ combinations such as "{\RtoL{ﺑ + ﻰ}}", "{\RtoL{ﺗ + ﻰ}}", and
+ "{\RtoL{ﭘ + ﻰ}}" because the character
+ \textsf{U+FEF0 (ARABIC LETTER FARSI YEH FINAL FORM)} is replaced with
+ another character. This is fixed by modifying the fixed part of the
+ glue inserted between the consecutive characters. Furthermore, both,
+ the fixed and the stretchable parts of the glue can be changed by the
+ user.
+ \item In \indexterm{letter combinations}{letter combinations} such as "{\RtoL{ﻫ + ﻰ}}", in \textsf{xepersian},
+ the character \textsf{U+FEEB (ARABIC LETTER HEH INITIAL FORM)} is
+ replaced with \textsf{U+06BE (ARABIC LETTER HEH DOACHASHEMEE)}. This
+ is fixed by inserting the character \textsf{U+200E} before the
+ combination "\textsf{U+200D + hrule + U+200D}" which is used as
+ stretching item.
+
+ {\color{gray}
+ Note: \indexterm{Vafa Khalighi}{Vafa Khalighi} has fixed this problem in
+ \href{https://tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def?revision=55165&view=co}%
+ {\texttt{xepersian-23.0}},
+ by copying the corresponding code from
+ \href{http://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def?revision=55123&view=co}%
+ {\texttt{xepersian-hm-0.5e}}.
+ Consequently, the
+ option \texttt{KashidaXBFix} along with the commands \linebreak[4]
+ \texttt{\textbackslash KashidaXBFixOn} and
+ \texttt{\textbackslash KashidaXBFixOff} has been removed in \linebreak[4]
+ \texttt{xepersian-23.0} and the later versions.}
+
+ \item In \textsf{xepersian} when outline or shadow fonts are used, the gaps
+ filled by horizontal rule appears as a solid box. This is fixed by
+ using the \textsf{kashida} glyph instead of the horizontal rule in
+ \TeXNegar.
+ \item Activating kashida in \textsf{xepersian} disturbs \indexterm{ligatures}{ligatures}. This is
+ fixed in \TeXNegar{} by escaping the components of the
+ ligature which form the glyph, i.e. by inserting an escape character
+ before Persian letters joined to form the ligature without any empty
+ characters, blank characters, invisible characters and whitespace
+ characters which form the glyph. See
+ \mbox{Figures \ref{fig:ligatures-xep} and \ref{fig:ligatures-texnegar}}.
+ Currently only 3 ligature glyphs are available in
+ \TeXNegar, but you can add as many as you want or let
+ me know the ligature glyphs that you need, so that I can add them in
+ the next release of the package. Of course, this is not the best
+ solution, but it works.
+
+ \item If italic or oblique style of some fonts, such as \textsf{X Series 2},
+ is used in \textsf{xepersian}, an extra \indexterm{gap}{gap} is left between the
+ stretched characters. This is fixed in \textsf{HM Series} fonts.
+\end{list}
+
+For comparing the outputs of \textsf{xepersian} and \TeXNegar{} with
+a variety of options available to these packages, please see the
+\mbox{Figures \ref{fig:xepersian-XB}, \ref{fig:texnegar-hrule}}, and \ref{fig:texnegar-glyph}.
+
+\begin{figure}
+ \centerline{\fbox{\includegraphics[scale=1]{doc-ligature-xep.pdf}}}
+ \caption{Package: \textsf{xeprsian}, Font: \textsf{Noto Sans Arabic}, \textsf{Scale=1.1}, \textsf{Kashida=On}}
+ \label{fig:ligatures-xep}
+\end{figure}
+
+\begin{figure}
+ \centerline{\fbox{\includegraphics[scale=1]{doc-ligature-texnegar.pdf}}}
+ \caption{Package: \textsf{texnegar}, Font: \textsf{Noto Sans Arabic}, \textsf{Scale=1.1}, \textsf{Kashida=glyph}}
+ \label{fig:ligatures-texnegar}
+\end{figure}
+
+\begin{figure}
+ \centerline{\fbox{\includegraphics[scale=1]{doc-samples-xep.pdf}}}
+ \caption{Package: \textsf{xeprsian}, Font: \textsf{XB Kayhan}, \textsf{Scale=4.5}, \textsf{Kashida=On}}
+ \label{fig:xepersian-XB}
+\end{figure}
+
+\begin{figure}
+ \centerline{\fbox{\includegraphics[scale=1]{doc-samples-hrule.pdf}}}
+ \caption{Package: \textsf{texnegar}, Font: \textsf{HM XKayhan}, \textsf{Scale=4.5}, \textsf{Kashida=hrule}}
+ \label{fig:texnegar-hrule}
+\end{figure}
+
+\begin{figure}
+ \centerline{\fbox{\includegraphics[scale=1]{doc-samples-glyph.pdf}}}
+ \caption{Package: \textsf{texnegar}, Font: \textsf{HM XKayhan}, \textsf{Scale=4.5}, \textsf{Kashida=glyph}}
+ \label{fig:texnegar-glyph}
+\end{figure}
+
+\clearpage
+
+\section{Package loading and options}
+
+If you are going to use \TeXNegar{} with \textsf{bidi} or \textsf{xepersian} then
+please note that \TeXNegar{} should be loaded before \textsf{xepersian}.
+
+For example:
+\begin{verbatim}
+\documentclass{report}
+\usepackage[Kashida=leaders+glyph]{texnegar}
+\usepackage{xepersian}
+\end{verbatim}
+
+The options available in \TeXNegar{} are:
+
+\begin{itemize}
+ \item \indexterm{General Options}{\textbf{General Options}}: \\
+\begin{itemize}
+ \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}: \\
+ which implements kashida feature with three possible values:
+ \begin{itemize}
+ \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{glyph}: \\
+ which uses the \texttt{kashida} character to stretch the text. \\
+
+ {\color{magenta}
+ Imortant notes for \hologo{XeLaTeX} users: \\
+
+ \begin{itemize}
+ \item
+ If you are going to use this option then you should run \texttt{xelatex} thrice. For example: \\
+
+ \texttt{rm -f kashida-example.aux \\
+ xelatex kashida-example.tex \\
+ xelatex kashida-example.tex \\
+ xelatex kashida-example.tex} \\
+
+ \item
+ This feature is still experimental in \hologo{XeLaTeX} and is not regarded as stable,
+ so, if you are going to use this option be ready for unpredictable results.
+
+ \item
+ With this option, for each gap which is to be filled with kashida,
+ some commands, current position on the page, and references are saved in the
+ \texttt{\bslash jobname.aux} file and if the text is long, the file size may get
+ too large.
+ \end{itemize}}
+
+ \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{leaders+glyph}: \\
+ which uses kashida glyph leaders to stretch the text.
+ Please note that the option `Kashida=leaders+glyph' is currently only
+ supported by \mbox{\textsf{HM Series}} fonts available at
+ \href{https://dma8hm1334.bitbucket.io}{\texttt{https://dma8hm1334.bitbucket.io}}.
+ If you know of any other font that supports this option, please
+ let me know to add it to the list of corresponding fonts.
+
+ Contrary to the option \texttt{Kashida=glyph}, in this case nothing is saved
+ in \texttt{.aux} files.
+
+ \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{leaders+hrule}: \\
+ which uses horizontal rule (\verb|\hrule|) leaders to stretch the text.
+
+ \item \texttt{Off}: \\
+ which disables kashida feature.
+
+ \item \texttt{On}: \\
+ which is the same as \texttt{leaders+glyph}.
+
+ \end{itemize}
+ Also, please note that the value of \texttt{Kashida} is mandatory.
+ For example \texttt{Kashida=glyph} inserts a stretched \texttt{kashida} glyph
+ and \linebreak[4] \texttt{Kashida=leaders+glyph} inserts \texttt{kashida} leaders wherever
+ it is needed.
+
+ \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{linebreakpenalty}}: \\
+ which specifies the amount of penalty for preventing bad line-breaking.
+ You may strictly specify the value of this option. For example you may either set % \linebreak[4]
+ \texttt{'linebreakpenalty=8'} or
+ use the default values. The available default values of penalties which are put into the
+ horizontal list output are the negative of the followings:
+
+ \begin{longtable}{ll}
+ \texttt{min}: & \texttt{0} \\
+ \texttt{low}: & \texttt{8} \\
+ \texttt{medium}: & \texttt{15} \\
+ \texttt{high}: & \texttt{25} \\
+ \texttt{max}: & \texttt{10000}
+ \end{longtable}
+
+ \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{ligatures}}: \\
+ which fixes the disturbance of ligatures caused by activating kashida
+ justification in \TeXNegar. You may strictly specify the value of this option.
+ For example \texttt{'ligatures=dlig'} or you may use the default value.
+ The available values are:
+
+ \begin{longtable}{ll}
+ \texttt{aalt}: & Access All Alternatives \\
+ \texttt{ccmp}: & Glyph Composition/Decomposition \\
+ \texttt{dlig}: & Discretionary Ligatures \\
+ \texttt{fina}: & Final (Terminal) Forms \\
+ \texttt{init}: & Initial Forms \\
+ \texttt{locl}: & Localized Forms \\
+ \texttt{medi}: & Medial Forms \\
+ \texttt{rlig}: & Required Ligatures \\
+ \texttt{default}: & All the above features
+ \end{longtable}
+ Please note that this feature is still experimental and is not regarded as stable.
+
+ \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{color}}: \\
+ which colorize the stretched parts of the text for checking the quality of kashida
+ justification. Color must be one of a named color declared in \textsf{xcolor} package.
+ For example: \texttt{color=blue} or \texttt{color=Blue}.
+
+ Default color name is: \texttt{magenta}
+
+ Please note that activating this option increases system resource and disk usage.
+
+\end{itemize}
+\end{itemize}
+
+\begin{itemize}
+ \item \indexterm{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}: \\
+\begin{itemize}
+ \item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{hboxrecursion}}: \\
+ which enables kashida justification inside horizontal boxes recursively.
+
+ \item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{vboxrecursion}}: \\
+ which enables kashida justification inside vertical boxes recursively.
+
+\end{itemize}
+\end{itemize}
+
+\begin{itemize}
+ \item \indexterm{XeLaTeX-only Options}{\textbf{\hologo{XeLaTeX}-only Options}}: \\
+\begin{itemize}
+ \item \indextermsub{XeLaTeX-only Options}{\textbf{\hologo{XeLaTeX}-only Options}}{\texttt{kashidastretch}}: \\
+ which specifies the amount of extra stretching
+ for some combinations of characters. You may strictly specify the value of
+ this option. For example \texttt{'kashidastretch=0.14 em plus 0.5 em'} or you
+ may use the default values. The available default values are:
+
+ \begin{longtable}{lll}
+ \texttt{kayhan} & \texttt{0.14 em plus 0.5 em} \\
+ \texttt{khorramshahr} & \texttt{0.131 em plus 0.5 em} \\
+ \texttt{kayhannavaar} & \texttt{0.129 em plus 0.5 em} \\
+ \texttt{kayhanpook} & \texttt{0.133 em plus 0.5 em} \\
+ \texttt{kayhansayeh} & \texttt{0.135 em plus 0.5 em} \\
+ \texttt{khoramshahr} & \texttt{0.128 em plus 0.5 em} \\
+ \texttt{khorramshahr} & \texttt{0.13 em plus 0.5 em} \\
+ \texttt{niloofar} & \texttt{0.132 em plus 0.5 em} \\
+ \texttt{paatch} & \texttt{0.127 em plus 0.5 em} \\
+ \texttt{riyaz} & \texttt{0.125 em plus 0.5 em} \\
+ \texttt{roya} & \texttt{0.142 em plus 0.5 em} \\
+ \texttt{shafigh} & \texttt{0.143 em plus 0.5 em} \\
+ \texttt{shafighKurd} & \texttt{0.126 em plus 0.5 em} \\
+ \texttt{shafighUzbek} & \texttt{0.123 em plus 0.5 em} \\
+ \texttt{shiraz} & \texttt{0.122 em plus 0.5 em} \\
+ \texttt{sols} & \texttt{0.124 em plus 0.5 em} \\
+ \texttt{tabriz} & \texttt{0.119 em plus 0.5 em} \\
+ \texttt{titr} & \texttt{0.12 em plus 0.5 em} \\
+ \texttt{titre} & \texttt{0.121 em plus 0.5 em} \\
+ \texttt{traffic} & \texttt{0.124 em plus 0.5 em} \\
+ \texttt{vahid} & \texttt{0.134 em plus 0.5 em} \\
+ \texttt{vosta} & \texttt{0.136 em plus 0.5 em} \\
+ \texttt{yaghut} & \texttt{0.138 em plus 0.5 em} \\
+ \texttt{yagut} & \texttt{0.137 em plus 0.5 em} \\
+ \texttt{yas} & \texttt{0.126 em plus 0.5 em} \\
+ \texttt{yekan} & \texttt{0.141 em plus 0.5 em} \\
+ \texttt{yermook} & \texttt{0.139 em plus 0.5 em} \\
+ \texttt{zar} & \texttt{0.116 em plus 0.5 em} \\
+ \texttt{ziba} & \texttt{0.119 em plus 0.5 em} \\
+ \texttt{default} & \texttt{0.14 em plus 0.5 em} \\
+ \texttt{noskip} & \texttt{0 em plus 0.5 em}
+ \end{longtable}
+
+ For example: \mbox{\texttt{'kashidastretch=titr'}} is equivalent to\linebreak
+ \mbox{\texttt{'kashidastretch=0.12 em plus 0.5 em'}}
+
+\end{itemize}
+\end{itemize}
+
+\section{Commands}
+
+\begin{itemize}
+ \item \indexterm{General Commands}{\textbf{General Commands}}: \\
+ \begin{description}
+ \item \ccstermsub{General Commands}{\textbf{General Commands}}{KashidaOff}: \\
+ disables kashida justification.
+
+ \item \ccstermsub{General Commands}{\textbf{General Commands}}{KashidaOn}: \\
+ enables kashida justification. If the option Kashida is activated
+ stretching the text is the default behavior.
+ \end{description}
+ \item \indexterm{XeLaTeX-only Commands}{\textbf{\hologo{XeLaTeX}-only Commands}}: \\
+ \begin{description}
+ \item \ccstermsub{XeLaTeX-only Commands}{\textbf{\hologo{XeLaTeX}-only Commands}}{discouragebadlinebreaks}{\color{HMhighlightBlueI}\verb|[linebreakpenalty][kashidastretch]{|{\it text}\verb|}|}: \\
+ {\it text} may not contain paragraph breaks.
+ This command puts a penalty after each Persian word.
+ The optional arguments \texttt{linebreakpenalty} and \texttt{kashidastretch} locally
+ specify the value of the penalty and the amount of extra stretching for some
+ combinations of characters respectively as discussed previously. For example
+ you may set this option as follows:
+
+ \texttt{\bslash discouragebadlinebreaks[9][0.12 em plus 0.5 em]\{$\dots\,$\}}
+ \end{description}
+\end{itemize}
+
+\section{Important notes}
+
+\begin{description}
+ \item Kashida and ligatures:
+
+ The method used to implement kashida feature breaks a ligature if it is applied to the letters which are joined to form
+ the ligature. This is fixed in \TeXNegar, but it is not well developed yet.
+\end{description}
+
+\section{Acknowledgments}
+In the first place I have to thank Donald Knuth for inventing TeX.
+During the development of this package I refered to Stack Exchange network of
+question-and-answer (Q\&A) websites to solve problems for which I am grateful.
+I also would like to thank the developer teams of TeX's friends especially LaTeX, LuaTeX and XeTeX teams.
+
+\def\HistoryItem#1#2{\subsection*{[#1]} \addcontentsline{toc}{subsection}{[#1]} \item #2}
+
+\section{Change History}
+
+\begin{itemize}
+ \let\tmpitemindent\itemindent
+ \addtolength{\itemindent}{\leftmargin}
+ \setlength{\parskip}{0pt}
+ \setlength{\itemsep}{0pt}
+
+ \HistoryItem{2020-08-29~v0.1a}{First standalone version.}
+
+ \HistoryItem{2020-08-30~v0.1b}{Changed some file names.}
+
+\end{itemize}
+
+\section*{To Do's}
+
+To do
+
+\renewcommand{\refname}{References: \\ {\normalsize\it Actually, this is not a ``References'' nor a ``Literature'', but the most important
+ although not a complete list of ``Resources Used'' to develop this package.}}
+
+\begin{thebibliography}{9}
+
+ \bibitem{DEK-TTB} Donald E. Knuth,
+ \emph{The \hologo{TeX} book},
+ Addison-Wesley, 1986.
+
+ \bibitem{VE-TBT} Victor Eijkhout,
+ \emph{\hologo{TeX} BY TOPIC},
+ Addison-Wesley, 2013.
+
+ \bibitem{PWA-KAH-KB-TFI} Paul W. Abrahams, Kathryn A. Hargreaves, and Karl Berry,
+ \emph{\hologo{TeX} for the Impatient},
+ Addison-Wesley, 2013.
+
+ \bibitem{LL-LADPS} Leslie Lamport,
+ \emph{\hologo{LaTeX}, A document preparation System},
+ Addison-Wesley, 1986.
+
+ \bibitem{FM-MG-JB-DC-CR-TLC} Frank Mittelbach and Michel Goossens with Johannes Braams, David Carlisle, and Chris Rowley,
+ \emph{The \hologo{LaTeX} Companion},
+ Addison-Wesley, second edition, 2004.
+
+ \bibitem{PRO-IN-LUA} Roberto Ierusalimschy,
+ \emph{Programming in Lua},
+ Lua.org, fourth edition, 2016
+
+ \bibitem{LUA-REF-MAN} Lua.org,
+ \emph{Lua 5.3 Reference Manual},
+ Lua.org, 2016
+
+ \bibitem{TLT-TLS} Package \texttt{latex}: The LaTeX Team,
+ \emph{The \hologo{LaTeX2e} Sources},
+ \href{http://mirrors.ctan.org/macros/latex/base/source2e.pdf}{\texttt{CTAN:macros/latex/base/source2e.pdf}}, 2020-02-02
+
+ \bibitem{TL3T-TLS} Package \texttt{l3kernel}: The LaTeX3 Team,
+ \emph{The \hologo{LaTeX}3 Sources},
+ \href{http://mirrors.ctan.org/macros/latex/contrib/l3kernel/source3.pdf}{\texttt{CTAN:macros/latex/contrib/l3kernel/source3.pdf}}, 2020-07-17
+
+ \bibitem{TL3T-TLI} Package \texttt{l3kernel}: The LaTeX3 Team,
+ \emph{The \hologo{LaTeX}3 Interfaces},
+ \href{http://mirrors.ctan.org/macros/latex/contrib/l3kernel/interface3.pdf}{\texttt{CTAN:macros/latex/contrib/l3kernel/interface3.pdf}}, 2020-07-17
+
+ \bibitem{TLT-LRM} Package \texttt{luatex}: The LuaTeX Team,
+ \hologo{LuaTeX} Reference Manual,
+ \href{http://mirrors.ctan.org/systems/doc/luatex/luatex.pdf}{\texttt{CTAN:systems/doc/luatex/luatex.pdf}}, 2020
+
+ \bibitem{WR-KH-KB-XRG} Package \texttt{xetexref}: Will Robertson, Khaled Hosny, and Karl Berry,
+ \hologo{XeTeX} reference guide,
+ \href{http://mirrors.ctan.org/info/xetexref/xetex-reference.pdf}{\texttt{CTAN:info/xetexref/xetex-reference.pdf}}, 2019-12-09
+
+ \bibitem{JQ-AX} Package \texttt{xetex}: Jonathan Kew,
+ About \hologo{XeTeX},
+ \href{http://mirrors.ctan.org/systems/doc/xetex/XeTeX-notes.pdf}{\texttt{CTAN:systems/doc/xetex/XeTeX-notes.pdf}}, 2005-10-17
+
+ \bibitem{NG-TXC} Package \texttt{xetex}: Michel Goossens,
+ The \hologo{XeTeX} Companion,
+ \href{http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf}{\texttt{http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf}}, 2009-08-19
+
+ \bibitem{TEX-STACKEXCHANGE} Website: Stack Exchange: Hot Questions,
+ \hologo{TeX}-\hologo{LaTeX} Q\&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems,
+ \href{https://tex.stackexchange.com}{\texttt{tex.stackexchange.com}}
+
+ \bibitem{LUATEX-WIKI} Website: LuaTeX Wiki,
+ \hologo{LuaTeX} Wiki,
+ \href{http://wiki.luatex.org/index.php/Main\_Page}{\texttt{wiki.luatex.org}}
+
+\end{thebibliography}
+
+\newpage
+
+\printindex
+\addcontentsline{toc}{section}{Index}
+
+\includepdf[pages={1-},scale=0.75]{xepersian-XB.pdf}
+
+\includepdf[pages={1-},scale=0.75]{texnegar-luatex-glyph.pdf}
+\includepdf[pages={1-},scale=0.75]{texnegar-luatex-leaders-glyph.pdf}
+\includepdf[pages={1-},scale=0.75]{texnegar-luatex-leaders-hrule.pdf}
+
+\includepdf[pages={1-},scale=0.75]{texnegar-xetex-bidi-glyph.pdf}
+\includepdf[pages={1-},scale=0.75]{texnegar-xetex-bidi-leaders-glyph.pdf}
+\includepdf[pages={1-},scale=0.75]{texnegar-xetex-bidi-leaders-hrule.pdf}
+
+\includepdf[pages={1-},scale=0.75]{texnegar-xetex-xepersian-glyph.pdf}
+\includepdf[pages={1-},scale=0.75]{texnegar-xetex-xepersian-leaders-glyph.pdf}
+\includepdf[pages={1-},scale=0.75]{texnegar-xetex-xepersian-leaders-hrule.pdf}
+
+\end{document}
+%%
+%%
+%% End of file `texnegar-doc.ltx'.
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdf
new file mode 100644
index 00000000000..dbc009499d6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf
new file mode 100644
index 00000000000..bfd2ac60c39
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex
new file mode 100644
index 00000000000..0cc842cb32c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex
@@ -0,0 +1,87 @@
+\documentclass{report}
+\usepackage{fontspec}
+\setmainfont[Script=Arabic,Language=Persian]{HM XKayhan}
+\setfontfamily\HMXKayhanEn[Scale=1.5,Colour=0000FF]{HM XKayhan}
+\setfontfamily\HMXKayhanRm[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan}
+\setfontfamily\HMXKayhanIt[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Italic}
+\setfontfamily\HMXKayhanOb[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhanOb Oblique}
+\setfontfamily\HMXKayhanOl[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Outline}
+\setfontfamily\HMXKayhanSd[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Shadow}
+\setfontfamily\HMXKayhanPo[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Pook}
+\setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
+\setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
+
+\def\LtoR{\pagedir TLT \bodydir TLT \pardir TLT \textdir TLT}
+\def\RtoL{\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT}
+
+\def\SampleText{\RtoL
+ راهی جایی تابی چاپی چاههی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }
+
+\def\SampleTitle#1#2#3{{\large\LtoR Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{26}
+
+\usepackage[Kashida=glyph,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
+
+\begin{document}
+
+{\LtoR\HMXKayhanEn
+\begin{center}
+{\Huge\textsf{\TeXNegar} \\
+ \vspace{20pt}Example of Use \\
+ \vspace{20pt}\texttt{Engine: LuaTeX {\normalsize using texnegar}} \\
+ \vspace{20pt}\texttt{Kashida=glyph}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-luatex-glyph.tex}}
+ \vspace{20pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt{8} \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{hboxrecursion:} & \texttt{On} \\
+ \textsf{vboxrecursion:} & \texttt{On} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+}
+
+\newpage \KashidaOff \SampleTitle{LuaTeX using texnegar}{Regular}{Off} \par {\HMXKayhanRm \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Regular}{glyph (On)} \par {\HMXKayhanRm \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Italic}{glyph (On)} \par {\HMXKayhanIt \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Oblique}{glyph (On)} \par {\HMXKayhanOb \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Outline}{glyph (On)} \par {\HMXKayhanOl \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Shadow}{glyph (On)} \par {\HMXKayhanSd \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Pook}{glyph (On)} \par {\HMXKayhanPo \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Sayeh}{glyph (On)} \par {\HMXKayhanSa \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Navaar}{glyph (On)} \par {\HMXKayhanNa \SampleText}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
new file mode 100644
index 00000000000..561f6089265
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex
new file mode 100644
index 00000000000..31caf27ebdf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex
@@ -0,0 +1,87 @@
+\documentclass{report}
+\usepackage{fontspec}
+\setmainfont[Script=Arabic,Language=Persian]{HM XKayhan}
+\setfontfamily\HMXKayhanEn[Scale=1.5,Colour=0000FF]{HM XKayhan}
+\setfontfamily\HMXKayhanRm[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan}
+\setfontfamily\HMXKayhanIt[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Italic}
+\setfontfamily\HMXKayhanOb[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhanOb Oblique}
+\setfontfamily\HMXKayhanOl[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Outline}
+\setfontfamily\HMXKayhanSd[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Shadow}
+\setfontfamily\HMXKayhanPo[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Pook}
+\setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
+\setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
+
+\def\LtoR{\pagedir TLT \bodydir TLT \pardir TLT \textdir TLT}
+\def\RtoL{\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT}
+
+\def\SampleText{\RtoL
+ راهی جایی تابی چاپی چاههی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }
+
+\def\SampleTitle#1#2#3{{\large\LtoR Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{36}
+
+\usepackage[Kashida=leaders+glyph,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
+
+\begin{document}
+
+{\LtoR\HMXKayhanEn
+\begin{center}
+{\Huge\textsf{\TeXNegar} \\
+ \vspace{20pt}Example of Use \\
+ \vspace{20pt}\texttt{Engine: LuaTeX {\normalsize using texnegar}} \\
+ \vspace{20pt}\texttt{Kashida=leaders+glyph}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex}}
+ \vspace{20pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt{8} \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{hboxrecursion:} & \texttt{On} \\
+ \textsf{vboxrecursion:} & \texttt{On} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+}
+
+\newpage \KashidaOff \SampleTitle{LuaTeX using texnegar}{Regular}{Off} \par {\HMXKayhanRm \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Regular}{leaders+glyph (On)} \par {\HMXKayhanRm \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Italic}{leaders+glyph (On)} \par {\HMXKayhanIt \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Oblique}{leaders+glyph (On)} \par {\HMXKayhanOb \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Outline}{leaders+glyph (On)} \par {\HMXKayhanOl \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Shadow}{leaders+glyph (On)} \par {\HMXKayhanSd \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Pook}{leaders+glyph (On)} \par {\HMXKayhanPo \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Sayeh}{leaders+glyph (On)} \par {\HMXKayhanSa \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Navaar}{leaders+glyph (On)} \par {\HMXKayhanNa \SampleText}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
new file mode 100644
index 00000000000..ec33a722c81
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex
new file mode 100644
index 00000000000..93938422da0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex
@@ -0,0 +1,87 @@
+\documentclass{report}
+\usepackage{fontspec}
+\setmainfont[Script=Arabic,Language=Persian]{HM XKayhan}
+\setfontfamily\HMXKayhanEn[Scale=1.5,Colour=0000FF]{HM XKayhan}
+\setfontfamily\HMXKayhanRm[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan}
+\setfontfamily\HMXKayhanIt[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Italic}
+\setfontfamily\HMXKayhanOb[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhanOb Oblique}
+\setfontfamily\HMXKayhanOl[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Outline}
+\setfontfamily\HMXKayhanSd[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Shadow}
+\setfontfamily\HMXKayhanPo[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Pook}
+\setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
+\setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
+
+\def\LtoR{\pagedir TLT \bodydir TLT \pardir TLT \textdir TLT}
+\def\RtoL{\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT}
+
+\def\SampleText{\RtoL
+ راهی جایی تابی چاپی چاههی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }
+
+\def\SampleTitle#1#2#3{{\large\LtoR Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{46}
+
+\usepackage[Kashida=leaders+hrule,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
+
+\begin{document}
+
+{\LtoR\HMXKayhanEn
+\begin{center}
+{\Huge\textsf{\TeXNegar} \\
+ \vspace{20pt}Example of Use \\
+ \vspace{20pt}\texttt{Engine: LuaTeX {\normalsize using texnegar}} \\
+ \vspace{20pt}\texttt{Kashida=leaders+hrule}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex}}
+ \vspace{20pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt{8} \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{hboxrecursion:} & \texttt{On} \\
+ \textsf{vboxrecursion:} & \texttt{On} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+}
+
+\newpage \KashidaOff \SampleTitle{LuaTeX using texnegar}{Regular}{Off} \par {\HMXKayhanRm \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Regular}{leaders+hrule (On)} \par {\HMXKayhanRm \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Italic}{leaders+hrule (On)} \par {\HMXKayhanIt \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Oblique}{leaders+hrule (On)} \par {\HMXKayhanOb \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Outline}{leaders+hrule (On)} \par {\HMXKayhanOl \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Shadow}{leaders+hrule (On)} \par {\HMXKayhanSd \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Pook}{leaders+hrule (On)} \par {\HMXKayhanPo \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Sayeh}{leaders+hrule (On)} \par {\HMXKayhanSa \SampleText}
+
+\newpage \KashidaOn \SampleTitle{LuaTeX using texnegar}{Navaar}{leaders+hrule (On)} \par {\HMXKayhanNa \SampleText}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
new file mode 100644
index 00000000000..f7965fcb96e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex
new file mode 100644
index 00000000000..127d31bfa67
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex
@@ -0,0 +1,91 @@
+\documentclass{report}
+
+\usepackage{fontspec}
+
+\setmainfont[Script=Arabic,Language=Persian]{HM XKayhan}
+
+\setfontfamily\HMXKayhanEn[Scale=1.5,Colour=0000FF]{HM XKayhan}
+\setfontfamily\HMXKayhanRm[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan}
+\setfontfamily\HMXKayhanIt[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Italic}
+\setfontfamily\HMXKayhanOb[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhanOb Oblique}
+\setfontfamily\HMXKayhanOl[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Outline}
+\setfontfamily\HMXKayhanSd[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Shadow}
+\setfontfamily\HMXKayhanPo[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Pook}
+\setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
+\setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
+
+\usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar} % Succeeds
+
+\usepackage{bidi}
+
+\def\SampleText#1#2{{\setRTL\discouragebadlinebreaks[#1][#2]{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }\unsetRTL}}
+
+\def\SampleTitle#1#2#3{{\large Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty 10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{56}
+
+\begin{document}
+
+{
+\begin{center}
+{\HMXKayhanEn
+ \Huge{\textsf{\TeXNegar} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using texnegar and bidi}} \\
+ \vspace{20pt}\texttt{ Kashida=glyph}} \\
+ \vspace{20pt}\makebox{\normalsize\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex}} \\
+ \vspace{20pt}
+}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt{8} \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{hboxrecursion:} & \texttt{On} \\
+ \textsf{vboxrecursion:} & \texttt{On} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+}
+
+\newpage \KashidaOff \SampleTitle{XeTeX using texnegar and bidi}{Regular}{Off} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Regular}{glyph (On)} \par {\HMXKayhanRm \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Italic}{glyph (On)} \par {\HMXKayhanIt \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Oblique}{glyph (On)} \par {\HMXKayhanOb \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Outline}{glyph (On)} \par {\HMXKayhanOl \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Shadow}{glyph (On)} \par {\HMXKayhanSd \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Pook}{glyph (On)} \par {\HMXKayhanPo \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Sayeh}{glyph (On)} \par {\HMXKayhanSa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Navaar}{glyph (On)} \par {\HMXKayhanNa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
new file mode 100644
index 00000000000..c240edb0e57
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex
new file mode 100644
index 00000000000..6f46fa216a4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex
@@ -0,0 +1,91 @@
+\documentclass{report}
+
+\usepackage{fontspec}
+
+\setmainfont[Script=Arabic,Language=Persian]{HM XKayhan}
+
+\setfontfamily\HMXKayhanEn[Scale=1.5,Colour=0000FF]{HM XKayhan}
+\setfontfamily\HMXKayhanRm[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan}
+\setfontfamily\HMXKayhanIt[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Italic}
+\setfontfamily\HMXKayhanOb[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhanOb Oblique}
+\setfontfamily\HMXKayhanOl[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Outline}
+\setfontfamily\HMXKayhanSd[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Shadow}
+\setfontfamily\HMXKayhanPo[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Pook}
+\setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
+\setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
+
+\usepackage[Kashida=leaders+glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar} % Succeeds
+
+\usepackage{bidi}
+
+\def\SampleText#1#2{{\setRTL\discouragebadlinebreaks[#1][#2]{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }\unsetRTL}}
+
+\def\SampleTitle#1#2#3{{\large Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty 10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{66}
+
+\begin{document}
+
+{
+\begin{center}
+{\HMXKayhanEn
+ \Huge{\textsf{\TeXNegar} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using texnegar and bidi}} \\
+ \vspace{20pt} \texttt{Kashida=leaders+glyph}} \\
+ \vspace{20pt}\makebox{\normalsize\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex}} \\
+ \vspace{20pt}
+}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt{8} \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{hboxrecursion:} & \texttt{On} \\
+ \textsf{vboxrecursion:} & \texttt{On} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+}
+
+\newpage \KashidaOff \SampleTitle{XeTeX using texnegar and bidi}{Regular}{Off} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Regular}{leaders+glyph (On)} \par {\HMXKayhanRm \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Italic}{leaders+glyph (On)} \par {\HMXKayhanIt \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Oblique}{leaders+glyph (On)} \par {\HMXKayhanOb \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Outline}{leaders+glyph (On)} \par {\HMXKayhanOl \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Shadow}{leaders+glyph (On)} \par {\HMXKayhanSd \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Pook}{leaders+glyph (On)} \par {\HMXKayhanPo \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Sayeh}{leaders+glyph (On)} \par {\HMXKayhanSa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Navaar}{leaders+glyph (On)} \par {\HMXKayhanNa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
new file mode 100644
index 00000000000..ac1526bf5e3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex
new file mode 100644
index 00000000000..a585b6af22b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex
@@ -0,0 +1,91 @@
+\documentclass{report}
+
+\usepackage{fontspec}
+
+\setmainfont[Script=Arabic,Language=Persian]{HM XKayhan}
+
+\setfontfamily\HMXKayhanEn[Scale=1.5,Colour=0000FF]{HM XKayhan}
+\setfontfamily\HMXKayhanRm[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan}
+\setfontfamily\HMXKayhanIt[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Italic}
+\setfontfamily\HMXKayhanOb[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhanOb Oblique}
+\setfontfamily\HMXKayhanOl[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Outline}
+\setfontfamily\HMXKayhanSd[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Shadow}
+\setfontfamily\HMXKayhanPo[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Pook}
+\setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
+\setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
+
+\usepackage[Kashida=leaders+hrule,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar} % Succeeds
+
+\usepackage{bidi}
+
+\def\SampleText#1#2{{\setRTL\discouragebadlinebreaks[#1][#2]{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }\unsetRTL}}
+
+\def\SampleTitle#1#2#3{{\large Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty 10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{76}
+
+\begin{document}
+
+{
+\begin{center}
+{\HMXKayhanEn
+ \Huge{\textsf{\TeXNegar} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using texnegar and bidi}} \\
+ \vspace{20pt} \texttt{Kashida=leaders+hrule}} \\
+ \vspace{20pt}\makebox{\normalsize\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex}} \\
+ \vspace{20pt}
+}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt{8} \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{hboxrecursion:} & \texttt{On} \\
+ \textsf{vboxrecursion:} & \texttt{On} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+}
+
+\newpage \KashidaOff \SampleTitle{XeTeX using texnegar and bidi}{Regular}{Off} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Regular}{leaders+hrule (On)} \par {\HMXKayhanRm \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Italic}{leaders+hrule (On)} \par {\HMXKayhanIt \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Oblique}{leaders+hrule (On)} \par {\HMXKayhanOb \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Outline}{leaders+hrule (On)} \par {\HMXKayhanOl \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Shadow}{leaders+hrule (On)} \par {\HMXKayhanSd \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Pook}{leaders+hrule (On)} \par {\HMXKayhanPo \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Sayeh}{leaders+hrule (On)} \par {\HMXKayhanSa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and bidi}{Navaar}{leaders+hrule (On)} \par {\HMXKayhanNa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
new file mode 100644
index 00000000000..c7034473fe1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex
new file mode 100644
index 00000000000..763b04d18a8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex
@@ -0,0 +1,89 @@
+\documentclass{report}
+
+\usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar} % Succeeds
+
+\usepackage[fontsloadable=true]{xepersian}
+% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
+\settextfont{HM XKayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}
+
+\deflatinfont\HMXKayhanEn[Scale=1.2]{HM XKayhan}
+\defpersianfont\HMXKayhanRm[Scale=4.5]{HM XKayhan}
+\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
+\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
+\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
+\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
+\defpersianfont\HMXKayhanPo[Scale=4.5]{HM XKayhan Pook}
+\defpersianfont\HMXKayhanSa[Scale=4.5]{HM XKayhan Sayeh}
+\defpersianfont\HMXKayhanNa[Scale=4.5]{HM XKayhan Navaar}
+
+\def\SampleText#1#2{\discouragebadlinebreaks[#1][#2]{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }}
+
+\def\SampleTitle#1#2#3{{{\HMXKayhanEn\LTR Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{86}
+\let\tmppage=\thepage
+\gdef\thepage{\scriptsize\lr\tmppage}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+{\Huge\textsf{\TeXNegar} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using texnegar and xepersian}} \\
+ \vspace{20pt}\texttt{Kashida=glyph}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex}} \\
+ \vspace{20pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt8 \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\newpage \KashidaOff \SampleTitle{XeTeX using texnegar and xepersian}{Regular}{Off} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Regular}{glyph (On)} \par {\HMXKayhanRm \SampleText{15}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Italic}{glyph (On)} \par {\HMXKayhanIt \SampleText{20}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Oblique}{glyph (On)} \par {\HMXKayhanOb \SampleText{20}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Outline}{glyph (On)} \par {\HMXKayhanOl \SampleText{25}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Shadow}{glyph (On)} \par {\HMXKayhanSd \SampleText{30}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Pook}{glyph (On)} \par {\HMXKayhanPo \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Sayeh}{glyph (On)} \par {\HMXKayhanSa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Navaar}{glyph (On)} \par {\HMXKayhanNa \SampleText{200}{0.14 em plus 0.5 em}}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
new file mode 100644
index 00000000000..005ec607bc2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex
new file mode 100644
index 00000000000..92870b4e44c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex
@@ -0,0 +1,89 @@
+\documentclass{report}
+
+\usepackage[Kashida=leaders+glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar} % Succeeds
+
+\usepackage[fontsloadable=true]{xepersian}
+% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
+\settextfont{HM XKayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}
+
+\deflatinfont\HMXKayhanEn[Scale=1.2]{HM XKayhan}
+\defpersianfont\HMXKayhanRm[Scale=4.5]{HM XKayhan}
+\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
+\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
+\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
+\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
+\defpersianfont\HMXKayhanPo[Scale=4.5]{HM XKayhan Pook}
+\defpersianfont\HMXKayhanSa[Scale=4.5]{HM XKayhan Sayeh}
+\defpersianfont\HMXKayhanNa[Scale=4.5]{HM XKayhan Navaar}
+
+\def\SampleText#1#2{\discouragebadlinebreaks[#1][#2]{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }}
+
+\def\SampleTitle#1#2#3{{{\HMXKayhanEn\LTR Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{96}
+\let\tmppage=\thepage
+\gdef\thepage{\scriptsize\lr\tmppage}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+{\Huge\textsf{\TeXNegar} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using texnegar and xepersian}} \\
+ \vspace{20pt}\texttt{Kashida=leaders+glyph}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex}} \\
+ \vspace{20pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt8 \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\newpage \KashidaOff \SampleTitle{XeTeX using texnegar and xepersian}{Regular}{Off} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Regular}{leaders+glyph (On)} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Italic}{leaders+glyph (On)} \par {\HMXKayhanIt \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Oblique}{leaders+glyph (On)} \par {\HMXKayhanOb \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Outline}{leaders+glyph (On)} \par {\HMXKayhanOl \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Shadow}{leaders+glyph (On)} \par {\HMXKayhanSd \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Pook}{leaders+glyph (On)} \par {\HMXKayhanPo \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Sayeh}{leaders+glyph (On)} \par {\HMXKayhanSa \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Navaar}{leaders+glyph (On)} \par {\HMXKayhanNa \SampleText{8}{0.14 em plus 0.5 em}}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
new file mode 100644
index 00000000000..9b5961a7c4d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex
new file mode 100644
index 00000000000..a5df81db3f6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex
@@ -0,0 +1,89 @@
+\documentclass{report}
+
+\usepackage[Kashida=leaders+hrule,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar} % Succeeds
+
+\usepackage[fontsloadable=true]{xepersian}
+% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
+\settextfont{HM XKayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}
+
+\deflatinfont\HMXKayhanEn[Scale=1.2]{HM XKayhan}
+\defpersianfont\HMXKayhanRm[Scale=4.5]{HM XKayhan}
+\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
+\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
+\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
+\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
+\defpersianfont\HMXKayhanPo[Scale=4.5]{HM XKayhan Pook}
+\defpersianfont\HMXKayhanSa[Scale=4.5]{HM XKayhan Sayeh}
+\defpersianfont\HMXKayhanNa[Scale=4.5]{HM XKayhan Navaar}
+
+\def\SampleText#1#2{\discouragebadlinebreaks[#1][#2]{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }}
+
+\def\SampleTitle#1#2#3{{{\HMXKayhanEn\LTR Engine: {\color{blue}\texttt{#1}}, \\
+ Style: {\color{blue}\texttt{#2}}, \\ Kashida: {\color{blue}\texttt{#3}}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{106}
+\let\tmppage=\thepage
+\gdef\thepage{\scriptsize\lr\tmppage}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+{\Huge\textsf{\TeXNegar} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using texnegar and xepersian}} \\
+ \vspace{20pt}\texttt{Kashida=leaders+hrule}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex}} \\
+ \vspace{20pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{HM XKayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{linebreakpenalty:} & \texttt8 \\
+ \textsf{kashidastretch:} & \texttt{0.14em plus 5.5em} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\newpage \KashidaOff \SampleTitle{XeTeX using texnegar and xepersian}{Regular}{Off} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Regular}{leaders+hrule (On)} \par {\HMXKayhanRm \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Italic}{leaders+hrule (On)} \par {\HMXKayhanIt \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Oblique}{leaders+hrule (On)} \par {\HMXKayhanOb \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Outline}{leaders+hrule (On)} \par {\HMXKayhanOl \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Shadow}{leaders+hrule (On)} \par {\HMXKayhanSd \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Pook}{leaders+hrule (On)} \par {\HMXKayhanPo \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Sayeh}{leaders+hrule (On)} \par {\HMXKayhanSa \SampleText{8}{0.14 em plus 0.5 em}}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using texnegar and xepersian}{Navaar}{leaders+hrule (On)} \par {\HMXKayhanNa \SampleText{8}{0.14 em plus 0.5 em}}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/texnegar/texnegar.pdf b/Master/texmf-dist/doc/latex/texnegar/texnegar.pdf
new file mode 100644
index 00000000000..521dfdcfc08
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/texnegar.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf b/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf
new file mode 100644
index 00000000000..b0cb0b76f30
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex b/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex
new file mode 100644
index 00000000000..10103a51b06
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex
@@ -0,0 +1,81 @@
+\documentclass{report}
+\usepackage{xcolor}
+\usepackage[Kashida=on]{xepersian}
+\settextfont[Scale=4.5,Colour=000001]{XB Kayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{XB Kayhan}
+
+\defpersianfont\XBKayhanEn[Scale=1.2,Colour=000001]{XB Kayhan}
+\defpersianfont\XBKayhanIt[Scale=4.5,Colour=000001]{XB Kayhan Italic}
+\defpersianfont\XBKayhanOb[Scale=4.5,Colour=000001]{XB Zar Oblique}
+\defpersianfont\XBKayhanOl[Scale=4.5,Colour=000001]{XB Kayhan Pook}
+\defpersianfont\XBKayhanSd[Scale=4.5,Colour=000001]{XB Kayhan Sayeh}
+\defpersianfont\XBKayhanPo[Scale=4.5,Colour=000001]{XB Kayhan Pook}
+\defpersianfont\XBKayhanSa[Scale=4.5,Colour=000001]{XB Kayhan Sayeh}
+\defpersianfont\XBKayhanNa[Scale=4.5,Colour=000001]{XB Kayhan Navaar}
+
+\def\SampleText{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }
+
+\def\SampleTitle#1#2#3{{{\begin{latin}\XBKayhanEn Engine: {\color{blue}\texttt{#1,}} \\
+ Style: {\color{blue}\texttt{#2,}} \\ Kashida: {\color{blue}\texttt{#3}}\end{latin}}}\hbox{}\vskip 5mm}
+
+\pretolerance = 10000
+% \exhyphenpenalty=10000
+% \hyphenpenalty=10000
+% \penalty -10000
+% \tolerance=10000
+% \tolerance = -10000
+% \looseness = 10000
+
+\setlength\parindent{0pt}
+% \pagestyle{empty}
+\setcounter{page}{16}
+\let\tmppage=\thepage
+\gdef\thepage{\scriptsize\lr\tmppage}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+% \Huge\textsf{xepersian}\vspace{20pt}\\ Example of Use\vspace{20pt}\\ \texttt{Kashida=On} \vspace{40pt}
+{\Huge\textsf{\XePersian} \\
+ \vspace{20pt} Example of Use \\
+ \vspace{20pt}\texttt{Engine: XeTeX {\normalsize using xepersian}} \\
+ \vspace{20pt}\texttt{Kashida=leaders+hrule}} \\
+ \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/xepersian-XB.tex}} \\
+ \vspace{20pt}
+
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{XB Kayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+ \textsf{color:} & \texttt{red}
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\color{red}
+\newpage \KashidaOff \SampleTitle{XeTeX using xepersian}{Regular}{Off} \par \SampleText
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Regular}{leaders+hrule On} \par \SampleText
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Italic}{leaders+hrule On} \par {\XBKayhanIt \SampleText}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Oblique}{leaders+hrule On} \par {\XBKayhanOb \SampleText}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Outline}{leaders+hrule On} \par {\XBKayhanOl \SampleText}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Sayeh}{leaders+hrule On} \par {\XBKayhanSd \SampleText}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Pook}{leaders+hrule On} \par {\XBKayhanPo \SampleText}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Sayeh}{leaders+hrule On} \par {\XBKayhanSa \SampleText}
+
+\newpage \KashidaOn \SampleTitle{XeTeX using xepersian}{Navaar}{leaders+hrule On} \par {\XBKayhanNa \SampleText}
+
+\end{document}