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 am using a little variation of the code provided by Gonzalo Medina,

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[rightcaption]{sidecap}
\usepackage{lipsum}

\sidecaptionvpos{figure}{t}
\begin{document}

\begin{SCfigure}
  \centering
  \begin{minipage}{5.5cm}
  \subcaptionbox{figure 1 \label{fig:sub1}}{\includegraphics{name1}}
  \end{minipage}
  \caption{\protect\lipsum[2]}
\end{SCfigure}

\begin{SCfigure}
  \centering
  \begin{minipage}{5.5cm}
  \subcaptionbox{figure 2 \label{fig:sub1}}{\includegraphics{name2}}
  \end{minipage}
  \caption{\protect\lipsum[2]}
\end{SCfigure}

\end{document}

to generate these figures:

enter image description here

Is it possible to place these 2 figures side by side?

share|improve this question
    
Isn't the current captioning redundant and confusing? Figure 1 is also labeled (a) and Figure 2 is also (a). Should just the main caption remain? –  Gonzalo Medina Jul 16 '13 at 22:03
    
@GonzaloMedina Thank you for your attention. In this case, the redundancy is necessary. –  Papiro Jul 16 '13 at 22:26
    
Would it be acceptable if the resulting object doesn't float? –  Gonzalo Medina Jul 16 '13 at 22:27
    
@GonzaloMedina Sure! –  Papiro Jul 16 '13 at 22:28

1 Answer 1

up vote 5 down vote accepted

Here's one possible solution using the hvfloat and subcaption packages; the double labeling was kept (as requested in a comment to the question); depending on the actual images, some setting might need to be adjusted:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{hvfloat}
\usepackage{lipsum}

\captionsetup[subfigure]{labelformat=parens,labelsep=space}

\begin{document}

\noindent\begin{minipage}[t]{.5\textwidth}
\savebox\hvOBox{\parbox{3cm}{\centering\includegraphics[width=3cm]{example-image-a}\par\captionof{subfigure}{Figure 1}}}
\hvFloat[%
nonFloat=true,%
capWidth=0.45,%
capPos=r,%
capVPos=t,%
useOBox=true
]{figure}{}%
{An example of a caption vertically top aligned beside the image; two simple test images on a row}{fig:testa}
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
\savebox\hvOBox{\parbox{3cm}{\centering\includegraphics[width=3cm]{example-image-b}\par\captionof{subfigure}{Figure 2}}}
\hvFloat[%
nonFloat=true,%
capWidth=0.45,%
capPos=r,%
capVPos=t,%
useOBox=true
]{figure}{}%
{An example of a caption vertically top aligned beside the image; two simple test images on a row}{fig:testb}
\end{minipage}

\end{document}

enter image description here

A simpler option with four minipages and the caption/subcaption combo:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{lipsum}

\captionsetup[subfigure]{labelformat=parens,labelsep=space}

\begin{document}

\noindent\begin{minipage}[t]{.23\textwidth}
  \vspace*{0pt}\centering
  \includegraphics[width=\linewidth]{example-image-a}\par
  \captionof{subfigure}{Figure 1}
\end{minipage}\hfill
\begin{minipage}[t]{.23\textwidth}
  \vspace*{0pt}
  \captionsetup[figure]{belowskip=0pt}
  \captionof{figure}{An example of a caption vertically top aligned beside the image; two simple test images on a row}
  \label{fig:testa}
\end{minipage}\hfill
\begin{minipage}[t]{.23\textwidth}
  \vspace*{0pt}\centering
  \includegraphics[width=\linewidth]{example-image-a}\par
  \captionof{subfigure}{Figure 2}
\end{minipage}\hfill
\begin{minipage}[t]{.23\textwidth}
  \vspace*{0pt}
  \captionsetup[figure]{belowskip=0pt}
  \captionof{figure}{An example of a caption vertically top aligned beside the image; two simple test images on a row}
  \label{fig:testb}
\end{minipage}%

\end{document}

enter image description here

share|improve this answer
    
Nice work! Thanks a lot! –  Papiro Jul 16 '13 at 22:52
1  
@Papiro You're welcome! I've updated my answer with another (simpler) option. –  Gonzalo Medina Jul 16 '13 at 23:13

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.