Graphics, Figures & Tableshow to get side caption for subfloat figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
halcyon7
Posts: 2
Joined: Wed Aug 11, 2010 7:44 pm

how to get side caption for subfloat figures

Post by halcyon7 »

Hi all,

currently im using the subfig package to get multiple images displayed, but the caption is at the bottom and i'd like to have it on the right hand side.

i have attempted to use sidecap package -- but seems like its not compatible
i tried with floatrow package as well but the examples are a bit confusing to understand..

anyone can help?

my code is below..


\begin{figure}
\centering

\subfloat[]{\label{....}\includegraphics[width=0.3\textwidth]{.....jpg}}\hspace{0.5cm}%
\subfloat[]{\label{....}\includegraphics[width=0.3\textwidth]{.....jpg}}\hspace{0.5cm}%
\subfloat[]{\label{....}\includegraphics[width=0.3\textwidth]{.....jpg}}\hspace{0.5cm}%
\subfloat[]{\label{....}\includegraphics[width=0.3\textwidth]{.....jpg}}\hspace{0.5cm}%

\caption{...}
\label{...}

\end{figure}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: how to get side caption for subfloat figures

Post by sommerfee »

Neither the sidecap nor the subfig package are capable of doing this.

So you either have to understand the floatrow documentation, or can take a peek at the subcaption documentation. The subcaption package has a command called \subcaption which can be placed wherever you like, but by using this (instead of the floatrow package) you have to do the alignment for yourself, e.g. by using minipages or parboxes.
halcyon7
Posts: 2
Joined: Wed Aug 11, 2010 7:44 pm

Re: how to get side caption for subfloat figures

Post by halcyon7 »

Thanks for the reply..

I've tried what you've suggested in your document but it doesnt seem to compile for some reason...

\begin{document}
\begin{minipage}{\textwidth} \captionsetup{type=figure}%
\centering
\subfloat[]{\label{.......}\includegraphics[width=0.3\textwidth]{......jpg}}\hspace{0.5cm}%
\subfloat[]{\label{.......}\includegraphics[width=0.3\textwidth]{......jpg}}\hspace{0.5cm}%
\subfloat[]{\label{.......}\includegraphics[width=0.3\textwidth]{......jpg}}\hspace{0.5cm}%
\subfloat[]{\label{.......}\includegraphics[width=0.3\textwidth]{......jpg}}\hspace{0.5cm}%

\caption{....}
\label{......}
\end{minipage}
\end{document}
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

how to get side caption for subfloat figures

Post by sommerfee »

halcyon7 wrote:I've tried what you've suggested in your document but it doesnt seem to compile for some reason...
Please reveal what exactly I've suggested in what document of mine. And what "doesnt seem to compile" means, do you get an error message? If yes: What error message? Are you able to give us a small, but complete sample document?

Furthermore I don't understand the relationship between your problem and changing the figure environment to a minipage environment. Is this a new problem you try to solve? If yes, please start a new thread with it.
Post Reply