Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
1  
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. –  Peter Grill 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"? –  hpesoj626 Oct 8 '12 at 5:04
2  
This only happens when you end the tabular with \hline \\ . Don't end your tabular with \\ . –  Werner Oct 8 '12 at 5:09
3  
Your MWE does not include documentclass nor the packages you are using. –  Vivi Oct 8 '12 at 7:35

1 Answer 1

up vote 1 down vote accepted

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).

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.