答案1
\hline
正如 @Teepeemm 在他的评论中提到的那样,您应该使用而不是s 。或者使用package\cline{2-3}
代替tabular
table :tblr
tabularray
\documentclass[margin=3mm,varwidth]{standalone}
\usepackage{multirow}
\usepackage{tabularray}
\begin{document}
\begin{tabular}{ |c|c|c|c| } \hline
col1 & col2 & col3 \\ \hline
\multirow{3}{4em}{Multiple row}
& cell2 & cell3 \\ \cline{2-3}
& cell5 & cell6 \\ \cline{2-3}
& cell8 & cell9 \\ \hline
\end{tabular}
or with \verb+tblr+
\begin{tblr}{
hlines, vlines,
colspec = { Q[c, wd=4em] c c c }
}
col1 & col2 & col3 \\
\SetCell[r=3]{l} Multiple row % tabularray syntax for multirow cell
& cell2 & cell3 \\
& cell5 & cell6 \\
& cell8 & cell9 \\
\end{tblr}
\end{document}
答案2
答案3
使用multirow
包。
\documentclass[a4paper,12pt]{article}
\usepackage{multirow}
\begin{document}
\begin{table}[h!]
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{1}{|c|}{col1} & col2 & col3 \\ \hline
\multirow{3}{*}{Multiple row} & cell2 & cell3 \\ \cline{2-3}
& cell5 & cell6 \\ \cline{2-3}
& cell8 & cell9 \\ \hline
\end{tabular}
\end{table}
\end{document}