General ⇒ problem with table handling
problem with table handling
i use tables which are not large, so i need to place two table in the same line,
Please can you help me and indicate to me how to do this ?
thanks,
Sara
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
problem with table handling
\documentclass{article}
\usepackage{subfig}
\begin{document}
%two floating tables side by side each with its own caption and label
\begin{table}
\centering
\subfloat[First table.]{%
\begin{tabular}{ccc}\hline
\multicolumn{3}{c}{\label{tab:subtable1}First table} \\ \hline
a & b & c \\
d & e & f \\ \hline
\end{tabular}}\qquad
\subfloat[Second table.]{%
\begin{tabular}{ccc}\hline
\multicolumn{3}{c}{\label{tab:subtable2}Second table} \\ \hline
a & b & c \\
d & e & f \\ \hline
\end{tabular}}
\caption{Two sub-floats.}
\label{tab:2tables}
\end{table}
Table~\ref{tab:2tables} contains two top ‘sub-floats’. The first one is table~\ref{tab:subtable1} and the second one is table~\ref{tab:subtable2}
\end{document}