From 092dff4bfcbe6db899f2ae3f6074a0a76686d6c1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 4 Jun 2020 21:10:35 +0000 Subject: xepersian-hm (4jun20) git-svn-id: svn://tug.org/texlive/trunk@55417 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/xelatex/xepersian-hm/xepersian-hm.dtx | 34 ++++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/source/xelatex') diff --git a/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx b/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx index 0daba1b3e04..8628fb08cc7 100644 --- a/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx +++ b/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx @@ -67,7 +67,7 @@ make time to fix. % }^^A % } % -% \date{Released \quad 2020-05-31 \quad v1.0a} +% \date{Released \quad 2020-06-04 \quad v1.0b} % % \maketitle % @@ -96,7 +96,7 @@ make time to fix. \RequirePackage{zref-savepos}[2020-03-03] \RequirePackage{xepersian} \ExplSyntaxOn -\ProvidesExplPackage {xepersian-hm} {2020-05-31} {1.0a} { Fixes~issues~in~xepersian~package } +\ProvidesExplPackage {xepersian-hm} {2020-06-04} {1.0b} { Fixes~issues~in~xepersian~package } \box_new:N \l_xephm_ksh_box @@ -151,6 +151,8 @@ make time to fix. \tl_set:Nn \l_xephm_stretch_glyph_tl { glyph } \tl_set:Nn \l_xephm_stretch_leaders_glyph_tl { leaders+glyph } \tl_set:Nn \l_xephm_stretch_leaders_hrule_tl { leaders+hrule } +\tl_set:Nn \l_xephm_stretch_off_tl { Off } +\tl_set:Nn \l_xephm_stretch_on_tl { On } \tl_set:Nn \l_xephm_fnt_kayhan_tl { kayhan } \tl_set:Nn \l_xephm_fnt_kayhannavaar_tl { kayhannavaar } @@ -268,18 +270,30 @@ make time to fix. \msg_error:nnx { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font } { \l_xephm_main_font_name_tl } } } + \bool_set_true:N \l_xephm_kashida_hm_fix_bool } \l_xephm_stretch_leaders_glyph_tl { \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_glyph_tl } + \bool_set_true:N \l_xephm_kashida_hm_fix_bool } \l_xephm_stretch_leaders_hrule_tl { \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_hrule_tl } + \bool_set_true:N \l_xephm_kashida_hm_fix_bool + } + \l_xephm_stretch_off_tl + { + \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_off_tl } + \bool_set_false:N \l_xephm_kashida_hm_fix_bool + } + \l_xephm_stretch_on_tl + { + \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_glyph_tl } + \bool_set_true:N \l_xephm_kashida_hm_fix_bool } } { } { \tl_set:Nx \l_xephm_gap_filler_tl { #1 } } \tl_if_empty:NT \l_xephm_gap_filler_tl { \msg_error:nn { xepersian-hm } { error-specify-value-for-kashida-option } } - \bool_set_true:N \l_xephm_kashida_hm_fix_bool } , linebreakpenalty .code:n = @@ -353,7 +367,6 @@ make time to fix. \bool_set_true:N \l_xephm_ligature_bool } , ligatures .default:n = \tl_set:Nn \l_xephm_active_ligs_tl { \l_xephm_lig_default_tl } , - } \ProcessKeysOptions { xepersian-hm } @@ -372,7 +385,7 @@ make time to fix. % \begin{macrocode} %<*kashida-xepersian-hm-def> \ExplSyntaxOn -\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-31} {1.0a} { Fixes~implementation~of~Kashida~in~xepersian~package } +\ProvidesExplFile {kashida-xepersian-hm.def} {2020-06-04} {1.0b} { Fixes~implementation~of~Kashida~in~xepersian~package } \newXeTeXintercharclass \c_xephm_d_charclass % dual-joiner class \newXeTeXintercharclass \c_xephm_l_charclass % lam @@ -429,7 +442,7 @@ make time to fix. { \skip_horizontal:N \l_tmpa_skip \tex_ignorespaces:D } \fi: } - + \NewDocumentCommand { \discouragebadlinebreaks } { O{\l_xephm_line_break_penalty_int} O{\c_xephm_skip_b_tl} m } { \IfNoValueF {#1} @@ -438,7 +451,7 @@ make time to fix. { \tl_set:Nn \l_xephm_skip_default_tl {#2} } \xephm_put_line_breaks:n { #3 } } - + \cs_new_protected:Nn \xephm_put_line_breaks:n { \tl_set:Nn \l_xephm_line_break_tl { #1 } @@ -498,7 +511,7 @@ make time to fix. { \bool_if:NT \l_xephm_kashida_hm_fix_bool { - \tl_if_eq:NNTF \l_xephm_gap_filler_tl \l_xephm_stretch_leaders_glyph_tl + \tl_if_eq:NNTF \l_xephm_gap_filler_tl \l_xephm_stretch_leaders_glyph_tl { \tl_set:Nx \l_xephm_font_full_tl { \tex_fontname:D \tex_the:D \tex_font:D } \tl_set:Nx \l_xephm_font_name_tl { \l_xephm_font_full_tl } @@ -636,7 +649,10 @@ make time to fix. \makeatletter \newif\if@Kashida@on -\newif\if@Kashida@XB@fix +%% Becuase Vafa Khalighi has copied the above code (injecting the character uni+200E) in xepersian-23.0 +%% (https://tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def?revision=55165&view=co), +%% the following line of code is not needed in xepersian anymore. +%% % \newif\if@Kashida@XB@fix \makeatother \endinput -- cgit v1.2.3