Fira Math 缺少 \vdots?

Fira Math 缺少 \vdots?

我使用TeXLive 2020。

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Fira Math}
\begin{document}

\[
A = \begin{pmatrix}
            a_{11} & a_{12} & \cdots & a_{1p}\\ 
            a_{21} & a_{22} & \cdots & a_{2p}\\      
            \vdots & \vdots & \ddots & \vdots\\ 
            a_{n1} & a_{n2} & \cdots & a_{np}
         \end{pmatrix}
\]
\end{document}

導致這個:

缺少垂直點

你知道我如何告訴 XeTeX 從其他地方「導入那些 \vdots」嗎?提前致謝。

答案1

是的,Fira Math 中缺少字形。

您可以使用另一種無襯線數學字體。

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Fira Math}
\setmathfont{TeX Gyre DejaVu Math}[range={\vdots,\ddots}]
\setmathfont{Fira Math}[range=]

\begin{document}

\[
A = \begin{pmatrix}
            a_{11} & a_{12} & \cdots & a_{1p}\\ 
            a_{21} & a_{22} & \cdots & a_{2p}\\      
            \vdots & \vdots & \ddots & \vdots\\ 
            a_{n1} & a_{n2} & \cdots & a_{np}
         \end{pmatrix}
\]
\end{document}

在此輸入影像描述

雖然不完美,但對於演示來說還算可以。

答案2

我想到了一種與上一個答案不同的解決方案,所以我決定分享它,儘管我認為它不太優雅。

graphicx軟體包提供了命令\rotatebox,該命令允許人們旋轉物件。由於\cdots已經定義了,我們可以用它來定義其他兩個指令。這是一個 MWE:

\documentclass{article}
\usepackage{graphicx}
\usepackage{unicode-math}
\setmathfont{Fira Math}

\AtBeginDocument{
    \renewcommand{\vdots}{\rotatebox[origin=c]{90}{\(\cdots\)}}
    \renewcommand{\ddots}{\rotatebox[origin=c]{135}{\(\cdots\)}}
}

\begin{document}

\[
A = \begin{pmatrix}
            a_{11} & a_{12} & \cdots & a_{1p}\\ 
            a_{21} & a_{22} & \cdots & a_{2p}\\      
            \vdots & \vdots & \ddots & \vdots \\ 
            a_{n1} & a_{n2} & \cdots & a_{np}
         \end{pmatrix}
\]
\end{document}

結果是

在此輸入影像描述

要重新定義命令\vdots\ddots我們需要使用\AtBeginDocument因為unicode-math在文件開頭定義了字形。因此,如果我們只使用\renewcommandwithout \AtBeginDocument,unicode-math將覆蓋文檔開頭的自訂定義。

相關內容