
크기가 다른 두 개의 이미지를 나란히 놓고 첫 번째 이미지 아래에 캡션을 넣어 빈 공간을 채우려고 합니다.
미니페이지 옵션 의 각 조합으로 tb
원하는 출력이 나오지 않습니다.
요구사항은 다음과 같습니다.
- 두 이미지가 위쪽에 정렬됩니다.
- 캡션은 두 이미지 모두에 고유하며 첫 번째 이미지 바로 아래에 작성됩니다.
다음 출력에서는 이미지가 위쪽에 정렬되지 않습니다. 미니페이지를 올바르게 조정하는 방법인가요?
MWE는 다음과 같습니다.
\documentclass[11pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[top=2.5cm,bottom=2cm,left=2.6cm,right=2.6cm]{geometry}
\begin{document}
\begin{figure}
\centering
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=238px, height=274px]{example-image-a}
\caption{Schémas dex expériences des aimants $A$ et $B$}
\end{minipage}\qquad
\begin{minipage}{0.4\linewidth}
\centering
\includegraphics[width=117px, height=383px]{example-image-b}
\end{minipage}
\end{figure}
\newpage
\begin{figure}
\centering
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=0.9\linewidth]{AimantAB1.png}
\caption{Schémas dex expériences des aimants $A$ et $B$}
\end{minipage}\qquad
\begin{minipage}{0.4\linewidth}
\centering
\includegraphics[width=0.6\linewidth]{AimantAB2.png}
\end{minipage}
\end{figure}
\end{document}
해당 출력으로 :
답변1
제가 귀하의 질문을 올바르게 이해했는지 잘 모르겠습니다. 이렇게요?
\documentclass[11pt,a4paper]{report}
\usepackage[export]{adjustbox} % it load graphicx too
% used to move images' baselines at their top
\usepackage[vmargin=2.5cm, hmargin=2.6cm]{geometry}
\begin{document}
\begin{figure}
\centering
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=238px, height=274px,valign=t]{example-image-a}
\caption{Schémas dex expériences des aimants $A$ et $B$}
\end{minipage}\hfil
\begin{minipage}[t]{0.4\linewidth}
\centering
\includegraphics[width=117px, height=383px,valign=t]{example-image-b}
\end{minipage}
\end{figure}
\end{document}
답변2
다음을 시도해 보십시오:
\documentclass[11pt,a4paper]{report}
\usepackage{graphicx}
\usepackage[top=2.5cm,bottom=2cm,left=2.6cm,right=2.6cm]{geometry}
\usepackage{adjustbox}
\begin{document}
\begin{figure}
\centering
\adjustbox{valign=t}{
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=238px, height=274px]{example-image-a}
\caption{Schémas dex expériences des aimants $A$ et $B$}
\end{minipage}}\qquad
\adjustbox{valign=t}{
\begin{minipage}{0.4\linewidth}
\centering
\includegraphics[width=117px, height=383px]{example-image-b}
\end{minipage}}
\end{figure}
\end{document}
산출: