100 hanzibox宏包中`\writegrid`在本地TeXLive2024的输出行为异常

发布于 2024-11-20 19:55:20

使用@u78 耿老师的hanzibox宏包提供的\writegrid[gridcols=8]{10}命令时,本地TeXLive2024使用xelatex或者latexmk -xelatex编译显示均异常;而在Overleaf与TeXPage上使用xelatex编译效果正常,我觉得非常难以理解。

下面是MWE:

\documentclass{ctexart}
\usepackage[a4paper]{geometry}
\usepackage{hanzibox}
\usepackage{zhlipsum}
\begin{document}

\zhlipsum[1]

\begin{center}
    \hanziboxset{frametype=口,framecolor=black,charf=\huge}
    \writegrid[gridcols=8]{10}
\end{center}

\hanziboxset{xscale=1.5,yscale=1.5,resize=real}
\hanzibox*[frametype=口,pinyinline=true]{我}[wo3][吾]
\hanzibox*[frametype=田,pinyinline=true]{我}[wo2][愚]
\hanzibox*[frametype=咪,pinyinline=true]{我}[ta5][山人]

\end{document}

在Overleaf的效果:
image.png

在TeXPage上的效果:
image.png

在我本地TeXLive2024的效果:

image.png

我本地的tex版本信息如下:

image.png

使用\listfiles命令输出本地xelatex编译的信息如下:

 *File List*
 ctexart.cls    2022/07/14 v2.5.10 Chinese adapter for class article (CTEX)
ctexbackend.cfg    2022/07/14 v2.5.10 Backend configuration file (CTEX)
   expl3.sty    2024-02-20 L3 programming layer (loader) 
l3backend-xetex.def    2024-02-20 L3 backend support: XeTeX
ctexhook.sty    2022/07/14 v2.5.10 Document and package hooks (CTEX)
ctexpatch.sty    2022/07/14 v2.5.10 Patching commands (CTEX)
  fix-cm.sty    2020/11/24 v1.1t fixes to LaTeX
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
ctexopts.cfg    2022/07/14 v2.5.10 Option configuration file (CTEX)
 article.cls    2023/05/17 v1.4n Standard LaTeX document class
  size10.clo    2023/05/17 v1.4n Standard LaTeX file (size option)
ctex-engine-xetex.def    2022/07/14 v2.5.10 XeLaTeX adapter (CTEX)
   xeCJK.sty    2022/08/05 v3.9.1 Typesetting CJK scripts with XeLaTeX
xtemplate.sty    2023-10-10 L3 Experimental prototype document functions
xtemplate-2023-10-10.sty
fontspec.sty    2024/02/13 v2.9a Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2024-02-18 L3 Experimental document command parser
fontspec-xetex.sty    2024/02/13 v2.9a Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty    2021/04/29 v2.0v Standard LaTeX package
fontspec.cfg
   xeCJK.cfg    2022/08/05 v3.9.1 Configuration file for xeCJK package
zhnumber.sty    2022/07/14 v3.0 Typesetting numbers with Chinese glyphs
zhnumber-utf8.cfg    2022/07/14 v3.0 Chinese numerals with UTF8 encoding
ctex-scheme-chinese-article.def    2022/07/14 v2.5.10 Chinese scheme for articl
e (CTEX)
ctex-name-utf8.cfg    2022/07/14 v2.5.10 Caption with encoding UTF-8 (CTEX)
ctex-c5size.clo    2022/07/14 v2.5.10 c5size option (CTEX)
ctex-fontset-windows.def    2022/07/14 v2.5.10 Windows fonts definition (CTEX)
    ctex.cfg    2022/07/14 v2.5.10 Configuration file (CTEX)
geometry.sty    2020/01/02 v5.9 Page Geometry
  keyval.sty    2022/05/29 v1.15 key=value parser (DPC)
  ifvtex.sty    2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
   iftex.sty    2022/02/03 v1.0f TeX engine tests
hanzibox.sty    2022/04/17 v2.3.0 Boxed Chinese characters with Pinyin above an
d translation below.
l3keys2e.sty    2024-02-18 LaTeX2e option processing using LaTeX3 keys
  l3draw.sty    2024-02-20 L3 Experimental core drawing support
 xpinyin.sty    2022/07/14 v3.1 Automatically add pinyin to Chinese characters
