我正在尝试将 2x2 矩阵与数字一起放入表格中。错误源自矩阵部分。如果您能帮助我,我将不胜感激。
\documentclass{standalone}
\usepackage{amsmath}
\usepackage{setspace} \doublespacing
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs, makecell, multirow,}
\usepackage[export]{adjustbox}
\begin{document}
\begin{tabular}{ccc}
\toprule
\textbf{A} & \textbf{B} & \textbf{C} \\
\midrule
$\begin{pmatrix} \ast & \ast \\ \ast & \ast \end{pmatrix}$
&
$\begin{pmatrix} \ast & \ast \\ \ast & \ast \end{pmatrix}$
&
$\begin{pmatrix} \ast & \ast \\ \ast & \ast \end{pmatrix}$
\midrule
\includegraphics[width=30mm,height=15mm,valign=m]{example-image-a} &
\includegraphics[width=30mm,height=15mm,valign=m]{example-image-a} &
\includegraphics[width=30mm,height=15mm,valign=m]{example-image-a}
\end{tabular}
\end{document}
答案1
您的错误仅仅是缺少\\
之前的内容\midrule
,与矩阵无关。