Closed stone-zeng closed 3 years ago
说起来,latex3 的颜色和 xcolor
是兼容的吗?
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\textcolor{red}{
\expandafter\show\csname l__color_current_tl\endcsname
}
\end{document}
输出:
> \l__color_current_tl=macro:
->{gray}{0}.
<recently read> \l__color_current_tl
把
https://github.com/CTeX-org/ctex-kit/blob/6405ee14065c022ea9c2f030df727b20f7150c0c/xpinyin/xpinyin.dtx#L595-L612
里 604 行的 \color_ensure_current:
删去,问题就好了。但我不知道为什么。overleaf 上的 texlive 2019,问题不复现。
以及,上面的 \color_group_begin:
和 \color_group_end:
是多余的,可以删去,因为 \hbox_set:Nn
自带了一层 group。见提交 https://github.com/latex3/latex3/commit/a3fef0fe81ce1980943b924e09a5d6f354945653
之前
xpinyin
会将拼音与文本显示为相同的颜色,是不是因为 LaTeX kernel 修改了颜色分组有关定义?