From 1732ebc134ca8655447d90fca802e3f6c782500b Mon Sep 17 00:00:00 2001 From: atXY Date: Tue, 19 Mar 2024 15:32:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20ctxdoc=20=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=E5=91=BD=E4=BB=A4=20(CTeX-org/ctex-kit#703)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/njuthesis.dtx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/source/njuthesis.dtx b/source/njuthesis.dtx index ac4eddb..29ae0c8 100644 --- a/source/njuthesis.dtx +++ b/source/njuthesis.dtx @@ -8730,10 +8730,25 @@ To produce the documentation run the original source files ending with % % 处理丢失的展开类型实现向后兼容。在2023年11月,\cls{l3doc} 进行了一系列展开类型修改。 % 详见 \href{https://github.com/CTeX-org/ctex-kit/pull/678}{\texttt{CTeX-org/ctex-kit\#678}} -% 以及 \href{https://github.com/CTeX-org/ctex-kit/pull/700}{\texttt{CTeX-org/ctex-kit\#700}}. +% 以及 \href{https://github.com/CTeX-org/ctex-kit/pull/700}{\texttt{CTeX-org/ctex-kit\#700}}。 % \begin{macrocode} \cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { x } -\cs_generate_variant:Nn \tl_replace_all:Nnn { No } +\cs_generate_variant:Nn \tl_replace_all:Nnn { No } +% \end{macrocode} +% +% 处理向后兼容。见 \href{https://github.com/CTeX-org/ctex-kit/pull/703}{\texttt{CTeX-org/ctex-kit\#703}}。 +% \begin{macrocode} +\cs_if_exist:NF \__codedoc_macroname_prefix:o + { + \cs_new_protected:Npn \__codedoc_macroname_prefix:n #1 + { + \__codedoc_if_macro_internal:nTF {#1} + { \__codedoc_typeset_aux:n {#1} } {#1} + } + \cs_generate_variant:Nn \__codedoc_macroname_prefix:n { o } + \cs_new_protected:Npn \__codedoc_macroname_suffix:N #1 + { \bool_if:NTF #1 { \__codedoc_typeset_TF: } { } } + } % \end{macrocode} % % \subsubsection{杂项}