1

I want the subfigures labels/numbers to appear on left of them instead of bottom. For example, in the followingenter image description here

I want to have the labels a, b and c appear on left of the figures instead of bottom. The code taken from How to create subfloat figures (two in first row and one below)? is as follows

\documentclass{article}
\usepackage{mwe}
\usepackage{subfig}
\begin{document}

\begin{figure}

\begin{minipage}{.5\linewidth}
\centering
\subfloat[]{\label{main:a}\includegraphics[scale=.5]{example-image-a}}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\subfloat[]{\label{main:b}\includegraphics[scale=.5]{example-image-b}}
\end{minipage}\par\medskip
\centering
\subfloat[]{\label{main:c}\includegraphics[scale=.5]{example-image-c}}

\caption{my fig}
\label{fig:main}
\end{figure}

\end{document}

How can I place the labels on left of the subfigures?

1

enter image description here

adopted from answer sidesubfloats of Gonzalo Medina and my answer here:

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


\begin{document}
    \begin{figure}
    \centering
\sidesubfloat[]{\label{main:a}\includegraphics[width=0.4\linewidth]{example-image-a}}
\hfil
\sidesubfloat[]{\label{main:b}\includegraphics[width=0.4\linewidth]{example-image-b}}

\bigskip
\sidesubfloat[]{\label{main:c}\includegraphics[width=0.4\linewidth]{example-image-c}}
    \caption{My figure with side subcaptions}
\label{fig:main}
    \end{figure}
\end{document}
  • thanks. Follow up question - if I include the packages you have included, for a different figure in the document created by '\begin{figure} \includegraphics[width=\linewidth]{fig2} \caption{fig2 } \label{fig2} \end{figure}' , I get the error 'You can't use `\vadjust' in vertical mode'. Do you know why? – user25957 Aug 31 '17 at 21:52
  • 1
    sorry, from this fragments i cant figured from where is mentioned problem. please, ask new question and in it provide mwe which demonstrate it. maybe you have some packages cash or something else ... with code fragment in your comment added to my mwe i can't reproduce mentioned error. – Zarko Aug 31 '17 at 22:27
  • Let me first try to explain here. 2 questions. How can I have paranthesis around a, b and c? And how do I include a separate single figure (only one subfigure) w/o any labels a, b or c using the sidesubfloat command? – user25957 Sep 1 '17 at 1:28
  • 1
    @user25957, you need to set up caption accordingly. please read subfig documentation (as I should do to answer on your new questions in comment) . there i found on page 29 that default style is parens. this means, you should remove option labelformat=simple. – Zarko Sep 1 '17 at 3:51
  • can I do the same without floatrow? floatrow gives me errors for other figures. For example, the one that I have mentioned before. I don't know why the error is coming and hence, I was unable to prepare the MWE. – user25957 Sep 3 '17 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.