[texhax] raisebox in longtable
Ulrike Fischer
news3 at nililand.de
Sat Dec 26 14:24:01 CET 2009
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}
--
Ulrike Fischer
More information about the texhax
mailing list