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.

I found Using fancyhdr to create an image based header and footer which is helpful and gave some ideas but I want to basically put in the bottom right or center of the footer a different image file (pdf or jpg) for each page in a latex document.

Any suggestions?

Thanks a lot!

P.S. Sorry, I typically use article class with lots of mathtools in latex or xelatex, but I am very flexible!

share|improve this question
    
Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Kurt Dec 13 '12 at 0:36
8  
Name your image file as image-1.png, image-2.jpg, etc and input them via \includegraphics{image-\arabic{page}} –  JLDiaz Dec 13 '12 at 0:36
add comment

1 Answer

up vote 16 down vote accepted

As JLDiaz mentioned in his comment, you can name your images image-1.png, image-2.png, etc. and then use the fancyhdr package to include them using

\includegraphics[<options>]{image-\arabic{page}}

from the graphicx package. A complete example:

\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\setlength\footskip{40pt}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\thepage}
\fancyfoot[C]{\includegraphics[height=30pt]{image-\arabic{page}}}

\begin{document}

\lipsum[2-23]

\end{document}

enter image description here

Here's another possibility, using this time the background package:

\documentclass{article}
\usepackage{graphicx}
\usepackage[bottom]{background}
\usepackage{lipsum}% just to generate text for the example

\SetBgScale{1}
\SetBgContents{\includegraphics[height=30pt]{onebit-\arabic{page}}}
\SetBgVshift{40pt}
\SetBgOpacity{1}

\begin{document}

\lipsum[2-23]

\end{document}

enter image description here

Make sure to have as least as much images as the number of pages in your document.

After a comment, the idea is to have the images to the right, on the footer, but outside the text area; this can be accomplished, in the fancyhdr example, using \fancyfootoffset; a little example:

\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\setlength\footskip{40pt}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\thepage}
\fancyfoot[R]{\includegraphics[height=30pt]{image-\arabic{page}}}
\fancyfootoffset[R]{4cm}

\begin{document}

\lipsum[2-23]

\end{document}

enter image description here

With the background approach, one can use \SetBgHshift{<length>}.

share|improve this answer
    
@Medina Well it worked, but I was wanting to place it in the far right corner and the option [R] only places it on the right of the footer. The cite I quoted had the image all the way across. Similarly, is it possible to place these figures even right of the typical footer? –  nate Dec 13 '12 at 2:47
    
@nate please see the last example in my updated answer. –  Gonzalo Medina Dec 13 '12 at 2:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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