# Vertical alignment in the tables with pictures (epsfig)

I have a table with two columns. The column on the left contains a picture (\epsfig) the column on the right contains the description.

The description starts on the same height as the lower end of the epsfig

I would like the description to start on the same height as the beginning of the epsfig.

How can I achieve this?

-
people generally like a minimal working example. Post the minimal code necessary to illustrate your problem please! you will get a much more precise answer this way! –  Mica Nov 26 '10 at 6:26
»epsfig« is obsolete and superseded by »graphicx«. –  Thorsten Donig Nov 26 '10 at 8:42
I think a more descriptive title would be "Vertical alignment in the tables with pictures". So people can find the question in the future. –  sastanin Nov 26 '10 at 9:20
I agree, but I am forced to use epsfig by the publishing company. This is as well the reason for net sending an example, since it is a "customized table environment". –  ddeimeke Nov 26 '10 at 9:32

This should work within a table. It aligns the picture and the text.

\documentclass{article}
\usepackage[english]{babel}
\usepackage{graphicx,booktabs,blindtext}

\begin{document}
\begin{tabular}{cc}
\hline
%raise the text and put it in a box
\raisebox{-\height}{\parbox{5cm}{%
\blindtext%
}}
% raise the picture \rule{}{} is a dummy for \includegraphics...
\hline
\end{tabular}

\end{document}

-
Perfect, thank you! –  ddeimeke Nov 26 '10 at 11:50

I use a custom \sidebyside macro to center (vertically) the text with respect to the figure on the left:

And the macro itself, to put in the preambula:

\newsavebox{\leftbox}
\newlength{\leftboxheight}
\newcommand{\sidebyside}[2]{
\sbox{\leftbox}{#1}
\settoheight{\leftboxheight}{\usebox{\leftbox}}
\usebox{\leftbox}
\raisebox{0.5\leftboxheight}{#2}
}


Details and mini-documentation are here. You can easily adjust the position by changing the first argument to \raisebox.

-
Thanks to you as well, I need to use the customized table environment. –  ddeimeke Nov 26 '10 at 9:35

Look in the TeX faq: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=topgraph

-
Thanks for the hint, but this unfortunately does not solve my problem. –  ddeimeke Nov 26 '10 at 9:34