无法在 xeCJKfntef 宏包的 \CJKunderanyline* 命令中使用\zhlipsum 以及 \lisum 命令?

发布于 2025-12-06 08:34:19

发行版texlive2025
编译命令:xelatex
问题\zhlipsum 以及 \lisum 命令无法使用 xeCJKfntef 宏包的 \CJKunderanyline* 命令?但 \newcommand\testtext 却可以在 \CJKunderanyline* 中使用
MWE: 如下

\documentclass{ctexart}
\usepackage{lipsum,zhlipsum}
\usepackage{xcolor}
\usepackage{xeCJKfntef}
\newcommand{\testtext}{我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。}
\begin{document}
\CJKunderanyline*{0.5ex}{\color{cyan!10}\rule{2pt}{2.5ex}}{\zhlipsum[1]}
\CJKunderanyline*{0.5ex}{\color{cyan!10}\rule{2pt}{2.5ex}}{\lipsum[1]}

\CJKunderanyline*{0.5ex}{\color{cyan!10}\rule{2pt}{2.5ex}}{\testtext}

\CJKunderanyline*{0.5ex}{\color{cyan!10}\rule{2pt}{2.5ex}}{我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。}
\end{document}

效果如下:
image.png

查看更多

关注者
0
被浏览
109
1 个回答
雾月
雾月 1天前
这家伙很懒,什么也没写!

xeCJKfntef 基于 ulem 实现,ulem 限制很多,不能随便加组,\zhlipsum 就有:

\NewDocumentCommand \zhlipsum { s o +o }
  {
    \group_begin:
      \IfBooleanF {#1}
        ...
  }

保存在宏里的文字一般也无法换行,见 ulem.pdf 第 5 页。
image.png

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览