8

How can I make \subfloat put the labels to the left of the images? It seems it only supports "top" and "bottom". I am searching for a solution without using \tabular. Thanks and regards, Jorge.

Example:

\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\captionsetup[subfloat]{position=top}   % "position=left" is not supported!!! :(
\centering
\subfloat[]{\includegraphics[scale=0.5]{example-image-a}}
\vfill
\subfloat[]{\includegraphics[scale=0.5]{example-image-b}}
\end{figure}
\end{document}

Output (in red the location I'd like to achieve):

enter image description here

2
  • What's the problem with tabular? By the way, \vfill will do nothing at all.
    – egreg
    Jul 29, 2018 at 20:58
  • Thanks for the observation! P.S. Nothing wrong about \tabular; just looking for an alternative solution :)
    – dontpanic
    Jul 29, 2018 at 21:09

1 Answer 1

9

enter image description here

it is obtained by use of the environment \sidesubfloat from the package floatrow:

\documentclass{article}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage[label font=bf]{subfig}
\usepackage{caption}
\floatsetup[figure]{style=plain,subcapbesideposition=center}

\begin{document}
\begin{figure}
\centering
\sidesubfloat[]{\includegraphics[scale=0.5]{example-image-duck}}

\medskip
\sidesubfloat[]{\includegraphics[scale=0.5]{example-image-duck}}
\end{figure}
\end{document}
3
  • Follow up: how can I tweak the space between the labels and the figures? I got lost trying to understand the (quite lengthy!) floatrow documentation :(
    – dontpanic
    Jul 29, 2018 at 22:01
  • 1
    @dontpanic, well, i also need to check documentation. i doubt that i will more successful than you. try to search on site. i will return to your question later.
    – Zarko
    Jul 29, 2018 at 22:35
  • OK, thanks. I've searched the forum and found some clues, but not a direct answer. I was trying (without luck) to use the following in the header: \newlength\mysep \setlength\mysep{1cm} \DeclareFloatSeparators{mysep}{\hskip\mysep} \floatsetup[figure]{style=plain,subcapbesideposition=top,capbesidesep=mysep}
    – dontpanic
    Jul 29, 2018 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .