summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-12 23:54:58 +0000
committerKarl Berry <karl@freefriends.org>2013-01-12 23:54:58 +0000
commit0cdeac8d67ad763351ae173884fa9f5d28779de7 (patch)
tree090217371149c73d5f9c7de9e8d9546baa34319b /Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
parent40582d40114fa4f0b3d0432e8a85900312bff43a (diff)
xecjk (12jan13)
git-svn-id: svn://tug.org/texlive/trunk@28816 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.sty222
1 files changed, 143 insertions, 79 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
index 6d3e152a498..9df832c901d 100644
--- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
+++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
@@ -6,7 +6,7 @@
%%
%% xeCJK.dtx (with options: `fntef')
%%
-%% $Id: xeCJK.dtx 382 2012-12-13 04:58:22Z sobenlee $
+%% $Id: xeCJK.dtx 399 2013-01-11 14:57:50Z sobenlee $
%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
@@ -15,7 +15,9 @@
%% Leo Liu <leoliu.pku@gmail.com>
%% Qing Lee <sobenlee@gmail.com>
%%
-%% Copyright (C) 2007--2012 Wenchang Sun
+%% Copyright (C) 2007--2013 Wenchang Sun
+%% (C) 2009--2013 Leo Liu
+%% (C) 2012--2013 Qing Lee
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -31,11 +33,11 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xeCJK.dtx 382 2012-12-13 04:58:22Z sobenlee $
+\GetIdInfo$Id: xeCJK.dtx 399 2013-01-11 14:57:50Z sobenlee $
{xeCJK patch file for ulem/CJKfntef}
\ProvidesExplPackage
{xeCJKfntef}
- {\ExplFileDate}{3.1.1}{\ExplFileDescription}
+ {\ExplFileDate}{3.1.2}{\ExplFileDescription}
\PassOptionsToPackage { normalem } { ulem }
\DeclareOption* { \PassOptionsToPackage { \CurrentOption } { ulem } }
\ProcessOptions \scan_stop:
@@ -92,22 +94,22 @@
\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_swap_cs:NN
\__xeCJK_Default_and_FullLeft_glue:N \__xeCJK_ulem_Default_and_FullLeft_glue:N
- \cs_set_eq:NN
+ \xeCJK_swap_cs:NN
\__xeCJK_Default_and_FullRight_glue:N \__xeCJK_ulem_Default_and_FullRight_glue:N
- \cs_set_eq:NN
+ \xeCJK_swap_cs:NN
\__xeCJK_CJK_and_FullLeft_glue:N \__xeCJK_ulem_CJK_and_FullLeft_glue:N
- \cs_set_eq:NN
+ \xeCJK_swap_cs:NN
\__xeCJK_CJK_and_FullRight_glue:N \__xeCJK_ulem_CJK_and_FullRight_glue:N
- \cs_set_eq:NN
+ \xeCJK_swap_cs: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
+ \xeCJK_swap_cs:NN \__xeCJK_punct_hskip:n \__xeCJK_ulem_punct_hskip:n
+ \xeCJK_swap_cs:NN \xeCJK_FullLeft_and_Default: \__xeCJK_ulem_FullLeft_and_Default:
+ \xeCJK_swap_cs:NN \xeCJK_FullLeft_and_CJK: \__xeCJK_ulem_FullLeft_and_CJK:
+ \xeCJK_swap_cs:NN \xeCJK_FullRight_and_Default: \__xeCJK_ulem_FullRight_and_Default:
+ \xeCJK_swap_cs:NN \xeCJK_FullRight_and_CJK: \__xeCJK_ulem_FullRight_and_CJK:
+ \xeCJK_swap_cs: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
@@ -126,12 +128,24 @@
}
}
}
+\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_CJK_and_CJK:N
{
- \xeCJK_class_group_end:
- \UL@stop \__xeCJK_ulem_ccglue: \UL@start
- \__xeCJK_ulem_class_group_begin:
- \CJKsymbol
+ \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:
{
@@ -141,104 +155,154 @@
}
\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
+ \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
{
- \UL@stop
- \__xeCJK_ulem_skip_punct_begin:
- \__xeCJK_punct_glue:NN \c__xeCJK_left_tl {#1}
- \UL@start
+ \xeCJK_if_ulem_patch:TF
+ {
+ \UL@stop
+ \__xeCJK_ulem_skip_punct_begin:
+ \__xeCJK_punct_glue: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
{
- \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
+ \xeCJK_if_ulem_patch:TF
+ {
+ \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
+ }
+ { \__xeCJK_ulem_Boundary_and_FullLeft_glue:N #1 }
}
\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:
+ \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}
+ \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
{
- \UL@stop
- \__xeCJK_ulem_skip_punct_begin:
- \__xeCJK_punct_if_long:NTF {#1}
- { \__xeCJK_ulem_ccglue: }
+ \xeCJK_if_ulem_patch:TF
{
- \__xeCJK_punct_if_middle:NT {#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:
- \__xeCJK_punct_glue:NN \c__xeCJK_right_tl {#1}
}
- \xeCJK_no_break:
+ \UL@start
}
- \UL@start
+ { \__xeCJK_ulem_Default_and_FullRight_glue:N #1 }
}
\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:
+ \xeCJK_if_ulem_patch:TF
+ {
+ \xeCJK_class_group_end:
+ \__xeCJK_ulem_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_punct_if_middle:NTF \g__xeCJK_last_punct_tl
+ \xeCJK_if_ulem_patch:TF
{
- \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_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
}
- { \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_ulem_FullLeft_and_Default:
- \__xeCJK_ulem_class_group_begin:
+ \xeCJK_if_ulem_patch:TF
+ {
+ \__xeCJK_ulem_FullLeft_and_Default:
+ \__xeCJK_ulem_class_group_begin:
+ }
+ { \__xeCJK_ulem_FullLeft_and_CJK: }
}
\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
+ \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_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_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:
+ \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_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_glue:n #1
{
- \cs_if_eq:NNTF \ \LA@space
- { \skip_horizontal: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 }