我正在使用该stix2
软件包bm
。这是我的 MWE:
\documentclass[preview]{standalone}
\usepackage{stix2}
\usepackage{amsmath,amsthm}
\usepackage{bm}
\newcommand{\abcABC}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\begin{document}
\begin{align*}
&\mathcal{\abcABC} \\
&\bm{\mathcal{\abcABC}}
\end{align*}
\begin{align*}
&\mathscr{\abcABC} \\
&\bm{\mathscr{\abcABC}}
\end{align*}
\end{document}
其输出如下:
我得到以下错误
LaTeX Font Warning: Font shape `LS2/stix2ex/b/n' in size <10> not available
(Font) Font shape `LS2/stix2ex/m/n' tried instead on input line 15
.
LaTeX Font Warning: Font shape `LS2/stix2ex/b/n' in size <7.5> not available
(Font) Font shape `LS2/stix2ex/m/n' tried instead on input line 15
.
LaTeX Font Warning: Font shape `LS2/stix2ex/b/n' in size <6> not available
(Font) Font shape `LS2/stix2ex/m/n' tried instead on input line 15
.
LaTeX Font Warning: Font shape `LS1/stix2bb/b/n' in size <10> not available
(Font) Font shape `LS1/stix2bb/m/n' tried instead on input line 22
.
LaTeX Font Warning: Font shape `LS1/stix2bb/b/n' in size <7.5> not available
(Font) Font shape `LS1/stix2bb/m/n' tried instead on input line 22
.
LaTeX Font Warning: Font shape `LS1/stix2bb/b/n' in size <6> not available
(Font) Font shape `LS1/stix2bb/m/n' tried instead on input line 22
.
LaTeX Font Warning: Font shape `LS1/stix2bb/b/it' in size <10> not available
(Font) Font shape `LS1/stix2bb/m/it' tried instead on input line 2
2.
LaTeX Font Warning: Font shape `LS1/stix2bb/b/it' in size <7.5> not available
(Font) Font shape `LS1/stix2bb/m/it' tried instead on input line 2
2.
LaTeX Font Warning: Font shape `LS1/stix2bb/b/it' in size <6> not available
(Font) Font shape `LS1/stix2bb/m/it' tried instead on input line 2
2.
LaTeX Font Warning: Font shape `LS2/stix2cal/b/n' in size <10> not available
(Font) Font shape `LS2/stix2cal/m/n' tried instead on input line 2
2.
LaTeX Font Warning: Font shape `LS2/stix2cal/b/n' in size <7.5> not available
(Font) Font shape `LS2/stix2cal/m/n' tried instead on input line 2
2.
LaTeX Font Warning: Font shape `LS2/stix2cal/b/n' in size <6> not available
(Font) Font shape `LS2/stix2cal/m/n' tried instead on input line 2
2.
LaTeX Font Warning: Font shape `LS2/stix2tt/b/n' in size <10> not available
(Font) Font shape `LS2/stix2tt/m/n' tried instead on input line 22
.
LaTeX Font Warning: Font shape `LS2/stix2tt/b/n' in size <7.5> not available
(Font) Font shape `LS2/stix2tt/m/n' tried instead on input line 22
.
LaTeX Font Warning: Font shape `LS2/stix2tt/b/n' in size <6> not available
(Font) Font shape `LS2/stix2tt/m/n' tried instead on input line 22
显然,mathcal
符号不是粗体。但显示的警告不仅限于这种情况,只需调用\bm\mathcal
或即可\bm\mathscr
。
我的问题
- 是否有可能得到一个大胆的
\mathcal
- 这些警告真的有问题吗?或者可以无视它们而不用担心?
编辑1:
我删除了amsfont
,问题仍然存在。
编辑2:
关于缺少粗体字体的问题\mathcal
已得到解答这里。因此,唯一剩下的问题是关于上面显示的警告。请注意,这些警告并不依赖于缺少的粗体字,\mathcal
因为以下内容会引发完全相同的警告:
\documentclass[preview]{standalone}
\usepackage{stix2}
\usepackage{amsmath,amsthm}
\usepackage{bm}
\newcommand{\abcABC}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\begin{document}
\begin{align*}
\bm{\mathscr{\abcABC}}
\end{align*}
\end{document}
最终编辑: 我关闭这个问题。问题 1 已经已回答和我重新表述了第二个问题以更清晰的方式。
答案1
虽然的 type 1 版本stix2
不支持粗体书法,但是的 OTF 字体unicode-math
支持\mathbfcal
。
有一个问题:默认情况下,Unicode 将\mathcal
和映射\mathscr
到相同的字母表。如果您在同一文档中需要两者,则必须使用\setmathfont[range=
... 覆盖其中一个或另一个。在此特定的 OTF 字体中,文档显示 STIX Two Math 使用\mathcal
和\mathbfcal
作为默认值,但也有\mathscr
和的字形\mathbfscr
作为样式集 1。因此:
\documentclass[preview]{standalone}
\usepackage{unicode-math}
\usepackage{amsthm}
\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}
\setmathfont{STIX Two Math}[range={scr,bfscr}, StylisticSet=1]
\newcommand{\abcABC}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\begin{document}
\begin{align*}
&\mathcal{\abcABC} \\
&\mathbfcal{\abcABC}
\end{align*}
\begin{align*}
&\mathscr{\abcABC} \\
&\mathbfscr{\abcABC}
\end{align*}
\end{document}
另一种方法是加载带有粗体字形的书法字体mathalpha
,例如 STIX 1 中的字体集。
\documentclass[preview]{standalone}
\usepackage{amsmath, amsthm}
\usepackage{stix2}
\usepackage[cal=stixplain]{mathalpha}
\usepackage{bm}
\newcommand{\abcABC}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\begin{document}
\begin{align*}
&\mathcal{\abcABC} \\
&\mathbfcal{\abcABC}
\end{align*}
\begin{align*}
&\mathscr{\abcABC} \\
&\mathbfscr{\abcABC}
\end{align*}
\end{document}
但是,这只适用于 XeLaTeX。如果你尝试使用 PDFLaTeX 编译它,你将收到错误:
! LaTeX Error: Too many math alphabets used in version normal
这是因为旧版 TeX 仅允许十六个数学字母,并且该stix2
包已经全部使用了它们。
解决此问题的一种可能方法是将四个脚本/书法字母定义为单独的数学版本,这是允许的。您也可以切换到文本模式并调用\usefont
。
然而,如果您不需要完整stix2
包中的所有符号,您可以mathalpha
同时加载cal=
和scr=
选项。