I have a small LaTeX table (tabular) created in R with the xtable package and I would like to place a figure underneath the table on the SAME page. I have tried various things (using packages float, needspace, etoolbox, etc etc), but I don't seem to get it completely right... It also doesn't work if I just put random text after the table.
How can I force to not have a page break after the table?
My code looks like this (omitting the packages) :
\documentclass[a4paper, 11pt]{article}
\begin{document}
\include{small_table}
\begin{figure}
\includegraphics{piechart.eps}
\end{figure}
\end{document}
Because I make the small table file from R, I want to avoid altering that file. However it looks something like this:
\begin{table}[ht]
\centering
\begin{tabular}{lc}
bla & bla
\end{tabular}
\end{table}
Thank you!
\end{tabular}
putting a blank line and then\includegraphics{piechart.eps}
?\include
_always forces a page break, use\input
\begin{figure}[htp]
to allow the figure to be in the page rather than float to top