%% %% The LaTeX Companion, 3ed %% %% Example 5-5-1 on page I-410 in "draftwatermark --- Put a visible stamp on your document". %% %% Copyright (C) 2022 Frank Mittelbach %% %% It may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% %% See https://www.latex-project.org/lppl.txt for details. %% \documentclass{tlc3exa} \pagestyle{empty} \setcounter{page}{6} \setlength\textwidth{124.20126pt} \pagestyle{origplain} % example class does not show page numbers with ``plain'' pagestyle \setcounter{page}{1} \tolerance=4000 % examples is very narrow ... \usepackage{microtype} % so let's try to make this a bit better %-------------------------------------- % For the book example we have to do some faking here. By default the % hpos and vpos are at the center of the page and so we mimic this % here. This is why we load the package internally and reset the keys: \setlength\textheight{94pt} \setlength\oddsidemargin{0pt} \setlength\evensidemargin{0pt} \RequirePackage{draftwatermark} \DraftwatermarkOptions{ hpos=\dimexpr 1in + .5\textwidth , vpos=\dimexpr 1in + \topmargin + \headheight+\headsep+ (\textheight+\footskip)/2 , } % So the above should not be copied into your own document preamble. %-------------------------------------- %StartShownPreambleCommands \usepackage{lipsum,xcolor} \usepackage{draftwatermark} \DraftwatermarkOptions {fontsize=25pt,colorspec=.6} %StopShownPreambleCommands \begin{document} \lipsum[1][1-3] \newpage \DraftwatermarkOptions {color=blue!40, angle=-45, text=Private, scale=1.4 } \lipsum[2][1] \par \lipsum[3] \end{document}