CTeX-org / ctex-kit

Macro Packages and Scripts for Chinese TeX users
972 stars 124 forks source link

ctxdoc 中 arguments 环境会产生缩进错误 #589

Closed atxy-blip closed 2 years ago

atxy-blip commented 2 years ago

贵开发者您好!近期我尝试在 DocStrip 文件中使用 arguments 环境来描述函数的参数,然而生成pdf后,参数序号和参数描述之间的间距不对,两者发生了重叠。单纯使用 l3doc 并不会产生错误,因此我认为可能是 ctxdoc 在进行修改时产生了冲突,定位到如下语句,原因可能是修改标签缩进时忽略了特殊情况。

\setlist[1]{labelindent=\parindent}

可以编译如下所示的MWE来复现这个问题。

% \iffalse
%
%<*driver>
\documentclass{ctxdoc}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \begin{implementation}
%    \begin{macrocode}
%<*package>
%<@@=test>
%    \end{macrocode}
% \begin{macro}{\@@_my_func:nn}
% 一些话。
% \begin{arguments}
%   \item 参数
%   \item 参数
% \end{arguments}
% 一些话。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_my_func:nn #1#2
{
  { do nothing }
}
%</package>
%    \end{macrocode}
% \end{macro}
% \end{implementation}