乳胶台中的水平线

问题描述 投票:0回答:1

我想在下表中的第一行和第二行之间放一条水平线:

\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}

这该怎么做?

latex
1个回答
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}
© www.soinside.com 2019 - 2024. All rights reserved.