# Two table environments side by side

I have the follown problem. In order to save space I want to place two different table-environemnts side by side. If I use subtable from the subcaption package I have the problem that the tables are named 'a) Caption of a' and 'b) Caption of b' and have a additional common caption below and only one common number. But I want to have for example Table 3 and Table 4 side by side without a addtional label a) or b) and without the addtional common caption below both.

How can this be done?

Here is a minimal - not clean - working example:

\documentclass{IOS-Book-Article}

\usepackage[utf8]{inputenc}
\begin{document}
\begin{table}
\begin{centering}
\begin{minipage}{0.4\textwidth}
\begin{tabular}{|c|r|r|}\hline
Matrix & $err_{global}(A,B)$ & $err_{local}(A,B)$ \\\hline\hline
(a) & & \\
(b) &  & \\
(c) & & \\
(d) & & \\\hline
(e) &  &\\
(f) &  &\\
(g) & & \\
(h) & & \\\hline
\end{tabular}
\caption{This is a ver very very long cpation which overwrites the text on the right side of the paper.}
\label{tab:accuracy}
\end{minipage}
\hfill
\begin{minipage}{0.55\textwidth}
\begin{tabular}{|c|r|r|r|}\hline
Matrix & no OpenMP & OpenMP & speed up\\\hline\hline
(a) & & &\\
(b) & & &\\
(c) & & &\\
(d) & & &\\\hline
(e) & & &\\
(f) & & &\\
(g) & & &\\
(h) & & &\\\hline
\end{tabular}
\caption{Speed up for the parallel solution of the trivial problem, 16
\label{tab:ompdiff}
\end{minipage}
\end{centering}
\end{table}

\end{document}


The IOS-Book-Article class is available at http://www.iospress.nl/service/authors/latex-and-word-tools-for-book-authors/ and I am forced to use it.

• That is exactly the problem. I only can provide an MWE how it show not look like. – M.K. aka Grisu Jun 14 '13 at 12:22

As David has mentioned, you can use two minipages inside a single table environment. However, with the IOS-Book-Article document class, this approach generates a problem due to the internal definition of \@maketablecaption; a quick workaround is to set \tablewidth to the appropriate value:

\documentclass[draft]{IOS-Book-Article}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{table}
\centering
\setlength\tabcolsep{4pt}
\begin{minipage}{0.48\textwidth}
\centering
\tablewidth=\textwidth
\begin{tabular}{|c|r|r|}\hline
Matrix & $err_{global}(A,B)$ & $err_{local}(A,B)$ \\\hline\hline
(a) & & \\
(b) &  & \\
(c) & & \\
(d) & & \\\hline
(e) &  &\\
(f) &  &\\
(g) & & \\
(h) & & \\\hline
\end{tabular}
\caption{This is a ver very very long caption which doesn't overwrites the text on the right side of the paper.}
\label{tab:accuracy}
\end{minipage}%
\hfill
\begin{minipage}{0.48\textwidth}
\centering
\begin{tabular}{|c|r|r|r|}\hline
Matrix & no OpenMP & OpenMP & speed up\\\hline\hline
(a) & & &\\
(b) & & &\\
(c) & & &\\
(d) & & &\\\hline
(e) & & &\\
(f) & & &\\
(g) & & &\\
(h) & & &\\\hline
\end{tabular}
\caption{Speed up for the parallel solution of the trivial problem, 16
\label{tab:ompdiff}
\end{minipage}
\end{table}

\end{document}


No need for subcaptions if you don't want them. You can have as many tabular as you need in a table, It is perhaps easier to control caption positioning if you use minipage although that is not always needed.

\begin{table}
\centering

\begin{minipage}{.4\textwidth}
\begin{tabular.....
\end{tabular}
\caption{zzzz}
\end{minipage}\hfill
\begin{minipage}{.4\textwidth}
\begin{tabular.....
\end{tabular}
\caption{zzzz}
\end{minipage}\hfill

\end{table}

• Thanks, that is exactly what I am searching for. The only problem is that there seems to be no automatic line break in the cpations, so that bad boxes are created and the left cpations overwrites the one on the right. – M.K. aka Grisu Jun 14 '13 at 12:28
• @Grisu No if that happens you are doing something wrong:-) If the captions are inside the minipages they should wrap to the minipage width (that is the only reason to add minipage) Please always include a complete small document in your question that shows the problem. – David Carlisle Jun 14 '13 at 12:35
• I add the current state in my post. I tried it with the article class and there it works. Using the document class which I am forced to use, it does not work. – M.K. aka Grisu Jun 14 '13 at 12:42