Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Latex 桌子上的水平线_Latex - Fatal编程技术网

Latex 桌子上的水平线

Latex 桌子上的水平线,latex,Latex,我想在下表的第一行和第二行之间画一条水平线: \begin{table}[ht] \centering \caption{Multi-row table} \label{tab:Mergedrows} \vspace{1ex} \begin{tabular}{|c|c|} \hline \multirow{2}{*}{Mergedrows} &X\\

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

\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}
如何做到这一点?

就像节目一样:通过添加一个
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}