答案1
解决方案如下blkarray
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{blkarray}
\usepackage{amsmath}
\begin{document}
\begin{figure}
\centering\setlength{\BAextrarowheight}{2pt}
$ \begin{blockarray}[t]{rccc >{\qquad}ll}
& a & b & c & \BAmulticolumn{2}{>{\qquad}l}{\textbf{results}} \\
\begin{block}{r|c|c|c| >{\qquad}ll}
\BAhhline{~|---~~~}
a & 1,1 & 1,1 & 1,1 & s = 1 & j = 4 \\
\BAhhline{~---~~~}
b & 1,1 & 1,1 & 1,1 & p = 2 & k = 5 \\
\BAhhline{~---~~~}
c & 1,1 & 1,1 & 1,1 & c = 3 & \text{This is true.} \\
\BAhhline{~---~~~}
\end{block}
\end{blockarray} $
\caption{A figure caption.}
\end{figure}
\end{document}
答案2
我倾向于使用两个相邻的tabular
s。根据右侧的内容,您可以将其对齐到 op [t]
(或其他地方):
\documentclass{article}
\newcommand{\mc}{\multicolumn{1}{c}}% Just for short-hand
\begin{document}
\begin{figure}
\centering
\begin{tabular}[t]{ *{4}{ c | } }
\mc{} & \mc{$a$} & \mc{$b$} & \mc{$c$} \\
\cline{2-4}
$a$ & $1,1$ & $1,1$ & $1,1$ \\
\cline{2-4}
$b$ & $1,1$ & $1,1$ & $1,1$ \\
\cline{2-4}
$c$ & $1,1$ & $1,1$ & $1,1$ \\
\cline{2-4}
\end{tabular}\quad
\begin{tabular}[t]{ l l }
\multicolumn{2}{l}{\bfseries Results:} \\
$s = 1$ & $j = 4$ \\
$p = 2$ & $k = 5$ \\
$c = 3$ & This is true.
\end{tabular}
\caption{A figure caption.}
\end{figure}
\end{document}