I would like to use subfigure package, since it allows to define the subfigure environment size in terms of columnwidth, etc.
However, I need to follow some formatting as:
- Figure title on top and align to left (Figure 1 – …);
- Subcaptions below subfigures and
- Figure description on bottom and align to left.
How is it possible?
Thanks in advance
Updated: I've got almost what I need. Only references to subfigure are not right yet.
\documentclass{article}
\usepackage{mwe}
\newcounter{subfig}[figure]
\renewcommand{\thesubfig}{\alph{subfig}}
\newcommand{\subcaption}[1]% #1 = caption text
{\par\stepcounter{subfig}%
\makebox[\textwidth]{\textbf{(\thesubfig)} #1}%
\medskip\par}
\newenvironment{subfigure}[1]% width
{\begin{minipage}{#1}\let\caption=\subcaption}%
{\end{minipage}}
\usepackage[justification=justified,singlelinecheck=false,labelsep=endash,position=top]{caption}
\begin{document}
\begin{figure}[t]
\caption{Test 1}
\begin{subfigure}{0.45\columnwidth}
\centering\includegraphics[width=\textwidth]{example-image-a}%
\label{fig:test11}
\caption{}
\end{subfigure}\hfill
\begin{subfigure}{0.45\columnwidth}
\centering\includegraphics[width=\textwidth]{example-image-b}%
\label{fig:test12}
\caption{}
\end{subfigure}
\label{fig:test1}\\
{\footnotesize Source: Here comes the figures description.}
\end{figure}
\begin{figure}[!h]
\caption{Test 2}
\begin{center}
\centering\includegraphics[width=0.6\columnwidth]{example-image-c}
\end{center}
\label{fig:test2}
{\footnotesize Source: Here comes the figures description.}
\end{figure}
Figures \ref{fig:test1} is composed of \ref{fig:test11} e \ref{fig:test12}.
Figure \ref{fig:test2} is an ordinary include entry.
\end{document}
Here the output:
Best Answer
See, if this modification of your MWE do what you like to have:
In above MWE I remove your definitions of subfigure counter and environment and instead them use package
subcaption
. Beside this I put labels after captions where they should be (for correct referencing)