我们的项目公式使用了 \it 和 \boldsymbol,但是自从我们将 texlive 从 2016 升级到 2022 后,它就不起作用了。我怀疑这可能是字体的问题?
公式:
- ${\it v} _x={\it v} _0$,$x={\it v} _0t$
- $\overrightarrow {AB}=\boldsymbol {a}+5\boldsymbol {b}$
可疑的错误信息:
- 字体“Source Han Serif CN”不包含(fontspec)请求的脚本“CJK”。
- 字体“Times New Roman”不包含请求的(fontspec)脚本“Math”。
- OpenType 功能“Style=MathScript”(ssty)不适用于字体“Times New Roman”且脚本(fontspec)为“CustomDefault”且语言为“Default”。
- OpenType 功能“Style=MathScriptScript”(ssty)不适用于字体“Times New Roman”且脚本(fontspec)为“CustomDefault”且语言为“Default”。
- 字体“BabelStone Han”不包含请求的(fontspec)脚本“CJK”。
- 字体“XITS”不包含请求的脚本“CJK”。
- 字体“Symbola”不包含请求的脚本(fontspec)“CJK”。
- 字体形状
TU/TeXGyreTermesMath(1)/b/n' undefined(Font) using
改为 TU/TeXGyreTermesMath(1)/m/n' - pubRuby.sty:软件包
CJK' can not be loaded with
xeCJK'。 - pubRuby.sty:您已在输入行 31 请求版本
1996/11/20' of package CJK, but only version
\[电子邮件保护]' 可用。latex 和软件包版本: - pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
- unicode-math:2020/01/31 0.8q
- amsmath:2022/04/08 v2.17n
关键源代码:
\RequirePackage{amsmath}
\everymath{\displaystyle}
\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\DeclareSymbolFontAlphabet{\mathbb}{AMSb}
\let\Bbb=\mathbb
\DeclareMathSymbol{\varpropto} {\mathrel}{AMSa}{"5F}
\DeclareMathSymbol{\thicksim} {\mathrel}{AMSb}{"73}
\DeclareMathSymbol{\thickapprox} {\mathrel}{AMSb}{"74}
\DeclareSymbolFont{rmlargesymbols}{U}{euex}{m}{n}
\DeclareMathSymbol{\rmintop}{\mathop}{rmlargesymbols}{82}
\RequirePackage[bold-style=ISO, mathbf=sym]{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\setmathfont{XITSMath-Regular}
[
Extension = .otf,
BoldFont = XITSMath-Bold,
range={"1D70B, "2605, "2ACB, "2AFD, "23DC}
]
\setmathfont{XITSMath-Regular}
[
Extension = .otf,
BoldFont = XITSMath-Bold,
range={"2A00-"2AFF}
]
\RequirePackage[CJKmath=true, CheckSingle=true, AutoFallBack]{xeCJK}
\RequirePackage{xeCJKfntef}
\xeCJKsetup{CJKspace=true, underline/skip=false}
\setCJKmainfont[AutoFakeBold,
AutoFakeSlant,
BoldFont=Source~Han~Serif~CN~Bold,
ItalicFont=Source-Sa3mSerifCN-Regular,
GeneralPunctuation=BabelStone~Han,
Arrows=XITS,
MathematicalOperators=XITS,
SimLikeMathematicalOperators=Tutor~Pub~Custom,
BoxDrawing=BabelStone~Han,
GeometricShapes=XITS,
Symbols=Symbola]{Source~Han~Serif~CN}
\setmainfont[ItalicFont=TimesNewRomanPS-ItalicMT]{TeXGyreTermes-Regular}
\newfontfamily{\enitshape}{TeXGyreTermes-Italic}
\DeclareSymbolFont{largeSymbolsExt}{OMX}{yhex}{m}{n}
\DeclareMathAccent{\wideparen}{\mathord}{largeSymbolsExt}{"F3}
\xeCJKsetcharclass{"20000}{"30000}{1}
\setCJKfallbackfamilyfont
{\CJKrmdefault}
[AutoFakeBold,AutoFakeSlant,CircledNumbers=STSong]
{STSongti-SC-Regular,TH-Sung-TP2}
\usepackage[CJK]{pubRuby}
答案1
使用 Windows 上的 TexLive 2022,在 xelatex 中运行此代码:
平均能量损失
\it
不再需要,\boldsymbol{}
并由 代替\symbf{}
。
(我没有所有的 CJK 字体,并且pubRuby
包被注释掉了,因为没有找到(1996 已经很老了)。)
\documentclass{article}
\usepackage{amsmath}
\everymath{\displaystyle}
\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\DeclareSymbolFontAlphabet{\mathbb}{AMSb}
\let\Bbb=\mathbb
\DeclareMathSymbol{\varpropto} {\mathrel}{AMSa}{"5F}
\DeclareMathSymbol{\thicksim} {\mathrel}{AMSb}{"73}
\DeclareMathSymbol{\thickapprox} {\mathrel}{AMSb}{"74}
\DeclareSymbolFont{rmlargesymbols}{U}{euex}{m}{n}
\DeclareMathSymbol{\rmintop}{\mathop}{rmlargesymbols}{82}
\usepackage[bold-style=ISO, mathbf=sym]{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\setmathfont{XITSMath-Regular}
[
Extension = .otf,
BoldFont = XITSMath-Bold,
range={"1D70B, "2605, "2ACB, "2AFD, "23DC}
]
\setmathfont{XITSMath-Regular}
[
Extension = .otf,
BoldFont = XITSMath-Bold,
range={"2A00-"2AFF}
]
\usepackage[CJKmath=true, CheckSingle=true, AutoFallBack]{xeCJK}
\usepackage{xeCJKfntef}
\xeCJKsetup{CJKspace=true, underline/skip=false}
%
%\setCJKmainfont[AutoFakeBold,
% AutoFakeSlant,
% BoldFont=Source Han Serif CN Bold,
% ItalicFont=Source-Sa3mSerifCN-Regular,
% GeneralPunctuation=BabelStone Han,
% Arrows=XITS,
% MathematicalOperators=XITS,
% SimLikeMathematicalOperators=Tutor Pub Custom,
% BoxDrawing=BabelStone Han,
% GeometricShapes=XITS,
% Symbols=Symbola]{Source Han Serif CN}
\setmainfont[ItalicFont=TimesNewRomanPS-ItalicMT]{TeXGyreTermes-Regular}
\newfontfamily{\enitshape}{TeXGyreTermes-Italic}
\DeclareSymbolFont{largeSymbolsExt}{OMX}{yhex}{m}{n}
\DeclareMathAccent{\wideparen}{\mathord}{largeSymbolsExt}{"F3}
\xeCJKsetcharclass{"20000}{"30000}{1}
%\setCJKfallbackfamilyfont
% {\CJKrmdefault}
% [AutoFakeBold,AutoFakeSlant,CircledNumbers=STSong]
% {STSongti-SC-Regular,TH-Sung-TP2}
%\usepackage[CJK]{pubRuby}
\begin{document}
text
$v_x=v_0$,$x=v_0t$
text
\bigskip
$\overrightarrow {AB}=\symbf {a}+5\symbf {b}$
text
text mode:
Aa