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 would like to place a figure side-by-side with a table, and have both of them aligned to the top. This is what I came up with:

\begin{figure}
  \begin{minipage}[b]{0.65\linewidth}
    \includegraphics[width=0.9\textwidth]{3_comparative/fig/pic.pdf}
  \end{minipage}
  \begin{minipage}[t]{0.35\linewidth}
      \begin{tabular}{| c | c |}
        \hline
        Contrast & value \\
        \hline
        I & 6 \\
        ... \\
        \hline
      \end{tabular}
\end{minipage}
\caption{Phylogenetic independent contrasts}
\end{figure}

But this doesn't work as I hoped, the two items are misaligned: Rendered figure and table

How can I fix this?

share|improve this question
add comment

1 Answer

The answer to this common question is to be found in Keith Reckdahl's epslatex.pdf, page 36, "Minipage Vertical Alignment". I quote the particular solution here. Please note the "secret", the two \vspace{0pt}

\begin{center}
\begin{minipage}[t]{.25\linewidth}
\vspace{0pt}
\centering
\includegraphics[width=1in]{graphic}
\end{minipage}%
\begin{minipage}[t]{.25\linewidth}
\vspace{0pt}
\centering
\includegraphics[width=1in,angle=-45]{graphic}
\end{minipage}
\end{center

In general, this document is a must for any LaTeX work with graphics.

/Leif Andersson

share|improve this answer
    
Most enlightening! –  Greg Slodkowicz Aug 6 '12 at 22:12
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.