I am using the multirow
package to typeset a tabular where two rows should merge into one. I look very carefully at my code and compare it to the working example but it fails to work. An ugly horizontal line goes across the rows that are supposed to be merged.
\documentclass{article}
\usepackage{array, float, multirow}
\begin{document}
\begin{table}[H]
\centering
\caption{LLLL}
\label{tab:location-xiagu}
\begin{tabular}{|c|>{\centering}m{0.1\textwidth}|m{0.5\textwidth}|}
\hline
\multirow{2}{*}{A} & B & C\tabularnewline
\hline
& A & C \tabularnewline
\hline
\multirow{2}{*}{X} & W & E \tabularnewline
\hline
& O & E \tabularnewline
\hline
\multirow{2}{*}{S} & M & N \tabularnewline
\hline
& P & W \tabularnewline
\hline
\end{tabular}
\end{table}
\end{document}
But I want no line crossing the A, X, S
letters. Thanks in advance!
Best Answer
\hline
will draw a full line, you need to use\cline{2-3}
for this:Alternatively, you can use booktabs and remove the vertical lines which, to me, gives a much more pleasing result:
as others have notes, the package
caption
will give you the proper spacing for your caption above the table.