If I have a minipage like the following:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\begin{document}
\begin{minipage}{1\linewidth}
\centering
A
\medskip
B
\end{minipage}
\end{document}
Why it is not possible to insert tables instead of A and B? If I try, I get "LaTeX Error: Not in outer par mode."
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\begin{document}
\begin{minipage}{1\linewidth}
\centering
\begin{table}[h]
\centering
\bgroup
\def\arraystretch{1.2}
\begin{tabular}{ c c | c | c | }
& & \multicolumn{2}{c|}{P2} \\
& & $a_1$ & $a_2$ \\
\hline
\multirow{2}{*}{P1} & $a_1$ & 0, 0 & 0, 0 \\
& $a_2$ & 0, 0 & 0, 0 \\
\hline
\end{tabular}
\egroup
\caption{Title}
\end{table}
\medskip
\begin{table}[h]
\centering
\bgroup
\def\arraystretch{1.2}
\begin{tabular}{ c c | c | c | }
& & \multicolumn{2}{c|}{P2} \\
& & $a_1$ & $a_2$ \\
\hline
\multirow{2}{*}{P1} & $a_1$ & 0, 0 & 0, 0 \\
& $a_2$ & 0, 0 & 0, 0 \\
\hline
\end{tabular}
\egroup
\caption{Title}
\end{table}
\end{minipage}
\end{document}
Ideally, I would like to understand the meaning of "LaTeX Error: Not in outer par mode."
Best Answer
A
table
environment cannot be part of aminipage
. Use only one environmenttable
and no minipage! Such an environment can have more than one caption:fro two tabulars side by side use: