# Minipage: 2 tables side by side isn't working

I have the following code to layout two tables side by side:

\begin{minipage}{0.3\textwidth}
\begin{tabular}{c | c | c | c | c | c | c}
F & D & E & G & P & A & L\\
\hline
C & H & I & I & U & G & F\\
\hline
G & Z & G & A & F & Z & U\\
\hline
F & R & \textbf{H} & \textbf{A} & \textbf{U} & \textbf{S} & Z\\
\hline
R & P & L & I & N & F & H\\
\hline
L & U & G & I & A & C & T\\
\hline
A & B & D & N & E & R & Z\\
\end{tabular}

\end{minipage}

\begin{minipage}{0.3\textwidth}
\begin{tabular}{c | c | c | c | c | c | c}
F & D & E & G & P & A & L\\
\hline
C & H & I & I & U & G & F\\
\hline
G & Z & G & A & F & Z & U\\
\hline
F & R & \textbf{H} & \textbf{A} & \textbf{U} & \textbf{S} & Z\\
\hline
R & P & L & I & N & F & H\\
\hline
L & U & G & I & A & C & T\\
\hline
A & B & D & N & E & R & Z\\
\end{tabular}

\end{minipage}


But it doesn't work. The tables are one below the other. What am I doing wrong?

-

What you are doing wrong is the new line between the minipages. That makes for a new paragraph. Remove it and make them a little wider (your tables are wider than .3\textwidth so they will overlap. This is what the code would look like:

\documentclass{article}
\begin{document}
\begin{minipage}{0.4\textwidth}
\begin{tabular}{c | c | c | c | c | c | c}
F & D & E & G & P & A & L\\
\hline
C & H & I & I & U & G & F\\
\hline
G & Z & G & A & F & Z & U\\
\hline
F & R & \textbf{H} & \textbf{A} & \textbf{U} & \textbf{S} & Z\\
\hline
R & P & L & I & N & F & H\\
\hline
L & U & G & I & A & C & T\\
\hline
A & B & D & N & E & R & Z\\
\end{tabular}
\begin{minipage}{0.4\textwidth}
\begin{tabular}{c | c | c | c | c | c | c}
F & D & E & G & P & A & L\\
\hline
C & H & I & I & U & G & F\\
\hline
G & Z & G & A & F & Z & U\\
\hline
F & R & \textbf{H} & \textbf{A} & \textbf{U} & \textbf{S} & Z\\
\hline
R & P & L & I & N & F & H\\
\hline
L & U & G & I & A & C & T\\
\hline
A & B & D & N & E & R & Z\\
\end{tabular}
\end{minipage}
\end{document}


The \qquad is added for some extra spacing. The result looks like this:

-
On the other hand, the two minipage environments are superfluous. –  egreg Nov 23 '11 at 10:45
yes, there is no problem in just placing the two tabulars side by side without the minipages. Then you wouldn't have to 'guess' the width of the tabulars either. –  Roelof Spijker Nov 23 '11 at 10:59