diff options
author | Karl Berry <karl@freefriends.org> | 2016-12-02 22:57:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-12-02 22:57:37 +0000 |
commit | 457a8e33ef7c5bb33b3d68f9aec793f92916ca69 (patch) | |
tree | 376e2a2eafcb39a4f8d45268e147cbea0b1d63db /Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | |
parent | c863aff30c4781b9f67c22225b3322de7e3f25fa (diff) |
xecjk (2dec16)
git-svn-id: svn://tug.org/texlive/trunk@42624 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty index 0cd56e3f91f..e36f03c91eb 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty @@ -29,10 +29,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xeCJK.dtx f0c9d10 2016-11-20 23:00:07 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: xeCJK.dtx 4063a2e 2016-12-02 17:58:03 +0800 Qing Lee <sobenlee@gmail.com> $ {Typesetting CJK scripts with XeLaTeX} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{3.4.3}{\ExplFileDescription} + {\ExplFileDate}{3.4.4}{\ExplFileDescription} \msg_new:nnn { xeCJK } { Require-XeTeX } { The~xeCJK~package~requires~XeTeX~to~function.\\\\ @@ -1138,8 +1138,9 @@ { \__xeCJK_punct_kern:n { - \__xeCJK_use_punct_dim:nnn { offset } {#1} {#2} } } \cs_new_protected_nopar:Npn \__xeCJK_punct_kern:n #1 { - \dim_compare:nNnF {#1} = \c_zero_dim - { \tex_kern:D #1 \exp_stop_f: } + \dim_set:Nn \l__xeCJK_tmp_dim {#1} + \dim_compare:nNnF \l__xeCJK_tmp_dim = \c_zero_dim + { \tex_kern:D \l__xeCJK_tmp_dim } } \cs_new_protected_nopar:Npn \__xeCJK_punct_glue:NN #1#2 { @@ -2216,14 +2217,21 @@ { \__xeCJK_original_kerning_margin:NN {#1} {#2} } \dim_set:Nn \l__xeCJK_minimum_bound_dim { \__xeCJK_punct_min_bound:NN {#1} {#2} } + \__xeCJK_punct_if_long:NTF {#1} + { \bool_set_false:N \l__xeCJK_enabled_kerning_bool } + { + \__xeCJK_punct_if_long:NT {#2} + { \bool_set_false:N \l__xeCJK_enabled_kerning_bool } + } \dim_set:Nn \l__xeCJK_kerning_margin_dim { - \bool_if:nTF + \bool_if:NTF \l__xeCJK_enabled_global_setting_bool { - \l__xeCJK_enabled_global_setting_bool && - \tl_if_exist_p:c { g__xeCJK_punct/kern/#1/#2/tl } + \cs_if_exist_use:cTF { g__xeCJK_punct/kern/#1/#2/tl } + { \use_none:n } + { \use:n } } - { \use:c { g__xeCJK_punct/kern/#1/#2/tl } } + { \use:n } { \bool_if:NTF \l__xeCJK_enabled_kerning_bool { \__xeCJK_calc_kerning_margin:NN {#1} {#2} } |