-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctxdoc: 匹配 l3doc 的展开类型修改 #700
Conversation
Line 6579 in 0095bcc
我看了一下,
不论是 可以在 -\LoadClass{l3doc}
+\LoadClass{l3doc}[2023-10-10] |
可是你引用的是 Line 298 in 0095bcc
我提供基于一个我使用的文档的 MWE 来复现问题,保存文件名为 % \iffalse meta-comment
% !TeX program = XeLaTeX
% !TeX encoding = UTF-8
%
%<*internal>
\begingroup
\def\NameOfLaTeXe{LaTeX2e}
\expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else
\csname fi\endcsname
%</internal>
%
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
Preamble text
\endpreamble
\generate{
\usedir{tex/latex/\jobname}
\file{\jobname.cls} {\from{\jobname.dtx}{class}}
%<*internal>
\usedir{source/latex/\jobname}
\file{\jobname.ins} {\from{\jobname.dtx}{install}}
%</internal>
}
\endbatchfile
%</install>
%
%<*internal>
\fi
%</internal>
%
%
%<*driver>
\ProvidesFile{t.dtx}
\documentclass[fontset=fandol, scheme=plain]{ctxdoc}
\ExplSyntaxOn
\cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { x } ^^A patch for current version of ctex
\ExplSyntaxOff
\begin{document}
\DocInput{t.dtx}
\end{document}
%</driver>
% \fi
%
% \begin{implementation}
%
% \begin{macro}{\foo}
% \begin{macrocode}
\foo
% \end{macrocode}
% \end{macro}
%
% \end{implementation}
%
这一点我了解了,会在全部问题讨论完后统一改一下。 |
你说的对,我看错了。 在 l3kernel 2023-12-08 之前, 也许 diff --git a/support/ctxdoc.cls b/support/ctxdoc.cls
index 2d476b0..56b7d01 100644
--- a/support/ctxdoc.cls
+++ b/support/ctxdoc.cls
@@ -295,8 +295,8 @@
{ \use:n }
{
\tl_set:Nn \l__codedoc_tmpa_tl {#1}
- \tl_replace_all:Non \l__codedoc_tmpa_tl
- { \c_catcode_other_space_tl }
+ \tl_replace_all:NVn \l__codedoc_tmpa_tl
+ \c_catcode_other_space_tl
{ \fontspec_visible_space: }
\__codedoc_macroname_prefix:o \l__codedoc_tmpa_tl
\__codedoc_macroname_suffix:N #2 |
@@ -28,7 +28,7 @@ | |||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}} | |||
\PassOptionsToClass{a4paper,full}{l3doc} | |||
\ProcessOptions | |||
\LoadClass{l3doc} | |||
\LoadClass{l3doc}[2023-10-10] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
太小的修改容易过度 review,比如「这个修改要不要作为单独的 commit」。是我的问题,不要像我一样纠结。
Update: 其实在发之前的评论时,我还纠结这里的日期是写(根据已知信息)兼容的最老的(2023-10-10)还是最新的(2024-02-20)。
- See CTeX-org/ctex-kit#700 and CTeX-org/ctex-kit#703. - Close #344.
今天编译文档时发现
\tl_replace_all:Non
的定义也消失了,粗略翻了一圈没能追溯到l3kernel
中的修改时间,先凑合提交了一个补丁来让代码跑起来。此外,关于 #678,为了向后兼容性还是把
e
型展开手动补上了。如果有更好的改法请不吝赐教!