summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples2.tex
blob: 2c93785bb803a7eb8df449962426d8166a189a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% This is file 'xwatermark-examples2.tex', version 1.5.1.                    %
%                                                                            %
% IMPORTANT NOTICE:                                                          %
%   This example file is not user compilable! The packages needed            %
%   to compile the examples are not yet available in the public              %
%   domain. This does not affect the functionalities of the                  %
%   xwatermark package. I am sorry, but I can't answer requests for          %
%   packages not yet released. Users can copy the examples into their        %
%   own files and compile them, removing all undefined commands.             %
%                                                                            %
% This work (ie, all the files in the xwatermark manifest) may be            %
% distributed and/or modified under the conditions of the LaTeX              %
% Project Public License, either version 1.3 of this license or any          %
% later version. The latest version of this license is at                    %
% http://www.latex-project.org/lppl.txt and version 1.3 or later             %
% is part of all distributions of LaTeX version 2005/12/01 or later.         %
%                                                                            %
% The LPPL maintenance status of this software is 'author-maintained'.       %
%                                                                            %
% This software is provided 'as it is', without warranty of any kind,        %
% either expressed or implied, including, but not limited to, the            %
% implied warranties of merchantability and fitness for a particular         %
% purpose.                                                                   %
%                                                                            %
% Copyright (c) 2009-2011 Ahmed Musa (amusa22@gmail.com).                    %
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%

\documentclass[final,showpagenos]{article}
\makeatletter
\InputIfFileExists{xwatermark-examples.cfg}{}{%
  \errmessage{No file xwatermark-examples.cfg or wrong path}}

\thispagestyle{empty}

\watermarkpaths[.](/){{}{/Graphics}}

\newwatermark*[%
  page=2,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,
  textscale=1,textalign=center,textangle=45,picangle=90,
  picontoptext=false,boxalign=center,picxpos=50,
  picypos=.25\paperheight,textxpos=-70,textypos=-50,
  picbb=116 428 477 718,picscale=1,picfile=tabu-test1,
  picfileext=eps
]{\tcl{Green}{\texttt{xwatermark\\package}}}

\newwallpaper[%
  page=2,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,
  textscale=2,textalign=center,textangle=45,picangle=45,
  tilexoffset=0pt,squaretiles,tileyoffset=0pt,picontoptext=true,
  boxalign=center,picbb=54 54 483 242,picscale=2,picfile=fant,
  tileno=4,picfileext=epsx,graphicsoptions={keepaspectratio,hiresbb}
]{\texttt{fant}}


% * (star) means 'put on foreground';
% ' (prime) means 'ignore this mark':
\newwallpaper*[%
  page=3,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,textscale=2,
  textalign=center,textangle=45,picangle=45,tilexoffset=0pt,%squaretiles,
  tileyoffset=0pt,picontoptext=false,boxalign=center,
  picbb=116 428 477 718,picscale=2,picfile=tabu-test1,tileno=4,
  % The package will look for the right file extension in each mode,
  % ignoring the following 'epsx':
  picfileext=epsx
]{\texttt{test}}

\newwallpaper[%
  page=5,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,textscale=2,
  textalign=center,textangle=0,picangle=0,tilexoffset=0pt,squaretiles,
  tileyoffset=0pt,picontoptext=false,boxalign=center,showpagecenter,
  picbb=116 428 477 718,picscale=2,picfile=tabu-test1,tileno=4,
  picfileext=eps
]{\texttt{test}}

\newwallpaper*[%
  page=4,fontfamily=put,textcolor=violet!70,fontsize=1cm,textscale=1,
  textalign=center,textangle=45,picangle=0,tilexoffset=0pt,squaretiles,
  tileyoffset=0pt,picontoptext=false,boxalign=center,%top left,
  picbb=20 21 590 400,picscale=1,picfile=comet1,%tileno=8,
  picfileext=epsx
]{Comet}

\dummywallpaper[%
  page=5,fontfamily=put,textcolor=BurntOrange,fontsize=1cm,textscale=2,
  textalign=center,textangle=45,picangle=45,squaretiles,tilexoffset=0pt,
  tileyoffset=0pt,picontoptext=false,%boxalign=lt,
  picbb=115 623 238 747,picscale=2,picfile=xwatermarkpic1,
  picfileext=eps
]{YES}

\newwatermark[%
  pages=4,fontfamily=put,textcolor=blue,fontsize=1.2cm,textscale=1,
  width=.8\paperheight,textalign=center,textangle=90,textxpos=0,textypos=0
]{%
  \xwmcolorbox[framesep=4pt,framerule=4pt,fillcolor=brown!70!yellow!55,
    innerframecolor=white,outerframecolor=blue,height=1.5cm,
    depth=1cm,textalign=center,width=.8\paperheight]%
  {\tt\string\advance\tcl{red}{\string\knowledge}%
  \string\by\tcl{red}{\string\inquiry}}%
}

\newwatermark[%
  page=6,fontfamily=put,textcolor=BurntOrange!70,fontsize=1cm,textscale=2,
  picbb=78 563 304 788,picscale=2,picfile=xwatermarkpic3,
  picfileext=epsx,width=\paperwidth,textalign=center,textangle=0,
  textxpos=0,textypos=0,picontoptext=false
]{\tcl{black}{Yes}}

\newwatermark*[%
  page=6,fontfamily=put,textcolor=violet!70,fontsize=2cm,textscale=1,
  width=\paperwidth,textalign=center,textangle=0,textxpos=0,textypos=0
]{\fbox{Brought to front}}

\newwatermark[%
  page=7,fontfamily=put,textcolor=MidnightBlue!80,fontsize=2cm,textscale=1,
  width=\paperwidth,textalign=center,textangle=-50,textxpos=-30,textypos=80
]{\fbox{Taken to back}}

\csndef*{watermark-2a}#1{%
  \newwatermark[%
    pages=6-7,fontfamily=pbk,textcolor=gray!35,fontsize=12pt,fontseries=n,
    textalign=center,textangle=90,textscale=1,textxpos=#1,textypos=-1,
    width=\paperheight
  ]{%
    \xwmcolorbox[framesep=5pt,framerule=2pt,fillcolor=teal,
      innerframecolor=magenta,outerframecolor=green,
      textalign=center,width=.995\paperheight]%
      {%
        \color{white}\framebox[2cm][t]{\phantom{Hello}}\hspace{1cm}%
        \color{orange!85!red!55}\tcl{red}{$\blacktriangleright$}%
        \hspace{2.1cm}Page \thepage~of~\pageref{xwmlastpage}%
        \hspace{2.1cm}\tcl{red}{$\blacktriangleleft$}\hspace{1cm}%
        \color{white}\framebox[2cm][t]{\phantom{Hello}}%
        \xwmstrut{9mm}{6mm}%
    }%
  }%
}
\begin{newcomment}
The same watermark is placed twice on the same page.
Compare this with one of the examples in  xwatermark-examples1.tex:
\end{newcomment}
\usecsn{watermark-2a}{-.43\paperwidth}
\usecsn{watermark-2a}{.445\paperwidth}

\begin{newcomment}
Here is an inefficient example. \scalebox and \rotatebox
could have been more efficiently achieved in the following
example:
\end{newcomment}
\newwatermark[page=\lastdocpage,width=\paperheight]{%
  \setbox\xwm@boxb=\hb@xt@.9\paperheight{%
  \hfuzz\maxdimen\hss
  \xwmcolorbox[framesep=4pt,framerule=4pt,fillcolor=brown!70,
    innerframecolor=white,outerframecolor=MidnightBlue,height=1cm,
    depth=.8cm,textalign=center,width=.8\paperheight]%
    {\scalebox{1.2}{\bf\tt\tcl{white}{\char`\\advance}%
      \tcl{red}{\string\knowledge}%
      \string\by\tcl{blue}{\char`\\inquiry}}}\hss}%
  \begin{center}\rotatebox{45}{\box\xwm@boxb}\end{center}%
}

\begin{document}

\title{%
  {\setbox\z@\vbox to.25\paperheight{}\box0}%
  \bfseries The \texttt{\tcl{blue}{xwatermark}} Package
  \xcopyright{red}\\[1ex]
  \large Version 1.5.1\\[2ex]
  \Large EXAMPLES (File 2)%
}
\author{%
  \textbf{Ahmed Musa}\\Preston, United Kingdom\\
  \email{amusa22@gmail.com}
}
\maketitle
\thispagestyle{empty}

\newpage

\llipsum[1-4]

\llipsum

\newpage

\llipsum[1-4]

\newpage

\llipsum[1-4]

\newpage

\llipsum[1-4]

\newpage

\llipsum[1-4]

\newpage

\llipsum[1-4]

\end{document}