summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexpatch.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexpatch.sty30
1 files changed, 15 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty
index 95c811fb41c..03bbb06dec0 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty
+++ b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 1fcc459 2016-04-25 13:35:13 +0800 Liu Haiyang <leoliu.pku@gmail.com> $
+\GetIdInfo$Id: ctex.dtx f745b21 2016-05-14 12:17:18 +0800 Qing Lee <sobenlee@gmail.com> $
{Patching commands (CTEX)}
\ProvidesExplPackage{ctexpatch}
- {\ExplFileDate}{2.4}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.1}{\ExplFileDescription}
\cs_if_exist:NF \str_new:N { \RequirePackage { l3str } }
\cs_new_protected:Npn \ctex_patch_cmd_once:NnnnTF #1#2
{
@@ -153,18 +153,17 @@
\ctex_get_macro_meaning:N ##1 { TF }
{
\exp_after:wN \__ctex_get_macro_meaning:w
- \token_to_meaning:N ##1 \q_mark #1 -> \q_no_value \q_mark \q_stop
+ \token_to_meaning:N ##1 \q_mark #1 -> \q_mark \q_stop
}
\cs_new_protected:Npn \__ctex_get_macro_meaning:w
##1 #1 ##2 -> ##3 \q_mark ##4 \q_stop
{
- \tl_set:Nn \l__ctex_replacement_tl {##3}
- \quark_if_no_value:NTF \l__ctex_replacement_tl
+ \tl_if_empty:nTF { ##4 }
{ \prg_return_false: }
{
- \str_set:Nn \l__ctex_prefix_str {##1}
- \str_set:Nn \l__ctex_parameter_str {##2}
- \str_set:Nn \l__ctex_replacement_str {##3}
+ \str_set:Nn \l__ctex_prefix_str { ##1 }
+ \str_set:Nn \l__ctex_parameter_str { ##2 }
+ \str_set:Nn \l__ctex_replacement_str { ##3 }
\prg_return_true:
}
}
@@ -197,7 +196,7 @@
{
\str_if_empty:NTF #2
{ \tl_clear:N #1 }
- { \tl_set_rescan:Nnx #1 {#3} {#2} }
+ { \tl_set_rescan:Nno #1 {#3} {#2} }
}
\tl_new:N \l__ctex_prefix_tl
\tl_new:N \l__ctex_parameter_tl
@@ -232,24 +231,25 @@
\ctex_get_macro_meaning:NTF #1
{
\str_if_empty:NTF \l__ctex_parameter_str
- { \__ctex_hookto_cmd_parameterless:Nnnw #1 {#2} {#4} }
- { \__ctex_hookto_cmd_parameter:Nnnnw #1 {#2} {#3} {#4} }
+ { \__ctex_hookto_cmd_parameterless:Nnnnw }
+ { \__ctex_hookto_cmd_parameter:Nnnnw }
+ #1 {#2} {#3} {#4}
}
{ \__ctex_patch_false:w }
}
-\cs_new_protected:Npn \__ctex_hookto_cmd_parameterless:Nnnw #1#2#3
+\cs_new_protected:Npn \__ctex_hookto_cmd_parameterless:Nnnnw #1#2#3#4
{
\str_if_empty:NF \l__ctex_prefix_str
- { \tl_rescan:nx { } { \l__ctex_prefix_str } }
+ { \tl_rescan:no {#3} { \l__ctex_prefix_str } }
\tex_edef:D #1
{
\use:c { __ctex_ #2 _hook_aux:nn }
{ \exp_not:o {#1} }
- { \exp_not:n {#3} }
+ { \exp_not:n {#4} }
}
\__ctex_patch_true:w
}
-\cs_generate_variant:Nn \tl_rescan:nn { nx }
+\cs_generate_variant:Nn \tl_rescan:nn { no }
\cs_new:Npn \__ctex_left_hook_aux:nn #1#2 { #2#1 }
\cs_new_eq:NN \__ctex_right_hook_aux:nn \use:nn
\cs_new_protected:Npn \__ctex_hookto_cmd_parameter:Nnnnw #1#2#3#4