我想在下表中的第一行和第二行之间放一条水平线:
\begin{table}[ht]
\centering
\caption{Multi-row table}
\label{tab:Mergedrows}
\vspace{1ex}
\begin{tabular}{|c|c|}
\hline
\multirow{2}{*}{Mergedrows}
&X\\
&X \\
\hline
\end{tabular}
\end{table}
怎么做?
答案 0 :(得分:0)
与documentation to multirow节目一样:添加cline
:
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{table}[ht]
\centering
\caption{Multi-row table}
\label{tab:Mergedrows}
\vspace{1ex}
\begin{tabular}{|c|c|}
\hline
\multirow{2}{*}{Mergedrows}
&X\\
\cline{2-2} % add this
&X \\
\hline
\end{tabular}
\end{table}
\end{document}