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.

With the following code I put an image in the bottom left corner of a page (see How to place an image in bottom left hand corner on every page? too).

\newcommand{\BackgroundPic}
{%
\put(0,0){%
\includegraphics[width=1cm,height=1cm,%
keepaspectratio]{images/test.png}%
}}

\AddToShipoutPicture*{\BackgroundPic}

But I want to put the image to the bottom right corner of the type area. How can I do this? I need the coordinates of the bottom right corner of the type area (without TikZ) …

share|improve this question
    
-1 for without TikZ ;-) Joking. –  Harish Kumar Nov 27 '13 at 13:31
    
Haha :D Is it possible with TikZ? –  Ronny Nov 27 '13 at 13:33
    
I prefer a more „native“ solution, but will accept TikZ if no native solution exists (which I don’t believe). –  Ronny Nov 27 '13 at 13:37
    
I was joking again. There is a tikz solution that may get updated within an hour. :-) –  Harish Kumar Nov 27 '13 at 13:44
add comment

2 Answers 2

up vote 3 down vote accepted
\documentclass{article}
\usepackage[a4paper,margin=1in,showframe,marginparsep=0pt,marginparwidth=0pt]{geometry}
\usepackage{graphicx}
\usepackage{eso-pic}
\AddToShipoutPictureBG*{%
  \AtTextLowerLeft{\makebox[\textwidth][r]{%
    \includegraphics[width=1cm,height=1cm,keepaspectratio]{example-image-a}}}}
\begin{document}
 Some text here
\end{document}
share|improve this answer
    
RTFM :D Thank you! It does the job perfectly! –  Ronny Nov 27 '13 at 14:29
add comment

A tikz solution any way.

\documentclass{article}
\usepackage[a4paper,margin=1in,showframe]{geometry}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc}
\usepackage{graphicx,lipsum}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\begin{pgfonlayer}{background}
  \node[anchor=south east,outer sep=0pt,inner sep=0pt] at ($(current page.south east) +(-1in,1in)$) {\includegraphics[width=2cm]{example-image-a}};
\end{pgfonlayer}
\end{tikzpicture}
\lipsum[1-15]
\end{document}

enter image description here

Notes:

I have added the picture in the background and picture is added only for one page. If you want the picture for all / some pages, use background package. If you change the margin, use appropriate values in ($(current page.south east) +(-1in,1in)$). (-1in,1in) is actually (<-right margin>,<bottom margin>).

share|improve this answer
    
Thanks for the suggestion, but it does not fully answer my question. First, I can put coordinates at \put(x,y) too, so no TikZ is necessary, right? Second, my type area is automatically calculated with KOMA Script. So I have to obtain the coordinates and do not set constants. –  Ronny Nov 27 '13 at 14:05
    
I think we have to use something like \evensidemargin, \oddsidemargin, \textheight and \textwidth –  Ronny Nov 27 '13 at 14:09
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.