두 개의 다른 줄에 있는 하위 그림 사이의 간격이 고르지 않습니까?

두 개의 다른 줄에 있는 하위 그림 사이의 간격이 고르지 않습니까?

8개의 하위 그림을 2줄로 쌓아서 페이지에서 수직으로 일치시키려고 합니다. 그러나 위쪽 줄은 페이지 전체에 걸쳐 균일한 간격으로 보이고 아래쪽 줄은 균일한 간격이지만 간격이 훨씬 더 작습니다. 저는 tex를 처음 접했기 때문에 제 코드가 이상하더라도 편하게 대해주세요.

\documentclass[10pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\newsubfloat{figure}
\begin{document}
\begin{figure}[ht!]
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\begin{minipage}{0.23\textwidth}
\centering
\subtop[]{\includegraphics[height=0.16\textheight]{Figures/Q1.png}\label{sf:Q1}}
\end{minipage}
\caption[contents]{caption}
\label{fig:Qual}
\end{figure}
\end{document}

각 SF의 코드를 복사하여 붙여넣었기 때문에 왜 각 줄에서 다르게 작동하는지 알 수 없습니다. 8개의 이미지는 모두 동일한 해상도(1780x1752)입니다. 분명히 간단한 것이 빠져 있습니다. 도움이 필요하십니까?

답변1

이미지가 미니페이지 너비보다 넓습니다. 이미지 너비를 미니페이지 너비에 맞게 조정하면 더 이상 이미지가 겹치지 않습니다. 보다:

\documentclass[10pt,a4paper]{memoir} \usepackage[utf8]{inputenc}
\usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}
\usepackage{graphicx} \newsubfloat{figure} \begin{document}
\begin{figure}[ht!] \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage}

\begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \begin{minipage}{0.23\textwidth} \centering
\subtop[]{\includegraphics[width=\hsize]{example-image}\label{sf:Q1}}
\end{minipage} \caption[contents]{caption} \label{fig:Qual}
\end{figure} \end{document}

이 경우 그림에 직접 이미지를 넣을 때 미니페이지를 생략할 수 있습니다. 이 같은:

\subtop[]{\includegraphics[width=0.23\hsize]{example-image}\label{sf:Q1}}\hfill
\subtop[]{\includegraphics[width=0.23\hsize]{example-image}\label{sf:Q1}}\hfill
\subtop[]{\includegraphics[width=0.23\hsize]{example-image}\label{sf:Q1}}\hfill
\subtop[]{\includegraphics[width=0.23\hsize]{example-image}\label{sf:Q1}}

처음 세 이미지 뒤에 \hfill을 추가하면 두 이미지 사이의 간격이 더 넓어집니다.

원본 이미지가 없어서 예시 이미지를 사용합니다. 아래 그림에서 처음 4개의 이미지는 미니페이지 없이 코드로 생성되었으며 그림 사이에 \hfill이 도입되었습니다. 여기에 이미지 설명을 입력하세요

편집하다: 물론 수동으로 이미지를 두 줄로 나누었습니다.

관련 정보