TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

Background images
TUG logo

Main page

Index
UK FAQ
Documentation
Software
CTAN
Search CTAN:

Statistics

Google c.t.t.

Google d.c.t.t.

 


 


Background image or text |  PDF and watermark | 


1 The code

Put in Latex preamble:
\usepackage{eso-pic,graphicx}
% `rose.eps' is in CTAN:/macros/generic/boxedeps/-------------
\makeatletter
\newcommand\BackgroundPicture[2]{%
  \setlength{\unitlength}{1pt}%
  default \put(0,\strip@pt\paperheight){%
  \parbox[t][\paperheight]{\paperwidth}{%
    \vfill
    \centering\includegraphics[angle=#2]{#1}
    \vfill
}}} %
\makeatother
%\AddToShipoutPicture{\BackgroundPicture{rose}{45}}% here or anywhere in text
%--------------------------------------------
Alternatives:

The packages eso-pic and graphicx are often part of your local tex-installation , otherwise download and install them. Don't forget a texhash. With the command
\AddToShipoutPicture{\BackgroundPicture{rose}{55}}
in LateX preamble or anywhere in the text an image is printed on the actual page where this command is located and all following one. For example: If you like a background picture beginning with the third page, write the command just behind the \newpage-command or any other one, which is on page 3.

2 The arguments

  1. the first one is the name of the image with relative path
  2. the second is the angle for the rotating of the image

rose.eps

3 Star version

A background image/text only on one page is possible with the star-version :
\AddToShipoutPicture*{\BackgroundPicture{rose}{45}}

local time: Sat Dec 7 19:37:09 CET 2019 ; file is: 164.15125 days old
contact webmaster _at_ TeXnik.de