%% %% This is file `xeCJKfntef.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% xeCJK.dtx (with options: `fntef') %% %% $Id: xeCJK.dtx 644 2014-04-29 09:45:49Z sobenlee $ %% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ %% ----------------------------------------------------------------- %% Author: %% Wenchang Sun %% Current Maintainers: %% Leo Liu %% Qing Lee %% %% Copyright (C) 2007--2014 Wenchang Sun %% (C) 2009--2014 Leo Liu %% (C) 2012--2014 Qing Lee %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% 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". %% The Current Maintainer of this work are Leo Liu and Qing Lee. %% ----------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \GetIdInfo$Id: xeCJK.dtx 644 2014-04-29 09:45:49Z sobenlee $ {xeCJK patch file for ulem/CJKfntef} \ProvidesExplPackage {xeCJKfntef} {\ExplFileDate}{3.2.11}{\ExplFileDescription} \PassOptionsToPackage { normalem } { ulem } \DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } } \ProcessOptions \scan_stop: \RequirePackage { xeCJK } \RequirePackage { ulem } \RequirePackage { CJKfntef } \RequirePackage { environ } \addto@hook \UL@hook { \xeCJK_hook_for_ulem: } \cs_new_protected_nopar:Npn \xeCJK_hook_for_ulem: { \bool_if:NF \l__xeCJK_ulem_hook_used_bool { \bool_set_true:N \l__xeCJK_ulem_hook_used_bool \xeCJKsetup { CheckFullRight = false , xCJKecglue = false } \bool_if:NTF \l__xeCJK_ulem_skip_punct_bool { \cs_set_eq:NN \__xeCJK_ulem_leader_type: \UL@leadtype } { \xeCJK_cs_clear:N \__xeCJK_ulem_skip_punct_begin: \xeCJK_cs_clear:N \__xeCJK_ulem_skip_punct_end: } \__xeCJK_ulem_initial: \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 \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 } } } \bool_new:N \l__xeCJK_ulem_hook_used_bool \cs_set_eq:NN \CJK@UL \CJK@@UL \tl_replace_once:Nnn \CJK@UL { \ULon } { \bool_set_true:N \l__xeCJK_ulem_skip_punct_bool \ULon } \tl_replace_once:Nnn \CJK@@UL { \ULon } { \bool_set_false:N \l__xeCJK_ulem_skip_punct_bool \ULon } \bool_new:N \l__xeCJK_ulem_skip_punct_bool \cs_new_protected_nopar:Npn \__xeCJK_ulem_skip_punct_begin: { \xeCJK_cs_clear:N \UL@leadtype } \cs_new_protected_nopar:Npn \__xeCJK_ulem_skip_punct_end: { \cs_set_eq:NN \UL@leadtype \__xeCJK_ulem_leader_type: } \xeCJK_cs_clear:N \__xeCJK_ulem_leader_type: \cs_new_protected_nopar:Npn \__xeCJK_ulem_initial: { \__xeCJK_ulem_swap_cs:NN \xeCJK_FullLeft_and_Default: \__xeCJK_ulem_FullLeft_and_Default: \xeCJK_FullLeft_and_CJK: \__xeCJK_ulem_FullLeft_and_CJK: \xeCJK_FullRight_and_Default: \__xeCJK_ulem_FullRight_and_Default: \xeCJK_FullRight_and_CJK: \__xeCJK_ulem_FullRight_and_CJK: \xeCJK_CJK_and_CJK:N \__xeCJK_ulem_CJK_and_CJK:N \xeCJK_Boundary_and_Default: \__xeCJK_ulem_Boundary_and_Default: \xeCJK_Boundary_and_NormalSp: \__xeCJK_ulem_Boundary_and_NormalSp: \xeCJK@fix@penalty \__xeCJK_ulem_fix_penalty: \__xeCJK_punct_kern:n \__xeCJK_ulem_punct_kern:n \__xeCJK_punct_hskip:n \__xeCJK_ulem_punct_hskip:n \__xeCJK_punct_breakable_kern:n \__xeCJK_ulem_punct_breakable_kern:n \__xeCJK_CJK_and_Boundary_aux: \__xeCJK_ulem_CJK_and_Boundary_aux: \__xeCJK_Default_and_FullLeft_glue:N \__xeCJK_ulem_Default_and_FullLeft_glue:N \__xeCJK_Default_and_FullRight_glue:N \__xeCJK_ulem_Default_and_FullRight_glue:N \__xeCJK_CJK_and_FullLeft_glue:N \__xeCJK_ulem_CJK_and_FullLeft_glue:N \__xeCJK_CJK_and_FullRight_glue:N \__xeCJK_ulem_CJK_and_FullRight_glue:N \__xeCJK_Boundary_and_FullLeft_glue:N \__xeCJK_ulem_Boundary_and_FullLeft_glue:N \q_recursion_tail \q_nil \q_recursion_stop \seq_map_inline:Nn \g__xeCJK_CJK_sub_class_seq { \seq_map_inline:Nn \g__xeCJK_CJK_sub_class_seq { \str_if_eq:nnTF {##1} {####1} { \xeCJK_inter_class_toks:nnn { CJK } { CJK/##1 } { \__xeCJK_ulem_between_CJK_blocks:nnN { CJK } {##1} } \xeCJK_inter_class_toks:nnn { CJK/##1 } { CJK/##1 } { \__xeCJK_ulem_between_CJK_blocks:nnN { CJK } {##1} } } { \xeCJK_inter_class_toks:nnn { CJK/##1 } { CJK/####1 } { \__xeCJK_ulem_between_CJK_blocks:nnN {##1} {####1} } } } } } \cs_new_protected_nopar: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 { \if_meaning:w \ \LA@space \exp_after:wN \use_ii:nn \else: \exp_after:wN \use_i:nn \fi: } \cs_new_protected_nopar:Npn \__xeCJK_ulem_Boundary_and_Default: { \xeCJK_if_ulem_patch:TF { \xeCJK_if_last_node:nTF { CJK } { \xeCJK_remove_node: \skip_horizontal:N \l__xeCJK_ecglue_skip } { \xeCJK_if_last_node:nT { CJK-space } { \xeCJK_remove_node: \c_space_tl } } } { \__xeCJK_ulem_Boundary_and_Default: } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_Boundary_and_NormalSp: { \xeCJK_if_ulem_patch:TF { \xeCJK_if_last_node:nT { CJK-space } { \xeCJK_remove_node: \c_space_tl } } { \__xeCJK_ulem_Boundary_and_NormalSp: } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_Boundary_aux: { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: \UL@stop \__xeCJK_ulem_hskip:n { \c_zero_skip } \UL@start { \xeCJK_make_node:n { CJK } } } { \__xeCJK_ulem_CJK_and_Boundary_aux: } } \cs_new_protected_nopar: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 { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: \UL@stop \__xeCJK_ulem_ccglue: \UL@start \__xeCJK_ulem_class_group_begin: \CJKsymbol } { \__xeCJK_ulem_CJK_and_CJK:N } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_class_group_begin: { \xeCJK_class_group_begin: \xeCJK_clear_Boundary_and_CJK_toks: \xeCJK_select_font: } \cs_new_protected_nopar:Npn \__xeCJK_ulem_between_CJK_blocks:nnN #1#2 { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: \UL@stop \__xeCJK_ulem_ccglue: \UL@start \xeCJK_class_group_begin: \xeCJK_clear_Boundary_and_CJK_toks: \__xeCJK_switch_font:nn {#1} {#2} \CJKsymbol } { \skip_horizontal:N \l__xeCJK_ccglue_skip \__xeCJK_switch_font:nn {#1} {#2} \CJKsymbol } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_Default_and_FullLeft_glue:N #1 { \xeCJK_if_ulem_patch:TF { \UL@stop \__xeCJK_ulem_skip_punct_begin: \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1} \__xeCJK_punct_offset:NN \c__xeCJK_left_tl {#1} \UL@start } { \__xeCJK_ulem_Default_and_FullLeft_glue:N #1 } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 { \xeCJK_if_ulem_patch:TF { \UL@stop \__xeCJK_ulem_skip_punct_begin: \int_compare:nNnTF \etex_lastnodetype:D = \c_one { \__xeCJK_zero_glue: } { \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1} } \UL@start } { \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_FullLeft_glue:N #1 { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: \UL@stop \__xeCJK_ulem_skip_punct_begin: \__xeCJK_ulem_ccglue: \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1} \__xeCJK_punct_offset:NN \c__xeCJK_left_tl {#1} \UL@start \__xeCJK_ulem_class_group_begin: } { \__xeCJK_ulem_CJK_and_FullLeft_glue:N #1 } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_Default_and_FullRight_glue:N #1 { \xeCJK_if_ulem_patch:TF { \UL@stop \__xeCJK_ulem_skip_punct_begin: \__xeCJK_punct_if_long:NTF {#1} { \__xeCJK_ulem_ccglue: } { \__xeCJK_punct_if_middle:NTF {#1} { \xeCJK_no_break: \__xeCJK_punct_glue:NN \c__xeCJK_right_tl {#1} \__xeCJK_punct_bound_rule:NN \c__xeCJK_left_tl {#1} } { \xeCJK_no_break: } } \UL@start } { \__xeCJK_ulem_Default_and_FullRight_glue:N #1 } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_FullRight_glue:N #1 { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: \__xeCJK_Default_and_FullRight_glue:N {#1} \__xeCJK_ulem_class_group_begin: } { \__xeCJK_ulem_CJK_and_FullRight_glue:N #1 } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_Default: { \xeCJK_if_ulem_patch:TF { \__xeCJK_punct_if_middle:NTF \g__xeCJK_last_punct_tl { \xeCJK_get_punct_bounds:NN \c__xeCJK_left_tl \g__xeCJK_last_punct_tl \__xeCJK_punct_bound_rule:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \xeCJK_class_group_end: \UL@stop \xeCJK_no_break: \__xeCJK_punct_glue:NN \c__xeCJK_left_tl \g__xeCJK_last_punct_tl } { \xeCJK_class_group_end: \UL@stop } \__xeCJK_ulem_skip_punct_end: \xeCJK_no_break: \UL@start } { \__xeCJK_ulem_FullLeft_and_Default: } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_CJK: { \xeCJK_if_ulem_patch:TF { \xeCJK_FullLeft_and_Default: \__xeCJK_ulem_class_group_begin: } { \__xeCJK_ulem_FullLeft_and_CJK: } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_Default: { \xeCJK_if_ulem_patch:TF { \__xeCJK_punct_rule:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \xeCJK_class_group_end: \UL@stop \__xeCJK_punct_offset:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \__xeCJK_punct_glue:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \__xeCJK_ulem_skip_punct_end: \UL@start } { \__xeCJK_ulem_FullRight_and_Default: } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_CJK: { \xeCJK_if_ulem_patch:TF { \__xeCJK_punct_rule:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \xeCJK_class_group_end: \UL@stop \__xeCJK_punct_offset:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \__xeCJK_punct_glue:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl \__xeCJK_ulem_ccglue: \__xeCJK_ulem_skip_punct_end: \UL@start \__xeCJK_ulem_class_group_begin: } { \__xeCJK_ulem_FullRight_and_CJK: } } \cs_new_protected_nopar: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_kern:n { \xeCJK_if_ulem_patch:TF { \__xeCJK_ulem_hskip:n } { \__xeCJK_ulem_punct_kern:n } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_punct_breakable_kern:n #1 { \xeCJK_if_ulem_patch:TF { \xeCJK_class_group_end: \UL@stop \__xeCJK_ulem_hskip:n {#1} \UL@start \__xeCJK_ulem_class_group_begin: } { \__xeCJK_ulem_punct_breakable_kern:n {#1} } } \cs_new_protected_nopar:Npn \__xeCJK_ulem_glue:n #1 { \xeCJK_if_ulem_patch:TF { \UL@stop \__xeCJK_ulem_hskip:n {#1} \UL@start } { \skip_horizontal:n {#1} } } \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_hskip:n #1 { \int_compare:nNnTF \tex_lastkern:D = \c_three { \skip_horizontal:n {#1} } { \skip_set:Nn \UL@skip {#1} \UL@leaders } } \RenewDocumentCommand \CJKunderdot { m } { \bool_if:NT \l__xeCJK_ulem_hook_used_bool { \UL@stop \__xeCJK_ulem_restore_CJK_and_Boundary: } \CJK@preUnderdot \__xeCJK_make_under_symbol:n { \CJK@underdotSkip } \cs_gset_eq:NN \__xeCJK_save_under_CJKsymbol:N \CJKsymbol \cs_set_eq:NN \CJKsymbol \__xeCJK_under_CJKsymbol:N \__xeCJK_restore_shipout_CJKsymbol: \bool_if:NT \l__xeCJK_ulem_hook_used_bool { \UL@start } #1 \bool_if:NT \l__xeCJK_ulem_hook_used_bool { \UL@stop } \cs_set_eq:NN \CJKsymbol \__xeCJK_save_under_CJKsymbol:N \tl_clear:N \l__xeCJK_fntef_shipout_tl \CJK@postUnderdot \bool_if:NT \l__xeCJK_ulem_hook_used_bool { \__xeCJK_ulem_restore_CJK_and_Boundary: \UL@start } \tex_ignorespaces:D } \box_new:N \g__xeCJK_under_symbol_box \cs_new_protected_nopar:Npn \__xeCJK_ulem_restore_CJK_and_Boundary: { \xeCJK_if_ulem_patch:TF { \xeCJK_swap_cs:NN \__xeCJK_CJK_and_Boundary_aux: \__xeCJK_ulem_CJK_and_Boundary_aux: } { } } \RenewDocumentCommand \CJKunderanysymbol { m m m } { \group_begin: \hbox_set:Nn \CJK@underdotBox {#2} \__xeCJK_make_under_symbol:n {#1} \cs_set_eq:NN \__xeCJK_save_under_CJKsymbol:N \CJKsymbol \cs_set_eq:NN \CJKsymbol \__xeCJK_under_CJKsymbol:N \__xeCJK_restore_shipout_CJKsymbol: \tl_clear:N \l__xeCJK_underdot_shipout_tl #3 \group_end: \tex_ignorespaces:D } \cs_new_protected:Npn \__xeCJK_restore_shipout_CJKsymbol: { \tl_set:Nn \l__xeCJK_fntef_shipout_tl { \l__xeCJK_underdot_shipout_tl \cs_set_eq:NN \CJKsymbol \__xeCJK_save_under_CJKsymbol:N } } \tl_new:N \l__xeCJK_fntef_shipout_tl \tl_new:N \l__xeCJK_underdot_shipout_tl \tl_set:Nn \l__xeCJK_underdot_shipout_tl { \cs_set_eq:NN \CJKf@global \scan_stop: \int_zero:N \CJK@nest \CJK@postUnderdot } \xeCJK_add_to_shipout:n { \l__xeCJK_fntef_shipout_tl } \cs_new_protected:Npn \__xeCJK_make_under_symbol:n #1 { \hbox_set:Nn \l__xeCJK_tmp_box { ^^^^4e00 } \vbox_gset_to_ht:Nnn \g__xeCJK_under_symbol_box \c_zero_dim { \skip_vertical:n {#1} \hbox_to_zero:n { \tex_kern:D \box_wd:N \l__xeCJK_tmp_box \tex_hss:D \box_use:N \CJK@underdotBox \tex_hss:D } \tex_vss:D } } \cs_new_protected_nopar:Npn \__xeCJK_under_CJKsymbol:N #1 { \hbox_overlap_right:n { \box_use:N \g__xeCJK_under_symbol_box } \xeCJK_no_break: \__xeCJK_save_under_CJKsymbol:N {#1} } \RenewDocumentEnvironment { CJKfilltwosides } { O { c } m } { \use:x { \exp_not:N \minipage [#1] { \dim_eval:n {#2} } } \cs_set_eq:NN \CJKglue \tex_hfill:D } { \endminipage \ignorespacesafterend } \NewEnviron { CJKfilltwosides* } [ 2 ] [ c ] { \cs_set_eq:NN \CJKglue \tex_hfill:D \tl_set:Nn \arraystretch { 1 } \token_if_dim_register:NT \extrarowheight { \dim_set_eq:NN \extrarowheight \c_zero_dim } \dim_compare:nNnTF {#2} > \c_zero_dim { \hbox_set:Nn \l__xeCJK_tmp_box { \tabular [#1] { @ { } c @ { } } \BODY \endtabular } \dim_compare:nNnTF {#2} > { \box_wd:N \l__xeCJK_tmp_box } { \tabular [#1] { @ { } p { \dim_eval:n {#2} } @ { } } \BODY \endtabular } { \hbox_unpack:N \l__xeCJK_tmp_box } } { \tabular [#1] { @ { } c @ { } } \BODY \endtabular } } [ \ignorespacesafterend ] %% %% This package consists of the file xeCJK.dtx, %% full-stop.map, %% fullwidth-stop.map, %% han-simp.map, %% han-trad.map, %% and the derived files xeCJK.pdf, %% xeCJK.sty, %% xeCJK.cfg, %% xeCJK.ins, %% xeCJKfntef.sty, %% xeCJK-listings.sty, %% xunicode-addon.sty, %% xunicode-extra.def, %% xeCJK-example-autofake.tex, %% xeCJK-example-fallback.tex, %% xeCJK-example-subCJKblock.tex, %% xeCJK-example-CJKecglue.tex, %% xeCJK-example-checksingle.tex, %% xeCJK-example-CJKfntef.tex, %% xeCJK-example-punctstyle.tex, %% xeCJK-example-verbatim.tex, %% xeCJK-example-IVS.tex, %% xeCJK-example-listings.tex, %% xunicode-symbols.tex, %% xunicode-commands.tex, %% xunicode-combine-marks.tex, %% xunicode-symbols.pdf, %% full-stop.tec, %% fullwidth-stop.tec, %% han-simp.tec, %% han-trad.tec, and %% README.txt. %% %% End of file `xeCJKfntef.sty'.