I'm trying to get three tables side by side using minipage. In spite of my horrific efforts my tables keep stacking on top of each other instead of standing beside what drives me mad. Can anybody spot a mistake here?
Cheers
\documentclass[12pt]{article}
\begin{document}
\begin{minipage}[b]{0.33\linewidth}\centering
\begin{tabular}{ | c | c |}
\hline
\textbf{Feat. id} & \textbf{F-Measure} \\ \hline
0 & 0.4286 \\ \hline
17 & 0.3973 \\ \hline
\end{tabular}
\label{tab:singlebest}
\end{minipage}
\begin{minipage}[b]{0.33\linewidth}\centering
\begin{tabular}{ | c | c |}
\hline
\textbf{Feat. id} & \textbf{F-Measure} \\ \hline
25 & 0.4494 \\ \hline
11 & 0.4457 \\ \hline
\end{tabular}
\label{tab:twobest}
\end{minipage}
\begin{minipage}[b]{0.33\linewidth}\centering
\begin{tabular}{ | c | c |}
\hline
\textbf{Feat. id} & \textbf{F-Measure} \\ \hline
18 & 0.4595 \\ \hline
19 & 0.4565 \\ \hline
\end{tabular}
\label{tab:threebest}
\end{minipage}
\end{document}
Best Answer
There are a number of problems here:
minipages
results in a new paragraph. Comment it out or remove it.label
command refers to the previous section or chapter and not the table as intended. Put everything inside atable
environment and use\caption
command to activate the correct labels.Here is and example: