我想显示几张图像,它们之间没有空白。通过在行%
尾添加空格来删除水平空白includegraphics
。但是,图像行之间仍然有可见的空格(见下文)。
我如何自动删除这个空间?
\documentclass{memoir}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htb]
\centering
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\end{figure}
\end{document}
答案1
使用\offinterlineskip
\documentclass{memoir}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htb]
\centering\offinterlineskip
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.25\linewidth]{example-image}%
\includegraphics[width=0.25\linewidth]{example-image}\\
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\includegraphics[width=0.2\linewidth]{example-image}%
\end{figure}
\end{document}