![如何定位子图标签](https://linux22.com/image/361210/%E5%A6%82%E4%BD%95%E5%AE%9A%E4%BD%8D%E5%AD%90%E5%9B%BE%E6%A0%87%E7%AD%BE.png)
我想让标签 a、b 和 c 出现在图形的左侧而不是底部。代码取自如何创建子浮动图形(第一行两个,下面一个)?如下
\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}
我怎样才能将标签放在子图的左边?
答案1
\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}