如何才能让两张图片完美对齐。我的代码如下。
\begin{figure}[t!]
\centering
\begin{minipage}{3.3cm}
\centering
\subtop[]{\includegraphics[height=0.25\textheight]{figa/ParameterSpace}\label{figa}}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}{3.3cm}
\centering
\subtop[]{\includegraphics[height=0.25\textheight]{figa/StringMotion}\label{figb}}
\end{minipage}
\mycaption[Motion of open string in spacetime.]{%
(a) Parameter space for open strings.
(b) Open string worlsheet in target space.}
\label{figA}
\end{figure}
答案1
您将子图放在minipage
s 内的做法是这里的问题所在。s 创建的块minipage
太窄,无法容纳图像,因此它们重叠。minipage
完全放弃使用 s:
\documentclass{memoir}
\usepackage{graphicx}
\newsubfloat{figure}
\begin{document}
\chapter{A chapter}
\begin{figure}[!ht]
\centering
% \begin{minipage}{3.3cm}
% \centering
\subtop[]{\includegraphics[height=0.2\textheight]{example-image-a}}
% \end{minipage}
\hspace{0.5cm}
% \begin{minipage}{3.3cm}
% \centering
\subtop[]{\includegraphics[height=0.2\textheight]{example-image-b}}
% \end{minipage}
\caption[Motion of open string in spacetime.]{%
(a) Parameter space for open strings.
(b) Open string worlsheet in target space.}
\end{figure}
\end{document}