diff options
author | Karl Berry <karl@freefriends.org> | 2022-09-07 20:43:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-09-07 20:43:54 +0000 |
commit | e6547c448209da923714d50573aac88039b2b4f7 (patch) | |
tree | 12c6c119324df718f045e6afe93dab347d65b804 /Master/texmf-dist/tex/latex/pmhanguljamo | |
parent | e624357f0142cb3099993e07e3170e176b56789f (diff) |
pmhanguljamo (7sep22)
git-svn-id: svn://tug.org/texlive/trunk@64313 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 | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty | 64 |
2 files changed, 60 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty index 40df178d30f..1f96ecd4173 100644 --- a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty +++ b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo-rrk.sty @@ -5,6 +5,7 @@ % v0.3.4 (2020/03/15) % v0.4 (2021/11/28) % v0.5 (2022/09/02) +% v0.5.1 (2022/09/06) % \seq_new:N \l_textjm_seq @@ -64,7 +65,7 @@ { \group_begin: \bool_if:NT \opt_usepmfont_bool - { \pm_hangulfontspec[Script=Hangul,Renderer=OpenType] {\opt_pmfont_tl } } + { \pm_hangulfontspec [\opt_pmfontfeature_tl] {\opt_pmfont_tl } } \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 } \seq_map_indexed_inline:Nn \l_tmpa_seq diff --git a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty index 59853b9dd07..c282b3c6ad1 100644 --- a/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty +++ b/Master/texmf-dist/tex/latex/pmhanguljamo/pmhanguljamo.sty @@ -22,14 +22,15 @@ \RequirePackage{xparse} \ProvidesExplPackage {pmhanguljamo} - {2022/09/02} - {v0.5} + {2022/09/06} + {v0.5.1} {Poorman's Hangul Jamo Input Method} \RequirePackage{l3keys2e} \bool_new:N \opt_usepmfont_bool \tl_new:N \opt_pmfont_tl +\tl_new:N \opt_pmfontfeature_tl \keys_define:nn { pmhanguljamo } { @@ -38,7 +39,8 @@ pmfont .code:n = { \bool_gset_true:N \opt_usepmfont_bool \tl_gset:Nn \opt_pmfont_tl { #1 } - } + }, + pmfontfeature .tl_set:N = \opt_pmfontfeature_tl } \ProcessKeysOptions { pmhanguljamo } @@ -179,9 +181,29 @@ \bool_gset_true:N \opt_usepmfont_bool } -\NewDocumentCommand \setpmhangulfont { m } +\NewDocumentCommand \unusepmfont { } { - \tl_gset:Nn \opt_pmfont_tl { #1 } + \bool_gset_false:N \opt_usepmfont_bool +} + +\NewDocumentCommand \setpmhangulfont { o m o } +{ + \tl_gset:Nn \opt_pmfont_tl { #2 } + \IfValueTF { #3 } { \tl_gset:Nn \opt_pmfontfeature_tl { #3, Script=Hangul, Renderer=OpenType } } + { + \IfValueTF { #1 } { \tl_gset:Nn \opt_pmfontfeature_tl { #1, Script=Hangul, Renderer=OpenType } } + { \tl_gset:Nn \opt_pmfontfeature_tl { Script=Hangul, Renderer=OpenType } } + } +} + +\AtBeginDocument{ + \tl_if_empty:NTF \opt_pmfontfeature_tl + { + \tl_gset:Nn \opt_pmfontfeature_tl { Script=Hangul, Renderer=OpenType } + } + { + \tl_gput_right:Nn \opt_pmfontfeature_tl { , Script=Hangul, Renderer=OpenType } + } } %%%% if RRK is given, then input pmhanguljamo-rrk.sty @@ -270,7 +292,12 @@ \seq_map_indexed_inline:Nn \l_inputword_seq { \bool_if:NTF \opt_usepmfont_bool - { {\pm_hangulfontspec[Script=Hangul,Renderer=OpenType]{\opt_pmfont_tl} \jamotextcmd{ ##2 } } } + { + { + \pm_hangulfontspec [\opt_pmfontfeature_tl] {\opt_pmfont_tl} + \jamotextcmd{ ##2 } + } + } { \jamotextcmd { ##2 } } \int_compare:nT { ##1 < \seq_count:N \l_inputword_seq } { \space } @@ -374,6 +401,7 @@ \NewDocumentCommand \ColonMark {} { : } \NewDocumentCommand \SemiColonMark {} { ; } \NewDocumentCommand \SlashMark {} { / } +\NewDocumentCommand \CntrdotMark {} { ยท } %%%%%%%%% DICTIONARIES \prop_const_from_keyval:Nn \c_cho_prop @@ -794,5 +822,29 @@ | = {} } +%%%% underline +\NewDocumentCommand \jamoul { m m } +{ + \tl_set:Nn \l_pmulcmdnm_tl { #1 } + \seq_set_split:Nnn \l_pmlli_seq { ~ } { #2 } + \seq_map_indexed_function:NN \l_pmlli_seq \_tr_ulfn:nn +} + +\cs_new:Npn \_tr_ulfn:nn #1 #2 +{ + \tl_set:Nn \l_tmpz_tl { #2 } + \regex_replace_all:nnN { \: } { \:\/ } \l_tmpz_tl + \regex_replace_all:nnN { \; } { \;\/ } \l_tmpz_tl + \seq_set_split:NnV \l_pmnni_seq { / } \l_tmpz_tl + \seq_map_inline:Nn \l_pmnni_seq + { + \exp_args:No \use:c { \l_pmulcmdnm_tl } { \jamoword { ##1 } } + } + \int_compare:nT { #1 < \seq_count:N \l_pmlli_seq } + { + \exp_args:No \use:c { \l_pmulcmdnm_tl } {\space} + } +} + \endinput |