我正在尝试用 LaTeX 绘制如下图所示的图形:
但是,我不知道如何让它们之间没有空隙。而且,它们开始干扰文本,文档不再有意义。我对所有图像使用下一个代码。
\begin{document}
\usepackage{graphicx}
\begin{figure}[p]
\centering
\subfloat[M20]{
\label{f: M20}
\includegraphics[width=0.6\textwidth]{M20}}
\subfloat[M14]{
\label{f:M14}
\includegraphics[width=0.6\textwidth]{M14}}
\end{figure}
\begin{figure}[p]
\centering
\subfloat[M23]{
\label{f: M23}
\includegraphics[width=0.6\textwidth]{M23}}
\subfloat[M5]{
\label{f:M5}
\includegraphics[width=0.6\textwidth]{M5}}
\end{figure}
\end{document}
答案1
我将按照我的一份博士报告的格式来回答,我需要一种与你输入的图像类似的格式(至少一页),所以我已经准备好了类似的模板:
由于您没有提供太多细节(正如@Mico 评论的那样),当提供更多细节时,这个答案可能会被其他人超越,但它可以帮助您入门(假设您的页面是纵向而不是横向,假设您不想要一个长图中包含 16 个子图)。
\documentclass[oneside]{book}
\usepackage{caption}
\usepackage[list=true,
listformat=simple,
]{subcaption}
\usepackage{graphicx} % For graphics
\usepackage{lipsum} % For dummy text
\begin{document}
\chapter{First}
\lipsum[1]
\begin{figure*}[p]
\centering
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.} % Change the captions
\label{fig:1a} % Change the labels
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Test caption.}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\caption{Main test caption.}
\label{fig:lefy}
\end{figure*}
\chapter{Second}
\lipsum[1]
\end{document}
没有字幕:
\documentclass[oneside]{book}
\usepackage{caption}
\usepackage[list=true,
listformat=simple,
]{subcaption}
\usepackage{graphicx} % For graphics
\usepackage{lipsum} % For dummy text
\begin{document}
\chapter{First}
\lipsum[1]
\begin{figure*}[p]
\centering
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\label{fig:1a}
\end{subfigure}
\\[1.2ex]
\caption{Main test caption.}
\label{fig:lefy}
\end{figure*}
\chapter{Second}
\lipsum[1]
\end{document}