| 1 |
%% |
| 2 |
%% This is file `test_draftwatermark-5.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% draftwatermark.dtx (with options: `samplecode-custom') |
| 8 |
%% |
| 9 |
\documentclass{article} |
| 10 |
\usepackage[svgnames]{xcolor} |
| 11 |
\usepackage[T1]{fontenc} |
| 12 |
\usepackage{draftwatermark} |
| 13 |
\usepackage{mathptmx} |
| 14 |
\usepackage[scaled]{helvet} |
| 15 |
\usepackage{lipsum} |
| 16 |
\title{Sample document for the draftwatermark package} |
| 17 |
\author{} |
| 18 |
|
| 19 |
\newsavebox\wmbox |
| 20 |
\savebox\wmbox{% |
| 21 |
{\color[rgb]{1,0.8,0.8}\sffamily \fbox{DRAFT}}} |
| 22 |
\newcommand\MyWM{% |
| 23 |
\ifodd\thepage |
| 24 |
\hspace*{\dimexpr \paperwidth -\wd\wmbox-10mm}% |
| 25 |
\usebox{\wmbox}% |
| 26 |
\else |
| 27 |
\usebox{\wmbox}% |
| 28 |
\fi} |
| 29 |
|
| 30 |
\DraftwatermarkOptions{anchor=lt, pos={5mm, 5mm}, markcmd=\MyWM} |
| 31 |
\begin{document} |
| 32 |
\maketitle |
| 33 |
|
| 34 |
\section{One} |
| 35 |
\lipsum[1-3] |
| 36 |
|
| 37 |
\section{Two} |
| 38 |
\lipsum[4-6] |
| 39 |
|
| 40 |
\end{document} |
| 41 |
\endinput |
| 42 |
%% |
| 43 |
%% End of file `test_draftwatermark-5.tex'. |