[Tex/LaTex] Horizontal icons between subfloats

horizontal alignmentspacingsubfloatstabularxvertical alignment

following up on this Vertical icons between subfloats problem, I'm struggling now adding horizontal (e.g. from left to right or from right to left) to my subfloats

This is what I have so far:

\documentclass{report}
\usepackage{pifont}
\usepackage[svgnames, x11names]{xcolor}
\usepackage{graphicx
}
\usepackage{caption}
\usepackage{subfig}
\usepackage{tabularx}
\newcommand\bigleftArrow{\color{Tomato2}\rotatebox[origin=c]{180}{\scalebox{2.4}[3.6]{\ding{225}}}}
\newcommand\bigrightArrow{\color{Tomato2}\rotatebox[origin=c]{0}{\scalebox{2.4}[3.6]{\ding{225}}}}
\begin{document}

\begin{figure} [h]
\begin{tabularx}{\textwidth}{@{}*{5}{>{\centering\arraybackslash}X}@{}}
  \subfloat[text 1]{
     \includegraphics[width=0.28\textwidth]
     {example-image-a}}
      &
      \bigleftArrow
      &
  \subfloat[text 2]{
     \includegraphics[width=0.28\textwidth]
     {example-image-b}}
      &
      \bigleftArrow
      &
  \subfloat[text 3]{
     \includegraphics[width=0.28\textwidth]
     {example-image-c}}
     \\
  \subfloat[text 4]{
     \includegraphics[width=0.28\textwidth]
     {example-image}}
       &
       \bigrightArrow
      &
  \subfloat[text 5]{
     \includegraphics[width=0.28\textwidth]
     {example-image}}
      &
      \bigrightArrow
      &
  \subfloat[text 6]{
     \includegraphics[width=0.28\textwidth]
     {example-image}}
\end{tabularx}
  \captionof{figure}[]{long text}
  \label{fig:merge}
\end{figure}

\end{document} 

which gives me this:

enter image description here

But obviously I would like to have the icons centered vertical and horizontal between the images e.g. between (a) and (b) (and not between the image captions)

Any suggestions?


This it how it should look like (roughly 😀 )

enter image description here


UPDATE

both so far provided answers are working pretty good. But I discovered a issue if one caption is longer than the others like provided for in the following for figure (c). The whole image moves up (insted of the regular behaviour where the text box grows to the bottom). I even amended how it should appear (Now: 1x 3 images; 1x 2 images connected with arrows) Here is the amended code with the little issue:

\documentclass{report}
\usepackage{pifont}
\usepackage[svgnames, x11names]{xcolor}
\usepackage{graphicx
}
\usepackage{caption}
\usepackage{subfig}
\usepackage{tabularx}

%% Fix Vertical Alignment
\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}} 

% Add \hspace to arrow definition
\newcommand\bigleftArrow{\hspace{40pt}\color{green}\rotatebox[origin=c]{180}{\scalebox{2.4}[3.6]{\ding{225}}}} 
\newcommand\bigrightArrow{\hspace{40pt}\color{green}\rotatebox[origin=c]{0}{\scalebox{2.4}[3.6]{\ding{225}}}}



\begin{document}

\begin{figure} [h]
\begin{tabularx}{\textwidth}{@{}*{5}{>{\centering\arraybackslash}X}@{}}
  \subfloat[text 1]{
     \includegraphics[width=0.28\textwidth]
     {example-image-a}}
      &
      \bigrightArrow
      &
  \subfloat[text 2]{
     \includegraphics[width=0.28\textwidth]
     {example-image-b}}
      &
      \bigrightArrow
      &
  \subfloat[text 3 is longer than the others: text text text text text text text text text]{
     \includegraphics[width=0.28\textwidth]
     {example-image-c}}
     \\
  \subfloat[text 4]{
     \includegraphics[width=0.28\textwidth]
     {example-image}}
      &
      &
       \bigrightArrow
      &
      &
  \subfloat[text 6]{
     \includegraphics[width=0.28\textwidth]
     {example-image}}
\end{tabularx}
  \captionof{figure}[]{long text}
  \label{fig:merge}
\end{figure}

\end{document} 

And this is how its drawn. (note image (c)/text 3 and the red lines I draw on to it):

enter image description here

Best Answer

I would like to show you a couple of solutions with a tikz matrix.

I've added a yshift to your \bigleftArrow and \bigrightArrow commands to refine the vertical alignment of the arrows.

To avoid the Underfull \hbox you could use \centering within your \subcaption command.

\documentclass{report}
\usepackage{pifont}
\usepackage[x11names]{xcolor}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{matrix}

\newcommand*{\bigrightArrow}{|[yshift=-2]| \color{green}{\scalebox{2.4}[3.6]{\ding{225}}}}
\newcommand*{\bigleftArrow}{|[yshift=2]| \color{Tomato2}{\rotatebox[origin=c]{180}{\scalebox{2.4}[3.6]{\ding{225}}}}}

\begin{document}
    \begin{figure}
        \centering
        \begin{tikzpicture}
        \matrix[matrix of nodes, 
        nodes={anchor=center},
        column sep=-3.7em]{%
            \includegraphics[width=0.26\textwidth]{example-image-a}
            &
            \bigrightArrow
            &
            \includegraphics[width=0.26\textwidth]{example-image-b}
            &
            \bigrightArrow
            &
            \includegraphics[width=0.26\textwidth]{example-image-c}
            \\
            \begin{minipage}[t][10ex][t]{0.26\textwidth}
            \subcaption{text 1\label{fig:1amerge2}}
            \end{minipage}
            &&
            \begin{minipage}[t][10ex][t]{0.26\textwidth}
            \subcaption{text 2}
            \end{minipage}%
            &&
            \begin{minipage}[t][10ex][t]{0.26\textwidth}
            \subcaption{\centering text 3 is longer than the others: text text text text text text text text text}
            \end{minipage}%
            \\[4pt]
            &
            \includegraphics[width=0.26\textwidth]{example-image}
            &
            \bigleftArrow
            &
            \includegraphics[width=0.26\textwidth]{example-image}
            \\
            &
            \begin{minipage}[t]{0.26\textwidth}
            \subcaption{text 4}
            \end{minipage}%
            &&
            \begin{minipage}[t]{0.26\textwidth}
            \subcaption{text 6}
            \end{minipage}%
            \\
        };
        \end{tikzpicture}
        \caption{long text\label{fig:merge2}}
    \end{figure}
    \begin{figure}
        \centering
        \begin{tikzpicture}
        \matrix[matrix of nodes, 
                nodes={anchor=center},
                column sep=-3pt
                ]{%
            \includegraphics[width=0.26\textwidth]{example-image-a}
            &
            \bigrightArrow
            &
            \includegraphics[width=0.26\textwidth]{example-image-b}
            &
            \bigrightArrow
            &
            \includegraphics[width=0.26\textwidth]{example-image-c}
            \\
            \begin{minipage}[t][10ex][t]{0.26\textwidth}
            \subcaption{text 1\label{fig:1a}}
            \end{minipage}
            &&
            \begin{minipage}[t][10ex][t]{0.26\textwidth}
            \subcaption{text 2}
            \end{minipage}%
            &&
            \begin{minipage}[t][10ex][t]{0.26\textwidth}
            \subcaption{text 3 is longer than the others: text text text text text text text text text}
            \end{minipage}%
            \\[4pt]
            \includegraphics[width=0.26\textwidth]{example-image}
            &&
            \bigleftArrow
            &&
            \includegraphics[width=0.26\textwidth]{example-image}
            \\
            \begin{minipage}[t]{0.26\textwidth}
            \subcaption{text 4}
            \end{minipage}%
            &&&&
            \begin{minipage}[t]{0.26\textwidth}
            \subcaption{text 6}
            \end{minipage}%
            \\
        };
        \end{tikzpicture}
        \caption{long text\label{fig:merge}}
    \end{figure}
\end{document}

enter image description here