Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
l.10 \bgroup
This is the document:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\begin{document}
\begin{center}
\begin{tabular}{ c c }
\begin{table}
\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}
Other text
\end{tabular}
\end{center}
\end{document}
What does this mean?
–
for this i suggest to use the tabularx
table environment for outer table:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{document}
\begin{table}
\centering
\begin{tabularx}{\linewidth}{ C C }
\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}
\caption{Title of the first table}
\label{tab:1}
\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}
\caption{Title of the second table}
\label{tab:2}
\end{tabularx}
\end{table}
\end{document}
–
–