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'm doing a report using LaTeX. I have not too much experience here, and need to solve this issue. It is a simple question:

How can I arrange two tables, one beside the other in LaTeX?

For example:

[Table1] [Table2]
share|improve this question
1  
Just place the code of one table after the other. By the way, welcome to TX.SX! –  azetina Oct 29 '12 at 21:02

2 Answers 2

up vote 5 down vote accepted

The following code should work:

\documentclass{article}
\begin{document}
%----------------------------------------
% No space between the tables
\begin{tabular}{|c|c|}
\hline
test & test\\ \hline
\end{tabular}
\begin{tabular}{|c|c|}
\hline
test & test\\ \hline
\end{tabular}
\par
%----------------------------------------
% Added a space between the tables
\begin{tabular}{|c|c|}
\hline
test & test\\ \hline
\end{tabular}
\hspace{2cm}
\begin{tabular}{|c|c|}
\hline
test & test\\ \hline
\end{tabular}
%----------------------------------------
% Centered with a space between the tables
\begin{center}
\begin{tabular}{|c|c|}
\hline
test & test\\ \hline
\end{tabular}
\hspace{2cm}
\begin{tabular}{|c|c|}
\hline
test & test\\ \hline
\end{tabular}
\end{center}
\end{document}

enter image description here

share|improve this answer

Or else in a minipage

screenshot

\documentclass{article}

\begin{document}

\begin{table}[!htb]
    \begin{minipage}{.5\textwidth}
        \centering
        \caption{}
        \label{tab:first}
        \begin{tabular}{rcl}
            right & center & left \\
            right & center & left 
        \end{tabular}
    \end{minipage}%
    \begin{minipage}{.5\textwidth}
        \centering
        \caption{}
        \label{tab:second}
        \begin{tabular}{rcl}
            right & center & left \\
            right & center & left 
        \end{tabular}
    \end{minipage}
\end{table}

\end{document}

Note the % after the first \end{minipage} to prevent the extra space creating an overfull hbox.

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.