# Subtables, column separate line draws out of table

I am using subtable environment to put two tables side by side.

However, the column separate line between the first two columns draws out of the table.

Anyone can help with this issue?

Sample code as follows:

\begin{table}[htbp]
\small
\centering
\caption{Experiment Results-I}
\subtable[Indexing Performance]{
\begin{tabular}{c|r|r}
\hline
A       & B       & D\\
\hline
\hline
a       & c       & d\\
\hline
\end{tabular}
}
\subtable[Indexing Performance]{
\begin{tabular}{c|r|r}
\hline
A       & B       & D\\
\hline
\hline
a       & c       & d\\
\hline
\end{tabular}
}
\end{table}

• Welcome to TeX.SE. Can you please elaborate on what the problem is, as it is not clear to me. Also, it is better to make the MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. Oct 8 '12 at 4:51
• What do you mean by "the column separate line between the first two columns draws out of the table"? Oct 8 '12 at 5:04
• This only happens when you end the tabular with \hline \\ . Don't end your tabular with \\ .
– Werner
Oct 8 '12 at 5:09
• Your MWE does not include documentclass nor the packages you are using.
– Vivi
Oct 8 '12 at 7:35

You seem to be using the obsolete package subfigure. Nevertheless your example doesn't show anything irregular.

Try something like this:

\documentclass{article}
\usepackage{subfig}
\begin{document}
\begin{table}[htbp]
\small
\centering
\caption{Experiment Results-I}
\subfloat[Indexing Performance]{%
\hspace{.5cm}%
\begin{tabular}{c|r|r}
\hline
A       & B       & D \\
\hline
\hline
a       & c       & d \\
\hline
\end{tabular}%
\hspace{.5cm}%
}\hspace{1cm}
\subfloat[Indexing Performance]{%
\hspace{.5cm}%
\begin{tabular}{c|r|r}
\hline
A       & B       & D  \\
\hline
\hline
a       & c       & d  \\
\hline
\end{tabular}%
\hspace{.5cm}%
}
\end{table}
\end{document}


With subfig you should use \subfloat rather than \subtable and \subfigure. The \hspace{1cm} is meant to separate the two subtables, the \hspace{.5cm} commands to give some more room for the subcaption (they aren't needed of course if the tables are wider than these).