1

I have added water mark using \backgroundsetup

\backgroundsetup{
angle=45,
scale=1,contents={\includegraphics[allpages,
    ]{water_mark.png}}}

\usepackage[most]{tcolorbox}\tcbset{colback=blue!8!white,colframe=blue!25!white, boxrule=0pt, left=10pt,right=10pt,top=10pt,bottom=10pt, arc=0pt,outer arc=0pt}

\begin{tcolorbox}\begin{verbatim} texts in box\end{verbatim} \end{tcolorbox}

This what I have achieved:

This what i have achieved

I am happy to see the watermark in every page but the problem is that some pages have images and custom boxes, in such pages the watermark is below that images and boxes. I want the watermark above the image or box.

7
  • Please show us what you have done to achieve this box (MWE).
    – TeXnician
    Jul 5, 2017 at 8:02
  • And why do you use the latex3 tag? Do you have some expl3 functions relevant to this issue? In addition: Do you really use two different packages for watermarks?
    – TeXnician
    Jul 5, 2017 at 8:03
  • Have highlighted the code used and the screenshot of my out put. Please see my edits Jul 5, 2017 at 8:06
  • 1
    That does not help. We need a minimal working example to really help you.
    – TeXnician
    Jul 5, 2017 at 8:07
  • 1
    That's still not compilable... It would be very helpful if you could follow the link I've provided and help us help you by post a minimal compilable code snippet (with documentclass, necessary packages and the document environment with minimal content).
    – TeXnician
    Jul 5, 2017 at 9:34

1 Answer 1

2

Instead of using background package, you could use xwatermark.

Its starred (*) variant of \newwatermark command puts the watermark in the foreground instead of the background.

\documentclass{article}
\usepackage[printwatermark]{xwatermark}

\usepackage[most]{tcolorbox}
\tcbset{colback=blue!8!white,colframe=blue!25!white, boxrule=0pt, left=10pt,right=10pt,top=10pt,bottom=10pt, arc=0pt,outer arc=0pt}

\usepackage{mwe}% for test purpose only, you don't need to use this in your document

\begin{document}

\newwatermark*[angle=45,scale=1,xpos=0,ypos=40, allpages]{\includegraphics[height=2cm,width=10cm]{example-image}}% put your image here with the correct height and width

\section{An example of section}

\blindtext

\begin{tcolorbox}
\begin{verbatim} 
texts in box
\end{verbatim} 
\end{tcolorbox}

\blindtext
\newpage
\blindtext
\end{document}

enter image description here

You must log in to answer this question.

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