diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty | 148 |
1 files changed, 69 insertions, 79 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty index 45152b5c2b4..9b122f2b5f0 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty @@ -21,7 +21,7 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -%% This work has the LPPL maintenance status `maintained'. +%% This work has the LPPL maintenance status "maintained". %% %% The Current Maintainers of this work are Leo Liu and Qing Lee. %% @@ -29,17 +29,17 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xeCJK.dtx 165cecc 2020-02-18 20:38:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: xeCJK.dtx b971c22 2020-05-01 21:10:43 +0800 Qing Lee <sobenlee@gmail.com> $ {xeCJK font effect} \ProvidesExplPackage{xeCJKfntef} - {\ExplFileDate}{3.8.2}{\ExplFileDescription} + {\ExplFileDate}{3.8.3}{\ExplFileDescription} \PassOptionsToPackage { normalem } { ulem } \DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } } \ProcessOptions \scan_stop: \RequirePackage { xeCJK } \RequirePackage { ulem } \addto@hook \UL@hook { \xeCJK_hook_for_ulem: } -\cs_new_protected_nopar:Npn \xeCJK_hook_for_ulem: +\cs_new_protected:Npn \xeCJK_hook_for_ulem: { \xeCJK_ulem_detect_node: \l__xeCJK_ulem_text_format_tl @@ -50,7 +50,7 @@ } \xeCJK_ulem_begin_node: } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_hook: +\cs_new_protected:Npn \__xeCJK_ulem_hook: { \__xeCJK_ulem_initial: \bool_if:NT \l__xeCJK_ulem_subtract_bool @@ -86,11 +86,11 @@ \CJKecglue } \l__xeCJK_ecglue_skip \xeCJK_glue_to_skip:nN { \xeCJK_space_glue: } \l__xeCJK_space_skip - \cs_set_protected_nopar:Npn \CJKglue + \cs_set_protected:Npn \CJKglue { \__xeCJK_ulem_glue:n \l__xeCJK_ccglue_skip } - \cs_set_protected_nopar:Npn \CJKecglue + \cs_set_protected:Npn \CJKecglue { \__xeCJK_ulem_glue:n \l__xeCJK_ecglue_skip } - \cs_set_protected_nopar:Npn \xeCJK_space_glue: + \cs_set_protected:Npn \xeCJK_space_glue: { \__xeCJK_ulem_glue:n \l__xeCJK_space_skip } \cs_set_eq:NN \xeCJK_punct_node:N \use_none:n \cs_set_eq:NN \xeCJK_if_last_punct:TF \use_ii:nn @@ -99,7 +99,7 @@ } \skip_new:N \l__xeCJK_space_skip \bool_new:N \l__xeCJK_ulem_hook_used_bool -\cs_new_protected_nopar:Npn \xeCJK_ulem_word:nw #1 ~ +\cs_new_protected:Npn \xeCJK_ulem_word:nw #1 ~ { \exp_after:wN \UL@start #1 ~ \exp_after:wN \if_meaning:w \exp_after:wN \UL@end #1 @@ -108,7 +108,7 @@ \exp_after:wN \__xeCJK_ulem_loop:nw \fi: } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_end: +\cs_new_protected:Npn \__xeCJK_ulem_end: { \c_group_end_token \c_group_end_token @@ -118,7 +118,7 @@ \xeCJK_ulem_right_node: \int_set:Nn \tex_spacefactor:D { \UL@spfactor } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_loop:nw +\cs_new_protected:Npn \__xeCJK_ulem_loop:nw { \reverse_if:N \if_mode_math: \reverse_if:N \if_dim:w \tex_lastskip:D = \c_zero_dim @@ -130,13 +130,13 @@ \xeCJK_ulem_word:nw \prg_do_nothing: } \cs_set_eq:NN \UL@word \xeCJK_ulem_word:nw -\cs_new_protected_nopar:Npn \xeCJK_ulem_left: +\cs_new_protected:Npn \xeCJK_ulem_left: { \xeCJK_ulem_left_node: \xeCJK_make_group_tag: } \cs_new_eq:NN \xeCJK_ulem_left_node: \prg_do_nothing: -\cs_new_protected_nopar:Npn \xeCJK_ulem_detect_node: +\cs_new_protected:Npn \xeCJK_ulem_detect_node: { \scan_stop: \dim_compare:nNnTF \tex_lastkern:D = \c_zero_dim @@ -151,12 +151,12 @@ \dim_compare:nNnTF \tex_lastkern:D = { - \l__xeCJK_tmp_dim } { \tex_unkern:D - \cs_set_protected_nopar:Npx \xeCJK_ulem_left_node: + \cs_set_protected: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: + \cs_set_protected:Npn \xeCJK_ulem_begin_node: { { \xeCJK_make_node:n { ulem-begin } } } \cs_set_eq:NN \__xeCJK_ulem_hskip:n \__xeCJK_ulem_hskip_first:n } @@ -170,7 +170,7 @@ } \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 +\cs_new_protected:Npn \__xeCJK_ulem_hskip_first:n #1 { \xeCJK_if_last_node:nTF { ulem-begin } { @@ -181,9 +181,9 @@ \cs_set_eq:NN \__xeCJK_ulem_hskip:n \xeCJK_ulem_hskip:n } \cs_new_eq:NN \__xeCJK_ulem_hskip:n \__xeCJK_ulem_hskip_first:n -\cs_new_protected_nopar:Npn \xeCJK_ulem_hskip:n #1 +\cs_new_protected:Npn \xeCJK_ulem_hskip:n #1 { { \skip_set:Nn \UL@skip {#1} \UL@leaders } } -\cs_new_protected_nopar:Npn \xeCJK_ulem_right: +\cs_new_protected:Npn \xeCJK_ulem_right: { \scan_stop: \dim_compare:nNnTF \tex_lastkern:D = \c_zero_dim @@ -197,12 +197,12 @@ } } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_right_aux:n #1 +\cs_new_protected:Npn \__xeCJK_ulem_right_aux:n #1 { \dim_compare:nNnTF \tex_lastkern:D = { - #1 } { \tex_unkern:D - \cs_gset_protected_nopar:Npn \xeCJK_ulem_right_node: + \cs_gset_protected:Npn \xeCJK_ulem_right_node: { \tex_kern:D - #1 \exp_stop_f: \tex_kern:D #1 \exp_stop_f: @@ -215,9 +215,9 @@ } } \cs_new_eq:NN \xeCJK_ulem_right_node: \prg_do_nothing: -\cs_new_protected_nopar:Npn \xeCJK_ulem_leaders: +\cs_new_protected:Npn \xeCJK_ulem_leaders: { \__xeCJK_ulem_var_leaders: } -\cs_new_protected_nopar:Npn \xeCJK_ulem_var_leaders: +\cs_new_protected:Npn \xeCJK_ulem_var_leaders: { \scan_stop: \skip_if_eq:nnF { \UL@skip } { \c_zero_skip } @@ -229,7 +229,7 @@ } \cs_new_eq:NN \__xeCJK_ulem_var_leaders: \xeCJK_ulem_var_leaders: \cs_new_eq:NN \xeCJK_ulem_right_skip: \prg_do_nothing: -\cs_new_protected_nopar:Npn \__xeCJK_ulem_right_skip: +\cs_new_protected:Npn \__xeCJK_ulem_right_skip: { \int_case:nn { \tex_lastnodetype:D } { @@ -238,7 +238,7 @@ { 13 } { \__xeCJK_ulem_right_skip_penalty: } } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_right_skip_hbox: +\cs_new_protected:Npn \__xeCJK_ulem_right_skip_hbox: { \box_set_to_last:N \l__xeCJK_tmp_box \int_compare:nNnTF \tex_lastnodetype:D = { 12 } @@ -246,7 +246,7 @@ { \__xeCJK_ulem_right_skip_glue: } \box_use_drop:N \l__xeCJK_tmp_box } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_right_skip_kern: +\cs_new_protected:Npn \__xeCJK_ulem_right_skip_kern: { \dim_set:Nn \l__xeCJK_tmp_dim { - \box_wd:N \l__xeCJK_tmp_box } \dim_compare:nNnT \tex_lastkern:D = \l__xeCJK_tmp_dim @@ -256,7 +256,7 @@ \tex_kern:D \l__xeCJK_tmp_dim } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_right_skip_glue: +\cs_new_protected:Npn \__xeCJK_ulem_right_skip_glue: { \skip_if_eq:nnT { \tex_lastskip:D } { - \UL@pixel } { @@ -266,7 +266,7 @@ \UL@leadtype \skip_horizontal:N \l__xeCJK_tmp_skip } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_right_skip_penalty: +\cs_new_protected:Npn \__xeCJK_ulem_right_skip_penalty: { \int_set_eq:NN \l__xeCJK_tmp_int \tex_lastpenalty:D \tex_unpenalty:D @@ -274,35 +274,37 @@ { \__xeCJK_ulem_right_skip_hbox: } \tex_penalty:D \l__xeCJK_tmp_int } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_hidden_box: +\cs_new_protected:Npn \__xeCJK_ulem_hidden_box: { \tl_if_empty:NF \UL@start { - \box_use:N \c__xeCJK_null_box + \box_set_ht:Nn \l__xeCJK_hidden_box { \box_ht:N \UL@box } + \box_set_dp:Nn \l__xeCJK_hidden_box { \box_dp:N \UL@box } + \box_use:N \l__xeCJK_hidden_box \xeCJK_no_break: \xeCJK_ulem_hskip:n { \box_wd:N \UL@box } - \box_use:N \c__xeCJK_null_box + \box_use:N \l__xeCJK_hidden_box } } -\box_new:N \c__xeCJK_null_box -\hbox_gset:Nn \c__xeCJK_null_box { } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_skip_punct_begin: +\box_new:N \l__xeCJK_hidden_box +\hbox_set:Nn \l__xeCJK_hidden_box { } +\cs_new_protected:Npn \__xeCJK_ulem_skip_punct_begin: { \cs_set_eq:NN \UL@putbox \__xeCJK_ulem_skip_putbox: \cs_set_eq:NN \xeCJK_ulem_hskip:n \skip_horizontal:n } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_skip_punct_end: +\cs_new_protected:Npn \__xeCJK_ulem_skip_punct_end: { \cs_set_eq:NN \UL@putbox \__xeCJK_ulem_putbox: \cs_set_eq:NN \xeCJK_ulem_hskip:n \__xeCJK_ulem_hskip_aux:n } \cs_new_eq:NN \__xeCJK_ulem_putbox: \UL@putbox -\cs_new_protected_nopar:Npn \__xeCJK_ulem_skip_putbox: +\cs_new_protected:Npn \__xeCJK_ulem_skip_putbox: { \tl_if_empty:NF \UL@start { \box_use_drop:N \UL@box } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_initial: +\cs_new_protected:Npn \__xeCJK_ulem_initial: { \__xeCJK_ulem_swap_cs:NN \xeCJK_FullLeft_and_Default: \__xeCJK_ulem_FullLeft_and_Default: @@ -339,13 +341,13 @@ } } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_swap_cs:NN #1#2 +\cs_new_protected:Npn \__xeCJK_ulem_swap_cs:NN #1#2 { \quark_if_recursion_tail_stop:N #1 \xeCJK_swap_cs:NN #1#2 \__xeCJK_ulem_swap_cs:NN } -\cs_new_nopar:Npn \xeCJK_if_ulem_patch:TF +\cs_new:Npn \xeCJK_if_ulem_patch:TF { \if_meaning:w \ \LA@space \exp_after:wN \use_ii:nn @@ -353,7 +355,7 @@ \exp_after:wN \use_i:nn \fi: } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_Boundary:w +\cs_new_protected:Npn \__xeCJK_ulem_CJK_and_Boundary:w { \xeCJK_if_ulem_patch:TF { @@ -378,13 +380,13 @@ } { \__xeCJK_ulem_CJK_and_Boundary:w } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_fix_penalty: +\cs_new_protected:Npn \__xeCJK_ulem_fix_penalty: { \xeCJK_if_ulem_patch:TF { \fix@penalty } { \__xeCJK_ulem_fix_penalty: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_CJK:N +\cs_new_protected:Npn \__xeCJK_ulem_CJK_and_CJK:N { \xeCJK_if_ulem_patch:TF { @@ -396,12 +398,12 @@ } { \__xeCJK_ulem_CJK_and_CJK:N } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_class_group_begin: +\cs_new_protected:Npn \__xeCJK_ulem_class_group_begin: { \xeCJK_class_group_begin: \xeCJK_clear_Boundary_and_CJK_toks: } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_between_CJK_blocks:nnN #1#2 +\cs_new_protected:Npn \__xeCJK_ulem_between_CJK_blocks:nnN #1#2 { \xeCJK_if_ulem_patch:TF { @@ -418,7 +420,7 @@ \CJKsymbol } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_Default_and_FullLeft_glue:N #1 +\cs_new_protected:Npn \__xeCJK_ulem_Default_and_FullLeft_glue:N #1 { \xeCJK_if_ulem_patch:TF { @@ -429,7 +431,7 @@ } { \__xeCJK_ulem_Default_and_FullLeft_glue:N #1 } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 +\cs_new_protected:Npn \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 { \xeCJK_if_ulem_patch:TF { @@ -440,7 +442,7 @@ } { \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_FullLeft_glue:N #1 +\cs_new_protected:Npn \__xeCJK_ulem_CJK_and_FullLeft_glue:N #1 { \xeCJK_if_ulem_patch:TF { @@ -455,7 +457,7 @@ } { \__xeCJK_ulem_CJK_and_FullLeft_glue:N #1 } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_Default_and_FullRight_glue:N #1 +\cs_new_protected:Npn \__xeCJK_ulem_Default_and_FullRight_glue:N #1 { \xeCJK_if_ulem_patch:TF { @@ -473,7 +475,7 @@ } { \__xeCJK_ulem_Default_and_FullRight_glue:N #1 } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_FullRight_glue:N #1 +\cs_new_protected:Npn \__xeCJK_ulem_CJK_and_FullRight_glue:N #1 { \xeCJK_if_ulem_patch:TF { @@ -495,7 +497,7 @@ } { \__xeCJK_ulem_CJK_and_FullRight_glue:N #1 } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_Default: +\cs_new_protected:Npn \__xeCJK_ulem_FullLeft_and_Default: { \xeCJK_if_ulem_patch:TF { @@ -513,7 +515,7 @@ } { \__xeCJK_ulem_FullLeft_and_Default: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_Boundary: +\cs_new_protected:Npn \__xeCJK_ulem_FullLeft_and_Boundary: { \xeCJK_if_ulem_patch:TF { @@ -532,7 +534,7 @@ } { \__xeCJK_ulem_FullLeft_and_Boundary: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_CJK: +\cs_new_protected:Npn \__xeCJK_ulem_FullLeft_and_CJK: { \xeCJK_if_ulem_patch:TF { @@ -542,7 +544,7 @@ } { \__xeCJK_ulem_FullLeft_and_CJK: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_Default: +\cs_new_protected:Npn \__xeCJK_ulem_FullRight_and_Default: { \xeCJK_if_ulem_patch:TF { @@ -555,7 +557,7 @@ } { \__xeCJK_ulem_FullRight_and_Default: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_Boundary: +\cs_new_protected:Npn \__xeCJK_ulem_FullRight_and_Boundary: { \xeCJK_if_ulem_patch:TF { @@ -569,7 +571,7 @@ } { \__xeCJK_ulem_FullRight_and_Boundary: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_CJK: +\cs_new_protected:Npn \__xeCJK_ulem_FullRight_and_CJK: { \xeCJK_if_ulem_patch:TF { @@ -585,13 +587,13 @@ } { \__xeCJK_ulem_FullRight_and_CJK: } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_punct_hskip:n +\cs_new_protected:Npn \__xeCJK_ulem_punct_hskip:n { \xeCJK_if_ulem_patch:TF { \xeCJK_ulem_hskip:n } { \__xeCJK_ulem_punct_hskip:n } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_punct_breakable_kern:n #1 +\cs_new_protected:Npn \__xeCJK_ulem_punct_breakable_kern:n #1 { \xeCJK_if_ulem_patch:TF { @@ -602,7 +604,7 @@ } { \__xeCJK_ulem_punct_breakable_kern:n {#1} } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_glue:n #1 +\cs_new_protected:Npn \__xeCJK_ulem_glue:n #1 { \xeCJK_if_ulem_patch:TF { @@ -616,7 +618,7 @@ } { \skip_horizontal:n {#1} } } -\cs_new_protected_nopar:Npn \xeCJK_make_group_tag: +\cs_new_protected:Npn \xeCJK_make_group_tag: { \tl_set:Nx \l__xeCJK_group_tag_tl { \c__xeCJK_group_tag_tl } } \tl_new:N \l__xeCJK_group_tag_tl \tl_const:Nn \c__xeCJK_group_tag_tl @@ -624,18 +626,18 @@ T \int_use:N \tex_currentgrouptype:D L \int_use:N \tex_currentgrouplevel:D } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_ccglue: +\cs_new_protected:Npn \__xeCJK_ulem_ccglue: { { \skip_set_eq:NN \UL@skip \l__xeCJK_ccglue_skip \UL@leaders } } -\cs_new_protected_nopar:Npn \__xeCJK_ulem_punct_ccglue: +\cs_new_protected:Npn \__xeCJK_ulem_punct_ccglue: { \__xeCJK_punct_hskip:n { \l__xeCJK_ccglue_skip } } -\cs_new_protected_nopar:Npn \xeCJK_ulem_group_begin: +\cs_new_protected:Npn \xeCJK_ulem_group_begin: { \mode_leave_vertical: \c_group_begin_token } -\cs_new_protected_nopar:Npn \xeCJK_ulem_group_end: +\cs_new_protected:Npn \xeCJK_ulem_group_end: { \c_group_end_token } -\cs_new_protected_nopar:Npn \xeCJK_ulem_on:n +\cs_new_protected:Npn \xeCJK_ulem_on:n { \ULon } \cs_new_eq:NN \__xeCJK_ulem_on:n \UL@on \cs_set_protected:Npn \UL@on #1 @@ -777,7 +779,7 @@ \tl_if_novalue:nF {#4} { \keys_set:nn { xeCJK / options / ulem } {#4} } } -\cs_new_protected_nopar:Npn \xeCJK_fntef_initial:n +\cs_new_protected:Npn \xeCJK_fntef_initial:n { \bool_if:NTF \l__xeCJK_nest_bool { \__xeCJK_warning:n { fntef-nesting } } @@ -912,18 +914,6 @@ sout / height = 0.35 em , xout / skip = true } -\cs_if_free:NF \color - { - \keys_set:nn { xeCJK / options } - { - underdot / format = \color { red } , - underline / format = \color { blue } , - underdblline / format = \color { blue } , - underwave / format = \color { blue } , - sout / format = \color { red } , - xout / format = \color { blue } - } - } \NewDocumentCommand \CJKunderanysymbol { o m m m } { \xeCJK_under_symbol:nnnnnn { symbol } { symbol } {#1} {#2} {#3} {#4} @@ -938,7 +928,7 @@ {#2} \tex_ignorespaces:D } -\cs_new_protected_nopar:Npn \xeCJK_under_symbol:nnnnnn +\cs_new_protected:Npn \xeCJK_under_symbol:nnnnnn { \xeCJK_if_ulem_patch:TF { \__xeCJK_under_symbol_auxi:nnnnnn } @@ -1028,7 +1018,7 @@ } \tl_new:N \l__xeCJK_fntef_shipout_tl \xeCJK_add_to_shipout:n { \l__xeCJK_fntef_shipout_tl } -\cs_new_protected_nopar:Npn \__xeCJK_under_CJKsymbol:N +\cs_new_protected:Npn \__xeCJK_under_CJKsymbol:N { \box_use:N \l__xeCJK_under_symbol_box \xeCJK_no_break: \__xeCJK_under_CJKsymbol:N @@ -1064,7 +1054,7 @@ } { \tabular [#1] { @ { } c @ { } } #3 \endtabular } } -\cs_new_protected_nopar:Npn \xeCJK_fntef_hfilll: +\cs_new_protected:Npn \xeCJK_fntef_hfilll: { \skip_horizontal:N \c__xeCJK_filll_skip } \skip_const:Nn \c__xeCJK_filll_skip { \c_zero_dim plus 1 filll } %% |