內含矩陣的表格

內含矩陣的表格

在此輸入影像描述

幫助任何人!我嘗試了一次,所以我嘗試我的運氣,希望有人擁有更敏銳的表格和矩陣技能。

答案1

由於表中幾乎所有材料都是數學內容,因此我建議您使用array環境而不是tabular環境。這樣,您只需鍵入$兩次(之前\begin{array}和之後\end{array}),而不是在包含數學模式材料的 33 個 [!] 單元格的開頭和結尾處鍵入。

在此輸入影像描述

\documentclass{article}
\usepackage{amsmath} % for "\text" macro
\newcommand{\smbullet}{{\scriptscriptstyle\bullet}}
\begin{document}
\begin{table}
\centering
$\begin{array}{|c|cccc|c|}
\hline
\text{Material\textbackslash Klass} & B_1 & B_2 & \dots & B_k & \text{Summa}\\
\hline
1 & o_{11} & o_{12} & \dots & o_{1k} & n_1=o_{1\smbullet} \\
2 & o_{21} & o_{22} & \dots & o_{2k} & n_2=o_{2\smbullet} \\
\vdots & \vdots & \vdots & \ddots &  \vdots & \vdots\\
r & o_{r1} & o_{r2} & \dots & o_{rk} & n_r=o_{r\smbullet} \\
\hline
\text{Sammanlagt} & o_{\smbullet1} & o_{\smbullet2} & \dots & o_{\smbullet k} & n_\smbullet \\
\hline
\end{array}$
\end{table}
\end{document}

相關內容