We can also stack images on top of each other, such as for a fancy photo collage. This can be combined with the previous recipes to do things like rotating and framing. Let's take a look at pure stacking.
The stackengine
package allows the placement of things above each other. It can handle text and math as well as images. Let's try it with the latter, using sample images. Follow these steps:
In your document preamble, load the
mwe
package. It provides dummy images and automatically loads thegraphicx
package, which we would otherwise load ourselves, as before:\usepackage{mwe}
Load the
stackengine
package:\usepackage{stackengine}
In the document body, use the command
\stackinset
. It takes six arguments. This sounds complicated, but it allows flexible positioning. The syntax is as follows:\stackinset{horizontal alignment} {horizontal offset} {vertical aligment} {vertical offset} {image above}{image below}
In our recipe, we use right and top alignment...