-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathimage_on_image.tex
More file actions
34 lines (28 loc) · 832 Bytes
/
image_on_image.tex
File metadata and controls
34 lines (28 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% Answer for http://tex.stackexchange.com/q/245691/828
\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\newlength\imagewidth
\newlength\imagescale
\begin{document}
\begin{figure}
\centering
\includegraphics[width=0.618\linewidth]{img1}
\caption{image 1}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.309\linewidth]{img2}
\caption{image 2}
\end{figure}
\begin{figure}
\centering
\pgfmathsetlength{\imagewidth}{\linewidth}%
\pgfmathsetlength{\imagescale}{\imagewidth/524}%
\begin{tikzpicture}[x=\imagescale,y=-\imagescale]
\node[anchor=north west] at (0,0) {\includegraphics[width=\imagewidth]{img1}};
\node[anchor=north west] at (300,100) {\includegraphics[width=0.25\imagewidth]{img2}};
\end{tikzpicture}
\caption{Both images on top of each other}
\end{figure}
\end{document}