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 figure setup as follows:

\begin{figure*}[t!]
\centering
\subfigure[Part 1]
{
   \includegraphics*[totalheight=2in,origin=c]{ost100}
}
\subfigure[Part 2]
{
   \includegraphics*[totalheight=2in,origin=c]{bay}
}
\subfigure[Part 3]
{
   \small
   \begin{tabular}{| l | c | r | r | } \hline
   {...}
   \hline
   \end{tabular}
}
\caption{The main experiment.\label{f:main}}
\end{figure*}

For some reason, my table ends up shifted far below the images in part 1 and 2, with about a 1/2 inch margin above it. Shrinking the images doesn't change this. Any idea what is going wrong and how to fix it?

share|improve this question
4  
subfigure is obsolete. You should consider using subfig instead. –  TH. Feb 6 '11 at 7:32
    
My collaborators made the subfigure decision. Can you recommend good documentation/examples. A quick test didn't let subfig and subfigure play nicely together. –  Nathan S. Feb 6 '11 at 7:41
3  
The subfigure and subfig packages are incompatible, so you can only use one of them. It's not clear to me why your collaborators made a decision using a package which is obsolete (and was superseeded by the subfig package of the same author) for more than 7 years. –  Axel Sommerfeldt Feb 6 '11 at 9:01
add comment

2 Answers 2

up vote 3 down vote accepted

The tabular environment accepts an optional parameter for alignment with respect to the current line.

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage[demo]{graphicx}
\usepackage{subfig}

\begin{document}
  \begin{figure*}[!ht]
    \centering
    \subfloat[Part 1]{%
      \includegraphics*[totalheight=1in,origin=c]{ost100}
    }
    \subfloat[Part 2]{%
      \includegraphics*[totalheight=1in,origin=c]{bay}
    }
    \subfloat[Part 3]{%
      \small
      \begin{tabular}[b]{|l|r|} \hline
        Table head & Table head \\ \hline
        Some Values & Some Values \\
        Some Values & Some Values \\
        Some Values & Some Values \\
        Some Values & Some Values \\
        Some Values & Some Values \\ \hline
      \end{tabular}
    }
    \caption{The main experiment.}\label{fig:main}
  \end{figure*}
\end{document}

Note that the example uses the subfig package instead oth the obsolete subfigure (see comments).

The demo option for the graphicx package was necessary because your graphics files where not present. Just drop it later.

share|improve this answer
    
I didn't know about the [b] parameter. That fixed the problem. (Of course, everyone is right -- we shouldn't be using subfigure, but I'll let my co-author deal with that.) –  Nathan S. Feb 6 '11 at 21:53
add comment
\documentclass[a4paper]{article}
\usepackage[demo]{graphicx}
\usepackage{subfig}

\begin{document}

\begin{figure*}[!ht]
\centering
\subfloat[Part 1]{\includegraphics*[width=0.3\linewidth]{ost100}}\hfill
\subfloat[Part 2]{\includegraphics*[width=0.3\linewidth]{bay}}   \hfill
\subfloat[Part 3]{\small
   \begin{tabular}[b]{| l | c | r | r | } \hline
    foo&bar&baz&foo \\\hline
    foo&bar&baz&foo \\\hline
    foo&bar&baz&foo \\\hline
   \end{tabular}}
\caption{The main experiment.\label{f:main}}
\end{figure*}

\end{document}

enter image description here

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