The following code places the figure and table one after another instead of side by side.
What's going wrong?
\begin{figure}
\begin{minipage}[t]{0.4\linewidth}
\centering
\caption{}\label{fig}
\includegraphics[scale=.4]{image}\label{}
\end{minipage}
\end{figure}
\hfill
\begin{table}
\begin{minipage}{0.5\linewidth}
\begin{center}
\caption{}\label{}
\scalebox{0.9}{
\setlength{\tabcolsep}{.6em}
\begin{tabular}{ |c c c c c | }
\end{tabular}
}
\end{center}
\end{minipage}
\end{table}
Best Answer
A
figure
andtable
environment always appear in the full width of a line and with nothing next to them. If you want to place the two next to each other, you can't use afigure
AND atable
environment. If you still want them to float you can use only one of the two environments and use\captionof{<type>}{<caption>}
instead (this is provided by thecapt-of
package, thecaption
package, or any KOMA-script class).Small example: