Stacking images
We can also stack images on top of one another, such as for a fancy photo collage. This can be combined with previous recipes such as rotating and framing. Let’s focus on stacking here.
How to do it...
The stackengine package allows things to be placed above each other. It can handle text and math as well as images. Let’s try it with the latter, using sample images. Here’s how to proceed:
- In your document preamble, load the mwe package. It provides dummy images and automatically loads the graphicx package, which we otherwise load ourselves, as before:
\usepackage{mwe}
- Load the stackengine package:
\usepackage{stackengine}
- In the document body, use the \stackinset command. It takes six arguments. This sounds like a lot of work, but it allows flexible positioning. The syntax is as follows:
\stackinset{horizontal alignment} {horizontal offset} {vertical aligment} ...