[Tex/LaTex] Captions of two figures side-by-side in a minipage

floatsminipage

Considering the below code, I am trying to put two figures side by side in a minipage by two separated captions. The problem that I am facing is that the captions have overlaps (caption of figure at right side covers the one at the left one if the caption is longer than few words.). If i use the default spacing, figures overlap too. To prevent captions and figures to overlap, I have tried to make space between figures but it will exceed the page length and will not be an ultimate solution for long captions. These are besides the fact that figures are not aligned.

\documentclass[smallextended]{svjour3}

\usepackage{graphicx}

\begin{document}

        \begin{figure*}[!htb]
        \centering
        \begin{minipage}{0.5\textwidth}
            \centering
    \includegraphics[scale=0.35]{sample.jpg}
    \caption{This is a caption} \label{this is a label}
        \end{minipage}%
        \begin{minipage}{0.8\textwidth}
            \centering
    \includegraphics[scale=0.35]{sample2.jpg}
    \caption{caption 2.} \label{label 2}
        \end{minipage}
    \end{figure*}
\end{document}

Consequently, I welcome any contra active solution!

Best Answer

your question, also after adding a photo of your result is not clear at all. i assume that you have two columns article, which has figure over both column. in placing of your images you make two errors:

  • sum of the both mini pages is 1.3\textwidth. consequently the second image spill out of page (as i told you in my comments)
  • you scale image size with some factor, which is not depend on available space in mini pages, so the images can become bigger than mini pages ...

in the following mwe i add \fbox around mini pages that their border is visible. as you can see, there is no overlapping of images nor captions nor images' spilling out of mini page nor page.

enter image description here (red lines indicate page layout. for images i use test image from duckumemnts package since haven't yours)

my test mwe:

\documentclass[twocolumn]{article}
\usepackage{geometry}
\usepackage[export]{adjustbox} % it also load graphics page

%-------------------------------------- only for show page layout
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.25pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}

\begin{document}
\lipsum[1-5]
    \begin{figure*}
    \centering
    \fbox{%
    \begin{minipage}[t]{0.47\linewidth}
        \centering
\includegraphics[scale=0.35]{example-image-duck}
\caption{\lipsum[11]} \label{this is a label}
    \end{minipage}%
    }
    \hfill
    \fbox{%
    \begin{minipage}[t]{0.47\linewidth}
        \centering
\includegraphics[scale=0.35]{example-image-duck}
\caption{caption 2.} \label{label 2}
    \end{minipage}
    }
\end{figure*}
\lipsum
\end{document}

edit: i test my mwe with \documentclass{scjour3} (on overleaf). the result is:

enter image description here

(in test i use example-image-a and example-image-b, and for float environment figure, since your document is one column only)

as you can see, mwe works with any problem. so it is not clear what is your problem. mwe works as "adverised" :-)