xpinyin-database.def    2022/07/14 v3.1 xpinyin database
zhlipsum.sty    2020/04/10 v1.2.0 Chinese dummy text
zhlipsum-utf8.def    2020/04/10 v1.2.0 Chinese dummy text with UTF-8 encoding (
for zhlipsum)
 ***********

 )
Output written on article-mwe.pdf (1 page).
Transcript written on article-mwe.log.

TeXPage上测试的信息如下:

*File List*
 ctexart.cls    2022/07/14 v2.5.10 Chinese adapter for class article (CTEX)
ctexbackend.cfg    2022/07/14 v2.5.10 Backend configuration file (CTEX)
   expl3.sty    2024-05-27 L3 programming layer (loader) 
l3backend-xetex.def    2024-05-08 L3 backend support: XeTeX
ctexhook.sty    2022/07/14 v2.5.10 Document and package hooks (CTEX)
ctexpatch.sty    2022/07/14 v2.5.10 Patching commands (CTEX)
  fix-cm.sty    2020/11/24 v1.1t fixes to LaTeX
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
ctexopts.cfg    2022/07/14 v2.5.10 Option configuration file (CTEX)
 article.cls    2024/02/08 v1.4n Standard LaTeX document class
  size10.clo    2024/02/08 v1.4n Standard LaTeX file (size option)
ctex-engine-xetex.def    2022/07/14 v2.5.10 XeLaTeX adapter (CTEX)
   xeCJK.sty    2022/08/05 v3.9.1 Typesetting CJK scripts with XeLaTeX
xtemplate.sty    2024-05-08 L3 Experimental prototype document functions
fontspec.sty    2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2024-05-08 L3 Experimental document command parser
fontspec-xetex.sty    2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty    2021/04/29 v2.0v Standard LaTeX package
fontspec.cfg
   xeCJK.cfg    2022/08/05 v3.9.1 Configuration file for xeCJK package
zhnumber.sty    2022/07/14 v3.0 Typesetting numbers with Chinese glyphs
zhnumber-utf8.cfg    2022/07/14 v3.0 Chinese numerals with UTF8 encoding
ctex-scheme-chinese-article.def    2022/07/14 v2.5.10 Chinese scheme for article (CTEX)
ctex-name-utf8.cfg    2022/07/14 v2.5.10 Caption with encoding UTF-8 (CTEX)
ctex-c5size.clo    2022/07/14 v2.5.10 c5size option (CTEX)
ctex-fontset-fandol.def    2022/07/14 v2.5.10 Fandol fonts definition (CTEX)
    ctex.cfg    2022/07/14 v2.5.10 Configuration file (CTEX)
geometry.sty    2020/01/02 v5.9 Page Geometry
  keyval.sty    2022/05/29 v1.15 key=value parser (DPC)
  ifvtex.sty    2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
   iftex.sty    2022/02/03 v1.0f TeX engine tests
hanzibox.sty    2022/04/17 v2.3.0 Boxed Chinese characters with Pinyin above and translation below.
l3keys2e.sty    2024-05-08 LaTeX2e option processing using LaTeX3 keys
  l3draw.sty    2024-03-14 L3 Experimental core drawing support
 xpinyin.sty    2022/07/14 v3.1 Automatically add pinyin to Chinese characters
xpinyin-database.def    2022/07/14 v3.1 xpinyin database
zhlipsum.sty    2020/04/10 v1.2.0 Chinese dummy text
zhlipsum-utf8.def    2020/04/10 v1.2.0 Chinese dummy text with UTF-8 encoding (for zhlipsum)
 ***********

查看更多

关注者
0
被浏览
315
1 个回答
Sagittarius Rover
Sagittarius Rover 2024-11-21
我要成为TikZ糕手/(ㄒoㄒ)/~~

Thanks to Eureka and 小狮子

使用diff工具的比较结果如下:在TeXLive2024发行版(texlive20240312.iso)三月份的版本中,关于latex3的部分宏包出现bug,这导致hanzibox表现异常。此时通过tlmgr更新宏包版本(2024.11.21更新后实测正常)即可正常编译。

image.png

image.png

另外据OsbertWang回忆证实:hanzibox在TeXLive2023发行版完全正常,而在TeXLive2024发行版表现存在异常。希望找到是哪一个包的具体实现出现了该bug,同时如有可能,希望定位在texlive上hanzibox出现异常的"空挡"期,并已为此增加了悬赏积分。

撰写答案

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

发布
问题

分享
好友

手机
浏览

扫码手机浏览