Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

I would like to place an image in the corner of each page.

Something like this:

https://tex.stackexchange.com/questions/44169/how-to-place-an-image-at-the-right-top-of-a-document

But I want a different image on each page. The images are numbered. For example, page 1 gets image 1.png in the corner, page 2 gets 2.png, et cetera.

I try to avoid to include each image by hand. The document is large, and I would like to avoid including and positioning 200 images by hand.

Is this possible, and how?

share|improve this question

marked as duplicate by Tobi, Jesse, Andrew Swann, Peter Jansson, Martin Schröder Feb 12 at 14:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Yes, it is a duplicate, thank you. In case anyone wants to know, the answer is ctan.org/pkg/flipbook –  Patrik Feb 12 at 13:38

1 Answer 1

up vote 1 down vote accepted

An alternative to flipbook. Here files file1.jp, file2.jpg, etc. are displayed in the upper right corners of pages. You can play with the measures and sizes to shift it around. Current image size is 3cmx3cm, shifted 1cm to the right of the right margin (\Hoffset) and 1cm above the top margin (\Voffset).

I have EDITED the answer so that it compiles without figures. To add figures, just comment the one line and uncomment the other.

\documentclass{article}
\usepackage{everypage}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{calc}
\newlength\Hoffset
\newlength\Voffset
\Hoffset 1cm
\Voffset 1cm
\AddEverypageHook{\smash{\hspace{\oddsidemargin}%
  \hspace{\textwidth}\hspace{\Hoffset}%
  \raisebox{\Voffset-\headsep-\headheight-\topmargin}{%
% COMMENT OUT THE NEXT LINE
  \fbox{\rule{0cm}{3cm}\raisebox{1.3cm}{\makebox[3cm]{file\thepage.jpg}}}%
% UNCOMMENT THIS LINE
%  \includegraphics[height=3cm,width=3cm]{file\thepage.jpg}%
}}}
\begin{document}
\lipsum[1-7]
\end{document}

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.