1

I need to create a table with two cells, with one further tables inside each cell, and put captions beneath the two subtables (see the attached figure). However, it's my understanding that (i) the table environment cannot be nested (I can nest the tabular environment, but not the table environment, right?); (ii) the subtables environment will give me two different tables, not two tables inside a larger one. Any ideas? It doesn't need to be a "clean" solution...

Incidentally, I'm aware that this looks kinda ugly, but I'm translating that book and so I have to follow the tables very precisely...

Tables inside a table

2

A very simple solution, using minipage, \fbox, and \captionof from the caption package:

enter image description here

\documentclass{article}

\usepackage{caption}

\begin{document}

\fbox{%
\begin{minipage}{0.5\textwidth}
  \centering
  \begin{tabular}{c@{\(\quad\rightarrow\quad\)}c}
    (frown, calm) & angry\\
    (smile, calm) & happy\\
    \vdots & \vdots
  \end{tabular}
  \captionof{table}{The function F}
\end{minipage}}%
\fbox{%
\begin{minipage}{0.5\textwidth}
  \centering
  \begin{tabular}{c@{\(\quad\rightarrow\quad\)}c}
    (frown, calm) & frown back\\
    (smile, calm) & smile back\\
    \vdots & \vdots
  \end{tabular}
  \captionof{table}{The function G}
\end{minipage}}

\end{document}
2

You can use more than one \caption command inside a table and arrange them to your liking:

\documentclass{article}

\begin{document}

\begin{table}
\begin{minipage}{0.5\textwidth}
a table
  \caption{The function F}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
another table
  \caption{The function G}
\end{minipage}

\bigskip

a third table

\caption{more functions}
\end{table}

\end{document}

enter image description here

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.