Put them, e.g., in paragraphs on their own:
\documentclass[12pt]{book}
\usepackage{graphicx}
\begin{document}
\thispagestyle{empty}
\lineskip=0pt% allow vertical boxes to touch each other
\includegraphics[width=0.25\linewidth]{example-image-a}
\includegraphics[width=0.25\linewidth]{example-image-b}
\includegraphics[width=0.25\linewidth]{example-image-c}
\end{document}
Note: The default value of \lineskip
, which is the minimum vertical distance of boxes, is 1pt with the standard classes, but can be different with other classes. And if your document contains not only the stacked images, you should limit the change of \lineskip
using, e.g., an environment like center
, flushleft
, raggedright
, minipage
or a \parbox
or \begingroup …\par\endgroup
or { … \par}
:
\documentclass[12pt]{book}
\usepackage{graphicx}
\begin{document}
\thispagestyle{empty}
\centering
\begin{minipage}{.25\linewidth}
\lineskip=0pt% allow vertical boxes to touch each other
\includegraphics[height=.25\textheight]{example-image-a}
\includegraphics[height=.25\textheight]{example-image-b}
\includegraphics[height=.25\textheight]{example-image-c}
\end{minipage}\hfill
\begin{minipage}{.25\linewidth}
\lineskip=0pt% allow vertical boxes to touch each other
\includegraphics[page=1,height=.25\textheight]{example-image-letter-numbered}
\includegraphics[page=2,height=.25\textheight]{example-image-letter-numbered}
\includegraphics[page=3,height=.25\textheight]{example-image-letter-numbered}
\end{minipage}
\end{document}
Any other environment, i.e., a figure
, would also limit the change to the group of that environment.
As an alternative to paragraphs, you can put them just or on lines on their own, e.g., in a center
(or flushleft
or flushright
) environment (or inside a minipage
or \parbox
):
\documentclass[12pt]{book}
\usepackage{graphicx}
\begin{document}
\thispagestyle{empty}
\begin{center}
\includegraphics[width=0.25\linewidth]{example-image-a}\\[-\lineskip]
\includegraphics[width=0.25\linewidth]{example-image-b}\\[-\lineskip]
\includegraphics[width=0.25\linewidth]{example-image-c}
\end{center}
\end{document}
(same result as shown above but horizontally centered in the text area).
In this example, the vertical distance is explicitly reduced by -\lineskip
, so that the automatic inserted distance of \lineskip
for the touching images, is compensated. You can use this also to do real overlapping:
\documentclass[12pt]{book}
\usepackage{graphicx}
\begin{document}
\thispagestyle{empty}
\begin{center}
\includegraphics[width=0.25\linewidth]{example-image-a}\\[-1ex]
\quad\includegraphics[width=0.25\linewidth]{example-image-b}\\[-1ex]
\qquad\includegraphics[width=0.25\linewidth]{example-image-c}
\end{center}
\end{document}
Note: Just for better visualization of the overlapping I've added an additional horizontal offset to the second and third image.
You could alternatively also use a tikzpicture
or picture
to place the images wherever you want. But in this case, this would IMHO be an extravagant solution.