# Magnified subfigure without tikz

I want to create a figure with a magnified subfigure. I know this can be done with tikz (link) however I want to do it without tikz. Can this be done?

Example:

My early attempt:

\documentclass{article}

\usepackage{subfig,graphicx}

\begin{document}

\begin{figure}
\subfloat[]{\includegraphics[width=0.6\textwidth]{example-image-a}}
\hspace*{0.5em}
\subfloat[]{\includegraphics[trim=5cm 0cm 5cm 5cm, clip=true, width=0.2\textwidth]{example-image-a}}
\end{figure}

\end{document}

• without TikZ you would be doing exactly the same boxing/unboxing or clipping as TikZ does only without TikZ. Feb 23, 2016 at 12:43
• @percusse Can you provide an example? Feb 23, 2016 at 14:31
• You have the the example in the link no? Feb 23, 2016 at 15:03
• What tag can be put? {no-tikz-pgf}? ;-) Note: I removed the {tikz-pgf} tag... Feb 23, 2016 at 16:05
• I'm somewhat curious as to why you don't want to use TikZ. Is this a puzzle (i.e. you have a good idea how to do it in TikZ)? Is it because you want to submit your source in some circumstance where TikZ is not allowed? Do you want to avoid learning TikZ? Would some other package like pstricks be acceptable? If you can't use TikZ for compatibility reasons, you could use the standalone package to create an image that already contains the magnification. Also, the example in the linked question would be easy with \includegraphics and basic TeX commands. The dashed diagonal lines are harder. Mar 24, 2016 at 17:19

If you don't apply height or width, you can use scale combined with trim and clip.

\documentclass{article}

\usepackage{subfig,graphicx}

\begin{document}

\begin{figure}
\subfloat[]{\includegraphics[width=0.6\textwidth]{example-image-a}}
\hspace*{0.5em}
\subfloat[]{\includegraphics[scale=3,trim=6cm 5cm 6cm 5cm, clip=true,]{example-image-a}}
\end{figure}

\end{document}


• You could use pict2e to draw the lines and rectangles, then overlay all three images. Feb 23, 2016 at 18:14