5

i have got a longtable that spans over many pages and contents both graphics and text. Now i want to align both columns vertically to the top, but the text column is being automatically parsed to the bottom.. How do i change this?

This is my example code:

\begin{longtable}{|p{6cm}|p{9cm}|}

\hline
\textbf{Visualisation} & \textbf{Explaining} \\ \hline
\includegraphics[width=6cm]{pic/pic1.pdf}
& text\\\hline

\end{longtable}

i want that the "text" is being placed on the top of the second column.

What is the easiest way to do this?

1 Answer 1

3

By default the baseline of the image is at the bottom you could use

\raisebox{-\height}{\includegraphics{....}}

to move the baseline to the top but that may be to far, you may want around a baseline of height something like

\raisebox{\normalbaselineskip-\height}{\includegraphics{....}}

if you have the calc package loaded.

The adjustbox package probably gives a nicer interface to this, so you might like to consult its documentation.

1
  • 2
    \adjustbox{valign=t}{\includegraphics{...}}
    – egreg
    Commented Sep 10, 2012 at 11:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .