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 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?

share|improve this question
1  
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
1  
»epsfig« is obsolete and superseded by »graphicx«. –  Thorsten Donig Nov 26 '10 at 8:42
1  
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

3 Answers 3

up vote 4 down vote accepted

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...
& \raisebox{-\height}{\rule{4cm}{4cm}}\\\addlinespace
\hline
\end{tabular}

\end{document}
share|improve this answer
    
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:

sidebyside in action

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.

share|improve this answer
    
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

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

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.