16

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?

SLx64
  • 2,823
  • Related -- http://tex.stackexchange.com/q/147217/34618 and http://tex.stackexchange.com/q/38751/34618 – Jesse Jun 13 '14 at 08:56

2 Answers2

15

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}}; –  Aug 18 '15 at 14:43
6
\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