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.

This code:

\begin{figure*}[t]
\begin{center}
        \begin{subfigure}[a]{0.3\textwidth}
                \label{im:device_front}
        \includegraphics[width=\textwidth]{images/bsn_side}
        \caption{a) Frontal view of the sensor system}
    \end{subfigure}
                \quad    
    \begin{subfigure}[b]{0.3\textwidth}
                \label{im:device_schuin}
        \includegraphics[width=\textwidth]{images/bsn_front}
        \caption{b) Perspective view of the sensor system}
    \end{subfigure} 
            \quad
    \begin{subfigure}[b]{0.25\textwidth}
                \label{im:device_side}
        \includegraphics[width=\textwidth]{images/bsn_schuin}
        \caption{c) Side view of the sensor system}
    \end{subfigure} 
\caption{Overview of the system as worn by the subjects}
\label{default}
\end{center}
\end{figure*}

produces result:

enter image description here

But I want them to be horizontally aligned. How can I do this?

share|improve this question
    
Use [b] for the first subfigure, similar to the other two. You should also consider using subfig since subfigure is deprecated. –  Werner Jul 31 '12 at 18:50
    
aah, thank you, I thought the [a],[b] and [c] was for enumeration purposes. –  jorrebor Jul 31 '12 at 18:53
1  
@Werner OP's probably using subcaption package. –  percusse Jul 31 '12 at 19:34

3 Answers 3

up vote 6 down vote accepted

The interface provided by the subfigure package, specifies the first (optional) argument to indicate the vertical alignment. Using [b] should align be bottom of the sub figures. Analogously, [t] should align the tops.

Instead of numbering the captions manually

\caption{a) ...}

you could use the accompanying \subfigure command:

\subfigure{...}

and change the format of the numbering to your liking.

share|improve this answer
    
subcaption seems to be incompatible with subfig. Is there a solution. But I have many subfloats. Is there a solution with subfig / one that does not require to change all subfloats (without setting height explicitly)? –  moose Dec 17 '13 at 6:47

I simply couldn't pass this one by, if only just to produce a solution that makes note of the obvious similarities between the sample provided and the classic Tron Guy.

The actual solution uses subfig package, but who cares.

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage[labelsep=quad,indention=10pt]{subfig}
\captionsetup*[subfigure]{position=bottom}
\begin{document}
    \begin{figure}[h]
        \centering
           \subfloat[Frontal view]{%
              \includegraphics[height=5cm]{tron_side.jpg}%
              \label{fig:left}%
           } 
           \subfloat[Perspective view]{%
              \includegraphics[height=5cm]{tron_front.jpg}%
              \label{fig:middle}%
           }
           \subfloat[Side view]{%
              \includegraphics[height=5cm]{tron_right2.jpg}%
              \label{fig:right}%
           }
           \caption{Overview of the sensor system as worn by the subjects.}
           \label{fig:default}
    \end{figure}    
\end{document}

Solution

share|improve this answer
2  
+1 for the comparison :) –  jorrebor Aug 9 '13 at 8:24

I found this code:

\begin{figure}
\subfigure{\includegraphics[width=67mm]{PipeScannerUnderGround}}
\subfigure{\raisebox{10mm}{\includegraphics[width=47mm]{CylScanGeometryPipe}}}
\caption{}
\end{figure}

here

Worked perfectly :)

share|improve this answer

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.