5

Is there any way to achieve a Droste effect in LaTeX?

For instance, I'd like to generate a floating figure that contains a rendering of the page it is included in.

Siapran
  • 53
  • 3

1 Answers1

6

Here is an example using \includegraphics:

\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}
\title{Drost effect}
\author{Droste}
\begin{document}
\maketitle
\lipsum[1]

\IfFileExists{\jobname-copy.pdf}{
  \begin{figure}
    \centering
    \framebox{\includegraphics[width=.3\linewidth,page=1]{\jobname-copy}}
    \caption{Droste effect}
  \end{figure}
}

\end{document}

Repeat the following commands:

pdflatex document.tex
cp document.pdf document-copy.pdf

After some iterations, you get:

enter image description here

Paul Gaborit
  • 70,770
  • 10
  • 176
  • 283