1

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}

enter image description here

2

enter image description here

\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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.