diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-19 21:58:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-19 21:58:08 +0000 |
commit | ecfba7a922aa985c09ee18bfc3a4fa6b746ca0ee (patch) | |
tree | 51cb1065c577cba80f7ad7d65ffe6867b039919e | |
parent | fdd64e46f7731e97f8dd25d5c738169d351a0242 (diff) |
xepersian-hm (19mar20)
git-svn-id: svn://tug.org/texlive/trunk@54405 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xepersian-hm/README.txt | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.pdf | bin | 0 -> 17987 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.tex | 37 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def | 132 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty | 100 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/xepersian-hm.tlpsrc | 0 |
8 files changed, 281 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xepersian-hm/README.txt b/Master/texmf-dist/doc/xelatex/xepersian-hm/README.txt new file mode 100644 index 00000000000..5bd2194c2e7 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/xepersian-hm/README.txt @@ -0,0 +1,10 @@ +The XEPERSIAN-HM package +------------------------ + +Kashida feature in xepersian has problem with some fonts such as HM Series +fonts available at 'https://dma8hm1334.bitbucket.io' and XB Series fonts +available at 'http://wiki.irmug.com/index.php/X_Series_2'. The `xepersian-hm' +package fixes this problem. + +The file texmf-dist/doc/xelatex/xepersian-hm/test-kashida.tex can be used as +a simple example of the usage of the package. diff --git a/Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.pdf b/Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.pdf Binary files differnew file mode 100644 index 00000000000..546432f082c --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.pdf diff --git a/Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.tex b/Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.tex new file mode 100644 index 00000000000..1c599c1cc04 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/xepersian-hm/test-kasida.tex @@ -0,0 +1,37 @@ +\documentclass{report} +\usepackage{graphicx} +\usepackage{xcolor} +% \usepackage[Kashida=off,fontsloadable=true,RTLdocument=on]{xepersian} % Load xepersian with a few options +\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]{IRXLotus} + +% \settextfont[Scale=4.5,Colour=darkgray]{IRLotus} + +\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]{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/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def b/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def new file mode 100644 index 00000000000..ce3a9600dc5 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def @@ -0,0 +1,132 @@ +%% +%% 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.def} {2018/01/04} {0.1} { Fixes~implementation~of~Kashida~in~xepersian~package } + +\int_const:Nn \c_xepersian_zwj_int {"200D} % zero-width joiner +\int_const:Nn \c_xepersian_lrm_int {"200E} % left-right-mark +\int_const:Nn \c_xepersian_two_int {2} % 2 +\int_const:Nn \c_xepersian_four_int {4} % 4 +\int_const:Nn \c_xepersian_ksh_int {"0640} % kashida +\int_const:Nn \c_xepersian_d_int {10} % dual-joiner class +\int_const:Nn \c_xepersian_l_int {11} % lam +\int_const:Nn \c_xepersian_r_int {12} % right-joiner +\int_const:Nn \c_xepersian_a_int {13} % alef +\int_const:Nn \c_xepersian_h_int {14} % heh +\int_const:Nn \c_xepersian_y_int {15} % yeh +\int_const:Nn \c_xepersian_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_xepersian_lrm_int\c_xepersian_zwj_int\tex_penalty:D 10000 + \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xepersian_two_int + \int_use:N \XeTeXcharglyph \c_xepersian_ksh_int depth \XeTeXglyphbounds \c_xepersian_four_int + \int_use:N \XeTeXcharglyph \c_xepersian_ksh_int \skip_horizontal:n { #1 } + \c_xepersian_zwj_int + } + } + +\XeTeXinterchartokenstate = 1 + +\clist_set:Nn \l_xepersian_a_clist { 0622,0623,0625,0627 } % ا، إ، أ، آ +\clist_map_inline:Nn \l_xepersian_a_clist + { + \XeTeXcharclass "#1 \c_xepersian_a_int + } + +\clist_set:Nn \l_xepersian_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_xepersian_d_clist + { + \XeTeXcharclass "#1 \c_xepersian_d_int + } + +\clist_set:Nn \l_xepersian_l_clist { 0644 } % ل +\clist_map_inline:Nn \l_xepersian_l_clist + { + \XeTeXcharclass "#1 \c_xepersian_l_int + } + +\clist_set:Nn \l_xepersian_r_clist { 0624,0629,062F,0630,0631,0632,0648,0698 } % ؤ,ة,د,ذ,ر,ز,و,ژ +\clist_map_inline:Nn \l_xepersian_r_clist + { + \XeTeXcharclass "#1 \c_xepersian_r_int + } + +\clist_set:Nn \l_xepersian_v_clist { 064B,064C,064D,064E,064F,0650,0651,0652 } % ً,ٌ,ٍ,َ,ُ,ِ,ّ,ْ +\clist_map_inline:Nn \l_xepersian_v_clist + { + \XeTeXcharclass "#1 \c_xepersian_v_int + } + +\clist_set:Nn \l_xepersian_y_clist { 0649,064A,06CC } +\clist_map_inline:Nn \l_xepersian_y_clist + { + \XeTeXcharclass "#1 \c_xepersian_y_int + } + +\XeTeXinterchartoks \c_xepersian_y_int \c_xepersian_y_int = {\bool_if:NTF \l_kashida_hm_fix_bool {\xepersian_kashida {\l_hskip_default_tl}} {\xepersian_kashida \l_hskip_zero_tl}} +\XeTeXinterchartoks \c_xepersian_d_int \c_xepersian_y_int = {\bool_if:NTF \l_kashida_hm_fix_bool {\xepersian_kashida {\l_hskip_default_tl}} {\xepersian_kashida \l_hskip_zero_tl}} +\XeTeXinterchartoks \c_xepersian_y_int \c_xepersian_d_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_d_int \c_xepersian_d_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_l_int \c_xepersian_d_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_d_int \c_xepersian_l_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_l_int \c_xepersian_l_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_d_int \c_xepersian_r_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_d_int \c_xepersian_a_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_l_int \c_xepersian_r_int = {\xepersian_kashida \l_hskip_zero_tl} +\XeTeXinterchartoks \c_xepersian_l_int \c_xepersian_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/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty b/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty new file mode 100644 index 00000000000..568c000c5ec --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty @@ -0,0 +1,100 @@ +%% +%% 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-17} {0.1} { 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 +%% diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index a5025ab5c75..bfb48924187 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -784,7 +784,7 @@ my @TLP_working = qw( xcolor xcolor-material xcolor-solarized xcomment xcookybooky xcpdftips xdoc xduthesis xebaposter xechangebar xecjk xecolor xecyr xecyrmongolian xeindex xellipsis - xepersian xesearch xespotcolor + xepersian xepersian-hm xesearch xespotcolor xetex-devanagari xetex-itrans xetex-pstricks xetex-tibetan xetexfontinfo xetexko xetexref xevlna xfakebold xfor xgreek xhfill diff --git a/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc b/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc index cb2c0c98da8..ae8ba47c614 100644 --- a/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc @@ -27,3 +27,4 @@ depend sexam depend simurgh depend tram depend xepersian +depend xepersian-hm diff --git a/Master/tlpkg/tlpsrc/xepersian-hm.tlpsrc b/Master/tlpkg/tlpsrc/xepersian-hm.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/xepersian-hm.tlpsrc |