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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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}