I want to put two tables side by side and my I have included a sample code below. How can we put separate captions for two tables in LaTeX included in one tabular environment?
\documentclass{article}
\begin{document}
\begin{tabular}{ll}
\begin{tabular}{ccc}
A & B & C \\
\cline{1-3}
1 & 2 & 3 \\
\cline{1-3}
C & B & A \\
\end{tabular}
&
\begin{tabular}{ccc}
D & E & F \\
\cline{1-3}
4 & 5 & 6 \\
\cline{1-3}
F & E & D \\
\end{tabular}
\end{tabular}
\end{document}
Best Answer
using
tabularx
for outer table and usetable
environment:addendum: in cases, when one table is wider than other and wider than the column width, you can manually accommodate columns width of the outer table. for this is more appropriate to use
tabular*
thantabularx
table environment:which gives: