I've checked out related questions here, and found similar answers via Google, and still can't figure out why the following code does not produce two side-by-side tables. They are narrow enough to fit on the page, but for any variation of textwidth, using either parbox or minipage, I always get the tables stacked vertically on top of each other instead of left to right.
I must be missing something obvious, but this is driving me nuts. What have I done wrong?
\documentclass{article}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{table}[h]
\begin{minipage}{0.4\textwidth}
\centering
\begin{tabular}{|l|l|c|}\hline
Site & Species & Abundance \\\hline
S1 & A.rubrum & 25 \\
S1 & A.saccharum & 5 \\
S2 & Q.rubrum & 45 \\\hline
\end{tabular}
\caption{Long-form data}
\label{tab:long-form}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\centering
\begin{tabular}{|l|c|c|c|}\hline
Sites & A.rubrum & A.sacch & Q.rubrum \\\hline
S1 & 25 & 5 & 0 \\
S2 & 0 & 0 & 45 \\\hline
\end{tabular}
\caption{Wide-form data}
\label{tab:wide-form}
\end{minipage}
\end{table}
\end{document}
booktabs
package's manual for making good looking tables. – TH. Mar 27 '11 at 11:14