![如何建立一個中間有三個垂直點的表格?](https://rvso.com/image/449620/%E5%A6%82%E4%BD%95%E5%BB%BA%E7%AB%8B%E4%B8%80%E5%80%8B%E4%B8%AD%E9%96%93%E6%9C%89%E4%B8%89%E5%80%8B%E5%9E%82%E7%9B%B4%E9%BB%9E%E7%9A%84%E8%A1%A8%E6%A0%BC%EF%BC%9F.png)
答案1
我不知道您評論中表格中的第四列是什麼,但我已將其保留在提示中。
\documentclass{article}
\begin{document}
\begin{tabular}{l|l|ll}
\cline{1-3} State & Action & Value & \\
\cline{1-3}
$s_1$ & $a_1$ & $Q(s_1,a_1)_1$ & \\
\cline{1-3}
\multicolumn{1}{c}{$\vdots$} & \multicolumn{1}{c}{$\vdots$} & \multicolumn{1}{c}{$\vdots$} & \\ \cline{1-3}
& & & \\
\cline{1-3}
\end{tabular}
\end{document}
答案2
與 @Przemysław Scherwentke 答案 (+1) 類似,但使用了tblr
該tabularray
包:
\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\begin{center}
\begin{tblr}{colspec={ *{3}{Q[c, mode=math, wd=5em]} },
row{1} = {mode=text, l},
hline{1-3, Y-Z} = {solid},
vline{2-Y} = {1-2, Z}{solid},
}
State & Action & Value \\
s_1 & a_1 & Q(s_1,a_1)_1 \\
\SetRow{font=\Huge, rowsep=3ex}
\vdots & \vdots & \vdots \\
s_n & a_n & Q(s_n,a_n)_n \\
\end{tblr}
\end{center}
\end{document}