Skip to content
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

\CJKunderline 的参数为文字与公式时的问题 #206

Closed
3 of 11 tasks
syvshc opened this issue Jul 25, 2021 · 1 comment
Closed
3 of 11 tasks

\CJKunderline 的参数为文字与公式时的问题 #206

syvshc opened this issue Jul 25, 2021 · 1 comment

Comments

@syvshc
Copy link

syvshc commented Jul 25, 2021

检查

  • 已在 issues 中进行搜索(包括已关闭的问题)

编译环境

  • 操作系统

    • Windows 10
    • Windows 8/8.1
    • Windows 7
    • 更早版本的 Windows
    • macOS
    • Linux(请附发行版)
  • TeX 发行版

    • TeX Live 2021
    • MiKTeX
    • CTeX 套装 2.9.2.164
    • 更早版本的 CTeX 套装

描述问题

\CJKunderline 后的参数为 "汉字$公式$" 即汉字和 $ 中间没有空格的形式时会报错, 参数为 "汉字 $公式$" 时不报错但是输出间距不正确, 其余情况如 "english$formula$, "english $formula$", "$公式$汉字", "$公式$ 汉字$" 均不报错且输出间距没问题. 以下是 mwe

最小工作示例(MWE)

  1. "汉字$公式$"
\documentclass{ctexart}
\usepackage{xeCJKfntef}
\begin{document}
    \CJKunderline{汉字$ x^2 $} 
\end{document}

报错为

! Too many }'s.
\UL@stop ... \UL@putbox \fi \else \egroup \egroup
                                                  \UL@putbox \fi \ifnum \UL@...
l.10     \CJKunderline{汉字$ x^2 $}

?
  1. "汉字 $公式$"
\documentclass{ctexart}
\usepackage{xeCJKfntef}
\begin{document}
    \CJKunderline{汉字 $ x^2 $} 
\end{document}

不报错且没有 warning, 输出为
image

  1. 其余情况
\documentclass{ctexart}
\usepackage{xeCJKfntef}
\begin{document}
    \CJKunderline{english $ x^2 $, english$ x^2 $, $ x^2 $ 汉字, $ x^2 $汉字 } 
\end{document}

image

以下是版本信息

 *File List*
 ctexart.cls    2021/06/20 v2.5.7 Chinese adapter for class article (CTEX)
ctexbackend.cfg    2021/06/20 v2.5.7 Backend configuration file (CTEX)
   expl3.sty    2021-07-12 L3 programming layer (loader) 
l3backend-xetex.def    2021-07-12 L3 backend support: XeTeX
  xparse.sty    2021-06-18 L3 Experimental document command parser
l3keys2e.sty    2021-06-18 LaTeX2e option processing using LaTeX3 keys
ctexhook.sty    2021/06/20 v2.5.7 Document and package hooks (CTEX)
ctexpatch.sty    2021/06/20 v2.5.7 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    2021/06/20 v2.5.7 Option configuration file (CTEX)
 article.cls    2021/02/12 v1.4n Standard LaTeX document class
  size10.clo    2021/02/12 v1.4n Standard LaTeX file (size option)
ctex-engine-xetex.def    2021/06/20 v2.5.7 XeLaTeX adapter (CTEX)
   xeCJK.sty    2021/06/20 v3.8.7 Typesetting CJK scripts with XeLaTeX
xtemplate.sty    2021-06-18 L3 Experimental prototype document functions
fontspec.sty    2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
fontspec-xetex.sty    2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
fontspec.cfg
   xeCJK.cfg    2021/06/20 v3.8.7 Configuration file for xeCJK package
zhnumber.sty    2020/05/01 v2.8 Typesetting numbers with Chinese glyphs
zhnumber-utf8.cfg    2020/05/01 v2.8 Chinese numerals with UTF8 encoding
ctex-scheme-chinese-article.def    2021/06/20 v2.5.7 Chinese scheme for article (CTEX)
ctex-name-utf8.cfg    2021/06/20 v2.5.7 Caption with encoding UTF-8 (CTEX)
ctex-c5size.clo    2021/06/20 v2.5.7 c5size option (CTEX)
ctex-fontset-windows.def    2021/06/20 v2.5.7 Windows fonts definition (CTEX)
    ctex.cfg    2021/06/20 v2.5.7 Configuration file (CTEX)
xeCJKfntef.sty    2021/06/20 v3.8.7 xeCJK font effect
    ulem.sty    2019/11/18
 ***********
@muzimuzhi
Copy link
Collaborator

已知问题,CTeX-org/ctex-kit#530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants