Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
1  
\adjustbox{valign=t}{\includegraphics{...}} –  egreg Sep 10 '12 at 11:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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