diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-17 21:31:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-17 21:31:37 +0000 |
commit | f853b6bb8fe5ed8eea324afcd32ad325056fe1e2 (patch) | |
tree | 5f221778bf3d2bbde40542efe9057364caf7ef1e /Master/texmf-dist/tex/latex/pmhanguljamo | |
parent | cfb44a762a4dba129a434ba56b5d568bcb7ba65a (diff) |
pmhanguljamo (17mar20)
git-svn-id: svn://tug.org/texlive/trunk@54378 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pmhanguljamo')
-rw-r--r-- | Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty | 35 |
2 files changed, 28 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty index 61dc4285628..d269a626e47 100644 --- a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty +++ b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty @@ -2,6 +2,7 @@ % subroutine of pmhanguljamo.sty %. v0.3.2 (2020/02/05) %. v0.3.3 (2020/03/09) +%. v0.3.4 (2020/03/15) % \seq_new:N \l_textjm_seq diff --git a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty index aa2a2b704bd..0d0d8e01ffb 100644 --- a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty +++ b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty @@ -22,8 +22,8 @@ \RequirePackage{xparse} \ProvidesExplPackage {pmhanguljamo} - {2020/02/05} - {v0.3.2} + {2020/03/15} + {v0.3.4} {Poorman's Hangul Jamo Input Method} \RequirePackage{l3keys2e} @@ -178,8 +178,8 @@ \regex_replace_all:nnN { : } { :/ } \l_tmpa_tl \exp_args:Nno \regex_split:nnN { / } { \l_tmpa_tl } \l_tmpa_seq - - \seq_map_function:NN \l_tmpa_seq \build_syl:n + + \seq_indexed_map_function:NN \l_tmpa_seq \build_syl:nn } \tl_new:N \l_cho_tl @@ -220,17 +220,26 @@ } } -\cs_new:Npn \build_syl:n #1 +%%% if xetexko loaded, +\bool_new:N \g_xetexko_bool +\@ifpackageloaded{xetexko-space}{ + \bool_gset_true:N \g_xetexko_bool +}{ + \bool_gset_false:N \g_xetexko_bool +} + +\cs_new:Npn \build_syl:nn #1 #2 { \bool_set_false:N \l_jj_bool \tl_clear:N \l_cho_tl \tl_clear:N \l_jun_tl \tl_clear:N \l_jon_tl - \build_syl_fn:n #1 \q_recursion_tail \q_recursion_stop + \int_set:Nn \l_tmpa_int { #1 } + \build_syl_fn:n #2 \q_recursion_tail \q_recursion_stop } \cs_new:Npn \build_syl_fn:n #1 -{ +{ \quark_if_recursion_tail_stop_do:nn { #1 } { \exp_args:Nnx \regex_match:nnTF { [A-Z] } { \l_cho_tl } @@ -246,10 +255,20 @@ \tl_set:Nx \l_tmpb_tl { \tl_tail:N \l_jon_tl } \tl_reverse:N \l_tmpb_tl + %%% force allowbreak'ing hangul syllables when xetexko loaded + %%% luatexko or polyglossia is of no problem. + \bool_if:NT \g_xetexko_bool { + \exp_args:Nnx \regex_match:nnT { [a-z] } { \l_cho_tl } + { + \int_compare:nF { \l_tmpa_int == 1 } + { \allowbreak } + } + } + %%% print out the syllable composed \exp_args:NNx \prop_item:Nn \c_cho_prop { \l_cho_tl } \exp_args:NNx \prop_item:Nn \c_jung_prop { \l_jun_tl } \exp_args:NNx \prop_item:Nn \c_jong_prop { \l_tmpb_tl } - \exp_args:NNx \prop_item:Nn \c_jong_prop { \l_tmpa_tl } + \exp_args:NNx \prop_item:Nn \c_jong_prop { \l_tmpa_tl } %% tone mark } } |