4

background package defines a background with absolute position in preamble, but how to set two independent backgrounds at different positions? Consider we have two backgrounds as

\SetBgColor{red}
\SetBgPosition{0,0}
\SetBgContents{content1}

\SetBgColor{blue}
\SetBgPosition{1cm,5cm}
\SetBgContents{content2}
0

1 Answer 1

9

The background material can be pretty much anything; in particular, it can be a tikzpicture environment, and inside this environment you can use two independent \nodes to place your material:

\documentclass{article}
\usepackage{background}
\usepackage{lipsum}

\SetBgAngle{0}
\SetBgScale{3}
\SetBgOpacity{1}
\SetBgContents{%
\begin{tikzpicture}[remember picture,overlay]
\node[text=red] at (0,0) {content1};
\node[text=blue] at (2,-2) {content2};
\end{tikzpicture}}

\begin{document}

\lipsum[1-10]

\end{document}

enter image description here

2
  • This method does not apply to simple text, but resolved my problem as I'm using tikz too. I wanna take the chance to thank you for your excellent package. It's very flexible, and I am using it for various purposes. This is the reason that I need more than one :)
    – Googlebot
    Commented Apr 20, 2012 at 6:35
  • Just for sake of clarification! Your codes did not work for me until setting a value for SetBgPosition.
    – Googlebot
    Commented Apr 20, 2012 at 7:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .