[Tex/LaTex] Draft watermark image just in a \section

draftwatermark

Is it possible to have a draft watermark only in a \section?

EDIT:

I have in a document more then one \section, and I need the draftwatermark just in some \section. Unfortunately the section with and without the draftwatermark share the page. For example I want the draftwatermark under the text of just one of these sections A,B,C

\documentclass{article}

\usepackage{kantlipsum} % supply mock text

\begin{document}

\section{A}

\kant[2]

\section{B}

\kant[2-4]

\section{C}

\kant[2]

\end{document}

Best Answer

One option would be to use the background package; to have the watermark appear on some pages, you can say something like

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

\begin{document}

\SetBgContents{}
\section{Test Section Without Draftwatermark}
\lipsum[1-12]
\section{Test Section With Draftwatermark}
\SetBgContents{Draft}
\lipsum[1-12]
\section{Test Section Without Draftwatermark}
\SetBgContents{}
\lipsum[1-12]

\end{document}

The background material (which can be almost anything you want (image, text) with control over the attributes (placement, color, scale, opacity, etc.) and, by default, "Draft" written diagonally, in red and in a large size) will appear on all the pages between \SetBgContents{Draft} and the following \SetBgContenst{}.

To have the watermark to appear only on selected pages, you can use the pages=some package option and then use \BgThispage on the page(s) you want the watermark to appear:

\documentclass{article}
\usepackage[pages=some]{background}
\usepackage{lipsum}

\begin{document}

\section{Test Section Without Draftwatermark}
\lipsum[1-12]
\section{Test Section With Draftwatermark}
\BgThispage
\lipsum[1-12]
\section{Test Section Without Draftwatermark}
\lipsum[1-12]

\end{document}

If the most recent version of the package is not available in your system, the line

\usepackage[pages=some]{background}

has to be replaced with

\usepackage[some]{background}

Here's an example that manually places the "Draft" mark only for section two:

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

\begin{document}

\SetBgContents{}
\section{Test Section Without Draftwatermark}
\lipsum[1-6]
\section{Test Section With Draftwatermark}
\backgroundsetup{contents=Draft,scale=4,position={2,-3.5},opacity=1}
\lipsum[1-6]
\section{Test Section Without Draftwatermark}
\backgroundsetup{contents=Draft,scale=4,position={2,-1.4},opacity=1}
\lipsum[1-3]
\SetBgContents{}
\lipsum[1-2]

\end{document}

enter image description here