![如何刪除同一列中多個儲存格之間的線?](https://rvso.com/image/475739/%E5%A6%82%E4%BD%95%E5%88%AA%E9%99%A4%E5%90%8C%E4%B8%80%E5%88%97%E4%B8%AD%E5%A4%9A%E5%80%8B%E5%84%B2%E5%AD%98%E6%A0%BC%E4%B9%8B%E9%96%93%E7%9A%84%E7%B7%9A%EF%BC%9F.png)
我有一張桌子,我想刪除其中的黃線。這是因為這些單元格(同一列中)具有相同的值。因此,我還想在合併儲存格中保留一個唯一值。
能否詳細說明如何操作?非常感謝你的幫忙!
\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
\textbf{Result} & \textbf{Assumption} & \textbf{Content} \\
\hline \hline
a & & b \\
\hline
c & D & e \\
\hline
f & D & g \\
\hline
h & I & j \\
\hline
k & I & l \\
\hline
m & I & n \\
\hline
\end{tabular}
\end{center}
\end{document}
答案1
您可以使用套件multirow
建立多行單元格和命令cline
來製作部分水平線。請參閱下面的程式碼或這個回覆以獲得更完整的範例。
\documentclass{article}
\usepackage{amsthm}
\usepackage{multirow}
\begin{document}
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
\textbf{Result} & \textbf{Assumption} & \textbf{Content} \\
\hline \hline
a & & b \\
\hline
c & \multirow{2}*{D} & e \\
\cline{1-1}\cline{3-3}
f & & g \\
\hline
h & \multirow{3}*{I} & j \\
\cline{1-1}\cline{3-3}
k & & l \\
\cline{1-1}\cline{3-3}
m & & n \\
\hline
\end{tabular}
\end{center}
\end{document}