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

newtx 宏包 version 1.60 更新后与 ctex 冲突 #454

Closed
3 tasks done
TomBener opened this issue Oct 15, 2019 · 5 comments
Closed
3 tasks done

newtx 宏包 version 1.60 更新后与 ctex 冲突 #454

TomBener opened this issue Oct 15, 2019 · 5 comments

Comments

@TomBener
Copy link

检查

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

编译环境

  • 操作系统

    • macOS
  • TeX 发行版

    • TeX Live 2019

描述问题

newtx 宏包更新(版本为 version 1.60,2019 年 10 月 9 日更新的版本)后与 ctex 冲突。

最小工作示例(MWE)

\documentclass[12pt,a4paper]{ctexart}

\usepackage{newtxmath}
\usepackage{lipsum}

\begin{document}
\lipsum[1-2]
\end{document}

(用 XeLaTeX 编译后)输出

TraditionalBuilder: Engine: xelatex. Invoking latexmk... done.

Errors:

test.tex:763: LaTeX Error: Command `\lvert' already defined. [...thopen}  {symbols}{106}{largesymbols}{12}]
test.tex:764: LaTeX Error: Command `\rvert' already defined. [...thclose} {symbols}{106}{largesymbols}{12}]
test.tex:765: LaTeX Error: Command `\lVert' already defined. [...thopen}  {symbols}{107}{largesymbols}{13}]
test.tex:766: LaTeX Error: Command `\rVert' already defined. [...thclose} {symbols}{107}{largesymbols}{13}]

Warnings:

/usr/local/texlive/2019/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.def: Package fontspec Warning: Font "Songti SC Light" does not contain requested(fontspec)                Script "CJK".
(Log parsing issues. Disregard unless something else is wrong.)

test.log:1: Double-click here to open the full log.

[Done!]
@stone-zeng stone-zeng transferred this issue from CTeX-org/forum Oct 15, 2019
@stone-zeng
Copy link
Member

研究了一下,发现是 ulem 宏包把 \MakeRobust 命令「自作主张」重定义了,因此使得 \set@mathdelimiter 之后 \lvert 等命令被多展开了一次,从而与 newtxmath 发生冲突。

@stone-zeng
Copy link
Member

@stone-zeng
Copy link
Member

stone-zeng commented Nov 10, 2019

b61b7e6 中不再自动载入 (xe)CJKfntef 包之后,这个问题至少就被掩盖起来了。如果需要使用 xeCJKfntef,只需在 newtxmath 之后调用即可:

\documentclass{ctexart}
\usepackage{newtxmath,xeCJKfntef}
\begin{document}
\CJKunderline{虚室生白,吉祥止止}\par
\CJKunderdblline{虚室生白,吉祥止止}\par
\CJKunderwave{虚室生白,吉祥止止}\par
\CJKsout{虚室生白,吉祥止止}\par
\CJKxout{虚室生白,吉祥止止}
\end{document}

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Mar 20, 2020

研究了一下,发现是 ulem 宏包把 \MakeRobust 命令「自作主张」重定义了,因此使得 \set@mathdelimiter 之后 \lvert 等命令被多展开了一次,从而与 newtxmath 发生冲突。
#454 (comment)

ulem 2019/11/18 修复了该问题。详见 #470 (comment)

使用 texlive 2019 的冻结版本(即,安装 texlive 2019 并升级所有宏包)编译 issue 中提供的 mwe(见 #454 (comment) ),

  • pdflatex 和 xelatex 均不再报错
  • lualatex 会在加载宏包 newtxmath 时报错 \Zbar 已定义,可通过在 \usepackage{newtxmath} 前添加 \let\Zbar\relax 避免。
    经查 \Zbar 在宏包 xunicode 中初次定义,属于 xunicodenewtxmath 的兼容性问题。这应该是长期存在的问题。

当前 issue 报告的问题(xelatex 编译特定例子时报错,命令 \lvert 等已定义)可通过更新 ulem 包解决,关闭 issue。

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

3 participants