diff --git a/ctex/ctex.dtx b/ctex/ctex.dtx index 352c77e4..eb8e8ce9 100644 --- a/ctex/ctex.dtx +++ b/ctex/ctex.dtx @@ -575,7 +575,7 @@ Copyright and Licence % \changes{v2.4.15}{2019/03/23}{同步 \LaTeXiii{} 2019/03/05。} % \changes{v2.5.1}{2020/05/02}{\pkg{zhconv} 更名为 \pkg{ctex-zhconv}。} % -% \CheckSum{6430} +% \CheckSum{6444} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -3293,9 +3293,18 @@ Copyright and Licence %<@@=ctex> % \end{macrocode} % +% \changes{v2.5.9}{2022/05/27}{设置消息模块的名字和类型。} +% % \begin{macrocode} %<*class|style> \RequirePackage { xparse , l3keys2e } +%\prop_gput:Nnn \g_msg_module_type_prop { ctex } { Class } +%
\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexart } +%\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexbook } +%\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexrep } +%\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexbeamer } +%\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexsize } +%\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexheading } % % \end{macrocode} % @@ -4551,9 +4560,9 @@ Copyright and Licence { \msg_critical:nnx { ctex } { luatexja-loaded } { \g_file_curr_name_str } } { \ctex_at_begin_package:nn { luatexja } - { \msg_redirect_name:nnn { ctex } { disable-package } { info } } + { \msg_redirect_name:nnn { ctexhook } { disable-package } { info } } \ctex_at_end_package:nn { luatexja } - { \msg_redirect_name:nnn { ctex } { disable-package } { } } + { \msg_redirect_name:nnn { ctexhook } { disable-package } { } } \ctex_disable_package:n { ltj-latex } } % \end{macrocode} @@ -11573,7 +11582,7 @@ Copyright and Licence \@ifpackageloaded {#1} { \msg_error:nnxx } { \@@_disable_package_aux:nnnn } - { ctex } { disable-package } {#1} { \@currname } + { ctexhook } { disable-package } {#1} { \@currname } } \cs_new_protected:Npx \@@_disable_package_aux:nnnn #1#2#3#4 { @@ -11584,7 +11593,7 @@ Copyright and Licence } { \tl_const:cn { ver@ #3 . \exp_not:N \@pkgextension } { 9999/99/99 } } } -\msg_new:nnn { ctex } { disable-package } +\msg_new:nnn { ctexhook } { disable-package } { Package~`#1'~can~not~be~loaded~with~`#2'. } % \end{macrocode} % \end{macro} @@ -11604,8 +11613,8 @@ Copyright and Licence } { \cs_new_protected:Npn \ctex_replace_package:nn - { \msg_warning:nnnn { ctex } { replace-package-invalid } } - \msg_new:nnn { ctex } { replace-package-invalid } + { \msg_warning:nnnn { ctexhook } { replace-package-invalid } } + \msg_new:nnn { ctexhook } { replace-package-invalid } { \token_to_str:N \ctex_replace_package:nn \{#1\}\{#2\}~is~invalid~ before~LaTeX~2020-10-01. @@ -11624,8 +11633,8 @@ Copyright and Licence { \ctex_gadd_package_hook:nnn { before } {#1} } } \cs_new_protected:Npn \@@_package_loaded_warning:nn #1#2 - { \msg_warning:nnx { ctex } { invalid-hook } {#1} } -\msg_new:nnn { ctex } { invalid-hook } + { \msg_warning:nnx { ctexhook } { invalid-hook } {#1} } +\msg_new:nnn { ctexhook } { invalid-hook } { Package~`#1'~is~loaded. \\ \token_to_str:N \ctex_at_begin_package:nn \{#1\}\{...\}~is~invalid. @@ -11798,8 +11807,8 @@ Copyright and Licence { \ctex_patch_failure:N #1 } } \cs_new_protected:Npn \ctex_patch_failure:N #1 - { \msg_warning:nnx { ctex } { patch-failure } { \token_to_str:N #1 } } -\msg_new:nnn { ctex } { patch-failure } + { \msg_warning:nnx { ctexpatch } { patch-failure } { \token_to_str:N #1 } } +\msg_new:nnn { ctexpatch } { patch-failure } { Oops!~Command~`#1'~is~NOT~patchable.\\ } % \end{macrocode} % \end{macro} diff --git a/ctex/test/testfiles/ctexhook.tlg b/ctex/test/testfiles/ctexhook.tlg index 616205c7..0ffd3034 100644 --- a/ctex/test/testfiles/ctexhook.tlg +++ b/ctex/test/testfiles/ctexhook.tlg @@ -4,8 +4,9 @@ Author: Xiangdong Zeng ============================================================ TEST 1: Package hook ============================================================ -Package ctex Warning: Package `indentfirst' is loaded. -(ctex) \ctex_at_begin_package:nn{indentfirst}{...} is invalid. +Package ctexhook Warning: Package `indentfirst' is loaded. +(ctexhook) \ctex_at_begin_package:nn{indentfirst}{...} is +(ctexhook) invalid. End hook: indentfirst Begin hook: somedefs (../somedefs.sty) diff --git a/ctex/test/testfiles/space.luatex.tlg b/ctex/test/testfiles/space.luatex.tlg index cf99a66a..f668e9c4 100644 --- a/ctex/test/testfiles/space.luatex.tlg +++ b/ctex/test/testfiles/space.luatex.tlg @@ -4,7 +4,7 @@ Author: Xiangdong Zeng ============================================================ TEST 1: space = true ============================================================ -Package ctex Warning: Option `space' is invalid in current mode. +Class ctexart Warning: Option `space' is invalid in current mode. (load cache: extra_lmromanslant10-regular.luc) LaTeX Font Info: Font shape `LTJY3/FandolSong-Regular(0)/m/sl' in size <10.53937> not available (Font) Font shape `LTJY3/FandolSong-Regular(0)/m/it' tried instead on input line .... @@ -124,7 +124,7 @@ Completed box being shipped out [1] ============================================================ TEST 2: space = false ============================================================ -Package ctex Warning: Option `space' is invalid in current mode. +Class ctexart Warning: Option `space' is invalid in current mode. Completed box being shipped out [2] \vbox(633.0+0.0)x407.0, direction TLT .\whatsit4=[] @@ -241,7 +241,7 @@ Completed box being shipped out [2] ============================================================ TEST 3: space = auto ============================================================ -Package ctex Warning: Option `space' is invalid in current mode. +Class ctexart Warning: Option `space' is invalid in current mode. Completed box being shipped out [3] \vbox(633.0+0.0)x407.0, direction TLT .\whatsit4=[] diff --git a/ctex/test/testfiles/space.uptex.tlg b/ctex/test/testfiles/space.uptex.tlg index 556c0669..a8237c63 100644 --- a/ctex/test/testfiles/space.uptex.tlg +++ b/ctex/test/testfiles/space.uptex.tlg @@ -4,7 +4,7 @@ Author: Xiangdong Zeng ============================================================ TEST 1: space = true ============================================================ -Package ctex Warning: Option `space' is invalid in current mode. +Class ctexart Warning: Option `space' is invalid in current mode. LaTeX Font Warning: Font shape `JY2/zhrm/m/sl' undefined (Font) using `JY2/zhrm/m/it' instead on input line .... Completed box being shipped out [1] @@ -85,7 +85,7 @@ Completed box being shipped out [1] ============================================================ TEST 2: space = false ============================================================ -Package ctex Warning: Option `space' is invalid in current mode. +Class ctexart Warning: Option `space' is invalid in current mode. LaTeX Font Warning: Font shape `JY2/zhrm/m/sl' undefined (Font) using `JY2/zhrm/m/it' instead on input line .... Completed box being shipped out [2] @@ -152,7 +152,7 @@ Completed box being shipped out [2] ============================================================ TEST 3: space = auto ============================================================ -Package ctex Warning: Option `space' is invalid in current mode. +Class ctexart Warning: Option `space' is invalid in current mode. LaTeX Font Warning: Font shape `JY2/zhrm/m/sl' undefined (Font) using `JY2/zhrm/m/it' instead on input line .... Completed box being shipped out [3]