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

newtexmath的数字字体看起来跟times差别很大啊? #105

Closed
xiaoyaoE opened this Issue Feb 13, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@xiaoyaoE
Copy link

xiaoyaoE commented Feb 13, 2019

752$\times$480,$752\times480$,渲染结果如图:
image

有时使用行内公式,渲染结果跟周边的times数字字体差别太明显。
翻了newtx的文档没有相关说明,没有提供数字字体的,mathrsfs包看起来也没有指定数字字体的选项,请问还有其他办法修改吗?

谢谢!

@zepinglee

This comment has been minimized.

Copy link

zepinglee commented Feb 13, 2019

是不是只加载了 newtxtext 没加载 newtxmath ?

@xiaoyaoE

This comment has been minimized.

Copy link
Author

xiaoyaoE commented Feb 13, 2019

artratex.sty

...
\else% <xelatex> or <lualatex> call system fonts
    \RequirePackage[cmintegrals]{newtxmath}% math symbol font, load after math but before fontspec packages
    \RequirePackage{fontspec}% support calling system fonts

根据代码,xelatex编译加载了newtxmath但是并没有加载newtxtext
另一方面,我看文档的意思是newtxtext会对文本而不是公式的字体产生影响,我自己实验的结果也是这样

@zepinglee
你那边的环境,公式中数字编译的结果是times字体?

@xiaoyaoE

This comment has been minimized.

Copy link
Author

xiaoyaoE commented Feb 13, 2019

我重新测试了一下

  1. 使用pdflatex编译,公式中数字为times字体;
  2. 使用xelatex编译,公式中数字字体如1楼中的右图所示
  3. xelatex条件部分手动加上\RequirePackage{newtxtext}后,正文和公式中的数字字体都变成公式中数字字体如1楼中的右图所示
@mohuangrui

This comment has been minimized.

Copy link
Owner

mohuangrui commented Feb 14, 2019

@xiaoyaoE 这个问题我已经折腾一阵子了,扒了很久才扒出问题所在,发现问题出在了 newtxmath 的默认设定上,进而找到了这个帖子以及其解决方案:tex.se

我已经根据找到的解决方案对ucasthesis进行了调整,特别是使其能工作于 fontspec,newtxmath,newtxtext 的多种组合情形。调整后的模版已在 mac 测试完毕,只是最近手头没有 Linux 和 Windows,所以还未发布。争取尽快测试完毕然后发布出来。

@xiaoyaoE

This comment has been minimized.

Copy link
Author

xiaoyaoE commented Feb 14, 2019

\AtBeginDocument{%
  \DeclareMathSymbol{0}{\mathalpha}{operators}{`0}%
  \DeclareMathSymbol{1}{\mathalpha}{operators}{`1}%
  \DeclareMathSymbol{2}{\mathalpha}{operators}{`2}%
  \DeclareMathSymbol{3}{\mathalpha}{operators}{`3}%
  \DeclareMathSymbol{4}{\mathalpha}{operators}{`4}%
  \DeclareMathSymbol{5}{\mathalpha}{operators}{`5}%
  \DeclareMathSymbol{6}{\mathalpha}{operators}{`6}%
  \DeclareMathSymbol{7}{\mathalpha}{operators}{`7}%
  \DeclareMathSymbol{8}{\mathalpha}{operators}{`8}%
  \DeclareMathSymbol{9}{\mathalpha}{operators}{`9}%
}

在linux平台上看起来可以,但是是否引起其他问题就不确定了

@mohuangrui

This comment has been minimized.

Copy link
Owner

mohuangrui commented Feb 20, 2019

已更新。这个问题主要受 fontspec, newtxmath,和 package库的版本所影响。texlive2018似乎修复了某些特定情形。不管怎样,更新版已基本解决了这个问题,但系统的 times new romann 和 newtxmath 的 times roman 字体在某些符号上有极细微的差异,这个目前只能这样了。

@mohuangrui mohuangrui closed this Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.