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?

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.

| improve this answer | |
  • 2
    \adjustbox{valign=t}{\includegraphics{...}} – egreg Sep 10 '12 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.