From 2bd4f7f317b392c32ce18c70d03fd5ba9ddd9e6d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 26 Mar 2020 03:02:49 +0000 Subject: CTAN sync 202003260302 --- macros/xetex/latex/xepersian-hm/README.txt | 27 +- .../xetex/latex/xepersian-hm/kashida-example.pdf | Bin 0 -> 17991 bytes .../xetex/latex/xepersian-hm/kashida-example.tex | 32 ++ .../latex/xepersian-hm/kashida-xepersian-hm.def | 132 ------- macros/xetex/latex/xepersian-hm/test-kashida.pdf | Bin 17989 -> 0 bytes macros/xetex/latex/xepersian-hm/test-kashida.tex | 32 -- .../xetex/latex/xepersian-hm/xepersian-hm-doc.pdf | Bin 36112 -> 0 bytes .../xetex/latex/xepersian-hm/xepersian-hm-doc.tex | 113 ------ macros/xetex/latex/xepersian-hm/xepersian-hm.dtx | 409 +++++++++++++++++++++ macros/xetex/latex/xepersian-hm/xepersian-hm.ins | 36 ++ macros/xetex/latex/xepersian-hm/xepersian-hm.pdf | Bin 0 -> 52190 bytes macros/xetex/latex/xepersian-hm/xepersian-hm.sty | 100 ----- 12 files changed, 495 insertions(+), 386 deletions(-) create mode 100644 macros/xetex/latex/xepersian-hm/kashida-example.pdf create mode 100644 macros/xetex/latex/xepersian-hm/kashida-example.tex delete mode 100644 macros/xetex/latex/xepersian-hm/kashida-xepersian-hm.def delete mode 100644 macros/xetex/latex/xepersian-hm/test-kashida.pdf delete mode 100644 macros/xetex/latex/xepersian-hm/test-kashida.tex delete mode 100644 macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf delete mode 100644 macros/xetex/latex/xepersian-hm/xepersian-hm-doc.tex create mode 100644 macros/xetex/latex/xepersian-hm/xepersian-hm.dtx create mode 100644 macros/xetex/latex/xepersian-hm/xepersian-hm.ins create mode 100644 macros/xetex/latex/xepersian-hm/xepersian-hm.pdf delete mode 100644 macros/xetex/latex/xepersian-hm/xepersian-hm.sty (limited to 'macros/xetex') diff --git a/macros/xetex/latex/xepersian-hm/README.txt b/macros/xetex/latex/xepersian-hm/README.txt index f271209861..e9df949970 100644 --- a/macros/xetex/latex/xepersian-hm/README.txt +++ b/macros/xetex/latex/xepersian-hm/README.txt @@ -1,26 +1,35 @@ %% -%% This is file `README.txt' +%% This is file `README.txt', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xepersian-hm.dtx (with options: `README') %% -%% Copyright (c) Hossein Movahhedian 2020 +%% Copyright (C) 2020 Hossein Movahhedian %% -%% 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 +%% 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 %% The XEPERSIAN-HM package ------------------------ -Kashida feature in `xepersian' has problem with some fonts such as `HM Series' +Kashida feature in `xepersian' has problems with some fonts such as `HM Series' fonts available at `https://dma8hm1334.bitbucket.io' and `X Series 2' fonts available at `http://wiki.irmug.com/index.php/X_Series_2'. The `xepersian-hm' -package fixes this problem. +package fixes these problems. -The file `texmf-dist/doc/xelatex/xepersian-hm/test-kashida.tex' can be used as +The file `texmf-dist/doc/xelatex/xepersian-hm/kashida-example.tex' can be used as a simple example of the usage of the package. -Any comments or suggestions would be gratefully appreciated. +Any comments or suggestions would be gratefully appreciated. Please report any bugs or issues to `dma8hm1334@gmail.com'. 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. +%% File: xepersian-hm.dtx +%% +%% +%% End of file `README.txt'. diff --git a/macros/xetex/latex/xepersian-hm/kashida-example.pdf b/macros/xetex/latex/xepersian-hm/kashida-example.pdf new file mode 100644 index 0000000000..0579becb84 Binary files /dev/null and b/macros/xetex/latex/xepersian-hm/kashida-example.pdf differ diff --git a/macros/xetex/latex/xepersian-hm/kashida-example.tex b/macros/xetex/latex/xepersian-hm/kashida-example.tex new file mode 100644 index 0000000000..d3492c93ef --- /dev/null +++ b/macros/xetex/latex/xepersian-hm/kashida-example.tex @@ -0,0 +1,32 @@ +% \PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian} % Load xepersian with a few options +\documentclass{report} +\usepackage{xcolor} +% \usepackage[Kashida]{xepersian} % Fails +\usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm} % Succeeds +% \usepackage[Kashida,kashidastretch=noskip]{xepersian-hm} % Succeeds +% \usepackage[Kashida,kashidastretch=default]{xepersian-hm} % Succeeds +% \usepackage[Kashida,kashidastretch=kayhan]{xepersian-hm} % Succeeds +% \usepackage[Kashida,kashidastretch=khorramshahr]{xepersian-hm} % Succeeds + +% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan} +\settextfont[Scale=4.5,Colour=darkgray]{HM XKayhan} +% \settextfont[Scale=4.5,Colour=darkgray]{HM XNiloofar} +% \settextfont[Scale=4.5,Colour=darkgray]{HM XYas} +% \settextfont[Scale=4.5,Colour=darkgray]{HM XZar} + +% \setlatintextfont[Scale=2.5,Colour=teal]{XB Kayhan} +\setlatintextfont[Scale=2.5,Colour=teal]{HM XKayhan} + +\def\SampleText{راهی جایی تابی چاپی چاههی تلاشهایی شتابهایی تابی چاپی راهی تلاشهــایی که کتابهایی که کلاههایی که} + +\setlength\parindent{0pt} +\pagestyle{empty} +\begin{document} +\color{red} + +\KashidaOff \SampleText \lr{(Kashida Off)~} + +\KashidaOn \SampleText \lr{(Kashida On)~} + +\end{document} + diff --git a/macros/xetex/latex/xepersian-hm/kashida-xepersian-hm.def b/macros/xetex/latex/xepersian-hm/kashida-xepersian-hm.def deleted file mode 100644 index 9d57fff997..0000000000 --- a/macros/xetex/latex/xepersian-hm/kashida-xepersian-hm.def +++ /dev/null @@ -1,132 +0,0 @@ -%% -%% This is file `kashida-xepersian-hm.def' -%% -%% 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 -%% -%% Copyright notice: the following code is partly adapted from the code in -%% 'kashida-xepersian.def' from xepersian package (v22.8). -\ExplSyntaxOn -\ProvidesExplFile {kashida-xepersian-hm.def} {2020-03-23} {0.3} { Fixes~implementation~of~Kashida~in~xepersian~package } - -\int_const:Nn \c_xepersianhm_zwj_int {"200D} % zero-width joiner -\int_const:Nn \c_xepersianhm_lrm_int {"200E} % left-right-mark -\int_const:Nn \c_xepersianhm_two_int {2} % 2 -\int_const:Nn \c_xepersianhm_four_int {4} % 4 -\int_const:Nn \c_xepersianhm_ksh_int {"0640} % kashida -\int_const:Nn \c_xepersianhm_d_int {10} % dual-joiner class -\int_const:Nn \c_xepersianhm_l_int {11} % lam -\int_const:Nn \c_xepersianhm_r_int {12} % right-joiner -\int_const:Nn \c_xepersianhm_a_int {13} % alef -\int_const:Nn \c_xepersianhm_h_int {14} % heh -\int_const:Nn \c_xepersianhm_y_int {15} % yeh -\int_const:Nn \c_xepersianhm_v_int {4096} % vowel or other combining mark (to be ignored) - -\bool_new:N \l_kashida_on_bool -\bool_new:N \l_kashida_hm_fix_bool -\bool_new:N \l_kashida_xb_fix_bool - -\tl_new:N \l_hskip_zero_tl -\tl_new:N \l_hskip_default_tl - -\cs_new:Npn \xepersian_kashida #1 - { - \bool_if:NT \l_kashida_on_bool - { - \c_xepersianhm_lrm_int\c_xepersianhm_zwj_int\tex_penalty:D 10000 - \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xepersianhm_two_int - \int_use:N \XeTeXcharglyph \c_xepersianhm_ksh_int depth \XeTeXglyphbounds \c_xepersianhm_four_int - \int_use:N \XeTeXcharglyph \c_xepersianhm_ksh_int \skip_horizontal:n { #1 } - \c_xepersianhm_zwj_int - } - } - -\XeTeXinterchartokenstate = 1 - -\clist_set:Nn \l_xepersianhm_a_clist { 0622,0623,0625,0627 } % ‏ا، إ، أ، آ‏ -\clist_map_inline:Nn \l_xepersianhm_a_clist - { - \XeTeXcharclass "#1 \c_xepersianhm_a_int - } - -\clist_set:Nn \l_xepersianhm_d_clist { 0626,0628,062A,062B,062C,062D,062E,0633,0634,0635,0636,0637,0638,0639,063A,0640,0641,0642,0643,0645,0646,0647,067E,0686,06A9,06AF } % ‏ئ,ب,ت,ث,ج,ح,خ,س,ش,ص,ض,ط,ظ,ع,غ,ـ,ف,ق,ك,م,ن,ه,پ,چ,ک,گ‏ -\clist_map_inline:Nn \l_xepersianhm_d_clist - { - \XeTeXcharclass "#1 \c_xepersianhm_d_int - } - -\clist_set:Nn \l_xepersianhm_l_clist { 0644 } % ‏ل‏ -\clist_map_inline:Nn \l_xepersianhm_l_clist - { - \XeTeXcharclass "#1 \c_xepersianhm_l_int - } - -\clist_set:Nn \l_xepersianhm_r_clist { 0624,0629,062F,0630,0631,0632,0648,0698 } % ‏ؤ,ة,د,ذ,ر,ز,و,ژ‏ -\clist_map_inline:Nn \l_xepersianhm_r_clist - { - \XeTeXcharclass "#1 \c_xepersianhm_r_int - } - -\clist_set:Nn \l_xepersianhm_v_clist { 064B,064C,064D,064E,064F,0650,0651,0652 } % ‏ً,ٌ,ٍ,َ,ُ,ِ,ّ,ْ‏ -\clist_map_inline:Nn \l_xepersianhm_v_clist - { - \XeTeXcharclass "#1 \c_xepersianhm_v_int - } - -\clist_set:Nn \l_xepersianhm_y_clist { 0649,064A,06CC } -\clist_map_inline:Nn \l_xepersianhm_y_clist - { - \XeTeXcharclass "#1 \c_xepersianhm_y_int - } - -\XeTeXinterchartoks \c_xepersianhm_y_int \c_xepersianhm_y_int = {\bool_if:NTF \l_kashida_hm_fix_bool {\xepersian_kashida {\l_hskip_default_tl}} {\xepersian_kashida \l_hskip_zero_tl}} -\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_y_int = {\bool_if:NTF \l_kashida_hm_fix_bool {\xepersian_kashida {\l_hskip_default_tl}} {\xepersian_kashida \l_hskip_zero_tl}} -\XeTeXinterchartoks \c_xepersianhm_y_int \c_xepersianhm_d_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_d_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_d_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_l_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_l_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_r_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_a_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_r_int = {\xepersian_kashida \l_hskip_zero_tl} -\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_a_int = {} - -\NewDocumentCommand \KashidaOn {} { \bool_set_true:N \l_kashida_on_bool } -\NewDocumentCommand \KashidaOff {} { \bool_set_false:N \l_kashida_on_bool } - -\NewDocumentCommand \KashidaXBFixOn {} { \bool_set_true:N \l_kashida_xb_fix_bool } -\NewDocumentCommand \KashidaXBFixOff {} { \bool_set_false:N \l_kashida_xb_fix_bool } - -\NewDocumentCommand \KashidaHMFixOn {} { \bool_set_true:N \l_kashida_hm_fix_bool } -\NewDocumentCommand \KashidaHMFixOff {} { \bool_set_false:N \l_kashida_hm_fix_bool } - -\ExplSyntaxOff -\makeatletter -\newif\if@Kashida@on -\newif\if@Kashida@XB@fix -\makeatother -\ExplSyntaxOn - -\KashidaHMFixOn - -\tl_set:Nn \l_hskip_zero_tl { 0 em plus 0.5 em } - -\bool_if:NTF \l_kashida_hm_fix_bool - { - \tl_if_empty:NT \l_hskip_default_tl { \tl_set:Nn \l_hskip_default_tl { 0.14 em plus 0.5 em } } - } - { - \tl_set:NV \l_hskip_default_tl \l_hskip_zero_tl - } - -\KashidaOn - -\ExplSyntaxOff -\endinput - -%% -%% END OF FILE -%% diff --git a/macros/xetex/latex/xepersian-hm/test-kashida.pdf b/macros/xetex/latex/xepersian-hm/test-kashida.pdf deleted file mode 100644 index ec20b35a83..0000000000 Binary files a/macros/xetex/latex/xepersian-hm/test-kashida.pdf and /dev/null differ diff --git a/macros/xetex/latex/xepersian-hm/test-kashida.tex b/macros/xetex/latex/xepersian-hm/test-kashida.tex deleted file mode 100644 index d3492c93ef..0000000000 --- a/macros/xetex/latex/xepersian-hm/test-kashida.tex +++ /dev/null @@ -1,32 +0,0 @@ -% \PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian} % Load xepersian with a few options -\documentclass{report} -\usepackage{xcolor} -% \usepackage[Kashida]{xepersian} % Fails -\usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm} % Succeeds -% \usepackage[Kashida,kashidastretch=noskip]{xepersian-hm} % Succeeds -% \usepackage[Kashida,kashidastretch=default]{xepersian-hm} % Succeeds -% \usepackage[Kashida,kashidastretch=kayhan]{xepersian-hm} % Succeeds -% \usepackage[Kashida,kashidastretch=khorramshahr]{xepersian-hm} % Succeeds - -% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan} -\settextfont[Scale=4.5,Colour=darkgray]{HM XKayhan} -% \settextfont[Scale=4.5,Colour=darkgray]{HM XNiloofar} -% \settextfont[Scale=4.5,Colour=darkgray]{HM XYas} -% \settextfont[Scale=4.5,Colour=darkgray]{HM XZar} - -% \setlatintextfont[Scale=2.5,Colour=teal]{XB Kayhan} -\setlatintextfont[Scale=2.5,Colour=teal]{HM XKayhan} - -\def\SampleText{راهی جایی تابی چاپی چاههی تلاشهایی شتابهایی تابی چاپی راهی تلاشهــایی که کتابهایی که کلاههایی که} - -\setlength\parindent{0pt} -\pagestyle{empty} -\begin{document} -\color{red} - -\KashidaOff \SampleText \lr{(Kashida Off)~} - -\KashidaOn \SampleText \lr{(Kashida On)~} - -\end{document} - diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf b/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf deleted file mode 100644 index a4bf9aa17d..0000000000 Binary files a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf and /dev/null differ diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.tex b/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.tex deleted file mode 100644 index 9320152898..0000000000 --- a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.tex +++ /dev/null @@ -1,113 +0,0 @@ -%% -%% This is file `xepersian-hm-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{hypdoc} - -\title{ - The \textsf{xepersian-hm} package\\Fixing kashida in xepersian -} - -\author{ - Hossein Movahhedian\thanks - { - E-mail: - \href{mailto:dma8hm1334@gmail.com} - {\textsf{dma8hm1334@gmail.com}} - } -} - -\date{Released 2020-03-23} - -\begin{document} - -\maketitle - -Kashida feature in \textsf{xepersian} has problem with some fonts such as \texttt{HM Series} -fonts available at -\href{https://dma8hm1334.bitbucket.io}{\texttt{https://dma8hm1334.bitbucket.io}} -and \texttt{X Series 2} fonts available at -\href{http://wiki.irmug.com/index.php/X_Series_2}{\texttt{http://wiki.irmug.com/index.php/X\_Series\_2}}. -The \textsf{xepersian-hm} package fixes this problem. - -The file \texttt{texmf-dist/doc/xelatex/xepersian-hm/test-kashida.tex} can be -used as a simple example of the usage of the package. - -Any comments or suggestions would be gratefully appreciated. -Please report any bug or issue to \href{mailto:dma8hm1334@gmail.com}{\textsf{dma8hm1334@gmail.com}}. - -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. - -Please note that \textsf{xepersian-hm} loads \textsf{xepersian} automatically, -so you may only pass options to the package using the command -\verb|\PassOptionsToPackage| before \verb|\documentclass|, for example: - -\begin{verbatim} -\PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian} -\documentclass{report} -\usepackage{xcolor} -\usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm} -\end{verbatim} - -The options available in \textsf{xepersian-hm} are: -\begin{itemize} - \item \texttt{Kashida}: with two possible values, \texttt{on} which enables - \texttt{Kashida} feature and \texttt{off} which disables that feature. For - example \texttt{Kashida=on} enables \texttt{Kashida} feature. - \item \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{tabular}{ll} - \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{tabular} - - For example: \mbox{\texttt{'kashidastretch=titr'}} is equivalent to\linebreak - \mbox{\texttt{'kashidastretch=0.12 em plus 0.5 em'}} -\end{itemize} - -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx b/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx new file mode 100644 index 0000000000..72cbc1d028 --- /dev/null +++ b/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx @@ -0,0 +1,409 @@ +% \iffalse meta-comment +% +%<*internal> +\iffalse +% +%<*README> +The XEPERSIAN-HM package +------------------------ + +Kashida feature in `xepersian' has problems with some fonts such as `HM Series' +fonts available at `https://dma8hm1334.bitbucket.io' and `X Series 2' fonts +available at `http://wiki.irmug.com/index.php/X_Series_2'. The `xepersian-hm' +package fixes these problems. + +The file `texmf-dist/doc/xelatex/xepersian-hm/kashida-example.tex' can be used as +a simple example of the usage of the package. + +Any comments or suggestions would be gratefully appreciated. +Please report any bugs or issues to `dma8hm1334@gmail.com'. + +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. +% +%<*internal> +\fi +% +% +%% File: xepersian-hm.dtx +% +% Copyright (C) 2020 Hossein Movahhedian +% +% 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 +% +% \iffalse +% +%% Copyright notice: the following code is partly adapted from the code in +%% 'kashida-xepersian.def' from xepersian package (v22.8). +% +% \fi +% +%<*driver|package> +% The version of expl3 required is tested as early as possible, as +% some really old versions do not define \ProvidesExplPackage. +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{expl3}[2020-03-06] +%\@ifpackagelater{expl3}{2020-03-06} +% {} +% {% +% \PackageError{xepersian-hm}{Support package l3kernel too old} +% {% +% Please install an up to date version of l3kernel\MessageBreak +% using your TeX package manager or from CTAN.\MessageBreak +% \MessageBreak +% Loading xtemplate will abort!% +% }% +% \endinput +% } +% +%<*driver> +\documentclass[full]{l3doc} +\usepackage{hypdoc} +\addtolength{\hoffset}{-10mm} +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +% +% \fi +% +% \title{^^A +% The \textsf{xepersian-hm} package\\ Fixes issues in xepersian package^^A +% } +% +% \author{^^A +% Hossein Movahhedian\thanks +% {^^A +% E-mail: +% \href{mailto:dma8hm1334@gmail.com} +% {dma8hm1334@gmail.com}^^A +% }^^A +% } +% +% \date{Released 2020-03-26} +% +% \maketitle +% +% \begin{documentation} +% +% Kashida feature in \textsf{xepersian} has problems with some fonts such as \texttt{HM Series} +% fonts available at +% \href{https://dma8hm1334.bitbucket.io}{\texttt{https://dma8hm1334.bitbucket.io}} +% and \texttt{X Series 2} fonts available at +% \href{http://wiki.irmug.com/index.php/X_Series_2}{\texttt{http://wiki.irmug.com/index.php/X\_Series\_2}}. +% The \textsf{xepersian-hm} package fixes these problems. +% +% The file \texttt{texmf-dist/doc/xelatex/xepersian-hm/kashida-example.tex} can be +% used as a simple example of the usage of the package. +% +% Any comments or suggestions would be gratefully appreciated. +% Please report any bug or issue to \href{mailto:dma8hm1334@gmail.com}{\textsf{dma8hm1334@gmail.com}}. +% +% 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. +% +% Please note that \textsf{xepersian-hm} loads \textsf{xepersian} automatically, +% so you may only pass options to the package using the command +% \verb|\PassOptionsToPackage| before \verb|\documentclass|, for example: +% +% \begin{verbatim} +% \PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian} +% \documentclass{report} +% \usepackage{xcolor} +% \usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm} +% \end{verbatim} +% +% The options available in \textsf{xepersian-hm} are: +% \begin{itemize} +% \item \texttt{Kashida}: with two possible values, \texttt{on} which enables +% \texttt{Kashida} feature and \texttt{off} which disables that feature. For +% example \texttt{Kashida=on} enables \texttt{Kashida} feature. +% \item \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{tabular}{ll} +% \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{tabular} +% +% For example: \mbox{\texttt{'kashidastretch=titr'}} is equivalent to\linebreak +% \mbox{\texttt{'kashidastretch=0.12 em plus 0.5 em'}} +% \end{itemize} +% +% \end{documentation} +% +%\begin{implementation} +% +% \section{\pkg{xepersian-hm} Implementation} +% +% \subsection{File: \file{xepersian-hm.sty}} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +\RequirePackage{l3keys2e} +\RequirePackage{xepersian} +\ExplSyntaxOn +\ProvidesExplPackage {xepersian-hm} {2020-03-26} {0.4} { Fixes~issues~in~xepersian~package } + +\tl_set:Nn \l_kayhan_tl { kayhan } +\tl_set:Nn \l_khorramshahr_tl { khorramshahr } +\tl_set:Nn \l_kayhannavaar_tl { kayhannavaar } +\tl_set:Nn \l_kayhanpook_tl { kayhanpook } +\tl_set:Nn \l_kayhansayeh_tl { kayhansayeh } +\tl_set:Nn \l_khoramshahr_tl { khoramshahr } +\tl_set:Nn \l_khorramshahr_tl { khorramshahr } +\tl_set:Nn \l_niloofar_tl { niloofar } +\tl_set:Nn \l_paatch_tl { paatch } +\tl_set:Nn \l_riyaz_tl { riyaz } +\tl_set:Nn \l_roya_tl { roya } +\tl_set:Nn \l_shafigh_tl { shafigh } +\tl_set:Nn \l_shafighKurd_tl { shafighKurd } +\tl_set:Nn \l_shafighUzbek_tl { shafighUzbek } +\tl_set:Nn \l_shiraz_tl { shiraz } +\tl_set:Nn \l_sols_tl { sols } +\tl_set:Nn \l_tabriz_tl { tabriz } +\tl_set:Nn \l_titr_tl { titr } +\tl_set:Nn \l_titre_tl { titre } +\tl_set:Nn \l_traffic_tl { traffic } +\tl_set:Nn \l_vahid_tl { vahid } +\tl_set:Nn \l_vosta_tl { vosta } +\tl_set:Nn \l_yaghut_tl { yaghut } +\tl_set:Nn \l_yagut_tl { yagut } +\tl_set:Nn \l_yas_tl { yas } +\tl_set:Nn \l_yekan_tl { yekan } +\tl_set:Nn \l_yermook_tl { yermook } +\tl_set:Nn \l_zar_tl { zar } +\tl_set:Nn \l_ziba_tl { ziba } +\tl_set:Nn \l_default_tl { default } +\tl_set:Nn \l_noskip_tl { noskip } + +\keys_define:nn { xepersian-hm } + { + Kashida .code:n = \tex_input:D { kashida-xepersian-hm.def } , + + kashidastretch .code:n = + { + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_case:NnTF \l_tmpa_tl + { + \l_kayhan_tl { \tl_set:Nn \l_hskip_default_tl { 0.14 em plus 0.5 em } } + \l_khorramshahr_tl { \tl_set:Nn \l_hskip_default_tl { 0.131 em plus 0.5 em } } + \l_kayhannavaar_tl { \tl_set:Nn \l_hskip_default_tl { 0.129 em plus 0.5 em } } + \l_kayhanpook_tl { \tl_set:Nn \l_hskip_default_tl { 0.133 em plus 0.5 em } } + \l_kayhansayeh_tl { \tl_set:Nn \l_hskip_default_tl { 0.135 em plus 0.5 em } } + \l_khoramshahr_tl { \tl_set:Nn \l_hskip_default_tl { 0.128 em plus 0.5 em } } + \l_khorramshahr_tl { \tl_set:Nn \l_hskip_default_tl { 0.13 em plus 0.5 em } } + \l_niloofar_tl { \tl_set:Nn \l_hskip_default_tl { 0.132 em plus 0.5 em } } + \l_paatch_tl { \tl_set:Nn \l_hskip_default_tl { 0.127 em plus 0.5 em } } + \l_riyaz_tl { \tl_set:Nn \l_hskip_default_tl { 0.125 em plus 0.5 em } } + \l_roya_tl { \tl_set:Nn \l_hskip_default_tl { 0.142 em plus 0.5 em } } + \l_shafigh_tl { \tl_set:Nn \l_hskip_default_tl { 0.143 em plus 0.5 em } } + \l_shafighKurd_tl { \tl_set:Nn \l_hskip_default_tl { 0.126 em plus 0.5 em } } + \l_shafighUzbek_tl { \tl_set:Nn \l_hskip_default_tl { 0.123 em plus 0.5 em } } + \l_shiraz_tl { \tl_set:Nn \l_hskip_default_tl { 0.122 em plus 0.5 em } } + \l_sols_tl { \tl_set:Nn \l_hskip_default_tl { 0.124 em plus 0.5 em } } + \l_tabriz_tl { \tl_set:Nn \l_hskip_default_tl { 0.119 em plus 0.5 em } } + \l_titr_tl { \tl_set:Nn \l_hskip_default_tl { 0.12 em plus 0.5 em } } + \l_titre_tl { \tl_set:Nn \l_hskip_default_tl { 0.121 em plus 0.5 em } } + \l_traffic_tl { \tl_set:Nn \l_hskip_default_tl { 0.124 em plus 0.5 em } } + \l_vahid_tl { \tl_set:Nn \l_hskip_default_tl { 0.134 em plus 0.5 em } } + \l_vosta_tl { \tl_set:Nn \l_hskip_default_tl { 0.136 em plus 0.5 em } } + \l_yaghut_tl { \tl_set:Nn \l_hskip_default_tl { 0.138 em plus 0.5 em } } + \l_yagut_tl { \tl_set:Nn \l_hskip_default_tl { 0.137 em plus 0.5 em } } + \l_yas_tl { \tl_set:Nn \l_hskip_default_tl { 0.126 em plus 0.5 em } } + \l_yekan_tl { \tl_set:Nn \l_hskip_default_tl { 0.141 em plus 0.5 em } } + \l_yermook_tl { \tl_set:Nn \l_hskip_default_tl { 0.139 em plus 0.5 em } } + \l_zar_tl { \tl_set:Nn \l_hskip_default_tl { 0.116 em plus 0.5 em } } + \l_ziba_tl { \tl_set:Nn \l_hskip_default_tl { 0.119 em plus 0.5 em } } + \l_default_tl { \tl_set:Nn \l_hskip_default_tl { 0.14 em plus 0.5 em } } + \l_noskip_tl { \tl_set:Nn \l_hskip_default_tl { 0 em plus 0.5 em } } + } { } { \tl_set:Nn \l_hskip_default_tl { #1 } } + } , + kashidastretch .default:n = \tl_set:Nn \l_hskip_default_tl { 0 em plus 0.5 em } , + } + +\ProcessKeysOptions { xepersian-hm } + +\ExplSyntaxOff + \endinput +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{File: \file{kashida-xepersian-hm.def}} +% +% \begin{macrocode} +%<*kashida-xepersian-hm> +\ExplSyntaxOn +\ProvidesExplFile {kashida-xepersian-hm.def} {2020-03-26} {0.4} { Fixes~implementation~of~Kashida~in~xepersian~package } + +\int_const:Nn \c_xepersianhm_zwj_int {"200D} % zero-width joiner +\int_const:Nn \c_xepersianhm_lrm_int {"200E} % left-right-mark +\int_const:Nn \c_xepersianhm_two_int {2} % 2 +\int_const:Nn \c_xepersianhm_four_int {4} % 4 +\int_const:Nn \c_xepersianhm_ksh_int {"0640} % kashida +\int_const:Nn \c_xepersianhm_d_int {10} % dual-joiner class +\int_const:Nn \c_xepersianhm_l_int {11} % lam +\int_const:Nn \c_xepersianhm_r_int {12} % right-joiner +\int_const:Nn \c_xepersianhm_a_int {13} % alef +\int_const:Nn \c_xepersianhm_h_int {14} % heh +\int_const:Nn \c_xepersianhm_y_int {15} % yeh +\int_const:Nn \c_xepersianhm_v_int {4096} % vowel or other combining mark (to be ignored) + +\bool_new:N \l_kashida_on_bool +\bool_new:N \l_kashida_hm_fix_bool +\bool_new:N \l_kashida_xb_fix_bool + +\tl_new:N \l_hskip_zero_tl +\tl_new:N \l_hskip_default_tl + +\cs_new:Npn \xepersian_kashida #1 + { + \bool_if:NT \l_kashida_on_bool + { + \c_xepersianhm_lrm_int\c_xepersianhm_zwj_int\tex_penalty:D 10000 + \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xepersianhm_two_int + \int_use:N \XeTeXcharglyph \c_xepersianhm_ksh_int depth \XeTeXglyphbounds \c_xepersianhm_four_int + \int_use:N \XeTeXcharglyph \c_xepersianhm_ksh_int \skip_horizontal:n { #1 } + \c_xepersianhm_zwj_int + } + } + +\XeTeXinterchartokenstate = 1 + +\clist_set:Nn \l_xepersianhm_a_clist { 0622,0623,0625,0627 } % ‏ا، إ، أ، آ‏ +\clist_map_inline:Nn \l_xepersianhm_a_clist + { + \XeTeXcharclass "#1 \c_xepersianhm_a_int + } + +\clist_set:Nn \l_xepersianhm_d_clist { 0626,0628,062A,062B,062C,062D,062E,0633,0634,0635,0636,0637,0638,0639,063A,0640,0641,0642,0643,0645,0646,0647,067E,0686,06A9,06AF } % ‏ئ,ب,ت,ث,ج,ح,خ,س,ش,ص,ض,ط,ظ,ع,غ,ـ,ف,ق,ك,م,ن,ه,پ,چ,ک,گ‏ +\clist_map_inline:Nn \l_xepersianhm_d_clist + { + \XeTeXcharclass "#1 \c_xepersianhm_d_int + } + +\clist_set:Nn \l_xepersianhm_l_clist { 0644 } % ‏ل‏ +\clist_map_inline:Nn \l_xepersianhm_l_clist + { + \XeTeXcharclass "#1 \c_xepersianhm_l_int + } + +\clist_set:Nn \l_xepersianhm_r_clist { 0624,0629,062F,0630,0631,0632,0648,0698 } % ‏ؤ,ة,د,ذ,ر,ز,و,ژ‏ +\clist_map_inline:Nn \l_xepersianhm_r_clist + { + \XeTeXcharclass "#1 \c_xepersianhm_r_int + } + +\clist_set:Nn \l_xepersianhm_v_clist { 064B,064C,064D,064E,064F,0650,0651,0652 } % ‏ً,ٌ,ٍ,َ,ُ,ِ,ّ,ْ‏ +\clist_map_inline:Nn \l_xepersianhm_v_clist + { + \XeTeXcharclass "#1 \c_xepersianhm_v_int + } + +\clist_set:Nn \l_xepersianhm_y_clist { 0649,064A,06CC } +\clist_map_inline:Nn \l_xepersianhm_y_clist + { + \XeTeXcharclass "#1 \c_xepersianhm_y_int + } + +\XeTeXinterchartoks \c_xepersianhm_y_int \c_xepersianhm_y_int = {\bool_if:NTF \l_kashida_hm_fix_bool {\xepersian_kashida {\l_hskip_default_tl}} {\xepersian_kashida \l_hskip_zero_tl}} +\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_y_int = {\bool_if:NTF \l_kashida_hm_fix_bool {\xepersian_kashida {\l_hskip_default_tl}} {\xepersian_kashida \l_hskip_zero_tl}} +\XeTeXinterchartoks \c_xepersianhm_y_int \c_xepersianhm_d_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_d_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_d_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_l_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_l_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_r_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_d_int \c_xepersianhm_a_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_r_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersianhm_l_int \c_xepersianhm_a_int = {} + +\NewDocumentCommand \KashidaOn {} { \bool_set_true:N \l_kashida_on_bool } +\NewDocumentCommand \KashidaOff {} { \bool_set_false:N \l_kashida_on_bool } + +\NewDocumentCommand \KashidaXBFixOn {} { \bool_set_true:N \l_kashida_xb_fix_bool } +\NewDocumentCommand \KashidaXBFixOff {} { \bool_set_false:N \l_kashida_xb_fix_bool } + +\NewDocumentCommand \KashidaHMFixOn {} { \bool_set_true:N \l_kashida_hm_fix_bool } +\NewDocumentCommand \KashidaHMFixOff {} { \bool_set_false:N \l_kashida_hm_fix_bool } + +\ExplSyntaxOff +\makeatletter +\newif\if@Kashida@on +\newif\if@Kashida@XB@fix +\makeatother +\ExplSyntaxOn + +\KashidaHMFixOn + +\tl_set:Nn \l_hskip_zero_tl { 0 em plus 0.5 em } + +\bool_if:NTF \l_kashida_hm_fix_bool + { + \tl_if_empty:NT \l_hskip_default_tl { \tl_set:Nn \l_hskip_default_tl { 0.14 em plus 0.5 em } } + } + { + \tl_set:NV \l_hskip_default_tl \l_hskip_zero_tl + } + +\KashidaOn + +\ExplSyntaxOff + \endinput +% +% \end{macrocode} +% +%\end{implementation} +% +% \typeout{***************************************************} +% \typeout{*} +% \typeout{* To finish the installation you have to move the} +% \typeout{* following files into a directory searched by TeX:} +% \typeout{*} +% \typeout{* \space\space *.def, *.sty } +% \typeout{*} +% \typeout{* Documentation is in xepersian-hm.pdf} +% \typeout{*} +% \typeout{***************************************************} +% +\endinput diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm.ins b/macros/xetex/latex/xepersian-hm/xepersian-hm.ins new file mode 100644 index 0000000000..84b5af7a92 --- /dev/null +++ b/macros/xetex/latex/xepersian-hm/xepersian-hm.ins @@ -0,0 +1,36 @@ +\iffalse meta-comment + +File: xepersian-hm.ins + +Copyright (C) 2020 Hossein Movahhedian + +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 + +\fi + +\let\jobname\relax +\input l3docstrip.tex +\askforoverwritefalse + +\preamble + +Copyright (C) 2020 Hossein Movahhedian + +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 + +\endpreamble +% stop docstrip adding \endinput +\postamble +\endpostamble + +\keepsilent + +\generate{\file{xepersian-hm.sty} {\from{xepersian-hm.dtx} {package}}} +\generate{\file{README.txt} {\from{xepersian-hm.dtx} {README}}} +\generate{\file{kashida-xepersian-hm.def} {\from{xepersian-hm.dtx} {kashida-xepersian-hm}}} + +\endbatchfile diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf b/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf new file mode 100644 index 0000000000..9c3cff93a1 Binary files /dev/null and b/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf differ diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm.sty b/macros/xetex/latex/xepersian-hm/xepersian-hm.sty deleted file mode 100644 index e7330b2022..0000000000 --- a/macros/xetex/latex/xepersian-hm/xepersian-hm.sty +++ /dev/null @@ -1,100 +0,0 @@ -%% -%% This is file `xepersian-hm.sty' -%% -%% 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 -%% -\ExplSyntaxOn -\NeedsTeXFormat{LaTeX2e} -\RequirePackage{l3keys2e} -\RequirePackage{xepersian} -\ProvidesExplPackage {xepersian-hm} {2020-03-23} {0.3} { Fixes~issues~in~xepersian~package } - -\tl_set:Nn \l_kayhan_tl { kayhan } -\tl_set:Nn \l_khorramshahr_tl { khorramshahr } -\tl_set:Nn \l_kayhannavaar_tl { kayhannavaar } -\tl_set:Nn \l_kayhanpook_tl { kayhanpook } -\tl_set:Nn \l_kayhansayeh_tl { kayhansayeh } -\tl_set:Nn \l_khoramshahr_tl { khoramshahr } -\tl_set:Nn \l_khorramshahr_tl { khorramshahr } -\tl_set:Nn \l_niloofar_tl { niloofar } -\tl_set:Nn \l_paatch_tl { paatch } -\tl_set:Nn \l_riyaz_tl { riyaz } -\tl_set:Nn \l_roya_tl { roya } -\tl_set:Nn \l_shafigh_tl { shafigh } -\tl_set:Nn \l_shafighKurd_tl { shafighKurd } -\tl_set:Nn \l_shafighUzbek_tl { shafighUzbek } -\tl_set:Nn \l_shiraz_tl { shiraz } -\tl_set:Nn \l_sols_tl { sols } -\tl_set:Nn \l_tabriz_tl { tabriz } -\tl_set:Nn \l_titr_tl { titr } -\tl_set:Nn \l_titre_tl { titre } -\tl_set:Nn \l_traffic_tl { traffic } -\tl_set:Nn \l_vahid_tl { vahid } -\tl_set:Nn \l_vosta_tl { vosta } -\tl_set:Nn \l_yaghut_tl { yaghut } -\tl_set:Nn \l_yagut_tl { yagut } -\tl_set:Nn \l_yas_tl { yas } -\tl_set:Nn \l_yekan_tl { yekan } -\tl_set:Nn \l_yermook_tl { yermook } -\tl_set:Nn \l_zar_tl { zar } -\tl_set:Nn \l_ziba_tl { ziba } -\tl_set:Nn \l_default_tl { default } -\tl_set:Nn \l_noskip_tl { noskip } - -\keys_define:nn { xepersian-hm } - { - Kashida .code:n = \tex_input:D { kashida-xepersian-hm.def } , - - kashidastretch .code:n = - { - \tl_set:Nn \l_tmpa_tl { #1 } - \tl_case:NnTF \l_tmpa_tl - { - \l_kayhan_tl { \tl_set:Nn \l_hskip_default_tl { 0.14 em plus 0.5 em } } - \l_khorramshahr_tl { \tl_set:Nn \l_hskip_default_tl { 0.131 em plus 0.5 em } } - \l_kayhannavaar_tl { \tl_set:Nn \l_hskip_default_tl { 0.129 em plus 0.5 em } } - \l_kayhanpook_tl { \tl_set:Nn \l_hskip_default_tl { 0.133 em plus 0.5 em } } - \l_kayhansayeh_tl { \tl_set:Nn \l_hskip_default_tl { 0.135 em plus 0.5 em } } - \l_khoramshahr_tl { \tl_set:Nn \l_hskip_default_tl { 0.128 em plus 0.5 em } } - \l_khorramshahr_tl { \tl_set:Nn \l_hskip_default_tl { 0.13 em plus 0.5 em } } - \l_niloofar_tl { \tl_set:Nn \l_hskip_default_tl { 0.132 em plus 0.5 em } } - \l_paatch_tl { \tl_set:Nn \l_hskip_default_tl { 0.127 em plus 0.5 em } } - \l_riyaz_tl { \tl_set:Nn \l_hskip_default_tl { 0.125 em plus 0.5 em } } - \l_roya_tl { \tl_set:Nn \l_hskip_default_tl { 0.142 em plus 0.5 em } } - \l_shafigh_tl { \tl_set:Nn \l_hskip_default_tl { 0.143 em plus 0.5 em } } - \l_shafighKurd_tl { \tl_set:Nn \l_hskip_default_tl { 0.126 em plus 0.5 em } } - \l_shafighUzbek_tl { \tl_set:Nn \l_hskip_default_tl { 0.123 em plus 0.5 em } } - \l_shiraz_tl { \tl_set:Nn \l_hskip_default_tl { 0.122 em plus 0.5 em } } - \l_sols_tl { \tl_set:Nn \l_hskip_default_tl { 0.124 em plus 0.5 em } } - \l_tabriz_tl { \tl_set:Nn \l_hskip_default_tl { 0.119 em plus 0.5 em } } - \l_titr_tl { \tl_set:Nn \l_hskip_default_tl { 0.12 em plus 0.5 em } } - \l_titre_tl { \tl_set:Nn \l_hskip_default_tl { 0.121 em plus 0.5 em } } - \l_traffic_tl { \tl_set:Nn \l_hskip_default_tl { 0.124 em plus 0.5 em } } - \l_vahid_tl { \tl_set:Nn \l_hskip_default_tl { 0.134 em plus 0.5 em } } - \l_vosta_tl { \tl_set:Nn \l_hskip_default_tl { 0.136 em plus 0.5 em } } - \l_yaghut_tl { \tl_set:Nn \l_hskip_default_tl { 0.138 em plus 0.5 em } } - \l_yagut_tl { \tl_set:Nn \l_hskip_default_tl { 0.137 em plus 0.5 em } } - \l_yas_tl { \tl_set:Nn \l_hskip_default_tl { 0.126 em plus 0.5 em } } - \l_yekan_tl { \tl_set:Nn \l_hskip_default_tl { 0.141 em plus 0.5 em } } - \l_yermook_tl { \tl_set:Nn \l_hskip_default_tl { 0.139 em plus 0.5 em } } - \l_zar_tl { \tl_set:Nn \l_hskip_default_tl { 0.116 em plus 0.5 em } } - \l_ziba_tl { \tl_set:Nn \l_hskip_default_tl { 0.119 em plus 0.5 em } } - \l_default_tl { \tl_set:Nn \l_hskip_default_tl { 0.14 em plus 0.5 em } } - \l_noskip_tl { \tl_set:Nn \l_hskip_default_tl { 0 em plus 0.5 em } } - } { } { \tl_set:Nn \l_hskip_default_tl { #1 } } - } , - kashidastretch .default:n = \tl_set:Nn \l_hskip_default_tl { 0 em plus 0.5 em } , - } - -\ProcessKeysOptions { xepersian-hm } - -\ExplSyntaxOff -\endinput - -%% -%% END OF FILE -%% -- cgit v1.2.3