以下最小示例不再使用{\bf b}
或来在数学模式下产生粗体字体\mathbf{b}
。
\documentclass{beamer}
\begin{document}
Text mode: {\bf b} $ = b$
\[
\text{Math mode with \texttt{bf}:}\quad {\bf b} = b
\]
\[
\text{Math mode with \texttt{mathbf}:}\quad \mathbf{b} = b
\]
\end{document}
我在 Ubuntu 20.04 上使用pdflatex
。具体版本是:
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) kpathsea version 6.3.1 Copyright 2019 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.37; using libpng 1.6.37 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.01
在另一台计算机上,使用 TeX Live 2013,pdf 按预期创建,并且在数学模式下也使用粗体字体。
以下是 TeX Live 2013 和 TeX Live 2019 的并排输出。
.log
使用TeX Live 2019时文件报如下错误:
LaTeX Font Warning: Font shape `OT1/cmss/b/n' undefined (Font) using `OT1/cmss/m/n' instead on input line 8.
使用旧安装时不会出现同样的错误。