| 1 |
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% |
| 2 |
% This is file 'xwatermark-examples2.tex', version 1.5.2d. % |
| 3 |
% % |
| 4 |
% This work (ie, all the files in the xwatermark manifest) may be % |
| 5 |
% distributed and/or modified under the conditions of the LaTeX % |
| 6 |
% Project Public License, either version 1.3 of this license or any % |
| 7 |
% later version. The latest version of this license is at % |
| 8 |
% http://www.latex-project.org/lppl.txt and version 1.3 or later % |
| 9 |
% is part of all distributions of LaTeX version 2005/12/01 or later. % |
| 10 |
% % |
| 11 |
% The LPPL maintenance status of this software is 'author-maintained'. % |
| 12 |
% % |
| 13 |
% This software is provided 'as it is', without warranty of any kind, % |
| 14 |
% either expressed or implied, including, but not limited to, the % |
| 15 |
% implied warranties of merchantability and fitness for a particular % |
| 16 |
% purpose. % |
| 17 |
% % |
| 18 |
% Copyright (c) 2009-2012 Ahmed Musa ([email protected]). % |
| 19 |
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% |
| 20 |
|
| 21 |
\documentclass[final,showpagenos]{article} |
| 22 |
\makeatletter |
| 23 |
|
| 24 |
\InputIfFileExists{xwatermark-examples.cfg}{}{% |
| 25 |
\errmessage{No file xwatermark-examples.cfg or wrong path}} |
| 26 |
|
| 27 |
\thispagestyle{empty} |
| 28 |
|
| 29 |
%\watermarkpaths*[.](/){{},/Graphics} |
| 30 |
\watermarkpaths[.](/){{}{/Graphics}} |
| 31 |
|
| 32 |
\newwatermark*[% |
| 33 |
page=2,fontfamily=put,textcolor=BurntOrange,fontsize=1cm, |
| 34 |
textscale=1,textalign=center,textangle=45,picangle=90, |
| 35 |
picontoptext=false,boxalign=center,picxpos=50, |
| 36 |
picypos=.25\paperheight,textxpos=-70,textypos=-50, |
| 37 |
picbb=116 428 477 718,picscale=1,picfile=tabu-test1, |
| 38 |
picfileext=eps |
| 39 |
]{\ttcl{Green}{\texttt{xwatermark\\package}}} |
| 40 |
|
| 41 |
\newwallpaper[% |
| 42 |
page=2,fontfamily=put,textcolor=BurntOrange,fontsize=1cm, |
| 43 |
textscale=2,textalign=center,textangle=45,picangle=45, |
| 44 |
tilexoffset=0pt,squaretiles,tileyoffset=0pt,picontoptext=true, |
| 45 |
boxalign=center,picbb=54 54 483 242,picscale=2,picfile=fant, |
| 46 |
tileno=4,picfileext=epsx,graphicsoptions={keepaspectratio,hiresbb} |
| 47 |
]{\texttt{fant}} |
| 48 |
|
| 49 |
|
| 50 |
% * (star) means 'put on foreground'; |
| 51 |
% ' (prime) means 'ignore this mark': |
| 52 |
\newwallpaper*[% |
| 53 |
page=3,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,textscale=2, |
| 54 |
textalign=center,textangle=45,picangle=45,tilexoffset=0pt,%squaretiles, |
| 55 |
tileyoffset=0pt,picontoptext=false,boxalign=center, |
| 56 |
picbb=116 428 477 718,picscale=2,picfile=tabu-test1,tileno=4, |
| 57 |
% The package will look for the right file extension in each mode, |
| 58 |
% ignoring the following 'epsx': |
| 59 |
picfileext=epsx |
| 60 |
]{\texttt{test}} |
| 61 |
|
| 62 |
\newwallpaper[% |
| 63 |
page=5,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,textscale=2, |
| 64 |
textalign=center,textangle=0,picangle=0,tilexoffset=0pt,squaretiles, |
| 65 |
tileyoffset=0pt,picontoptext=false,boxalign=center,showpagecenter, |
| 66 |
picbb=116 428 477 718,picscale=2,picfile=tabu-test1,tileno=4, |
| 67 |
picfileext=eps |
| 68 |
]{\texttt{test}} |
| 69 |
|
| 70 |
\newwallpaper*[% |
| 71 |
page=4,fontfamily=put,textcolor=violet!70,fontsize=1cm,textscale=1, |
| 72 |
textalign=center,textangle=45,picangle=0,tilexoffset=0pt,squaretiles, |
| 73 |
tileyoffset=0pt,picontoptext=false,boxalign=center,%top-left, |
| 74 |
picbb=20 21 590 400,picscale=1,picfile=comet1,%tileno=8, |
| 75 |
picfileext=epsx |
| 76 |
]{Comet} |
| 77 |
|
| 78 |
\dummywallpaper[% |
| 79 |
page=5,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,textscale=2, |
| 80 |
textalign=center,textangle=45,picangle=45,squaretiles,tilexoffset=0pt, |
| 81 |
tileyoffset=0pt,picontoptext=false,%boxalign=l-t, |
| 82 |
picbb=115 623 238 747,picscale=2,picfile=xwatermarkpic1, |
| 83 |
picfileext=eps |
| 84 |
]{YES} |
| 85 |
|
| 86 |
\newwatermark[% |
| 87 |
pages=4,fontfamily=put,textcolor=blue,fontsize=1.2cm,textscale=1, |
| 88 |
width=.8\paperheight,textalign=center,textangle=90,textxpos=0,textypos=0 |
| 89 |
]{% |
| 90 |
\xwmcolorbox[framesep=4pt,framerule=4pt,fillcolor=brown!70!yellow!55, |
| 91 |
innerframecolor=white,outerframecolor=blue,height=1.5cm, |
| 92 |
depth=1cm,textalign=center,width=.8\paperheight]% |
| 93 |
{\tt\string\advance\ttcl{red}{\string\knowledge}% |
| 94 |
\string\by\ttcl{red}{\string\inquiry}}% |
| 95 |
} |
| 96 |
|
| 97 |
\newwatermark[% |
| 98 |
page=6,fontfamily=put,textcolor=BurntOrange!70,fontsize=1cm,textscale=2, |
| 99 |
picbb=78 563 304 788,picscale=2,picfile=xwatermarkpic3, |
| 100 |
picfileext=epsx,width=\paperwidth,textalign=center,textangle=0, |
| 101 |
textxpos=0,textypos=0,picontoptext=false |
| 102 |
]{\ttcl{black}{Yes}} |
| 103 |
|
| 104 |
\newwatermark*[% |
| 105 |
page=6,fontfamily=put,textcolor=violet!70,fontsize=2cm,textscale=1, |
| 106 |
width=\paperwidth,textalign=center,textangle=0,textxpos=0,textypos=0 |
| 107 |
]{\fbox{Brought to front}} |
| 108 |
|
| 109 |
\newwatermark[% |
| 110 |
page=7,fontfamily=put,textcolor=MidnightBlue!80,fontsize=2cm,textscale=1, |
| 111 |
width=\paperwidth,textalign=center,textangle=-50,textxpos=-30,textypos=80 |
| 112 |
]{\fbox{Taken to back}} |
| 113 |
|
| 114 |
\csndef*{watermark-2a}#1#2{% |
| 115 |
\newwatermark[% |
| 116 |
pages=6-7,fontfamily=pbk,textcolor=gray!35,fontsize=12pt,fontseries=n, |
| 117 |
textalign=center,textangle=#2,textscale=1,textxpos=#1,textypos=0, |
| 118 |
width=\paperheight |
| 119 |
]{% |
| 120 |
\xwmcolorbox[framesep=5pt,framerule=2pt,fillcolor=teal, |
| 121 |
innerframecolor=magenta,outerframecolor=green, |
| 122 |
textalign=center,width=.98\paperheight]% |
| 123 |
{% |
| 124 |
\color{white}\framebox[2cm][t]{\phantom{Hello}}\hspace{1cm}% |
| 125 |
\color{orange!85!red!55}\ttcl{red}{$\blacktriangleright$}% |
| 126 |
\hspace{2.1cm}Page \thepage~of~\pageref{xwmlastpage}% |
| 127 |
\hspace{2.1cm}\ttcl{red}{$\blacktriangleleft$}\hspace{1cm}% |
| 128 |
\color{white}\framebox[2cm][t]{\phantom{Hello}}% |
| 129 |
\xwmstrut{9mm}{6mm}% |
| 130 |
}% |
| 131 |
}% |
| 132 |
} |
| 133 |
|
| 134 |
\begin{ltscomment} |
| 135 |
The same watermark is placed twice on the same page. |
| 136 |
Compare this with one of the examples in xwatermark-examples1.tex: |
| 137 |
\end{ltscomment} |
| 138 |
|
| 139 |
\usecsn{watermark-2a}{-.428\paperwidth}{90} |
| 140 |
\usecsn{watermark-2a}{.428\paperwidth}{-90} |
| 141 |
|
| 142 |
\begin{ltscomment} |
| 143 |
Here is an inefficient example. \scalebox and \rotatebox |
| 144 |
could have been more efficiently achieved in the following |
| 145 |
example: |
| 146 |
\end{ltscomment} |
| 147 |
\newwatermark[page=\lastdocpage,width=\paperheight]{% |
| 148 |
\setbox\xwm@boxb=\hb@[email protected]\paperheight{% |
| 149 |
\hfuzz\maxdimen\hss |
| 150 |
\xwmcolorbox[framesep=4pt,framerule=4pt,fillcolor=brown!70, |
| 151 |
innerframecolor=white,outerframecolor=MidnightBlue,height=1cm, |
| 152 |
depth=.8cm,textalign=center,width=.8\paperheight]% |
| 153 |
{\scalebox{1.2}{\bf\tt\ttcl{white}{\char`\\advance}% |
| 154 |
\ttcl{red}{\string\knowledge}% |
| 155 |
\string\by\ttcl{blue}{\char`\\inquiry}}}\hss}% |
| 156 |
\begin{center}\rotatebox{45}{\box\xwm@boxb}\end{center}% |
| 157 |
} |
| 158 |
|
| 159 |
\begin{document} |
| 160 |
|
| 161 |
\title{% |
| 162 |
{\setbox\z@\vbox to.25\paperheight{}\box0}% |
| 163 |
\bfseries The \texttt{\ttcl{blue}{xwatermark}} Package |
| 164 |
\xcopyright{red}\\[1ex] |
| 165 |
\large Version 1.5.2d\\[2ex] |
| 166 |
\Large EXAMPLES (File 2)% |
| 167 |
} |
| 168 |
\author{% |
| 169 |
\textbf{Ahmed Musa}\\Preston, United Kingdom\\ |
| 170 |
\email{[email protected]} |
| 171 |
} |
| 172 |
\maketitle |
| 173 |
\thispagestyle{empty} |
| 174 |
|
| 175 |
\newpage |
| 176 |
|
| 177 |
\ltslipsum[1-4] |
| 178 |
|
| 179 |
\ltslipsum |
| 180 |
|
| 181 |
\newpage |
| 182 |
|
| 183 |
\ltslipsum[1-4] |
| 184 |
|
| 185 |
\newpage |
| 186 |
|
| 187 |
\ltslipsum[1-4] |
| 188 |
|
| 189 |
\newpage |
| 190 |
|
| 191 |
\ltslipsum[1-4] |
| 192 |
|
| 193 |
\newpage |
| 194 |
|
| 195 |
\ltslipsum[1-4] |
| 196 |
|
| 197 |
\newpage |
| 198 |
|
| 199 |
\ltslipsum[1-4] |
| 200 |
|
| 201 |
\end{document} |