6

Can I render a figure inside another figure. For example, I want to have a big figure and showing a small one (like for zooming in) instead of the legend.

Can I do that using latex?

Thanks.

Assimiz
  • 163

1 Answers1

5

I \llap the embedded image after setting the large image. The 2.5in is the vertical rise and the 0.2in is the leftward offset of the embedded image.

\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}

Here is some text.

\begin{figure}[ht]
\includegraphics[scale=1]{example-image-1x1}
\centering
\llap{\shortstack{%
        \includegraphics[scale=.2]{example-image}\\
        \rule{0ex}{2.5in}%
      }
  \rule{0.2in}{0ex}}
\caption{This is my embedded figure}
\end{figure}

And text continues\ldots

\end{document}

enter image description here

David Carlisle
  • 757,742