[texhax] raisebox in longtable

Christian Pleul chrisptex at googlemail.com
Sun Dec 27 07:44:27 CET 2009


Am 26.12.2009 um 14:24 schrieb Ulrike Fischer:

> Am Sat, 26 Dec 2009 11:45:02 +0100 schrieb Christian Pleul:
> 
>> Hi,
>> 
>> To properly align images and text within a longtable, I use raisebox like the following:
>> 
>> ---------
>> \latexhtml{\begin{longtable}{p{0,5\textwidth}p{0,45\textwidth}}}{\begin{longtable}{lp{20cm}}}
>> \latex{\multicolumn{2}{r}{\footnotesize{Fortsetzung folgt auf der nächsten Seite\dots}}\\}
>> \latex{\endfoot}
>> \latex{\endlastfoot}
>> 	\raisebox{-0.8\height}{\includegraphics[scale=0.5]{foo}} & some text goes here\\
>> 	\raisebox{-0.8\height}{\includegraphics[scale=0.5]{boom}} & some text goes here too\\
>> \end{longtable}
>> ---------
> 
>> Unfortunately, the images nearly stick together vertically. So
>> there is no space between the first and the second row and
>> therefore between the images.
> 
>> How could I create a little space between the rows?
> 
> You set the height of the second image to a bit more than the
> "natural" 0.2\height it has after you moved it down:
> 
> \listfiles
> \documentclass{article}
> \begin{document}
> \begin{tabular}{ll}
> \raisebox{-0.8\height}{\rule{1cm}{4cm}}&text\\
> \raisebox{-0.8\height}[0.25\height]{\rule{1cm}{4cm}}&text\\
> \end{tabular}
> \end{document}

Thanks a lot. This did the trick.

--
	Christian


-Because I'm the CEO, and I think it can be done.-

Steve Jobs, 2005



More information about the texhax mailing list