8

I am trying to add a background image at the upper right corner of my titlepage with 1cm margins to the top and the right.

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\title{Test}
\author{Test}
\date{\today}

\usepackage{eso-pic}
\usepackage[demo]{graphicx}

\providecommand*\LenToUnit[1]{#1\@gobble}

\newcommand\AtPageUpperRight[1]{\AtPageUpperLeft{
\put(\LenToUnit{0.5\paperwidth},\LenToUnit{-1cm}){#1}}
}

\begin{document}

\AddToShipoutPictureBG*{
 \AtPageUpperRight{\raisebox{-\height}{\includegraphics{logo.pdf}}}
}

\maketitle

\end{document}

Is it possible to right align the image?

5
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\title{Test}
\author{Test}
\date{\today}
\usepackage{eso-pic}
\usepackage[demo]{graphicx}
\newcommand\AtPageUpperRight[1]{\AtPageUpperLeft{%
   \makebox[\paperwidth][r]{#1}}}
\begin{document}

\AddToShipoutPictureBG*{%
  \AtPageUpperRight{\raisebox{-\height}{\frame{\includegraphics[width=8cm]{Uni-Logo}}}}}
\maketitle

\end{document}

enter image description here

  • Thanks for your answer but it only works with demo options. "LaTeX Error: Cannot determine size of graphic in logo.pdf (no BoundingBox)." How can i set margins to the right and top? – SLx64 Jun 13 '14 at 9:06
  • did you run pdflatex? – user2478 Jun 13 '14 at 10:25
  • Yes, i used pdflatex. – SLx64 Jun 13 '14 at 10:38
  • Then your image is buggy. Can you provide it for a download? – user2478 Jun 13 '14 at 10:52
  • I do not open exe files ... – user2478 Jun 13 '14 at 10:57
9

Piece of cake with tikz

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\title{Test}
\author{Test}
\date{\today}

\usepackage{tikz}    
\begin{document}
\maketitle
\begin{tikzpicture}[remember picture,overlay]
   \node[anchor=north east,inner sep=0pt] at (current page.north east)
              {\includegraphics[scale=0.2]{example-image-a}};
\end{tikzpicture}

\end{document}

enter image description here

  • How do I put the picture in the bottom right corner? I tried to replace north with south and east with west but that won't work :( – Coxa Aug 18 '15 at 14:03
  • 1
    @Coxa anchor=south east and at (current page.south east). i.e., \node[anchor=south east,inner sep=0pt] at (current page.south east) {\includegraphics[scale=0.2]{example-image-a}}; – user11232 Aug 18 '15 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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