我正在使用以下代码插入四个子浮点数:
\documentclass{article}
\usepackage[margin=0.8in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{float}
%
\newcommand{\rulesep}{\unskip\ \vrule\ }
%
\begin{document}
%
\begin{figure}[H]
\centering
\captionsetup[subfigure]{justification=centerlast}
\begin{subfigure}{.44\linewidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[Short caption]{Isosurface corresponding to $H_{m}(x)$.}
\label{subfig1a}
\end{subfigure}
\hfill
\rulesep
\begin{subfigure}{.44\linewidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[caption]{Isosurface corresponding to $H_{m}(x).$}
\label{subfig1b}
\end{subfigure}
\vspace{0.6cm}
\hrule
\vspace{0.6cm}\par
\captionsetup[subfigure]{justification=centerlast}
\begin{subfigure}{.44\linewidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[Short caption]{Isosurface corresponding to $H_{m}(x)$.}
\label{subfig1a}
\end{subfigure}
\hfill
\rulesep
\begin{subfigure}{.44\linewidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[caption]{Isosurface corresponding to $H_{m}(x).$}
\label{subfig1b}
\end{subfigure}
\caption{Caption of Figure 1.}
\end{figure}
%
\end{document}
其输出为:
我希望子图 a 和 b 之间的垂直线以及子图 c 和 d 之间的垂直线成为一条连续的线。即:
我应该对当前代码做哪些更改?有人能帮助我吗?
答案1
您想使用tabular
。
对于如此大的浮动,这种选择[H]
显然是不合适的。它应该绝不被实际使用。
说实话,我不会使用这些规则:它们对于清晰度没有任何帮助。
\documentclass{article}
\usepackage[margin=0.8in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{subcaption}
\captionsetup[subfigure]{justification=centerlast}
\begin{document}
%
\begin{figure}[htp]
\centering
\begin{tabular}{@{} c|c @{}}
\begin{subfigure}{.44\columnwidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[Short caption]{Isosurface corresponding to $H_{m}(x)$.}
\label{subfig1a}
\end{subfigure}
&
\begin{subfigure}{.44\columnwidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[caption]{Isosurface corresponding to $H_{m}(x).$}
\label{subfig1b}
\end{subfigure}
\\
& \\
\hline
& \\
\begin{subfigure}{.44\columnwidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[Short caption]{Isosurface corresponding to $H_{m}(x)$.}
\label{subfig1a}
\end{subfigure}
&
\begin{subfigure}{.44\columnwidth}
\centering
\includegraphics[width=6.5cm,height=9.5cm]{example-image-duck}
\caption[caption]{Isosurface corresponding to $H_{m}(x).$}
\label{subfig1b}
\end{subfigure}
\end{tabular}
\caption{Caption of Figure 1.}
\end{figure}
\end{document}