I am using the code from https://tfischernet.wordpress.com/2010/09/07/more-on-latex-beamer-linking-images-to-an-enlarged-version/ to link small images in my latex beamer slides to enlarged versions at the end. The nice thing is that the additional slides at the end are automatically generated. This code writes the filenames to a separate file and reads it in again during the next compilation run in order to pass the filename to includegraphics. Is it possible to design something similar for tikzpictures? I.e. if I have a small tikzpicture in some of my slides, that LaTeX automatically generates an additional slide at the end that contains an enlarged version of the same figure.

1 Answer 1


TikZ pictures can be saved in boxes for later replay. Here, the xsavebox package is used, which allows for arbitrarily named boxes and which efficiently saves the PDF code of the drawings into PDF XObjects. (Standard \savebox/lrbox and \usebox replicate the PDF code on every box insertion.)





\begin{frame}{My talk}
  %define and save some tikzpictures
  \begin{xlrbox}{Red line}
      \draw [red] (0,0) -- (1,1);
  \begin{xlrbox}{Blue line}
      \draw [blue] (0,1) -- (1,0);
  \gdef\mytikzpictures{Red line, Blue line}%
  \hyperlink{Red line}{\xusebox{Red line}}
  \hyperlink{Blue line}{\xusebox{Blue line}}


% enlarged views, 1 frame per image
\foreach \i in \mytikzpictures {
  \begin{frame}{\Acrobatmenu{GoBack}{$\curvearrowleft$} \i}

  • Seems to work for me. :)
    – Laurent
    May 16, 2017 at 14:33
  • Another option, without additional slides, could be a click-to-zoom box.
    – AlexG
    May 16, 2017 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .