考虑以下文件:
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\fbox{\vdots}
\end{document}
通过 lualatex 运行它得到
This is LuaTeX, Version 1.10.0 (TeX Live 2019/Debian)
restricted system commands enabled.
(./a.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def))
(/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/share/texlive/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/filehook/filehook.sty))
(/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex)))
No file a.aux.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./a.aux))
(see the transcript file for additional information)
484 words of node memory still in use:
6 hlist, 2 vlist, 2 rule, 2 glue, 4 kern, 1 glyph, 6 attribute, 52 glue_spec
, 6 attribute_list, 1 write nodes
avail lists: 1:1,2:25,3:4,4:2,5:23,6:1,7:17,9:17
</usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on a.pdf (1 page, 2528 bytes).
Transcript written on a.log.
以及一个其中没有字符的框。 Fira Math 中缺少 \vdots?建议我想要一种不同的字体,但我在这里使用内置的 LaTeX 字体。(我的实际非最小示例使用\usepackage{lmodern}
,并给出错误Missing character: There is no ⋮ (U+22EE) in font [lmmono12-regular]:!
)我应该使用什么字体来获得可通过的 vdots 构造,或者我如何重新定义 vdots 以恢复我的垂直点?
答案1
问题在于您处于文本模式,而不是数学模式。字体lmmono12-regular
是您的默认字体\ttfamily
。
在你的框内进入数学模式。
\documentclass{article}
\tracinglostchars=2
\begin{document}
\fbox{\(\vdots\)}
\end{document}
\tracinglostchars=2
每当当前字体缺少一个字符时,该行都会向您发出警告。
对于 Latin Modern Math 中确实缺少的字符,例如\setminus
,一个好的解决方案是\usepackage{newcomputermodern}
,或者\usepackage[regular]{newcomputermodern}
对于经典的较细字体。Latin Modern 和 New Computer Modern 都基于 Computer Modern(和 AMS 字体),但 New Computer Modern Math 更全面。
另一种通常适用于丢失字符的修复方法是
\setmathfont{Latin Modern Math} % For example
\setmathfont{STIX Two Math}[ range=\setminus,
Scale=MatchUppercase ]