Subcaption – How to Resize the Width of Subcaption in LaTeX

subcaptionwidth

I have two pictures and I'm using \usepackage{subcaption} to place them beside each other. The output might look like the following .

enter image description here

The problem in the above picture is that it is difficult to read the description of each picture. My question is that is there a way to reduce the width of each subcaption?

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage{subcaption}

\usepackage{blindtext}

\begin{document}


\begin{figure}[H]
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=0.9\linewidth, height=6cm]{rose.png} 
\caption{\blindtext}
\label{fig:subim1}
\end{subfigure}
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=0.9\linewidth, height=6cm]{rose.png}
\caption{\blindtext}
\label{fig:subim2}
\end{subfigure}
\caption{Caption for this figure with two images}
\label{fig:image2}
\end{figure}



\end{document}

Best Answer

Two possible ways to choose from. The first is making the whole subfigure a bit smaller, which will also make the figure a little bit smaller. If that is undesired, just make the caption width a bit smaller. No matter which way you choose, it looks kind of odd without centering the picture.

crocoSmallerSubfigure

crocoSmallerCapwidth

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{blindtext}
\begin{document}

\begin{figure}
    \begin{subfigure}{0.45\textwidth}
    \centering
        \includegraphics[width=0.9\linewidth,
        height=5cm]{example-image-a} 
        \caption{\blindtext}
    \end{subfigure}\hfill
    \begin{subfigure}{0.45\textwidth}
    \centering
        \includegraphics[width=0.9\linewidth,
        height=5cm]{example-image-b}
        \caption{\blindtext}
    \end{subfigure}
    \caption{Caption for this figure with two images}
\end{figure}

\begin{figure}
    \begin{subfigure}{0.5\textwidth}%
    \centering\captionsetup{width=.8\linewidth}%
        \includegraphics[width=0.9\linewidth,height=5cm]{example-image-a}%
        \caption{\blindtext}
    \end{subfigure}% Ensure no space and avoid warning
    \begin{subfigure}{0.5\textwidth}%
    \centering\captionsetup{width=.8\linewidth}%
        \includegraphics[width=0.9\linewidth,height=5cm]{example-image-b}%
        \caption{\blindtext}
    \end{subfigure}
    \caption{Caption for this figure with two images}
\end{figure}
\end{document}