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.

Before anything, this question may have been asked already, but I can't find it. I want to place a picture right on top of the page letting no white space between the top edge of the page and the top edge of the picture. I have already fitted the picture width to the paper width like this:

\makebox[\textwidth]{\includegraphics[width=\paperwidth]{mypicture}}

Thanks for all and sorry about my spelling.

share|improve this question
3  
In every page or just in the first one? –  egreg Nov 29 '12 at 16:25
add comment

2 Answers

I suggest you to use the eso-pic package:

\documentclass{scrartcl}
\usepackage{eso-pic}
\begin{document}

\AddToShipoutPicture*{\put(0,788){\rule{21cm}{2cm}}} 

Hello

\end{document}

You might need to play with the settings but basically this is one way to do it. To have the picture on each page just remove the '*'.

result

share|improve this answer
    
Ok, I'll take a look to it. Thanks –  Agustin Nov 29 '12 at 16:44
    
Ehhh, I can't get the same result. I get the picture centered verticaly and without the page width. Can you explain me a little bit more how it works? –  Agustin Nov 29 '12 at 17:14
    
Try by changing \textwidth to \paperwidth, the following line works nicely here: \AddToShipoutPicture*{\put(0,820){\makebox[\paperwidth]{\includegraphics[width=‌​\paperwidth,height=1cm]{tulpen}}}} –  Uwe Ziegenhagen Nov 29 '12 at 17:27
    
No, it doesn't work for me. Is there a way to tell latex to stick the picture to the top edge? Or something like this: \vspace*{-xxx}\makebox[\textwidth]{\includegraphics[width=\paperwidth]{mypicture‌​}}, but I cant know what xxx is. –  Agustin Nov 29 '12 at 19:17
    
Check egreg's solution then. The code works fine for me but I don't know your setup. –  Uwe Ziegenhagen Nov 29 '12 at 20:21
add comment

With the picture package you don't even have to guess:

\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage{picture}
\usepackage{eso-pic}
\begin{document}

\AddToShipoutPicture*{\put(0,\dimexpr\paperheight-1cm){%
  \makebox[\paperwidth]{\includegraphics[width=\paperwidth,height=1cm]{tulpen}}%
}}

Hello
\newpage
Hello

\end{document}

If you use \AddToShipoutPicture (without the *), the image will be added to every page.

share|improve this answer
    
Note: the -1cm part needs to be adjusted according to your image –  John J. Camilleri Sep 13 '13 at 15:07
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.