texlive[56272] Master: xepersian-*kashida.tex file locations (5sep20)
commits+karl at tug.org
commits+karl at tug.org
Sat Sep 5 23:53:43 CEST 2020
Revision: 56272
http://tug.org/svn/texlive?view=revision&revision=56272
Author: karl
Date: 2020-09-05 23:53:42 +0200 (Sat, 05 Sep 2020)
Log Message:
-----------
xepersian-*kashida.tex file locations (5sep20)
Modified Paths:
--------------
trunk/Master/tlpkg/libexec/ctan2tds
Added Paths:
-----------
trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex
trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-kashida.tex
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex
trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-kashida.tex
Deleted: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex 2020-09-05 21:42:16 UTC (rev 56271)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex 2020-09-05 21:53:42 UTC (rev 56272)
@@ -1,87 +0,0 @@
-%%
-%% This is file `xepersian-hm-common-kashida.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% xepersian-hm.dtx (with options: `xepersian-hm-common-kashida-tex')
-%%
-%% 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
-%%
-\ProvidesExplFile {xepersian-hm-common-kashida.tex} {2020-09-04} {1.1a} { Fixes~implementation~of~Kashida~in~xepersian~package }
-
-\bool_if:NT \l_xephm_ligature_bool
-{
- \clist_new:N \l_xephm_ligatures_clist
- \int_new:N \l_xephm_lig_names_len_int
- \int_set:Nn \l_xephm_lig_names_len_int { \clist_count:N \l_xephm_lig_names_clist }
- \int_step_inline:nnnn { 1 } { 2 } { \l_xephm_lig_names_len_int }
- {
- \int_set:Nn \l_tmpa_int { #1 }
- \int_set:Nn \l_tmpb_int { \int_eval:n { \l_tmpa_int + 1 } }
- \tl_set:Nf \l_tmpa_tl { \clist_item:Nn \l_xephm_lig_names_clist { \l_tmpa_int } }
- \clist_set:Nx \l_tmpa_clist { { \clist_item:Nn \l_xephm_lig_names_clist { \l_tmpb_int } } }
- \bool_if:nT { \tl_if_eq_p:NN \l_xephm_active_ligs_tl \l_tmpa_tl || \tl_if_eq_p:NN \l_xephm_active_ligs_tl \l_xephm_lig_default_tl }
- {
- \clist_put_left:Nx \l_xephm_ligatures_clist { \l_tmpa_clist }
- }
- }
- \clist_map_inline:Nn \l_xephm_ligatures_clist
- {
- \seq_set_split:Nnn \l_tmpa_seq { = } { #1 }
- \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl { } { }
- \seq_pop_left:NN \l_tmpa_seq \l_tmpb_tl { } { }
- \tl_const:cx { \tl_use:N \l_tmpb_tl } { \char"\l_tmpa_tl \ }
- }
-}
-
-\bool_if:NT \l_xephm_linebreakpenalty_bool
-{
- %% Partly adapted from LaTeX2e source
- \cs_new:Nn \xephm_line_break: {
- \if_mode_vertical:
- \GenericError{
- \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space
- }{
- LaTeX Error: There’s no line here to end
- }{
- See the LaTeX manual or LaTeX Companion for explanation.
- }{
- Your command was ignored.\MessageBreak
- Type \space I <command> <return> \space to replace it~
- with another command,\MessageBreak
- or \space <return> \space to continue without it.}
- \else:
- \l_tmpa_skip \tex_lastskip:D
- \tex_unskip:D
- \tex_penalty:D -\l_xephm_line_break_penalty_int
- \dim_compare:nT { \l_tmpa_skip > \c_zero_skip }
- { \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}
- { \int_set:Nn \l_xephm_line_break_penalty_int {#1} }
- \IfNoValueF {#2}
- { \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 }
- \regex_replace_all:nnN { ([ابپتثجحخچدذرزژسشعغصضفقطظکگلمنوهیـ])+ } { \ \0 \ \c{xephm_line_break:}\ } \l_xephm_line_break_tl
- \tl_use:N \l_xephm_line_break_tl
- }
-}
-
- \endinput
-%%
-%%
-%% End of file `xepersian-hm-common-kashida.tex'.
Deleted: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-kashida.tex 2020-09-05 21:42:16 UTC (rev 56271)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-kashida.tex 2020-09-05 21:53:42 UTC (rev 56272)
@@ -1,213 +0,0 @@
-%%
-%% This is file `xepersian-hm-kashida.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% xepersian-hm.dtx (with options: `xepersian-hm-kashida-tex')
-%%
-%% 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
-%%
-\ProvidesExplFile {xepersian-hm-kashida.tex} {2020-09-04} {1.1a} { Fixes~implementation~of~Kashida~in~xepersian~package }
-
-\tex_input:D { xepersian-hm-common-kashida.tex }
-
-\newXeTeXintercharclass \c_xephm_d_charclass % dual-joiner class
-\newXeTeXintercharclass \c_xephm_l_charclass % lam
-\newXeTeXintercharclass \c_xephm_r_charclass % right-joiner
-\newXeTeXintercharclass \c_xephm_a_charclass % alef
-\newXeTeXintercharclass \c_xephm_y_charclass % yeh
-
-\tl_set:Nn \l_xephm_use_color_tl
- {
- \bool_if:NTF \l_xephm_color_bool
- {
- \colorlet{default}{\l_xephm_color_tl}
- }
- {
- \colorlet{default}{.}
- }
- \color{default}
- }
-
-%% Partly adapted from the code provided by David Carlisle in:
-%% https://tex.stackexchange.com/questions/356709/how-to-know-the-width-and-fill-the-glue-space-between-two-characters-when-using/356721#356721
-\cs_new:Npn \xephm_kashida_glyph #1
-{
- \bool_if:NT \l_xephm_kashida_fix_bool
- {
- \c_xephm_lrm_int\tex_penalty:D 10000
- \mode_leave_vertical:
- \tex_global:D \tex_advance:D \l_xephm_counter_int \c_one_int
-
- \tl_set:Nx \l_xephm_pos_tl { p\tex_romannumeral:D \l_xephm_counter_int }
- \tl_set:Nx \l_xephm_zref_tl { z\tex_romannumeral:D \l_xephm_counter_int }
-
- \zsaveposx{x_i_\l_xephm_zref_tl}
- \tl_set:Nx \l_tmpa_tl
- {
- \iow_now:cx { @auxout }
- {
- \token_to_str:N \gdef \exp_after:wN \token_to_str:N \cs:w xi\l_xephm_pos_tl \cs_end: { \zposx{ x_i_\l_xephm_zref_tl } }
- }
- }
- \l_tmpa_tl
- \skip_horizontal:n { #1 }
- \zsaveposx{x_f_\l_xephm_zref_tl}
- \tl_set:Nx \l_tmpa_tl
- {
- \iow_now:cx { @auxout }
- {
- \token_to_str:N \gdef \exp_after:wN \token_to_str:N \cs:w xf\l_xephm_pos_tl \cs_end: { \zposx{ x_f_\l_xephm_zref_tl } }
- }
- }
- \l_tmpa_tl
- \exp_after:wN
- \if_meaning:w
- \cs:w xi\l_xephm_pos_tl \cs_end: \tex_relax:D
- \else:
- \dim_set:Nn \l_xephm_diff_pos_dim
- {
- \dim_eval:n { \cs:w xi\l_xephm_pos_tl \cs_end: sp - \cs:w xf\l_xephm_pos_tl \cs_end: sp }
- }
- \dim_compare:nTF { \l_xephm_diff_pos_dim == 0sp }
- { }
- { \llap { \resizebox { \l_xephm_diff_pos_dim \tex_relax:D } { \height } { \l_xephm_use_color_tl \c_xephm_ksh_int } } }
- \fi:
- }
-}
-
-\cs_new:Npn \xephm_kashida_leaders #1
-{
- \bool_if:NT \l_xephm_kashida_fix_bool
- {
- \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 }
- \tl_set:Nx \l_xephm_font_init_tl { \l_xephm_font_name_tl }
- \regex_replace_once:nnN { ^"\[?(HM)[\_\ ](X|F).* } { \1\2 } \l_xephm_font_init_tl\relax
- \tl_set:Nn \l_tmpa_tl { HMF }
- \tl_set:Nn \l_tmpb_tl { HMX }
- \bool_if:nTF { \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpa_tl } || \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpb_tl } }
- {
- \hbox_set:Nn \l_xephm_ksh_box { \l_xephm_use_color_tl \XeTeXglyph\XeTeXglyphindex"kashida" }
- \c_xephm_zwj_int \tex_penalty:D 10000
- \tex_leaders:D \copy\l_xephm_ksh_box \skip_horizontal:n { #1 }
- \c_xephm_zwj_int
- }
- {
- \msg_error:nnx { xepersian-hm } { hm-series-font-not-found } { \l_xephm_font_name_tl }
- }
- }
- {
- %% Partly adapted from the code provided by Jonathan Kew in:
- %% https://tug.org/pipermail/xetex/2009-February/012307.html.
- %% Somebody notified me that the code in 'kashida-xepersian.def' from xepersian
- %% package is an exact copy of Jonathan Kew's code. Being unaware of this, in
- %% the earlier versions of this package I made a mistake and acknowledged
- %% Vafa Khalighi instead of Jonathan Kew. A sincere thank you to Jonathan Kew
- %% for his excellent code.
- \c_xephm_lrm_int\c_xephm_zwj_int
- {\l_xephm_use_color_tl\tex_penalty:D 10000
- \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xephm_two_int
- \int_use:N \XeTeXcharglyph \c_xephm_ksh_int depth \XeTeXglyphbounds \c_xephm_four_int
- \int_use:N \XeTeXcharglyph \c_xephm_ksh_int \skip_horizontal:n { #1 }
- }
- \c_xephm_zwj_int
- }
- }
-}
-
-\XeTeXinterchartokenstate = 1
-
-\clist_set:Nn \l_xephm_a_clist { 0622,0623,0625,0627 } % ا، إ، أ، آ
-\clist_map_inline:Nn \l_xephm_a_clist
- {
- \XeTeXcharclass "#1 \c_xephm_a_charclass
- }
-
-\clist_set:Nn \l_xephm_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_xephm_d_clist
- {
- \XeTeXcharclass "#1 \c_xephm_d_charclass
- }
-
-\clist_set:Nn \l_xephm_l_clist { 0644 } % ل
-\clist_map_inline:Nn \l_xephm_l_clist
- {
- \XeTeXcharclass "#1 \c_xephm_l_charclass
- }
-
-\clist_set:Nn \l_xephm_r_clist { 0624,0629,062F,0630,0631,0632,0648,0698 } % ؤ,ة,د,ذ,ر,ز,و,ژ
-\clist_map_inline:Nn \l_xephm_r_clist
- {
- \XeTeXcharclass "#1 \c_xephm_r_charclass
- }
-
-\clist_set:Nn \l_xephm_y_clist { 0649,064A,06CC } % ی,ي,ى
-\clist_map_inline:Nn \l_xephm_y_clist
- {
- \XeTeXcharclass "#1 \c_xephm_y_charclass
- }
-
-\tl_if_eq:NNTF \l_xephm_gap_filler_tl \l_xephm_stretch_glyph_tl {
- \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
- \bool_if:NTF \l_xephm_kashida_fix_bool
- { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
- { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
- \bool_if:NTF \l_xephm_kashida_fix_bool
- { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
- { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- }
- \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
-}
-{
- \bool_if:nTF {
- \tl_if_eq_p:NN \l_xephm_gap_filler_tl \l_xephm_stretch_leaders_glyph_tl ||
- \tl_if_eq_p:NN \l_xephm_gap_filler_tl \l_xephm_stretch_leaders_hrule_tl
- }
- {
- \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
- \bool_if:NTF \l_xephm_kashida_fix_bool
- { \xephm_kashida_leaders \l_xephm_skip_default_tl }
- { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
- \bool_if:NTF \l_xephm_kashida_fix_bool
- { \xephm_kashida_leaders \l_xephm_skip_default_tl }
- { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- }
- \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
- \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
- }
- {
- \msg_error:nnx { xepersian-hm } { error-value-not-available-for-kashida-option } { \l_xephm_gap_filler_tl }
- }
-}
-
- \endinput
-%%
-%%
-%% End of file `xepersian-hm-kashida.tex'.
Added: trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex 2020-09-05 21:53:42 UTC (rev 56272)
@@ -0,0 +1,87 @@
+%%
+%% This is file `xepersian-hm-common-kashida.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian-hm.dtx (with options: `xepersian-hm-common-kashida-tex')
+%%
+%% 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
+%%
+\ProvidesExplFile {xepersian-hm-common-kashida.tex} {2020-09-04} {1.1a} { Fixes~implementation~of~Kashida~in~xepersian~package }
+
+\bool_if:NT \l_xephm_ligature_bool
+{
+ \clist_new:N \l_xephm_ligatures_clist
+ \int_new:N \l_xephm_lig_names_len_int
+ \int_set:Nn \l_xephm_lig_names_len_int { \clist_count:N \l_xephm_lig_names_clist }
+ \int_step_inline:nnnn { 1 } { 2 } { \l_xephm_lig_names_len_int }
+ {
+ \int_set:Nn \l_tmpa_int { #1 }
+ \int_set:Nn \l_tmpb_int { \int_eval:n { \l_tmpa_int + 1 } }
+ \tl_set:Nf \l_tmpa_tl { \clist_item:Nn \l_xephm_lig_names_clist { \l_tmpa_int } }
+ \clist_set:Nx \l_tmpa_clist { { \clist_item:Nn \l_xephm_lig_names_clist { \l_tmpb_int } } }
+ \bool_if:nT { \tl_if_eq_p:NN \l_xephm_active_ligs_tl \l_tmpa_tl || \tl_if_eq_p:NN \l_xephm_active_ligs_tl \l_xephm_lig_default_tl }
+ {
+ \clist_put_left:Nx \l_xephm_ligatures_clist { \l_tmpa_clist }
+ }
+ }
+ \clist_map_inline:Nn \l_xephm_ligatures_clist
+ {
+ \seq_set_split:Nnn \l_tmpa_seq { = } { #1 }
+ \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl { } { }
+ \seq_pop_left:NN \l_tmpa_seq \l_tmpb_tl { } { }
+ \tl_const:cx { \tl_use:N \l_tmpb_tl } { \char"\l_tmpa_tl \ }
+ }
+}
+
+\bool_if:NT \l_xephm_linebreakpenalty_bool
+{
+ %% Partly adapted from LaTeX2e source
+ \cs_new:Nn \xephm_line_break: {
+ \if_mode_vertical:
+ \GenericError{
+ \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space
+ }{
+ LaTeX Error: There’s no line here to end
+ }{
+ See the LaTeX manual or LaTeX Companion for explanation.
+ }{
+ Your command was ignored.\MessageBreak
+ Type \space I <command> <return> \space to replace it~
+ with another command,\MessageBreak
+ or \space <return> \space to continue without it.}
+ \else:
+ \l_tmpa_skip \tex_lastskip:D
+ \tex_unskip:D
+ \tex_penalty:D -\l_xephm_line_break_penalty_int
+ \dim_compare:nT { \l_tmpa_skip > \c_zero_skip }
+ { \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}
+ { \int_set:Nn \l_xephm_line_break_penalty_int {#1} }
+ \IfNoValueF {#2}
+ { \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 }
+ \regex_replace_all:nnN { ([ابپتثجحخچدذرزژسشعغصضفقطظکگلمنوهیـ])+ } { \ \0 \ \c{xephm_line_break:}\ } \l_xephm_line_break_tl
+ \tl_use:N \l_xephm_line_break_tl
+ }
+}
+
+ \endinput
+%%
+%%
+%% End of file `xepersian-hm-common-kashida.tex'.
Property changes on: trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-common-kashida.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-kashida.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-kashida.tex 2020-09-05 21:53:42 UTC (rev 56272)
@@ -0,0 +1,213 @@
+%%
+%% This is file `xepersian-hm-kashida.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian-hm.dtx (with options: `xepersian-hm-kashida-tex')
+%%
+%% 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
+%%
+\ProvidesExplFile {xepersian-hm-kashida.tex} {2020-09-04} {1.1a} { Fixes~implementation~of~Kashida~in~xepersian~package }
+
+\tex_input:D { xepersian-hm-common-kashida.tex }
+
+\newXeTeXintercharclass \c_xephm_d_charclass % dual-joiner class
+\newXeTeXintercharclass \c_xephm_l_charclass % lam
+\newXeTeXintercharclass \c_xephm_r_charclass % right-joiner
+\newXeTeXintercharclass \c_xephm_a_charclass % alef
+\newXeTeXintercharclass \c_xephm_y_charclass % yeh
+
+\tl_set:Nn \l_xephm_use_color_tl
+ {
+ \bool_if:NTF \l_xephm_color_bool
+ {
+ \colorlet{default}{\l_xephm_color_tl}
+ }
+ {
+ \colorlet{default}{.}
+ }
+ \color{default}
+ }
+
+%% Partly adapted from the code provided by David Carlisle in:
+%% https://tex.stackexchange.com/questions/356709/how-to-know-the-width-and-fill-the-glue-space-between-two-characters-when-using/356721#356721
+\cs_new:Npn \xephm_kashida_glyph #1
+{
+ \bool_if:NT \l_xephm_kashida_fix_bool
+ {
+ \c_xephm_lrm_int\tex_penalty:D 10000
+ \mode_leave_vertical:
+ \tex_global:D \tex_advance:D \l_xephm_counter_int \c_one_int
+
+ \tl_set:Nx \l_xephm_pos_tl { p\tex_romannumeral:D \l_xephm_counter_int }
+ \tl_set:Nx \l_xephm_zref_tl { z\tex_romannumeral:D \l_xephm_counter_int }
+
+ \zsaveposx{x_i_\l_xephm_zref_tl}
+ \tl_set:Nx \l_tmpa_tl
+ {
+ \iow_now:cx { @auxout }
+ {
+ \token_to_str:N \gdef \exp_after:wN \token_to_str:N \cs:w xi\l_xephm_pos_tl \cs_end: { \zposx{ x_i_\l_xephm_zref_tl } }
+ }
+ }
+ \l_tmpa_tl
+ \skip_horizontal:n { #1 }
+ \zsaveposx{x_f_\l_xephm_zref_tl}
+ \tl_set:Nx \l_tmpa_tl
+ {
+ \iow_now:cx { @auxout }
+ {
+ \token_to_str:N \gdef \exp_after:wN \token_to_str:N \cs:w xf\l_xephm_pos_tl \cs_end: { \zposx{ x_f_\l_xephm_zref_tl } }
+ }
+ }
+ \l_tmpa_tl
+ \exp_after:wN
+ \if_meaning:w
+ \cs:w xi\l_xephm_pos_tl \cs_end: \tex_relax:D
+ \else:
+ \dim_set:Nn \l_xephm_diff_pos_dim
+ {
+ \dim_eval:n { \cs:w xi\l_xephm_pos_tl \cs_end: sp - \cs:w xf\l_xephm_pos_tl \cs_end: sp }
+ }
+ \dim_compare:nTF { \l_xephm_diff_pos_dim == 0sp }
+ { }
+ { \llap { \resizebox { \l_xephm_diff_pos_dim \tex_relax:D } { \height } { \l_xephm_use_color_tl \c_xephm_ksh_int } } }
+ \fi:
+ }
+}
+
+\cs_new:Npn \xephm_kashida_leaders #1
+{
+ \bool_if:NT \l_xephm_kashida_fix_bool
+ {
+ \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 }
+ \tl_set:Nx \l_xephm_font_init_tl { \l_xephm_font_name_tl }
+ \regex_replace_once:nnN { ^"\[?(HM)[\_\ ](X|F).* } { \1\2 } \l_xephm_font_init_tl\relax
+ \tl_set:Nn \l_tmpa_tl { HMF }
+ \tl_set:Nn \l_tmpb_tl { HMX }
+ \bool_if:nTF { \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpa_tl } || \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpb_tl } }
+ {
+ \hbox_set:Nn \l_xephm_ksh_box { \l_xephm_use_color_tl \XeTeXglyph\XeTeXglyphindex"kashida" }
+ \c_xephm_zwj_int \tex_penalty:D 10000
+ \tex_leaders:D \copy\l_xephm_ksh_box \skip_horizontal:n { #1 }
+ \c_xephm_zwj_int
+ }
+ {
+ \msg_error:nnx { xepersian-hm } { hm-series-font-not-found } { \l_xephm_font_name_tl }
+ }
+ }
+ {
+ %% Partly adapted from the code provided by Jonathan Kew in:
+ %% https://tug.org/pipermail/xetex/2009-February/012307.html.
+ %% Somebody notified me that the code in 'kashida-xepersian.def' from xepersian
+ %% package is an exact copy of Jonathan Kew's code. Being unaware of this, in
+ %% the earlier versions of this package I made a mistake and acknowledged
+ %% Vafa Khalighi instead of Jonathan Kew. A sincere thank you to Jonathan Kew
+ %% for his excellent code.
+ \c_xephm_lrm_int\c_xephm_zwj_int
+ {\l_xephm_use_color_tl\tex_penalty:D 10000
+ \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xephm_two_int
+ \int_use:N \XeTeXcharglyph \c_xephm_ksh_int depth \XeTeXglyphbounds \c_xephm_four_int
+ \int_use:N \XeTeXcharglyph \c_xephm_ksh_int \skip_horizontal:n { #1 }
+ }
+ \c_xephm_zwj_int
+ }
+ }
+}
+
+\XeTeXinterchartokenstate = 1
+
+\clist_set:Nn \l_xephm_a_clist { 0622,0623,0625,0627 } % ا، إ، أ، آ
+\clist_map_inline:Nn \l_xephm_a_clist
+ {
+ \XeTeXcharclass "#1 \c_xephm_a_charclass
+ }
+
+\clist_set:Nn \l_xephm_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_xephm_d_clist
+ {
+ \XeTeXcharclass "#1 \c_xephm_d_charclass
+ }
+
+\clist_set:Nn \l_xephm_l_clist { 0644 } % ل
+\clist_map_inline:Nn \l_xephm_l_clist
+ {
+ \XeTeXcharclass "#1 \c_xephm_l_charclass
+ }
+
+\clist_set:Nn \l_xephm_r_clist { 0624,0629,062F,0630,0631,0632,0648,0698 } % ؤ,ة,د,ذ,ر,ز,و,ژ
+\clist_map_inline:Nn \l_xephm_r_clist
+ {
+ \XeTeXcharclass "#1 \c_xephm_r_charclass
+ }
+
+\clist_set:Nn \l_xephm_y_clist { 0649,064A,06CC } % ی,ي,ى
+\clist_map_inline:Nn \l_xephm_y_clist
+ {
+ \XeTeXcharclass "#1 \c_xephm_y_charclass
+ }
+
+\tl_if_eq:NNTF \l_xephm_gap_filler_tl \l_xephm_stretch_glyph_tl {
+ \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
+ \bool_if:NTF \l_xephm_kashida_fix_bool
+ { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
+ { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
+ \bool_if:NTF \l_xephm_kashida_fix_bool
+ { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
+ { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ }
+ \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
+}
+{
+ \bool_if:nTF {
+ \tl_if_eq_p:NN \l_xephm_gap_filler_tl \l_xephm_stretch_leaders_glyph_tl ||
+ \tl_if_eq_p:NN \l_xephm_gap_filler_tl \l_xephm_stretch_leaders_hrule_tl
+ }
+ {
+ \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
+ \bool_if:NTF \l_xephm_kashida_fix_bool
+ { \xephm_kashida_leaders \l_xephm_skip_default_tl }
+ { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
+ \bool_if:NTF \l_xephm_kashida_fix_bool
+ { \xephm_kashida_leaders \l_xephm_skip_default_tl }
+ { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ }
+ \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+ \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
+ }
+ {
+ \msg_error:nnx { xepersian-hm } { error-value-not-available-for-kashida-option } { \l_xephm_gap_filler_tl }
+ }
+}
+
+ \endinput
+%%
+%%
+%% End of file `xepersian-hm-kashida.tex'.
Property changes on: trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm-kashida.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2020-09-05 21:42:16 UTC (rev 56271)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2020-09-05 21:53:42 UTC (rev 56272)
@@ -2201,6 +2201,7 @@
'xcomment', 'xcomment\.tex|' . $standardtex,
'xduthesis', '\.eps|' . $standardtex,
'xepersian', 'xepersian-mathsdigitspec\.tex|' . $standardtex,
+ 'xepersian-hm','xepersian-.*-kashida\.tex|' . $standardtex,
'xesearch', 't-.*|' . $standardtex,
'xetexfontinfo','\.tex',
'xetexko', '\.tab$|' . $standardtex,
More information about the tex-live-commits
mailing list.