diff options
author | Karl Berry <karl@freefriends.org> | 2012-12-14 00:12:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-12-14 00:12:28 +0000 |
commit | 54b3f2d277e2a2359cd249de2055ae706214c4be (patch) | |
tree | fc68d2f1ccad6b178993d9040b1ca0bb1d4fc11e /Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty | |
parent | ad47ef91d24fc1c34e67a07db6a1e860d3b0253d (diff) |
xecjk (13dec12)
git-svn-id: svn://tug.org/texlive/trunk@28528 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty | 339 |
1 files changed, 339 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty new file mode 100644 index 00000000000..6d3e152a498 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty @@ -0,0 +1,339 @@ +%% +%% This is file `xeCJKfntef.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xeCJK.dtx (with options: `fntef') +%% +%% $Id: xeCJK.dtx 382 2012-12-13 04:58:22Z sobenlee $ +%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $ +%% ----------------------------------------------------------------- +%% Author: +%% Wenchang Sun <sunwch@nankai.edu.cn> +%% Current Maintainers: +%% Leo Liu <leoliu.pku@gmail.com> +%% Qing Lee <sobenlee@gmail.com> +%% +%% Copyright (C) 2007--2012 Wenchang Sun +%% +%% 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 382 2012-12-13 04:58:22Z sobenlee $ + {xeCJK patch file for ulem/CJKfntef} +\ProvidesExplPackage + {xeCJKfntef} + {\ExplFileDate}{3.1.1}{\ExplFileDescription} +\PassOptionsToPackage { normalem } { ulem } +\DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } } +\ProcessOptions \scan_stop: +\@ifpackageloaded { xeCJK } + { } + { \RequirePackage { xeCJK } } +\RequirePackage { ulem } +\RequirePackage { CJKfntef } +\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 } + \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: + { + \cs_set_eq:NN \__xeCJK_punct_hskip:n \__xeCJK_ulem_hskip:n + \cs_set_eq:NN + \__xeCJK_Default_and_FullLeft_glue:N \__xeCJK_ulem_Default_and_FullLeft_glue:N + \cs_set_eq:NN + \__xeCJK_Default_and_FullRight_glue:N \__xeCJK_ulem_Default_and_FullRight_glue:N + \cs_set_eq:NN + \__xeCJK_CJK_and_FullLeft_glue:N \__xeCJK_ulem_CJK_and_FullLeft_glue:N + \cs_set_eq:NN + \__xeCJK_CJK_and_FullRight_glue:N \__xeCJK_ulem_CJK_and_FullRight_glue:N + \cs_set_eq:NN + \__xeCJK_Boundary_and_FullLeft_glue:N \__xeCJK_ulem_Boundary_and_FullLeft_glue:N + \cs_set_eq:NN \xeCJK_FullLeft_and_Default: \__xeCJK_ulem_FullLeft_and_Default: + \cs_set_eq:NN \xeCJK_FullLeft_and_CJK: \__xeCJK_ulem_FullLeft_and_CJK: + \cs_set_eq:NN \xeCJK_FullRight_and_Default: \__xeCJK_ulem_FullRight_and_Default: + \cs_set_eq:NN \xeCJK_FullRight_and_CJK: \__xeCJK_ulem_FullRight_and_CJK: + \cs_set_eq:NN \xeCJK_CJK_and_CJK:N \__xeCJK_ulem_CJK_and_CJK:N + \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_CJK_and_CJK:N + { + \xeCJK_class_group_end: + \UL@stop \__xeCJK_ulem_ccglue: \UL@start + \__xeCJK_ulem_class_group_begin: + \CJKsymbol + } +\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_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 + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_Default_and_FullLeft_glue:N #1 + { + \UL@stop + \__xeCJK_ulem_skip_punct_begin: + \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1} + \UL@start + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 + { + \UL@stop + \__xeCJK_ulem_skip_punct_begin: + \int_compare:nNnF \etex_lastnodetype:D = \c_one + { \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1} } + \UL@start + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_FullLeft_glue:N #1 + { + \xeCJK_class_group_end: + \UL@stop + \__xeCJK_ulem_skip_punct_begin: + \__xeCJK_ulem_ccglue: + \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1} + \UL@start + \__xeCJK_ulem_class_group_begin: + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_Default_and_FullRight_glue:N #1 + { + \UL@stop + \__xeCJK_ulem_skip_punct_begin: + \__xeCJK_punct_if_long:NTF {#1} + { \__xeCJK_ulem_ccglue: } + { + \__xeCJK_punct_if_middle:NT {#1} + { + \xeCJK_no_break: + \__xeCJK_punct_glue:NN \c__xeCJK_right_tl {#1} + } + \xeCJK_no_break: + } + \UL@start + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_CJK_and_FullRight_glue:N #1 + { + \xeCJK_class_group_end: + \__xeCJK_ulem_Default_and_FullRight_glue:N {#1} + \__xeCJK_ulem_class_group_begin: + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_Default: + { + \__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_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 + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullLeft_and_CJK: + { + \__xeCJK_ulem_FullLeft_and_Default: + \__xeCJK_ulem_class_group_begin: + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_Default: + { + \__xeCJK_punct_rule:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl + \xeCJK_class_group_end: + \UL@stop + \__xeCJK_punct_glue:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl + \__xeCJK_ulem_skip_punct_end: + \UL@start + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_FullRight_and_CJK: + { + \__xeCJK_punct_rule:NN \c__xeCJK_right_tl \g__xeCJK_last_punct_tl + \xeCJK_class_group_end: + \UL@stop + \__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: + } +\cs_new_protected_nopar:Npn \__xeCJK_ulem_glue:n #1 + { + \cs_if_eq:NNTF \ \LA@space + { \skip_horizontal:n {#1} } + { \UL@stop \__xeCJK_ulem_hskip:n {#1} \UL@start } + } +\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 } + \CJK@preUnderdot + \__xeCJK_make_under_symbol:n { \CJK@underdotSkip } + \cs_gset_eq:NN \__xeCJK_save_under_dot_CJKsymbol:N \CJKsymbol + \cs_set_eq:NN \CJKsymbol \__xeCJK_under_CJKsymbol:N + \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_dot_CJKsymbol:N + \CJK@postUnderdot + \bool_if:NT \l__xeCJK_ulem_hook_used_bool { \UL@start } + \tex_ignorespaces:D + } +\box_new:N \g__xeCJK_under_symbol_box +\RenewDocumentCommand \CJKunderanysymbol { m m m } + { + \group_begin: + \hbox_set:Nn \CJK@underdotBox {#2} + \__xeCJK_make_under_symbol:n {#1} + \cs_gset_eq:NN \__xeCJK_save_under_dot_CJKsymbol:N \CJKsymbol + \cs_set_eq:NN \CJKsymbol \__xeCJK_under_CJKsymbol:N + #3 + \group_end: + \tex_ignorespaces:D + } +\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 + { + \__xeCJK_save_under_dot_CJKsymbol:N {#1} + \hbox_overlap_left:n { \box_use:N \g__xeCJK_under_symbol_box } + { \xeCJK_make_node:n { CJK } } + \xeCJK_ignore_spaces:w + } +\RenewDocumentEnvironment { CJKfilltwosides } { m } + { + \dim_set:Nn \l__xeCJK_fill_width_dim {#1} + \cs_set_eq:NN \CJKglue \tex_hfil:D + \cs_set_eq:NN \\ \__xeCJK_fill_newline: + \mode_if_vertical:T { \tex_indent:D } + \tex_vbox:D \c_group_begin_token + \tex_hbox:D to \l__xeCJK_fill_width_dim \c_group_begin_token + \tex_ignorespaces:D + } + { + \tex_unskip:D + \c_group_end_token + \c_group_end_token + } +\dim_new:N \l__xeCJK_fill_width_dim +\cs_new_protected_nopar:Npn \__xeCJK_fill_newline: + { + \tex_unskip:D + \c_group_end_token + \tex_hbox:D to \l__xeCJK_fill_width_dim \c_group_begin_token + \tex_ignorespaces:D + } +%% +%% This package consists of the file xeCJK.dtx +%% and the derived files xeCJK.pdf, +%% xeCJK.sty, +%% xeCJK.cfg, +%% xeCJK.ins, +%% xeCJKfntef.sty, +%% 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, and +%% README.txt. +%% +%% End of file `xeCJKfntef.sty'. |