# Remove vertical whitespace between figures

I want to display several images with no whitespace between them. The horizontal whitespace was removed by adding % to the end of the includegraphics lines. However, there is still a visible space between the image rows (see below).

How do I remove this space automatically?

\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}


\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}

• So the key here is \offinterlineskip. Wonderfully simple. Thanks. – Thomas Mar 15 '17 at 9:55