删除“LaTeX 字体警告:字体形状‘LS1/stix2bb/b/n’大小不可用”

删除“LaTeX 字体警告:字体形状‘LS1/stix2bb/b/n’大小不可用”

我使用 stix2 软件包。文档可以编译,但那些警告一直困扰着我。有什么方法可以删除它们吗?

我把它们复制到这里:

LaTeX Font Warning: Font shape `LS1/stix2bb/b/n' in size <10.95> not available Font shape `LS1/stix2bb/m/n' tried instead on input line 31
LaTeX Font Warning: Font shape `LS1/stix2bb/b/n' in size <8> not available Font shape `LS1/stix2bb/m/n' tried instead on input line 31
LaTeX Font Warning: Font shape `LS1/stix2bb/b/n' in size <6> not available Font shape `LS1/stix2bb/m/n' tried instead on input line 31
LaTeX Font Warning: Font shape `LS1/stix2bb/b/it' in size <10.95> not available
LaTeX Font Warning: Font shape `LS1/stix2bb/b/it' in size <8> not available Font shape `LS1/stix2bb/m/it' tried instead on input line 3
LaTeX Font Warning: Font shape `LS1/stix2bb/b/it' in size <6> not available Font shape `LS1/stix2bb/m/it' tried instead on input line 3
LaTeX Font Warning: Font shape `LS2/stix2cal/b/n' in size <10.95> not available
LaTeX Font Warning: Font shape `LS2/stix2cal/b/n' in size <8> not available Font shape `LS2/stix2cal/m/n' tried instead on input line 3
LaTeX Font Warning: Font shape `LS2/stix2cal/b/n' in size <6> not available Font shape `LS2/stix2cal/m/n' tried instead on input line 3
LaTeX Font Warning: Font shape `LS2/stix2tt/b/n' in size <10.95> not available Font shape `LS2/stix2tt/m/n' tried instead on input line 31
LaTeX Font Warning: Font shape `LS2/stix2tt/b/n' in size <8> not available Font shape `LS2/stix2tt/m/n' tried instead on input line 31
LaTeX Font Warning: Font shape `LS2/stix2tt/b/n' in size <6> not available Font shape `LS2/stix2

答案1

使用\boldmath或时,会出现令人讨厌的警告。请重新声明要使用的字体系列,而不是。\bmssubsub

\documentclass{article}
\usepackage{stix2}

\DeclareFontFamily{LS1}{stix2bb}{\skewchar\font127 }
\DeclareFontShape{LS1}{stix2bb}{m}{n} {<-> stix2-mathbb}{}
\DeclareFontShape{LS1}{stix2bb}{m}{it}{<-> stix2-mathbbit}{}
\DeclareFontShape{LS1}{stix2bb}{b}{n} {<->ssub * stix2bb/m/n}{}
\DeclareFontShape{LS1}{stix2bb}{b}{it}{<->ssub * stix2bb/m/it}{}

\DeclareFontFamily{LS2}{stix2ex}{}
\DeclareFontShape{LS2}{stix2ex}{m}{n} {<-> stix2-mathex}{}
\DeclareFontShape{LS2}{stix2ex}{b}{n} {<->ssub * stix2ex/m/n}{}

\DeclareFontFamily{LS2}{stix2cal}{\skewchar\font127 }
\DeclareFontShape{LS2}{stix2cal}{m}{n} {<-> stix2-mathcal}{}
\DeclareFontShape{LS2}{stix2cal}{b}{n} {<->ssub * stix2cal/m/n}{}

\DeclareFontFamily{LS2}{stix2tt}{\skewchar\font127 }
\DeclareFontShape{LS2}{stix2tt}{m}{n} {<-> stix2-mathtt}{}
\DeclareFontShape{LS2}{stix2tt}{b}{n} {<->ssub * stix2tt/m/n}{}

\begin{document}

\boldmath $x=y$

\end{document}

答案2

您可以定义sub(替代)大小函数来像ssub(静默替代)大小函数一样运行,并且只写入日志文件,而不是终端。

\documentclass{article}

\makeatletter
\DeclareSizeFunction{sub}{\sub@sfcnt\@font@info}
\makeatother
\usepackage{stix2}

\begin{document}
\boldmath
$\mathcal{x} \mathbb{x}$
\end{document}

相关内容