並排的兩個人物 - 標題

並排的兩個人物 - 標題

我的作品中有兩個並排的人物,我需要為它們添加標題。然而,當我添加標題時,它們與數字不符。有人能幫助我嗎?非常感謝。

這是代碼:

 \begin{figure}[h]
           \begin{floatrow}
             \ffigbox{\includegraphics[scale = 0.5]{Figures/dontknow_ecb_countries_members}}{\caption{\small{The level of people\\not expressing the\\opinion on trust in\\the ECB in individual\\Euro-Area countries}}\label{fig:dont know countries members}}
             \ffigbox{\includegraphics[scale = 0.5]{Figures/trust_ecb_countries_nonmembers}}{\caption{\small{The trust in the ECB\\in individual non-Euro\\Area countries}}\label{fig:trust countries nonmembers}}
           \end{floatrow}
        \end{figure}

這就是我得到的:

結果

答案1

使用\ffigbox[\FBwidth]時,標題的寬度應與圖片的寬度相同。順便說一句,你不能\\在裡面使用\caption

\documentclass{article}
\usepackage{graphicx}
\usepackage{floatrow}

\begin{document}
 \begin{figure}[h]
           \begin{floatrow}
             \ffigbox[\FBwidth]{\includegraphics[scale = 0.2]{example-image}}
                               {\caption{The level of people not expressing the opinion on trust in the ECB in individual Euro-Area countries}\label{fig:dont know countries members}}
             \ffigbox[\FBwidth]{\includegraphics[scale = 0.2]{example-image-a}}
                               {\caption{The trust in the ECB in individual non-Euro Area countries}\label{fig:trust countries nonmembers}}
           \end{floatrow}
        \end{figure}

\end{document}

在此輸入影像描述

相關內容