# pretending to have a table, but placing an image (of an table) in order to get table counting [closed]

I have images of tables (screenshots from Excel actually), and up to now I'm using this structure.

\begin{table}[htp]
\includegraphics{mytable.png}
\caption{\label{tab:MyTable}some description}
\end{table}


As far as I have gathered, this is the way to go if I want to get a numbering like "Table 1.99" - which I want it to be.

My problem is that the space between caption and picture is different with every table. Is that because the table-images are all of different height and it gets rounded to \baselineskip or something similar? The idea would then be to make the table be vertically aligned at the bottom (I would not care about extra space above a table, but between table and caption that looks no good) - which I don't know how to achieve.

BTW:

• I am aware of the fact that it is recommended to place captions above images, but I want it to have the same appearance as my images.
• I also would like to use table because I want my tables to be listed on the list of tables (so changing "Figure" to "Table" but using begin{figure} won't do the trick for me).
• I know that using built-in tables would be better, but that's currently not the way to go
• My images do not have spurious white space at any side

EDIT: In order to have all the text equally sized in all "tables", the screenshots were taken at the same zoom level from Excel. The widest table determined the dpi number which was then set for all the table-images (BTW: 215 dpi), so that it fittet on the page. Might that odd resolution be the problem? I'm trying to reproduce it with other images, but it seems random somehow...

-
I'm sure others will wonder too.... why not produce the tables in LaTeX? – cmhughes Feb 1 at 16:35
@David I suspect we are going to need some demo images here, plus a suitable TeX file to try them with. It's not clear to me exactly where the spacing might come from. – Joseph Wright Feb 1 at 16:43
maybe the screenshots are not cropped properly? – percusse Feb 1 at 16:46
@BenediktBauer There is no difference between {figure} and {table} environment, besides the fact that they show a different caption text and use a different counter. As a journal Copy Editor, I can verify that table is a table even when it's an Excel printscreen, and I change this in the manuscripts I typeset. – tohecz Feb 1 at 17:29
You need to check your images in an image viewer (or simply put \fbox{...} around the image to test) to see if there is spurious white space in the image,and if so crop the images before inclusion. However while it's reasonable to enter and manage the data in excel you will get much better typeset result if instead of printing a screenshot you export the data from excel as a comma separated list and then import that into latex to typeset the table. – David Carlisle Feb 1 at 17:42

## closed as too localized by Stephan Lehmke, David Carlisle, tohecz, cmhughes, lockstepFeb 1 at 19:55

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

The main problem was in my case, that I had used [width=\textwidth] in some cases (so it was not obvious right away), trusting in LaTeX to make it fit perfectly onto the page taking all the horizontal space possible. Yet in my configuration (don't know what/where the culprit is), this always resulted having extra space between table and caption, no matter high the res was set on the pictures.
I have used the etoolbox package and the \AtBeginEnvironment and \AtEndEnvironment to fine tune spacing, but there's not more to it than \vspace{...} so I don't suspect that to be the problem.