I can't manage to get two tables side by side in a minipage environment. Any kind suggestion would be highly appreciated!
\documentclass{article}
\usepackage{array}
\begin{document}
\begin{table}[htbp]
\centering
\begin{minipage}{.2\textwidth}
\begin{tabular}{| m{3cm} | m{4.3cm} | c |}
\hline
number of entity filter (size 1) & number of context filters (size 2, size 3,
size 4) & Accuracy\\ [2ex]
\hline
32 & 32 , 32 , 32 & 0.835 \\[0.5ex]
\hline
32 & 64 , 64 , 64 & 0.821 \\[0.5ex]
\hline
32 & 128 , 128 , 128 & 0.819 \\[0.5ex]
\hline
32 & 256 , 256 , 256 & 0.749 \\[0.5ex]
\hline
32 & 512 , 512 , 512 & 0.683 \\[0.5ex]
\hline
32 & 1024 , 1024 , 1024 & 0.528 \\[0.5ex]
\hline
32 & 2048 , 2048 , 2048 & 0.235 \\[0.5ex]
\hline
64 & 32 , 32 , 32 & 0.850 \\[0.5ex]
\hline
64 & 64 , 64 , 64 & 0.816 \\[0.5ex]
\hline
64 & 128 , 128 , 128 & 0.786 \\[0.5ex]
\hline
64 & 256 , 256 , 256 & 0.795 \\[0.5ex]
\hline
64 & 512 , 512 , 512 & 0.765 \\[0.5ex]
\hline
64 & 1024 , 1024 , 1024 & 0.669 \\[0.5ex]
\hline
64 & 2048 , 2048 , 2048 & 0.331 \\[0.5ex]
\hline
128 & 32 , 32 , 32 & 0.920 \\[0.5ex]
\hline
128 & 64 , 64 , 64 & 0.890 \\[0.5ex]
\hline
128 & 128 , 128 , 128 & 0.886 \\[0.5ex]
\hline
128 & 256 , 256 , 256 & 0.846 \\[0.5ex]
\hline
128 & 512 , 512 , 512 & 0.789 \\[0.5ex]
\hline
128 & 1024 , 1024 , 1024 & 0.755 \\[0.5ex]
\hline
128 & 2048 , 2048 , 2048 & 0.488 \\[0.5ex]
\hline
256 & 32 , 32 , 32 & 0.920 \\[0.5ex]
\hline
256 & 64 , 64 , 64 & 0.922 \\[0.5ex]
\hline
256 & 128 , 128 , 128 & 0.912 \\[0.5ex]
\hline
256 & 256 , 256 , 256 & 0.877 \\[0.5ex]
\hline
256 & 512 , 512 , 512 & 0.872 \\[0.5ex]
\hline
256 & 1024 , 1024 , 1024 & 0.771 \\[0.5ex]
\hline
256 & 2048 , 2048 , 2048 & 0.683 \\[0.5ex]
\hline
\end{tabular}
\end{minipage}%
\hfill
\begin{minipage}{.2\textwidth}
\begin{tabular}{| m{3cm} | m{4.3cm} | c |}
\hline
number of entity filter (size 1) & number of context filters (size 2, size 3,
size4) & Accuracy\\ [2ex]
\hline
512 & 32 , 32 , 32 & 0.910 \\[0.5ex]
\hline
512 & 64 , 64 , 64 & 0.922 \\[0.5ex]
\hline
512 & 128 , 128 , 128 & 0.909 \\[0.5ex]
\hline
512 & 256 , 256 , 256 & 0.910 \\[0.5ex]
\hline
512 & 512 , 512 , 512 & 0.883 \\[0.5ex]
\hline
512 & 1024 , 1024 , 1024 & 0.730 \\[0.5ex]
\hline
512 & 2048 , 2048 , 2048 & 0.682 \\[0.5ex]
\hline
1024 & 32 , 32 , 32 & 0.925 \\[0.5ex]
\hline
1024 & 64 , 64 , 64 & 0.931 \\[0.5ex]
\hline
1024 & 128 , 128 , 128 & 0.920 \\[0.5ex]
\hline
1024 & 256 , 256 , 256 & 0.917 \\[0.5ex]
\hline
1024 & 512 , 512 , 512 & 0.899 \\[0.5ex]
\hline
1024 & 1024 , 1024 , 1024 & 0.858 \\[0.5ex]
\hline
1024 & 2048 , 2048 , 2048 & 0.776 \\[0.5ex]
\hline
2048 & 32 , 32 , 32 & 0.933 \\[0.5ex]
\hline
2048 & 64 , 64 , 64 & 0.934 \\[0.5ex]
\hline
2048 & 128 , 128 , 128 & 0.925 \\[0.5ex]
\hline
2048 & 256 , 256 , 256 & 0.928 \\[0.5ex]
\hline
2048 & 512 , 512 , 512 & 0.907 \\[0.5ex]
\hline
2048 & 1024 , 1024 , 1024 & 0.878 \\[0.5ex]
\hline
2048 & 2048 , 2048 , 2048 & 0.798 \\[0.5ex]
\hline
\hline
\end{tabular}
\end{minipage}
\caption{filter window size}
\label{tab:config_filternum}
\end{table}
\end{document}
What I have so far
EDIT: I followed the second solution from here, and it somehow didn't work. I am not sure why.
Best Answer
I think the problem is that the way you have defined your two tabulars, the width is forced to be larger than the available page width. Also, the tabular does not agree on the boundaries set by the minipage.
I would recommend using the tabularx package and the booktabs package.
In the answer below, you can and should of course work a bit on the column widths. I recommend using the booktabs package as it helps in producing clear tables ready for publication. They recommend not to use any vertical lines, so I have omitted these in my answer. I have put a
\scriptsize
to help fit the data. The\noindent
is because otherwise the minipages might not align next to each other.I would recommend to discard data from the 2nd columns, as it is only repetitive data which does not help in readability of the table.