mohuangrui / ucasthesis

LaTeX Thesis Template for the University of Chinese Academy of Sciences
3.44k stars 926 forks source link

数学公式的字体问题 #406

Closed Triumphal closed 1 year ago

Triumphal commented 1 year ago

发现问题是在使用数学公式的时候,在使用黑板粗体\mathbb{R}指令表示实数集的时候,字体比较奇怪(见下图),可能是由于使用了XITS 字体库的原因

但是使用amssymb包直接使用\mathbb{}看上去比较合适(见下图)。

并且该模板中的数学公式中的字体似乎都比较偏粗体一点,实际的粗体的显示并不是那么的明显,不知道是设置的原因还是字体库就是这样。

主要是公式美观上的考虑。

mohuangrui commented 1 year ago

使用 XITS 是为了和Word版本相近(许多人有此诉求)。 如果你想进行修改:

https://github.com/mohuangrui/ucasthesis/blob/aec46ba1f621c537404cb631f54f6289b25a97af/Style/artratex.sty#L382 开始注释,直到(包括) https://github.com/mohuangrui/ucasthesis/blob/aec46ba1f621c537404cb631f54f6289b25a97af/Style/artratex.sty#L417 然后在此后加入你需要的math字体package

sikouhjw commented 1 year ago

覆盖一下就好了,你需要的是找到『符合你审美』的字体。

\documentclass{article}
\usepackage{amsmath,unicode-math}
\setmathfont{XITS Math}
\setmathfont{Latin Modern Math}[range = bb]
\begin{document}
  $\symbb{ABCD}$
\end{document}
Triumphal commented 1 year ago

使用 XITS 是为了和Word版本相近(许多人有此诉求)。 如果你想进行修改:

https://github.com/mohuangrui/ucasthesis/blob/aec46ba1f621c537404cb631f54f6289b25a97af/Style/artratex.sty#L382

开始注释,直到(包括) https://github.com/mohuangrui/ucasthesis/blob/aec46ba1f621c537404cb631f54f6289b25a97af/Style/artratex.sty#L417

然后在此后加入你需要的math字体package

是的,我将其替换成 \setmathfont{Latin Modern Math} \setmathfont{TeXGyrePagellaMath-Regular}[range={\mathbb}] 解决了我的问题