2

I have following problem:

I have two tables..... Table one:

\begin{table}[h]
\begin{tabular}{|c|c|}
\hline
\textbf{A} & \textbf{B} \\ \hline
\end{tabular}
\end{table}

Table two:

\begin{table}[h]
\begin{tabular}{|c|c|}
\hline
\textbf{C} & \textbf{D} \\ \hline
\end{tabular}
\end{table}

How can I make two columns for this table (on my page)? Like this:

there is some text....
TABLE ONE | TABLE TWO
there is some text...

Thank you for your advice.

3
  • 1
    Have you read of subcaption package and nested tabulars?
    – Astrinus
    Apr 14 '15 at 13:52
  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. As an aside, really consider not using so many lines and rules. Your data/ink ratio is suffering for it – it's visually cluttered. Apr 14 '15 at 13:53
  • Could not agree more with @SeanAllred; tables should have at most one hline separating column headings from the contents. Whitespace does a fine job of separating the information, it looks more attractive, and saves that precious toner cartridge
    – repurposer
    Apr 14 '15 at 13:57
4

You can put both the tabulars inside the same table environment:

\documentclass{Article}
\begin{document}
  Some text here Some text here Some text here Some text here Some text here Some text here
  \begin{table}[htb]
  \centering
\begin{tabular}{|c|c|}
\hline
\textbf{A} & \textbf{B} \\ \hline
\end{tabular}
\quad
\vrule
\quad
\begin{tabular}{|c|c|}
\hline
\textbf{C} & \textbf{D} \\ \hline
\end{tabular}
\end{table}

Some more text to follow
\end{document}

enter image description here

2

The page can be split into minipages, for the lazy:

some text...

\begin{minipage}{0.5\textwidth}
\begin{tabular}{ c c }
...
\end{tabular}
\end{minipage}

\begin{minipage}{0.5\textwidth}
\begin{tabular}{ c c }
...
\end{tabular}
\end{minipage}

some more text...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.