![我怎样才能使图像 a) 之间没有空格并且 b) 不干扰文本?](https://linux22.com/image/461134/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E4%BD%BF%E5%9B%BE%E5%83%8F%20a)%20%E4%B9%8B%E9%97%B4%E6%B2%A1%E6%9C%89%E7%A9%BA%E6%A0%BC%E5%B9%B6%E4%B8%94%20b)%20%E4%B8%8D%E5%B9%B2%E6%89%B0%E6%96%87%E6%9C%AC%EF%BC%9F.png)
我正在尝试用 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}