diff options
Diffstat (limited to 'language/chinese')
-rw-r--r-- | language/chinese/ctex/README.md | 2 | ||||
-rw-r--r-- | language/chinese/ctex/ctex.dtx | 110 | ||||
-rw-r--r-- | language/chinese/ctex/ctex.pdf | bin | 1152148 -> 1154937 bytes | |||
-rw-r--r-- | language/chinese/ctex/ctxdoc.cls | 16 |
4 files changed, 80 insertions, 48 deletions
diff --git a/language/chinese/ctex/README.md b/language/chinese/ctex/README.md index fc0e62555f..e7ab08db2a 100644 --- a/language/chinese/ctex/README.md +++ b/language/chinese/ctex/README.md @@ -30,7 +30,7 @@ Issues and pull requests are welcome. Copyright and Licence --------------------- - Copyright (C) 2003--2021 + Copyright (C) 2003--2022 CTEX.ORG and any individual authors listed elsewhere in this file. ---------------------------------------------------------------------- diff --git a/language/chinese/ctex/ctex.dtx b/language/chinese/ctex/ctex.dtx index adc4440bc7..e01c5519d5 100644 --- a/language/chinese/ctex/ctex.dtx +++ b/language/chinese/ctex/ctex.dtx @@ -2,7 +2,7 @@ % !TeX program = XeLaTeX % !TeX encoding = UTF-8 % -% Copyright (C) 2003--2021 +% Copyright (C) 2003--2022 % CTEX.ORG and any individual authors listed elsewhere in this file. % -------------------------------------------------------------------------- % @@ -56,7 +56,7 @@ Issues and pull requests are welcome. Copyright and Licence --------------------- - Copyright (C) 2003--2021 + Copyright (C) 2003--2022 CTEX.ORG and any individual authors listed elsewhere in this file. ---------------------------------------------------------------------- @@ -163,7 +163,7 @@ Copyright and Licence \preamble - Copyright (C) 2003--2021 + Copyright (C) 2003--2022 CTEX.ORG and any individual authors listed in the documentation. --------------------------------------------------------------------- @@ -443,7 +443,7 @@ Copyright and Licence %<class|style|ctexcap|ctexhook|ctexpatch>\NeedsTeXFormat{LaTeX2e} %<class>\input{ctexbackend.cfg} %<class|style|ctexcap|ctexhook|ctexpatch>\RequirePackage{expl3} -%<+!driver>\GetIdInfo$Id: ctex.dtx fcbe2c0 2021-12-12 18:20:54 +0800 Qing Lee <sobenlee@gmail.com> $ +%<+!driver>\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ %<ctex> {Chinese adapter in LaTeX (CTEX)} %<ctex>\ProvidesExplPackage{\ExplFileName} %<ctexsize> {Chinese font size definition (CTEX)} @@ -530,7 +530,7 @@ Copyright and Licence %<founder>\ProvidesExplFile{ctex-fontset-founder.def} %<ubuntu> {Ubuntu fonts definition (CTEX)} %<ubuntu>\ProvidesExplFile{ctex-fontset-ubuntu.def} -%<!driver> {\ExplFileDate}{2.5.8}{\ExplFileDescription} +%<!driver> {\ExplFileDate}{2.5.9}{\ExplFileDescription} %</!(fd|ctexspa|dict|backend)> %<c19&rm>\ProvidesFile{c19rm.fd}% %<c19&sf>\ProvidesFile{c19sf.fd}% @@ -548,10 +548,10 @@ Copyright and Licence %<backend>\ProvidesFile{ctexbackend.cfg}% %<dict&theorem&GBK>\ProvidesDictionary{translator-theorem-dictionary}{ChineseGBK}% %<dict&theorem&UTF8>\ProvidesDictionary{translator-theorem-dictionary}{ChineseUTF8}% -%<fd> [2021/12/12 v2.5.8 Chinese font definition (CTEX)] -%<ctexspa> [2021/12/12 v2.5.8 Space info for CJKpunct (CTEX)] -%<backend> [2021/12/12 v2.5.8 Backend configuration file (CTEX)] -%<dict&theorem> [2021/12/12 v2.5.8 Chinese translation for theorem name (CTEX)] +%<fd> [2022/06/04 v2.5.9 Chinese font definition (CTEX)] +%<ctexspa> [2022/06/04 v2.5.9 Space info for CJKpunct (CTEX)] +%<backend> [2022/06/04 v2.5.9 Backend configuration file (CTEX)] +%<dict&theorem> [2022/06/04 v2.5.9 Chinese translation for theorem name (CTEX)] %</!(driver|readme|install|zhmap|spa|docstrip)> %<*driver> \documentclass{ctxdoc} @@ -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{6420} +% \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 @@ -3211,6 +3211,7 @@ Copyright and Licence % \item \pkg{ltxcmds} 宏包。 % \item \pkg{pdftexcmds} 宏包。 % \item \pkg{xkeyval} 宏包。 +% \item \pkg{chinese-jfm} 宏包。 % \end{itemize} % \item \pkg{fontspec} 宏包。 % \item[\ding{229}] 以上是使用 \LuaLaTeX{} 编译时的依赖项。 @@ -3292,9 +3293,18 @@ Copyright and Licence %<@@=ctex> % \end{macrocode} % +% \changes{v2.5.9}{2022/05/27}{设置消息模块的名字和类型。} +% % \begin{macrocode} %<*class|style> \RequirePackage { xparse , l3keys2e } +%<class>\prop_gput:Nnn \g_msg_module_type_prop { ctex } { Class } +%<article>\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexart } +%<book>\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexbook } +%<report>\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexrep } +%<beamer>\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexbeamer } +%<ctexsize>\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexsize } +%<ctexheading>\prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexheading } %</class|style> % \end{macrocode} % @@ -4550,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} @@ -4860,14 +4870,6 @@ Copyright and Licence end, "global") % \end{macrocode} % \end{macro} -% \begin{macro}{\ctex_ltj_use_jfont:} -% 使用 jfont,确保当前的 \tn{font} 是 jfont。 -% \begin{macrocode} - newluacmd("ctex_ltj_use_jfont:", function () - font.current(getattribute("ltj@curjfnt")) - end, "global", "protected") -% \end{macrocode} -% \end{macro} % \begin{macro}{\ctex_ltj_set_alt_font:nnnn} % |#1| 和 |#2| 分别是字符区间的首末,|#3| 是基础字体,|#4| 是替代字体。 % \begin{macrocode} @@ -5057,6 +5059,14 @@ Copyright and Licence % \end{macrocode} % \end{macro} % +% \begin{macro}{\ctex_ltj_use_jfont:} +% 使用 jfont,确保当前的 \tn{font} 是 jfont。 +% \begin{macrocode} +\cs_new_protected_nopar:Npn \ctex_ltj_use_jfont: + { \tex_setfontid:D \ltj@curjfnt } +% \end{macrocode} +% \end{macro} +% % \begin{macro}[int]{\ctex_ltj_subst_font:} % \tn{do@subst@correction} 在设置通过 \texttt{sub} 或者 \texttt{ssub} 函数定义的 % 字体时会用到。如果没有设置 \opt{SlantedFont},\pkg{fontspec} 会设置 @@ -5285,19 +5295,33 @@ Copyright and Licence % % \paragraph{字体族的定义与使用} % -% \begin{macro}[int]{\ctex_mono_jfm:n} -% \begin{variable}{\l_@@_jfm_tl} -% \pkg{LuaTeX-ja} 中与标点格式 \opt{plain} 对应的 \texttt{JFM} 是 \opt{mono}。 +% \changes{v2.5.9}{2022/05/26}{依赖 \pkg{chinese-jfm} 宏包。} +% +% \begin{macro}[int]{\ctex_set_jfm:n} +% \begin{variable}{\l_@@_jfm_tl, \l_@@_redirect_jfm_prop} +% 设置 \texttt{JFM},需要进行一些重定向操作。 % \begin{macrocode} -\cs_new_protected:Npn \ctex_mono_jfm:n #1 +\cs_new_protected:Npn \ctex_set_jfm:n #1 { - \str_if_eq:nnTF {#1} { plain } - { \tl_set:Nn \l_@@_jfm_tl { mono } } + \prop_get:NnNF \l_@@_redirect_jfm_prop {#1} \l_@@_jfm_tl { \tl_set:Nn \l_@@_jfm_tl {#1} } } +\cs_generate_variant:Nn \ctex_set_jfm:n { o } +\prop_new:N \l_@@_redirect_jfm_prop +\prop_set_from_keyval:Nn \l_@@_redirect_jfm_prop + { + plain = mono , + quanjiao = zh_CN / quanjiao , + banjiao = zh_CN / banjiao , + kaiming = zh_CN / kaiming + } +\keys_define:nn { ctex_ltj / fontspec } + { + JFM .code:n = \ctex_set_jfm:n {#1} , + JFM .value_required:n = true + } \tl_new:N \l_@@_jfm_tl -\cs_generate_variant:Nn \ctex_mono_jfm:n { o } -\ctex_mono_jfm:o { \l__ctex_punct_tl } +\ctex_set_jfm:o { \l__ctex_punct_tl } % \end{macrocode} % \end{variable} % \end{macro} @@ -6966,7 +6990,7 @@ Copyright and Licence \tl_set:Nx \l_@@_punct_tl {#1} %<pdftex> \punctstyle { \l_@@_punct_tl } %<xetex> \xeCJKsetup { PunctStyle = \l_@@_punct_tl } -%<luatex> \ctex_mono_jfm:o { \l_@@_punct_tl } +%<luatex> \ctex_set_jfm:o { \l_@@_punct_tl } %<uptex|aptex> \msg_warning:nn { ctex } { invalid-option } } , punct .default:n = { quanjiao } , @@ -10920,17 +10944,17 @@ Copyright and Licence % 文件标识信息。 % \begin{macrocode} %<adobe>\ProvidesFile{ctex-zhmap-adobe.tex}% -%<adobe> [2021/12/12 v2.5.8 Adobe font map loader for DVIPDFMx (CTEX)] +%<adobe> [2022/06/04 v2.5.9 Adobe font map loader for DVIPDFMx (CTEX)] %<fandol>\ProvidesFile{ctex-zhmap-fandol.tex}% -%<fandol> [2021/12/12 v2.5.8 Fandol font map loader for DVIPDFMx (CTEX)] +%<fandol> [2022/06/04 v2.5.9 Fandol font map loader for DVIPDFMx (CTEX)] %<founder>\ProvidesFile{ctex-zhmap-founder.tex}% -%<founder> [2021/12/12 v2.5.8 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] +%<founder> [2022/06/04 v2.5.9 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] %<mac>\ProvidesFile{ctex-zhmap-mac.tex}% -%<mac> [2021/12/12 v2.5.8 Mac font map loader for DVIPDFMx (CTEX)] +%<mac> [2022/06/04 v2.5.9 Mac font map loader for DVIPDFMx (CTEX)] %<ubuntu>\ProvidesFile{ctex-zhmap-ubuntu.tex}% -%<ubuntu> [2021/12/12 v2.5.8 Ubuntu font map loader for DVIPDFMx (CTEX)] +%<ubuntu> [2022/06/04 v2.5.9 Ubuntu font map loader for DVIPDFMx (CTEX)] %<windows>\ProvidesFile{ctex-zhmap-windows.tex}% -%<windows> [2021/12/12 v2.5.8 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] +%<windows> [2022/06/04 v2.5.9 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] % \end{macrocode} % % \paragraph{\pkg{ctex-zhmap-adobe.tex}} @@ -11558,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 { @@ -11569,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} @@ -11589,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. @@ -11609,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. @@ -11783,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/language/chinese/ctex/ctex.pdf b/language/chinese/ctex/ctex.pdf Binary files differindex e4e02e6d8b..1f2e3782ca 100644 --- a/language/chinese/ctex/ctex.pdf +++ b/language/chinese/ctex/ctex.pdf diff --git a/language/chinese/ctex/ctxdoc.cls b/language/chinese/ctex/ctxdoc.cls index 9e5d39f97d..8b353bd0e3 100644 --- a/language/chinese/ctex/ctxdoc.cls +++ b/language/chinese/ctex/ctxdoc.cls @@ -21,7 +21,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctxdoc.cls 838ebab 2021-11-19 14:11:35 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctxdoc.cls 87d629c 2022-05-23 22:55:12 +0800 Qing Lee <sobenlee@gmail.com> $ {ctex documentation (CTEX)} \ProvidesExplClass{ctxdoc}{\ExplFileDate}{}{\ExplFileDescription} \ExplSyntaxOff @@ -301,8 +301,10 @@ \GetFileInfo {#1} \file_get:nnNTF { \c_sys_jobname_str .id } { \int_set:Nn \tex_endlinechar:D { -1 } } \l__ctxdoc_tmp_tl - { \exp_after:wN \GetIdInfo \l__ctxdoc_tmp_tl } + { \tl_if_empty:NTF \l__ctxdoc_tmp_tl } + { \use_i:nn } { \GetIdInfo $Id$ } + { \exp_after:wN \GetIdInfo \l__ctxdoc_tmp_tl } { \fileinfo } } \cs_new_eq:NN \__ctxdoc_ltx_changes:nnn \changes@ @@ -431,14 +433,20 @@ \if@inlabel \global \@inlabelfalse \@noparlistfalse - \llap { \box \@labels \hskip \leftskip } + \unless \ifvoid \CTEX@labelbox + \llap { \box \CTEX@labelbox \hskip \leftskip } + \fi \fi #1 } } \ctex_patch_cmd:Nnn \macro@code { \if@inlabel \leavevmode \fi } - { \partopsep \z@skip } + { + \partopsep \z@skip + \if@inlabel \setbox \CTEX@labelbox \copy \@labels \fi + } +\newbox \CTEX@labelbox \group_begin: \int_set:Nn \tex_endlinechar:D { -1 } \use:n |