I have asked help before in order to use subfigimg with label in here: https://tex.stackexchange.com/questions/387837/how-to-use-subfigimg-macro-and-label. which @Skillmon helped me solved, however i encounter a new problem using subfigimg when putting the subfigimg in a merged cell like in this case:
\documentclass[preview,border=4mm]{standalone}
\usepackage{graphicx}
\usepackage{xparse}
\newcounter{subfigs}[figure]
\renewcommand*{\thesubfigs}{\thefigure.\alph{subfigs}}
\makeatletter
\NewDocumentCommand{\subfigimg}{s O{} m D<>{10pt} O{2\baselineskip} m}{%
\IfBooleanTF{#1}%
{\@subfigimg{#2}{#3}{#6}{0}{#4}{#5}}%
{\@subfigimg{#2}{#3}{#6}{1}{#4}{#5}}%
}
\newcommand*{\@subfigimg}[6]{%
\bgroup%
\advance\c@figure by #4%
\refstepcounter{subfigs}%
\ifx\relax#3\relax\else%
\label{#3}%
\fi%
\setbox1=\hbox{\includegraphics[#1]{#2}}% Store image in box
\leavevmode\rlap{\usebox1}% Print image
\rlap{\hspace*{#5}\raisebox{\dimexpr\ht1-#6\relax}{(\alph{subfigs})}}% Print label
\phantom{\usebox1}% Insert appropriate spcing
\egroup%
}
\makeatother
\begin{document}
\begin{figure}
\centering
\begin{tabular}{p{0.5\linewidth}@{}p{0.5\linewidth}}
\subfigimg[width=\linewidth]{example-image-a}{fig:s11}
&
\subfigimg[width=\linewidth]{example-image-b}{fig:s12}\\
\multicolumn{2}{c}{\subfigimg[width=0.5\linewidth]{example-image-c}<30pt>[3\baselineskip]{}}
\end{tabular}
\caption{bla bla bla}
\label{fig:1}
\end{figure}
See subfigures \ref{fig:s11} and \ref{fig:s12} of figure~\ref{fig:1}
\end{document}
In here the last image label is not working well as the location is off. I tried to solve it by using the location options (<30pt>[3\baselineskip]) and while it does move horizontal, it doesn't move verticaly. i.e., changing <30pt> will move the label but not changing [3\baselineskip].
if anyone can have a fix for this it would be great.
example-image-davailable. You should change that toexample-imageor thedto one ofa,b, orc. – Skillmon Sep 12 '17 at 19:05