Graphics, Figures & Tablespicture next to table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
emmajonson
Posts: 5
Joined: Mon Jun 15, 2009 10:42 am

picture next to table

Post by emmajonson »

Hi!
I want to make a table with figures and small tables inside. I started with a picture and then a table next to it. The problem is that the picture is slightly higher than the table...

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{table}
\begin{tabular}{lr}
\includegraphics[width=6cm]{picture.JPG}
&
\begin{tabular}{|ll|}
\multicolumn{2}{|c|}{\textbf{Chile}} \\
\hline
  Geography & ... \\
  Population & ... \\
  Industry & ... \\
  Energy & .... \\
\end{tabular}
\end{tabular}
\end{table}
\end{document}
The table ends up too low. I also tried:

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{table}[ht]
\begin{minipage}[b]{0.5\linewidth}\centering
\includegraphics[width=6cm]{picture.JPG}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.5\linewidth}
\centering
\begin{tabular}{|ll|}
\multicolumn{2}{|c|}{\textbf{Chile}} \\
\hline
  Geography & ...... \\
  Population & ..... \\
  Industry & ..... \\
  Energy & ..... \\
\end{tabular}\end{minipage}
\end{table}
\end{document}
but with the same result. I think there was somebody with a similar problem here, but I didn't really understand the answer....

Would be very grateful for a solution!
Thanks so much!

Cheers,
Emma

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

emmajonson
Posts: 5
Joined: Mon Jun 15, 2009 10:42 am

Re: picture next to table

Post by emmajonson »

Hello again!
This problem is driving me crazy! I don't understand why it has to be so complicated!! Word is 1000 times easier to understand! I feel like I have tried so many things and nothing works!

When I try to put my picture and my table next to each other in one bigger table, they end up side-by-side, but the little table is much lower down than the figure. When I try the subfigure, they don't end up side-by-side at all. The table ends up below the figure, even when I make them both very narrow. When I try the minipage it only works if I include captions on both the figure and the table. But I prefer just one caption for both the figure and table, and then I'm back to square 1, the figure and table are side-by-side, but with the table a couple of cm lower down than the figure.

It is impossible to find information about this anywhere! I've spent so many hours googling but nobody seems to have the same problem as I have!

*sad latex-beginner*
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

picture next to table

Post by localghost »

emmajonson wrote:[...] I don't understand why it has to be so complicated!! Word is 1000 times easier to understand! [...]
There is a steep learning curve to get to grip with LaTeX. But your patience will be rewarded with professional looking documents in marked contrast to the very poor output quality of MS Word.

Take a look at the caption package. Its manual (Section 4.1 - Further examples, p. 28ff) provides a very interesting example (#4) that should solve this issue.


Best regards
Thorsten
emmajonson
Posts: 5
Joined: Mon Jun 15, 2009 10:42 am

Re: picture next to table

Post by emmajonson »

Thanks so much for your help!

Your link led me to a very simple solution: just change to [t] in my table. That solved the problem! Now I'm happy again:)
Cheers
Post Reply