Possible Duplicate:
How to align picture top left in a table?
I want to display an image and some lines of monospaced text with line breaks (as far as I know, lstlisting is the only option). The upper bounds of both image and text should both be aligned at the top of the row, but I always result in either the image or the monospace text at the wrong position. As I don't understand whats wrong I haven't got any clue how to fix this.
\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{verbatim}
\begin{document}
\lstset{
breaklines = true
}
\begin{tabular}{|p{3cm}|p{10cm}|}
\hline
\includegraphics{/Users/jenserat/Downloads/test.png} & \begin{lstlisting}
Some listing.
Some listing. Some lines can get quite long and should be wrapped.
Some listing.
Some listing.
Some listing.
Some listing.
Some listing.
Some listing.
\end{lstlisting} \\
\hline
\end{tabular}
\end{document}
I tried using different combinations of tabular, tabularx, graphics, graphicsx, minipages without luck. I want to avoid some ugly hacks using vspace as this latex code should be generated by some script which probably will get distributed.
I'd like to use a table, but am not bound to one. I do not mind using tabularx and do not mind what column style I use (as long as the code is left-aligned).

minipages with the optional alignment argument, eithert,b, orc– cmhughes Jan 26 '12 at 23:49adjustboxas proposed by @MartinScharrer - thanks a lot!\begin{minipage}[t]{...}...\end{minipage}didn't work in this case. – Jens Erat Jan 27 '12 at 00:33