From 63891237806957ce0706ffac4e1425a4a73de187 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 27 Aug 2016 22:16:30 +0000 Subject: xecjk (27aug16) git-svn-id: svn://tug.org/texlive/trunk@41941 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/xelatex/xecjk/xeCJK-listings.sty | 4 +- Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg | 4 +- Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | 80 ++++++--- Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty | 186 +++++++++++++-------- .../tex/xelatex/xecjk/xunicode-addon.sty | 4 +- .../tex/xelatex/xecjk/xunicode-extra.def | 4 +- 6 files changed, 175 insertions(+), 107 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty index 8e449676869..51ce6106f1b 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty @@ -29,10 +29,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xeCJK.dtx 463fb57 2016-05-14 12:24:41 +0800 Qing Lee $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee $ {xeCJK patch file for listings} \ProvidesExplPackage{xeCJK-listings} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} \DeclareOption* { \PassOptionsToPackage { \CurrentOption } { xeCJK } } \ProcessOptions \scan_stop: \RequirePackage { xeCJK } diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg index b0d70da52e9..e0dc0a8b813 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg @@ -6,10 +6,10 @@ %% %% xeCJK.dtx (with options: `config') %% -\GetIdInfo$Id: xeCJK.dtx 463fb57 2016-05-14 12:24:41 +0800 Qing Lee $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee $ {Configuration file for xeCJK package} \ProvidesExplFile{\ExplFileName.cfg} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} %% %% diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty index ba88db7d131..5e030296495 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 463fb57 2016-05-14 12:24:41 +0800 Qing Lee $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee $ {Typesetting CJK scripts with XeLaTeX} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} \msg_new:nnn { xeCJK } { Require-XeTeX } { The~xeCJK~package~requires~XeTeX~to~function.\\\\ @@ -462,7 +462,7 @@ \clist_const:Nn \c__xeCJK_iteration_marks_chars_clist { "3005 , "303B , "309D , "309E , "30FD , "30FE } \clist_const:Nn \c__xeCJK_NS_chars_clist - { "30FB , "FE54 , "FE55 , "FF1A , "FF1B , "FF65 } + { "30FB , "FE54 , "FE55 , "FF1A , "FF1B , "FF65 , "16FE0 } \clist_const:Nn \c__xeCJK_EX_chars_clist { "FE15 , "FE16 , "FE56 , "FE57 , "FF01 , "FF1F } \clist_const:Nn \c__xeCJK_IS_chars_clist { "FE10 , "FE13 , "FE14 } @@ -510,6 +510,9 @@ "FE10 -> "FE1F , "FE30 -> "FE4F , "FF00 -> "FFEF , + "16FE0 -> "16FFF , + "17000 -> "187FF , + "18800 -> "18AFF , "1B000 -> "1B0FF , "1F200 -> "1F2FF , "20000 -> "2A6DF , @@ -975,14 +978,20 @@ CJKspace / true .code:n = { \bool_set_true:N \l__xeCJK_reserve_space_bool - \cs_set_eq:NN \__xeCJK_maybe_reserve_space: \__xeCJK_reserve_space: + \cs_set_eq:NN \__xeCJK_ignore_space_end: + \__xeCJK_maybe_reserve_space: + \cs_set_eq:NN \__xeCJK_boundary_group_end_space: + \__xeCJK_boundary_maybe_reserve_space: \cs_set_protected_nopar:Npn \__xeCJK_ccglue_or_space: { \xeCJK_space_glue: } } , CJKspace / false .code:n = { \bool_set_false:N \l__xeCJK_reserve_space_bool - \xeCJK_cs_clear:N \__xeCJK_maybe_reserve_space: + \cs_set_eq:NN \__xeCJK_ignore_space_end: + \group_align_safe_end: + \cs_set_eq:NN \__xeCJK_boundary_group_end_space: + \__xeCJK_boundary_group_end_aux: \cs_set_protected_nopar:Npn \__xeCJK_ccglue_or_space: { \CJKglue } } , @@ -1001,41 +1010,46 @@ { \xeCJK_class_group_end: \CJKecglue } } { + \group_align_safe_begin: \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool { - \group_align_safe_begin: \token_if_macro:NTF \l_peek_token - { - \group_align_safe_end: - \xeCJK_class_group_end: - { \xeCJK_make_node:n { CJK-space } } - \xeCJK_space_or_xecglue: - } - { - \group_align_safe_end: - \xeCJK_class_group_end: - { \xeCJK_make_node:n { CJK-space } } - \__xeCJK_maybe_reserve_space: - } + { \__xeCJK_boundary_reserve_space: } + { \__xeCJK_boundary_group_end_space: } } { \token_if_eq_meaning:NNTF \l_peek_token \scan_stop: { \__xeCJK_CJK_and_Boundary_relax:N } - { \__xeCJK_CJK_and_Boundary_aux: } + { \__xeCJK_boundary_group_end:n { CJK } } } } } -\cs_new_protected_nopar:Npn \__xeCJK_CJK_and_Boundary_aux: - { \xeCJK_class_group_end: { \xeCJK_make_node:n { CJK } } } +\cs_new_protected_nopar:Npn \__xeCJK_boundary_reserve_space: + { + \__xeCJK_boundary_group_end_aux: + \xeCJK_space_or_xecglue: + } +\cs_new_protected_nopar:Npn \__xeCJK_boundary_maybe_reserve_space: + { + \token_if_letter:NTF \l_peek_token + { \__xeCJK_boundary_reserve_space: } + { \__xeCJK_boundary_group_end_aux: } + } +\cs_new_protected_nopar:Npn \__xeCJK_boundary_group_end_aux: + { \__xeCJK_boundary_group_end:n { CJK-space } } +\cs_new_eq:NN \__xeCJK_boundary_group_end_space: \__xeCJK_boundary_group_end_aux: \cs_new_protected:Npn \__xeCJK_CJK_and_Boundary_relax:N #1 { - \__xeCJK_CJK_and_Boundary_aux: + \__xeCJK_boundary_group_end:n { CJK } \token_if_eq_meaning:NNTF #1 \scan_stop: {#1} { \cs_set_eq:NN #1 \scan_stop: #1 } } -\cs_new_protected:Npn \__xeCJK_reserve_space: - { \token_if_letter:NT \l_peek_token { \xeCJK_space_or_xecglue: } } -\cs_new_eq:NN \__xeCJK_maybe_reserve_space: \prg_do_nothing: +\cs_new_protected_nopar:Npn \__xeCJK_boundary_group_end:n #1 + { + \group_align_safe_end: + \xeCJK_class_group_end: + { \xeCJK_make_node:n {#1} } + } \cs_new_protected_nopar:Npn \xeCJK_ignore_spaces:w { \xeCJK_peek_catcode_ignore_spaces:NTF \c_math_toggle_token @@ -1050,11 +1064,23 @@ { \xeCJK_remove_node: { \xeCJK_make_node:n { CJK-space } } } \group_align_safe_begin: \token_if_macro:NTF \l_peek_token - { \group_align_safe_end: \xeCJK_space_or_xecglue: } - { \group_align_safe_end: \__xeCJK_maybe_reserve_space: } + { \__xeCJK_reserve_space_aux: } + { \__xeCJK_ignore_space_end: } } } } +\cs_new_protected:Npn \__xeCJK_reserve_space_aux: + { + \group_align_safe_end: + \xeCJK_space_or_xecglue: + } +\cs_new_protected:Npn \__xeCJK_maybe_reserve_space: + { + \token_if_letter:NTF \l_peek_token + { \__xeCJK_reserve_space_aux: } + { \group_align_safe_end: } + } +\cs_new_eq:NN \__xeCJK_ignore_space_end: \group_align_safe_end: \xeCJK_inter_class_toks:nnn { CJK } { CJK } { \xeCJK_CJK_and_CJK:N } \cs_new_protected_nopar:Npn \xeCJK_CJK_and_CJK:N #1 { \CJKglue \CJKsymbol {#1} } \xeCJK_inter_class_toks:nnn { FullLeft } { CJK } diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty index ebcfc0357f0..8ab073d4e4c 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty @@ -29,10 +29,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xeCJK.dtx 463fb57 2016-05-14 12:24:41 +0800 Qing Lee $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee $ {xeCJK font effect} \ProvidesExplPackage{xeCJKfntef} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} \PassOptionsToPackage { normalem } { ulem } \DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } } \ProcessOptions \scan_stop: @@ -44,54 +44,60 @@ \addto@hook \UL@hook { \xeCJK_hook_for_ulem: } \cs_new_protected_nopar:Npn \xeCJK_hook_for_ulem: { + \xeCJK_ulem_detect_node: + \l__xeCJK_ulem_text_format_tl \bool_if:NF \l__xeCJK_ulem_hook_used_bool { \bool_set_true:N \l__xeCJK_ulem_hook_used_bool - \__xeCJK_ulem_initial: - \bool_if:NT \l__xeCJK_ulem_subtract_bool - { - \xeCJK_swap_cs:NN \UL@leaders \xeCJK_ulem_leaders: - \cs_set_eq:NN \__xeCJK_ulem_var_leaders: \xeCJK_ulem_var_leaders: - \cs_set_eq:NN \xeCJK_ulem_right_skip: \__xeCJK_ulem_right_skip: - } - \bool_if:NT \l__xeCJK_ulem_hidden_bool - { \cs_set_eq:NN \UL@putbox \__xeCJK_ulem_hidden_box: } - \bool_if:NTF \l__xeCJK_ulem_skip_bool - { - \cs_set_eq:NN \__xeCJK_ulem_putbox: \UL@putbox - \cs_set_eq:NN \__xeCJK_ulem_hskip_aux:n \xeCJK_ulem_hskip:n - } - { - \xeCJK_swap_cs:NN \__xeCJK_punct_kern:n \__xeCJK_ulem_punct_kern:n - \xeCJK_swap_cs:NN \__xeCJK_punct_hskip:n \__xeCJK_ulem_punct_hskip:n - \xeCJK_cs_clear:N \__xeCJK_ulem_skip_punct_begin: - \xeCJK_cs_clear:N \__xeCJK_ulem_skip_punct_end: - } - \xeCJK_glue_to_skip:nN - { - \cs_set_eq:NN \ \tex_space:D - \cs_set_eq:NN \penalty \tex_penalty:D - \cs_set_eq:NN \hskip \skip_horizontal:N - \CJKglue - } \l__xeCJK_ccglue_skip - \xeCJK_glue_to_skip:nN - { - \cs_set_eq:NN \ \tex_space:D - \cs_set_eq:NN \penalty \tex_penalty:D - \cs_set_eq:NN \hskip \skip_horizontal:N - \CJKecglue - } \l__xeCJK_ecglue_skip - \xeCJK_glue_to_skip:nN { \xeCJK_space_glue: } \l__xeCJK_space_skip - \cs_set_protected_nopar:Npn \CJKglue - { \__xeCJK_ulem_glue:n \l__xeCJK_ccglue_skip } - \cs_set_protected_nopar:Npn \CJKecglue - { \__xeCJK_ulem_glue:n \l__xeCJK_ecglue_skip } - \cs_set_protected_nopar:Npn \xeCJK_space_glue: - { \__xeCJK_ulem_glue:n \l__xeCJK_space_skip } - \keys_set:nn { xeCJK / options } - { CheckFullRight = false , xCJKecglue = false } - \xeCJK_ulem_detect_node: + \__xeCJK_ulem_hook: + } + \xeCJK_ulem_begin_node: + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_hook: + { + \__xeCJK_ulem_initial: + \bool_if:NT \l__xeCJK_ulem_subtract_bool + { + \xeCJK_swap_cs:NN \UL@leaders \xeCJK_ulem_leaders: + \cs_set_eq:NN \__xeCJK_ulem_var_leaders: \xeCJK_ulem_var_leaders: + \cs_set_eq:NN \xeCJK_ulem_right_skip: \__xeCJK_ulem_right_skip: + } + \bool_if:NT \l__xeCJK_ulem_hidden_bool + { \cs_set_eq:NN \UL@putbox \__xeCJK_ulem_hidden_box: } + \bool_if:NTF \l__xeCJK_ulem_skip_bool + { + \cs_set_eq:NN \__xeCJK_ulem_putbox: \UL@putbox + \cs_set_eq:NN \__xeCJK_ulem_hskip_aux:n \xeCJK_ulem_hskip:n } + { + \xeCJK_swap_cs:NN \__xeCJK_punct_kern:n \__xeCJK_ulem_punct_kern:n + \xeCJK_swap_cs:NN \__xeCJK_punct_hskip:n \__xeCJK_ulem_punct_hskip:n + \xeCJK_cs_clear:N \__xeCJK_ulem_skip_punct_begin: + \xeCJK_cs_clear:N \__xeCJK_ulem_skip_punct_end: + } + \xeCJK_glue_to_skip:nN + { + \cs_set_eq:NN \ \tex_space:D + \cs_set_eq:NN \penalty \tex_penalty:D + \cs_set_eq:NN \hskip \skip_horizontal:N + \CJKglue + } \l__xeCJK_ccglue_skip + \xeCJK_glue_to_skip:nN + { + \cs_set_eq:NN \ \tex_space:D + \cs_set_eq:NN \penalty \tex_penalty:D + \cs_set_eq:NN \hskip \skip_horizontal:N + \CJKecglue + } \l__xeCJK_ecglue_skip + \xeCJK_glue_to_skip:nN { \xeCJK_space_glue: } \l__xeCJK_space_skip + \cs_set_protected_nopar:Npn \CJKglue + { \__xeCJK_ulem_glue:n \l__xeCJK_ccglue_skip } + \cs_set_protected_nopar:Npn \CJKecglue + { \__xeCJK_ulem_glue:n \l__xeCJK_ecglue_skip } + \cs_set_protected_nopar:Npn \xeCJK_space_glue: + { \__xeCJK_ulem_glue:n \l__xeCJK_space_skip } + \keys_set:nn { xeCJK / options } + { CheckFullRight = false , xCJKecglue = false } } \skip_new:N \l__xeCJK_space_skip \bool_new:N \l__xeCJK_ulem_hook_used_bool @@ -110,9 +116,9 @@ \hbox_set_end: \tex_unskip:D \tex_unskip:D \tex_unskip:D \xeCJK_ulem_right_skip: - \xeCJK_ulem_right_node: - \int_set:Nn \tex_spacefactor:D { \UL@spfactor } - \c_group_end_token + \xeCJK_ulem_group_end: + \xeCJK_ulem_right_node: + \int_set:Nn \tex_spacefactor:D { \UL@spfactor } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_loop:nw { @@ -138,6 +144,7 @@ \dim_compare:nNnTF \tex_lastkern:D = \c_zero_dim { \xeCJK_cs_clear:N \xeCJK_ulem_left_node: + \xeCJK_cs_clear:N \xeCJK_ulem_begin_node: \cs_set_eq:NN \__xeCJK_ulem_hskip:n \xeCJK_ulem_hskip:n } { @@ -146,25 +153,28 @@ \dim_compare:nNnTF \tex_lastkern:D = { - \l__xeCJK_tmp_dim } { \tex_unkern:D - { \xeCJK_make_node:n { ulem-left } } \cs_set_protected_nopar:Npx \xeCJK_ulem_left_node: { \tex_kern:D - \dim_use:N \l__xeCJK_tmp_dim \exp_stop_f: \tex_kern:D \dim_use:N \l__xeCJK_tmp_dim \exp_stop_f: } + \cs_set_protected_nopar:Npn \xeCJK_ulem_begin_node: + { { \xeCJK_make_node:n { ulem-begin } } } \cs_set_eq:NN \__xeCJK_ulem_hskip:n \__xeCJK_ulem_hskip_first:n } { \tex_kern:D \l__xeCJK_tmp_dim \xeCJK_cs_clear:N \xeCJK_ulem_left_node: + \xeCJK_cs_clear:N \xeCJK_ulem_begin_node: \cs_set_eq:NN \__xeCJK_ulem_hskip:n \xeCJK_ulem_hskip:n } } } -\xeCJK_declare_node:n { ulem-left } +\xeCJK_declare_node:n { ulem-begin } +\cs_new_eq:NN \xeCJK_ulem_begin_node: \prg_do_nothing: \cs_new_protected_nopar:Npn \__xeCJK_ulem_hskip_first:n #1 { - \xeCJK_if_last_node:nTF { ulem-left } + \xeCJK_if_last_node:nTF { ulem-begin } { \xeCJK_remove_node: \skip_horizontal:n {#1} @@ -349,7 +359,11 @@ \xeCJK_if_ulem_patch:TF { \xeCJK_peek_catcode_ignore_spaces:NTF \c_math_toggle_token - { } + { + \xeCJK_class_group_end: \UL@stop + \CJKecglue + \UL@start + } { \bool_if:NTF \l__xeCJK_peek_ignore_spaces_bool { @@ -580,17 +594,27 @@ } \cs_new_protected_nopar:Npn \__xeCJK_ulem_ccglue: { { \skip_set_eq:NN \UL@skip \l__xeCJK_ccglue_skip \UL@leaders } } +\cs_new_protected_nopar:Npn \xeCJK_ulem_group_begin: + { + \xeCJK_leave_vmode: + \c_group_begin_token + } +\cs_new_protected_nopar:Npn \xeCJK_ulem_group_end: + { \c_group_end_token } +\cs_new_protected_nopar:Npn \xeCJK_ulem_on:n + { \ULon } +\cs_new_eq:NN \__xeCJK_ulem_on:n \UL@on +\cs_set_protected:Npn \UL@on #1 + { \__xeCJK_ulem_on:n { \xeCJK_ulem_left: #1 \xeCJK_ulem_right: } } \NewDocumentCommand \xeCJKfntefon { s t- s o } { + \xeCJK_leave_vmode: \xeCJK_ulem_boot:NNNn #1#2#3 {#4} - \ULon + \xeCJK_ulem_on:n } -\cs_new_eq:NN \xeCJK_ulem_on:n \UL@on -\cs_set_protected:Npn \UL@on #1 - { \xeCJK_ulem_on:n { \xeCJK_ulem_left: #1 \xeCJK_ulem_right: } } \DeclareDocumentCommand \CJKunderline { s t- s o } { - \c_group_begin_token + \xeCJK_ulem_group_begin: \xeCJK_fntef_boot:nnNNNn { underline } { uline } #1#2#3 {#4} \xeCJK_fntef_initial:nnn { \l__xeCJK_uline_depth_tl } @@ -602,23 +626,23 @@ depth \c_zero_dim width .2em } - \ULon + \xeCJK_ulem_on:n } \DeclareDocumentCommand \varCJKunderline { } { \CJKunderline - } \DeclareDocumentCommand \CJKunderwave { s t- s o } { - \c_group_begin_token + \xeCJK_ulem_group_begin: \xeCJK_fntef_boot:nnNNNn { underwave } { uwave } #1#2#3 {#4} \xeCJK_fntef_initial:nnn { \l__xeCJK_uwave_depth_tl } { \l__xeCJK_uwave_sep_tl } { \l__xeCJK_uwave_format_tl \l__xeCJK_uwave_symbol_tl } - \ULon + \xeCJK_ulem_on:n } \DeclareDocumentCommand \CJKunderdblline { s t- s o } { - \c_group_begin_token + \xeCJK_ulem_group_begin: \xeCJK_fntef_boot:nnNNNn { underdblline } { udbline } #1#2#3 {#4} \xeCJK_fntef_initial:nnn { \l__xeCJK_udbline_depth_tl } @@ -638,11 +662,11 @@ width .2em } } - \ULon + \xeCJK_ulem_on:n } \DeclareDocumentCommand \CJKsout { s t- s o } { - \c_group_begin_token + \xeCJK_ulem_group_begin: \xeCJK_fntef_boot:nnNNNn { sout } { sout } #1#2#3 {#4} \xeCJK_fntef_initial:nn { @@ -657,11 +681,11 @@ { \l__xeCJK_sout_height_tl - \box_ht:N \l__xeCJK_fntef_box / 2 } { \box_use:N \l__xeCJK_fntef_box } } - \ULon + \xeCJK_ulem_on:n } \DeclareDocumentCommand \CJKxout { s t- s o } { - \c_group_begin_token + \xeCJK_ulem_group_begin: \xeCJK_fntef_boot:nnNNNn { xout } { xout } #1#2#3 {#4} \xeCJK_fntef_initial:nn { @@ -674,11 +698,11 @@ { \box_dp:N \l__xeCJK_fntef_box / 2 } { \box_use:N \l__xeCJK_fntef_box } } - \ULon + \xeCJK_ulem_on:n } \DeclareDocumentCommand \CJKunderanyline { s t- s o m m } { - \c_group_begin_token + \xeCJK_ulem_group_begin: \xeCJK_ulem_boot:NNNn #1#2#3 {#4} \xeCJK_fntef_initial:nn {#6} @@ -695,7 +719,7 @@ \dim_set:Nn \l__xeCJK_fntef_dim { \l__xeCJK_ulem_sep_tl + \box_dp:N \ULC@box } } - \ULon + \xeCJK_ulem_on:n } \cs_new_protected:Npn \xeCJK_fntef_boot:nnNNNn #1#2#3#4#5#6 { @@ -708,6 +732,7 @@ \bool_set_eq:Nc \l__xeCJK_ulem_skip_bool { l__xeCJK_#2_skip_bool } \bool_set_eq:Nc \l__xeCJK_ulem_hidden_bool { l__xeCJK_#2_hidden_bool } \bool_set_eq:Nc \l__xeCJK_ulem_subtract_bool { l__xeCJK_#2_subtract_bool } + \tl_set_eq:Nc \l__xeCJK_ulem_text_format_tl { l__xeCJK_#2_text_format_tl } } \cs_new_protected:Npn \xeCJK_ulem_boot:NNNn #1#2#3#4 { @@ -720,7 +745,6 @@ } \cs_new_protected_nopar:Npn \xeCJK_fntef_initial:n { - \xeCJK_leave_vmode: \bool_if:NTF \l__xeCJK_nest_bool { \__xeCJK_warning:n { fntef-nesting } } { @@ -781,9 +805,11 @@ underdot / depth .tl_set:N = \l__xeCJK_udot_depth_tl , underdot / sep .tl_set:N = \l__xeCJK_udot_sep_tl , underdot / format .tl_set:N = \l__xeCJK_udot_format_tl , + underdot / textformat .tl_set:N = \l__xeCJK_udot_text_format_tl , underdot / boxdepth .tl_set:N = \l__xeCJK_udot_boxdepth_tl , symbol / sep .tl_set:N = \l__xeCJK_symbol_sep_tl , symbol / boxdepth .tl_set:N = \l__xeCJK_symbol_boxdepth_tl , + symbol / textformat .tl_set:N = \l__xeCJK_symbol_text_format_tl , underline / skip .bool_set:N = \l__xeCJK_uline_skip_bool , underline / hidden .bool_set:N = \l__xeCJK_uline_hidden_bool , underline / subtract .bool_set:N = \l__xeCJK_uline_subtract_bool , @@ -791,6 +817,7 @@ underline / depth .tl_set:N = \l__xeCJK_uline_depth_tl , underline / sep .tl_set:N = \l__xeCJK_uline_sep_tl , underline / format .tl_set:N = \l__xeCJK_uline_format_tl , + underline / textformat .tl_set:N = \l__xeCJK_uline_text_format_tl , underdblline / skip .bool_set:N = \l__xeCJK_udbline_skip_bool , underdblline / hidden .bool_set:N = \l__xeCJK_udbline_hidden_bool , underdblline / subtract .bool_set:N = \l__xeCJK_udbline_subtract_bool , @@ -798,6 +825,7 @@ underdblline / depth .tl_set:N = \l__xeCJK_udbline_depth_tl , underdblline / sep .tl_set:N = \l__xeCJK_udbline_sep_tl , underdblline / format .tl_set:N = \l__xeCJK_udbline_format_tl , + underdblline / textformat .tl_set:N = \l__xeCJK_udbline_text_format_tl , underdblline / gap .tl_set:N = \l__xeCJK_udbline_gap_tl , underwave / skip .bool_set:N = \l__xeCJK_uwave_skip_bool , underwave / hidden .bool_set:N = \l__xeCJK_uwave_hidden_bool , @@ -806,24 +834,28 @@ underwave / depth .tl_set:N = \l__xeCJK_uwave_depth_tl , underwave / sep .tl_set:N = \l__xeCJK_uwave_sep_tl , underwave / format .tl_set:N = \l__xeCJK_uwave_format_tl , + underwave / textformat .tl_set:N = \l__xeCJK_uwave_text_format_tl , sout / skip .bool_set:N = \l__xeCJK_sout_skip_bool , sout / hidden .bool_set:N = \l__xeCJK_sout_hidden_bool , sout / subtract .bool_set:N = \l__xeCJK_sout_subtract_bool , sout / thickness .tl_set:N = \l__xeCJK_sout_thickness_tl , sout / height .tl_set:N = \l__xeCJK_sout_height_tl , sout / format .tl_set:N = \l__xeCJK_sout_format_tl , + sout / textformat .tl_set:N = \l__xeCJK_sout_text_format_tl , xout / skip .bool_set:N = \l__xeCJK_xout_skip_bool , xout / hidden .bool_set:N = \l__xeCJK_xout_hidden_bool , xout / subtract .bool_set:N = \l__xeCJK_xout_subtract_bool , xout / format .tl_set:N = \l__xeCJK_xout_format_tl , + xout / textformat .tl_set:N = \l__xeCJK_xout_text_format_tl , ulem / skip .bool_set:N = \l__xeCJK_ulem_skip_bool , ulem / hidden .bool_set:N = \l__xeCJK_ulem_hidden_bool , ulem / subtract .bool_set:N = \l__xeCJK_ulem_subtract_bool , ulem / sep .tl_set:N = \l__xeCJK_ulem_sep_tl , - ulem / boxdepth .tl_set:N = \l__xeCJK_ulem_boxdepth_tl + ulem / boxdepth .tl_set:N = \l__xeCJK_ulem_boxdepth_tl , + ulem / textformat .tl_set:N = \l__xeCJK_ulem_text_format_tl } \clist_map_inline:nn - { underdot , underline , underdblline , underwave , sout , xout } + { underdot , underline , underdblline , underwave , sout , xout , ulem } { \keys_define:nn { xeCJK / options } { #1 .meta:nn = { xeCJK / options / #1 } { ##1 } } @@ -889,6 +921,7 @@ \xeCJK_ulem_right: \UL@stop \group_begin: \xeCJK_under_symbol_initial:nnnnn {#1} {#2} {#3} {#4} {#5} + \use:c { l__xeCJK_#2_text_format_tl } \UL@start \xeCJK_ulem_right_node: #6 \xeCJK_ulem_right: \UL@stop @@ -900,8 +933,11 @@ \xeCJK_leave_vmode: \group_begin: \xeCJK_under_symbol_initial:nnnnn {#1} {#2} {#3} {#4} {#5} + \__xeCJK_under_symbol_text_format:c { l__xeCJK_#2_text_format_tl } #6 + \xeCJK_ulem_right: \group_end: + \xeCJK_ulem_right_node: } \cs_new_protected:Npn \xeCJK_under_symbol_initial:nnnnn #1#2#3#4#5 { @@ -924,6 +960,12 @@ \xeCJK_swap_cs:NN \CJKsymbol \__xeCJK_under_CJKsymbol:N \__xeCJK_restore_shipout_CJKsymbol: } +\cs_new_protected:Npn \__xeCJK_under_symbol_text_format:N #1 + { + \tl_if_empty:NF #1 + { \xeCJK_ulem_right: #1 \xeCJK_ulem_right_node: } + } +\cs_generate_variant:Nn \__xeCJK_under_symbol_text_format:N { c } \box_new:N \l__xeCJK_under_symbol_box \cs_new_protected:Npn \xeCJK_make_under_symbol:n #1 { diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty index 0c979a61813..039692ba3f2 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty @@ -29,10 +29,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xeCJK.dtx 463fb57 2016-05-14 12:24:41 +0800 Qing Lee $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee $ {addon file for xunicode} \ProvidesExplPackage{xunicode-addon} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} \bool_if:nF { \sys_if_engine_xetex_p: || diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def index 1937f559f6f..8827e785755 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def +++ b/Master/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def @@ -27,10 +27,10 @@ %% %% ---------------------------------------------------------------------- %% -\GetIdInfo$Id: xeCJK.dtx 463fb57 2016-05-14 12:24:41 +0800 Qing Lee $ +\GetIdInfo$Id: xeCJK.dtx 10a8836 2016-08-27 11:02:24 +0800 Qing Lee $ {extra definition for xunicode} \ProvidesExplFile{xunicode-extra.def} - {\ExplFileDate}{3.4.0}{\ExplFileDescription} + {\ExplFileDate}{3.4.1}{\ExplFileDescription} \DeclareUTFComposite\textsuperscript \DeclareUTFComposite\textsubscript \DeclareUTFEncodedAccent\textsbleftarrow{"20EE}{"20FF} -- cgit v1.2.3