
У меня в работе есть два рисунка рядом, и мне нужно добавить к ним подписи. Однако, когда я добавляю подписи, они не совпадают с рисунками. Кто-нибудь может мне помочь? Большое спасибо.
Вот код:
\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}