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.

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}
share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

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

share|improve this answer
    
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 :) –  All Apr 20 '12 at 6:35
    
Just for sake of clarification! Your codes did not work for me until setting a value for SetBgPosition. –  All Apr 20 '12 at 7:12
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.