summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xwatermark/doc/xwatermark-examples2.tex
blob: 169904b799166d97c000bbe65edb2ad2292fa475 (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
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% This is file 'xwatermark-examples2.tex', version 1.5.2d.                   %
%                                                                            %
% 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-2012 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}
\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
]{\ttcl{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=l-t,
  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\ttcl{red}{\string\knowledge}%
  \string\by\ttcl{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
]{\ttcl{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#2{%
  \newwatermark[%
    pages=6-7,fontfamily=pbk,textcolor=gray!35,fontsize=12pt,fontseries=n,
    textalign=center,textangle=#2,textscale=1,textxpos=#1,textypos=0,
    width=\paperheight
  ]{%
    \xwmcolorbox[framesep=5pt,framerule=2pt,fillcolor=teal,
      innerframecolor=magenta,outerframecolor=green,
      textalign=center,width=.98\paperheight]%
      {%
        \color{white}\framebox[2cm][t]{\phantom{Hello}}\hspace{1cm}%
        \color{orange!85!red!55}\ttcl{red}{$\blacktriangleright$}%
        \hspace{2.1cm}Page \thepage~of~\pageref{xwmlastpage}%
        \hspace{2.1cm}\ttcl{red}{$\blacktriangleleft$}\hspace{1cm}%
        \color{white}\framebox[2cm][t]{\phantom{Hello}}%
        \xwmstrut{9mm}{6mm}%
    }%
  }%
}

\begin{ltscomment}
The same watermark is placed twice on the same page.
Compare this with one of the examples in  xwatermark-examples1.tex:
\end{ltscomment}

\usecsn{watermark-2a}{-.428\paperwidth}{90}
\usecsn{watermark-2a}{.428\paperwidth}{-90}

\begin{ltscomment}
Here is an inefficient example. \scalebox and \rotatebox
could have been more efficiently achieved in the following
example:
\end{ltscomment}
\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\ttcl{white}{\char`\\advance}%
      \ttcl{red}{\string\knowledge}%
      \string\by\ttcl{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{\ttcl{blue}{xwatermark}} Package
  \xcopyright{red}\\[1ex]
  \large Version 1.5.2d\\[2ex]
  \Large EXAMPLES (File 2)%
}
\author{%
  \textbf{Ahmed Musa}\\Preston, United Kingdom\\
  \email{amusa22@gmail.com}
}
\maketitle
\thispagestyle{empty}

\newpage

\ltslipsum[1-4]

\ltslipsum

\newpage

\ltslipsum[1-4]

\newpage

\ltslipsum[1-4]

\newpage

\ltslipsum[1-4]

\newpage

\ltslipsum[1-4]

\newpage

\ltslipsum[1-4]

\end{document}