summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-01-13 00:04:39 +0000
committerKarl Berry <karl@freefriends.org>2010-01-13 00:04:39 +0000
commit8ef4b34298b082adaed9714c182beb730e8aafeb (patch)
treee8983a766e40bb6185850d1506e57dde7ad447d4
parentbf3ee8e4da13507d79b5af06868c9a3b1eb456db (diff)
xwatermark update (12jan10)
git-svn-id: svn://tug.org/texlive/trunk@16691 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/Graphics/xwatermarkpic.tex107
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/README13
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-bugreport-1dot4.tex30
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot4.pdf (renamed from Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot3.pdf)bin182246 -> 182125 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot4.tex (renamed from Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot3.tex)59
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.pdfbin262885 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.cfg (renamed from Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.cfg)121
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.pdfbin0 -> 255156 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.tex (renamed from Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.tex)158
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-manifest-1dot4.tex17
-rw-r--r--Master/texmf-dist/tex/latex/xwatermark/keyreader.sty113
-rw-r--r--Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty247
12 files changed, 453 insertions, 412 deletions
diff --git a/Master/texmf-dist/doc/latex/xwatermark/Graphics/xwatermarkpic.tex b/Master/texmf-dist/doc/latex/xwatermark/Graphics/xwatermarkpic.tex
new file mode 100644
index 00000000000..c4b62a2cf8f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xwatermark/Graphics/xwatermarkpic.tex
@@ -0,0 +1,107 @@
+\documentclass[12pt,a4paper]{article}
+\usepackage{epic,pict2e,eepic,pstricks,curve2e}
+\begin{document}
+\setlength{\unitlength}{1mm}
+ \begin{picture}(60,40)
+ \color{cyan}
+ \put(20,30){\circle{1}}
+ \put(20,30){\circle{3}}
+ \put(20,30){\circle{6}}
+ \put(20,30){\circle{9}}
+ \put(20,30){\circle{12}}
+ \put(20,30){\circle{15}}
+ \put(20,30){\circle{18}}
+ \put(20,30){\circle{21}}
+ \put(20,30){\circle{24}}
+ \put(20,30){\circle{27}}
+ \put(20,30){\circle{30}}
+ \put(20,30){\circle{33}}
+ \put(20,30){\circle{36}}
+ \put(20,30){\circle{39}}
+ \put(20,30){\circle{42}}
+ \color{brown}
+ \put(30,30){\circle{1}}
+ \put(30,30){\circle{2}}
+ \put(30,30){\circle{3}}
+ \put(30,30){\circle{4}}
+ \put(30,30){\circle{5}}
+ \put(30,30){\circle{6}}
+ \put(30,30){\circle{7}}
+ \put(30,30){\circle{8}}
+ \put(30,30){\circle{9}}
+ \put(30,30){\circle{10}}
+ \put(30,30){\circle{11}}
+ \put(30,30){\circle{12}}
+ \put(30,30){\circle{13}}
+ \put(30,30){\circle{14}}
+ \put(30,30){\circle{15}}
+ \put(30,30){\circle{16}}
+ \put(30,30){\circle{17}}
+ \put(30,30){\circle{18}}
+ \put(30,30){\circle{19}}
+ \put(30,30){\circle{20}}
+ \color{magenta}
+ \put(10,30){\circle{1}}
+ \put(10,30){\circle{2}}
+ \put(10,30){\circle{3}}
+ \put(10,30){\circle{4}}
+ \put(10,30){\circle{5}}
+ \put(10,30){\circle{6}}
+ \put(10,30){\circle{7}}
+ \put(10,30){\circle{8}}
+ \put(10,30){\circle{9}}
+ \put(10,30){\circle{10}}
+ \put(10,30){\circle{11}}
+ \put(10,30){\circle{12}}
+ \put(10,30){\circle{13}}
+ \put(10,30){\circle{14}}
+ \put(10,30){\circle{15}}
+ \put(10,30){\circle{16}}
+ \put(10,30){\circle{17}}
+ \put(10,30){\circle{18}}
+ \put(10,30){\circle{19}}
+ \put(10,30){\circle{20}}
+ \color{orange}
+ \put(20,20){\circle{1}}
+ \put(20,20){\circle{2}}
+ \put(20,20){\circle{3}}
+ \put(20,20){\circle{4}}
+ \put(20,20){\circle{5}}
+ \put(20,20){\circle{6}}
+ \put(20,20){\circle{7}}
+ \put(20,20){\circle{8}}
+ \put(20,20){\circle{9}}
+ \put(20,20){\circle{10}}
+ \put(20,20){\circle{11}}
+ \put(20,20){\circle{12}}
+ \put(20,20){\circle{13}}
+ \put(20,20){\circle{14}}
+ \put(20,20){\circle{15}}
+ \put(20,20){\circle{16}}
+ \put(20,20){\circle{17}}
+ \put(20,20){\circle{18}}
+ \put(20,20){\circle{19}}
+ \put(20,20){\circle{20}}
+ \color{green}
+ \put(20,40){\circle{1}}
+ \put(20,40){\circle{2}}
+ \put(20,40){\circle{3}}
+ \put(20,40){\circle{4}}
+ \put(20,40){\circle{5}}
+ \put(20,40){\circle{6}}
+ \put(20,40){\circle{7}}
+ \put(20,40){\circle{8}}
+ \put(20,40){\circle{9}}
+ \put(20,40){\circle{10}}
+ \put(20,40){\circle{11}}
+ \put(20,40){\circle{12}}
+ \put(20,40){\circle{13}}
+ \put(20,40){\circle{14}}
+ \put(20,40){\circle{15}}
+ \put(20,40){\circle{16}}
+ \put(20,40){\circle{17}}
+ \put(20,40){\circle{18}}
+ \put(20,40){\circle{19}}
+ \put(20,40){\circle{20}}
+ \end{picture}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/xwatermark/README b/Master/texmf-dist/doc/latex/xwatermark/README
index f6a33bb5d7b..2c44eda0933 100644
--- a/Master/texmf-dist/doc/latex/xwatermark/README
+++ b/Master/texmf-dist/doc/latex/xwatermark/README
@@ -1,4 +1,4 @@
-This is the README file for 'xwatermark' package, version 1.3.
+This is the README file for 'xwatermark' package, version 1.4.
This package puts user-specified watermarks (graphics and arbitrary texts)
on select pages of documents. It is more general than the packages
@@ -17,10 +17,11 @@ specify watermark properties for each page or range of pages. With the
'xcolor' package (loaded by this package), all colors and those defined
within the user document can be passed to this package.
-This work 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 in http://www.latex-project.org/lppl.txt and version 1.3 or later
+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 (LPPL), either version 1.3 of this license or
+any later version. The latest version of this license is in
+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'.
@@ -30,6 +31,6 @@ kind, either expressed or implied, including, but not limited to,
the implied warranties of merchantability and fitness for a
particular purpose.
-Copyright (c) 2009 Ahmed Musa (a.musa@rocketmail.com).
+Copyright (c) 2010 Ahmed Musa (a.musa@rocketmail.com).
End of README file. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-bugreport-1dot4.tex b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-bugreport-1dot4.tex
new file mode 100644
index 00000000000..1689ccb25ef
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-bugreport-1dot4.tex
@@ -0,0 +1,30 @@
+%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
+% This is file xwatermark-bugreport.tex, the bug report file for the %
+% xwatermark package, version 1.4. %
+% %
+% (c) Ahmed Musa 2010 (a.musa@rocketmail.com) %
+%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
+% %
+% IMPORTANT %
+% %
+% Fill in the details below, compile the file and email the %
+% sample file, the log file, and the auxiliary file to %
+% a.musa@rocketmail.com. %
+% Thank you %
+% %
+%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
+\documentclass{article}
+\listfiles
+\usepackage[logonly]{trace}
+\traceon
+%\usepackage[Put your options here]{xwatermark}
+% Load your select packages here:
+% Provide other elements of your preamble here:
+\traceoff
+\begin{document}
+\traceon
+% Provide sample text here:
+
+
+\traceoff
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot3.pdf b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot4.pdf
index 91fc2ef72ee..92033fb5808 100644
--- a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot3.pdf
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot4.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot3.tex b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot4.tex
index da27ab7eacf..669457b6437 100644
--- a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot3.tex
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-examples-1dot4.tex
@@ -1,17 +1,17 @@
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% This is file xwatermark-examples.tex, which demonstrates the use %
-% of the xwatermark package, version 1.3. %
+% of the xwatermark package, version 1.4. %
% %
-% (c) Ahmed Musa 2009 %
+% (c) Ahmed Musa 2010 %
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\documentclass[a4paper,11pt,final]{article}
\InputIfFileExists{xwatermark-guide.cfg}{}{%
\errmessage{No file xwatermark-guide.cfg or wrong path}}
\begin{document}
\MakeShortVerb{\+}
-\title{\bfseries The \texttt{\TC{blue}{xwatermark}}
+\title{\bfseries The \texttt{\textcolor{blue}{xwatermark}}
\xcopyright{Package}{red}\\[1ex]
- \large Version 1.3\\[2ex]
+ \large Version 1.4\\[2ex]
\Large EXAMPLES}
\author{Ahmed Musa\\[1ex]University of Central Lancashire\\
Preston PR1 2HE, United Kingdom\\[1ex]
@@ -21,8 +21,7 @@
\pagestyle{fancyplain}
\watermarksetup{fontfamily=bch,color=magenta!60!blue!25,align=center,
- angle=45,scale=0.7,xcoord=0,ycoord=0,
- textmark=\xtempd
+ angle=45,scale=0.7,xcoord=0,ycoord=0,textmark=\xtempd
}
\section{Introduction}
@@ -64,12 +63,11 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
\xwcolorbox{framesep=5pt,framerule=6pt,fillcolor=yellow,
textcolor=white,align=center,width=.9\paperwidth,
text={New\\[.25ex]
- \color{green}\framebox[1.1\width]{\TC{white}{Systems}}
- \\[.25ex]\color{white}Department}
- }
- }
+ \color{green}\framebox[1.1\width]{\textcolor{white}{Systems}}%
+ \\[.25ex]\color{white}Department}%
+ }%
+ }%
}
-
\newpage
\lipsum[1-4]
\watermarksetup{fontfamily=pbk,color=gray!35,fontsize=3cm,fontseries=b,
@@ -78,7 +76,7 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
\xwminipage{width=\paperwidth,align=center,textcolor=gray!35,
framesep=4pt,framerule=4pt,framecolor=green,
text={\raggedright\textcolor{blue!65}{Restricted}\\[.25ex]\hfill Document
- }}}
+ }}}%
}
\newpage
@@ -88,18 +86,19 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
textmark={%
\xwminipage{framesep=15pt,framerule=6pt,framecolor=orange,
width=1.2\textheight,align=center,textcolor=gray!35!red,
- text={\raggedright{\color{blue!65}Restricted}\\[.25ex]\hfill Document}
- }}
+ text={\raggedright{\color{blue!65}Restricted}\\[.25ex]\hfill Document}%
+ }}%
}
\newpage
\lipsum[1-4]
\watermarksetup{fontfamily=bch,color=purple!70,
width=\paperheight,angle=45,fontsize=5cm,scale=.7,xcoord=-30,ycoord=7,
- textmark={\fboxsep=15pt\fboxrule=6pt\hspace{.5cm}
- \fbox{\TC{orange!85}{@}}
- \\[.25ex]\fboxsep=15pt\fboxrule=16pt\color{cyan}
- \fbox{\TC{red!85}{Intel}\TC{orange!85}{BiZ}\TC{red!45}{Forum}}}
+ textmark={\fboxsep=15pt\fboxrule=6pt\hspace{.5cm}%
+ \fbox{\textcolor{orange!85}{@}}%
+ \\[.25ex]\fboxsep=15pt\fboxrule=16pt\color{cyan}%
+ \fbox{\textcolor{red!85}{Intel}\textcolor{orange!85}{BiZ}%
+ \textcolor{red!45}{Forum}}}%
}
\newpage
@@ -107,7 +106,7 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
\fboxsep=5pt\fboxrule=4pt
\watermarksetup{fontfamily=cmss,angle=90,fontsize=5cm,fontseries=bx,
scale=.8,align=center,color=red!75!blue!25,xcoord=-65,ycoord=0,
- textmark={=\fbox{\color{red!65}Official}=\\[.25ex]Document}
+ textmark={=\fbox{\color{red!65}Official}=\\[.25ex]Document}%
}
\newpage
@@ -118,7 +117,7 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
textmark={%
\xwminipage{framesep=10pt,framerule=6pt,framecolor=yellow,
width=1.3\textheight,align=center,
- text={\color{red!55}Control\\[3.4ex]\color{violet!55}Version}
+ text={\color{red!55}Control\\[3.4ex]\color{violet!55}Version}%
}
}
}
@@ -131,8 +130,8 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
textmark={%
\xwcolorbox{width=\paperheight,fillcolor=cyan!50!blue!25,textcolor=blue,
framesep=10pt,framerule=6pt,text=PENDING%
- }
- }
+ }%
+ }%
}
\newpage
@@ -144,23 +143,23 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
{\color{purple!55}\fbox{\color{xyellow3}%
\fbox{\textcolor{red}{Unrestricted}}}}\\[.25ex]
\color{xyellow3}For General\\[.25ex] Circulation
- }}}}
+ }}}}%
}
\newpage
\lipsum[1-4]
\watermarksetup{showcenter,fontfamily=txtt,fontseries=m,color=red,
align=center,scale=0.7,angle=0,xcoord=0,ycoord=0,
- textmark={
+ textmark={%
\xwminipage{width=\paperwidth,text={%
\xwminipage{width=\paperwidth,align=left,textcolor=magenta,
- text={\TeX\\[.1ex] \LaTeX}}
+ text={\TeX\\[.1ex] \LaTeX}}%
\\[1ex]
\xwminipage{width=\paperwidth,align=center,textcolor=green,
- text={\TeX\\[.1ex] \LaTeX}}
+ text={\TeX\\[.1ex] \LaTeX}}%
\\[1ex]
\xwminipage{width=\paperwidth,align=right,textcolor=orange,
- text={\TeX\\[.1ex] \LaTeX}}
+ text={\TeX\\[.1ex] \LaTeX}}%
}}}
}
@@ -173,8 +172,10 @@ The remaining options can be set dynamically using the +\watermarksetup+ macro.
\xwminipage{width={0.6\textwidth},textcolor=black,align=left,
text={\sffamily
This text was placed here using the \stya{xwatermark} package.
- One of the wonders of \TC{red}{\TeX}\bfseries{!}
- }}}}
+ The wonders of \textcolor{red}{\TeX}\bfseries{!}%
+ }}}}%
}
\end{document}
+
+%%% End of file xwatermark-examples.tex %%%
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.pdf b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.pdf
deleted file mode 100644
index 7ec85f8665c..00000000000
--- a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.cfg b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.cfg
index 163a2627129..c1bab2cf13f 100644
--- a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.cfg
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.cfg
@@ -1,14 +1,13 @@
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% This is file xwatermark-guide.cfg, the configuration file for %
% the files xwatermark-guide.tex and xwatermark-examples.tex, %
-% version 1.3. %
+% version 1.4. %
% %
-% (c) Ahmed Musa 2009 (a.musa@rocketmail.com) %
+% (c) Ahmed Musa 2010 (a.musa@rocketmail.com) %
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\ProvidesFile{xwatermark-guide.cfg}%
- [2009/10/20 v1.3 Configuration file for xwatermark-guide.tex]
+ [2010/01/10 v1.4 Configuration file for xwatermark-guide.tex (AM)]
\NeedsTeXFormat{LaTeX2e}
-\usepackage{xkvltxp}
\usepackage[left=3cm,right=3cm]{geometry}
\usepackage[scaled=0.9]{helvet}
\usepackage{lettrine}
@@ -54,22 +53,21 @@
\fboxrule.5pt\fboxsep3pt\fcolorbox{red!65}{yellow!25}{%
\upshape\expandafter\csname the#1\endcsname}\kern1em%
}
-\makeatother
-\new\let\TC\textcolor
\xglobal\definecolorset{rgb}{x}{1}{green,0.00,0.50,0.00;%
magenta,0.50,0.00,0.50;blue,0.50,0.00,1.00;purple,0.50,0.00,0.25}
\colorlet{xyellow2}{brown!25!yellow!75}
\colorlet{xyellow3}{magenta!10!yellow!85}
-\date{\TC{purple}{\today}\vadjust{\kern2ex\hrule}}
+\date{\textcolor{purple}{\today}\vadjust{\kern2ex\hrule}}
\renewcommand*\reftextcurrent{on this page}
\newcommand*\nTeX{\TeX\xspace}
\newcommand*\nLaTeX{\LaTeX\xspace}
-\newcommand*\La{\leavevmode L\raise.42ex\hbox{\footnotesize\kern-.45em A}}
-\newcommand*\texorlatex{\mbox{(\La\kern-.20em)\kern-.15em\TeX}\xspace}
-\newcommand*\Xe{\leavevmode X\raise.45em\hbox{\rotatebox{180}{E}}\xspace}
-\def\XeTeX{\mbox{\Xe\kern-.45em\TeX}\xspace}
-\def\XeLaTeX{\mbox{\Xe\kern-.45em(\La\kern-.45em)\kern-.15em\TeX}\xspace}
-\def\pdfTeX{pdf\TeX\xspace}
+\def\La{\leavevmode L\raise.42ex\hbox{\footnotesize\kern-.35em A}}
+\newcommand*\TeXorLaTeX{\hbox{(\/\La\kern-.15em\/)\kern-.1em\TeX}}
+\newcommand*\TeXL{\TeXorLaTeX\xspace}
+\newcommand*\Xe{\leavevmode X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}}
+\def\XeTeX{\mbox{\Xe\kern-.1667em\TeX}\xspace}
+\def\XeLaTeX{\mbox{\Xe\kern-.15em\TeXorLaTeX}}
+\def\pdfTeX{pdf\nTeX}
\renewcommand{\LettrineFontHook}{\bfseries\gothfamily\color{red}}
\renewcommand{\LettrineTextFont}{\sffamily\scshape}
\def\lettrineops{lines=2,lhang=0.1,loversize=0.1,lraise=0.1,%
@@ -77,18 +75,21 @@
\def\lletter{\begingroup\edef\1{\endgroup\noexpand\lettrine[\lettrineops]}\1}
\def\bibfont{\normalfont\small}
\newcommand*\helv{\fontfamily{phv}\selectfont\color{xpurple1}}
-\def\eg{e.g.\xspace}
-\def\ie{i.e.\xspace}
-\def\etc{etc.\xspace}
+\def\eg{\@ifnextchar.{e.g}{e.g.}\xspace}
+\def\ie{\@ifnextchar.{i.e}{i.e.}\xspace}
+\def\etc{\@ifnextchar.{etc}{etc.}\xspace}
\newcommand*\email[1]{\href{mailto:#1}{#1}}
-\newrobustcmd*\stya[1]{\TC{xgreen1}{\texttt{#1}}\xspace}
-\newrobustcmd*\styb[1]{\TC{teal}{\texttt{#1}}\xspace}
-\newrobustcmd*\cmda[1]{\escapechar=92\TC{xgreen1}{\ttfamily\string#1}\xspace}
-\newrobustcmd*\cmdb[1]{\escapechar=92\TC{teal}{\texttt{\string#1}}\xspace}
-\newrobustcmd*\usepackxwm{\cmda{\usepackage\{xwatermark\}}}
-\newrobustcmd*\dclass{\cmdb{\documentclass}}
-\newrobustcmd*\wmsetup{\cmda{\watermarksetup}}
-\newrobustcmd*\xcopyright[2]{#1\TC{#2}{\textsuperscript{\copyright}}\xspace}
+\newrobustcmd*\stya[1]{\textcolor{xgreen1}{#1}\xspace}
+\newrobustcmd*\styb[1]{\textcolor{teal}{#1}\xspace}
+\newrobustcmd*\cmda[1]{\textcolor{xgreen1}{\textbackslash#1}\xspace}
+\newrobustcmd*\cmdb[1]{\textcolor{teal}{\textbackslash#1}\xspace}
+\newrobustcmd*\usepackxwm{\cmda{usepackage\{xwatermark\}}}
+\newrobustcmd*\dclass{\cmdb{documentclass}}
+\newrobustcmd*\wmsetup{\cmda{watermarksetup}}
+\def\copyrightyear{\copyright~\uppercase\expandafter{\romannumeral\year}\xspace}
+\def\colorbullet#1{\textcolor{#1}{\textbullet}\xspace}
+\newrobustcmd*\xcopyright[2]{%
+ \leavevmode#1\textcolor{#2}{\textsuperscript{\copyright}}\xspace}
\newrobustcmd*\XWM{\stya{\bf\textbackslash watermarksetup}\xspace}
\newrobustcmd*\DCL{\stya{\bf\textbackslash documentclass}\xspace}
\newrobustcmd*\XWCB{\stya{\bf\textbackslash xwcolorbox}\xspace}
@@ -98,7 +99,7 @@
\CustomVerbatimEnvironment{xwverbatim}{Verbatim}{numbers=left,
numberblanklines=false,firstnumber=last,frame=single,rulecolor=\color{xyellow2},
framerule=2pt,framesep=2pt, fillcolor=\color{violet!55},formatcom=\color{blue},
- xrightmargin=0pc,commandchars=\|\(\),commentchar=\#}
+ xrightmargin=0pc,commandchars=\|\(\),commentchar=\&}
\renewcommand\textfraction{0.05}
\renewcommand\topfraction{0.95}
\renewcommand\bottomfraction{0.95}
@@ -110,8 +111,8 @@
\abovecaptionskip=6pt plus3pt minus1pt
\setcounter{totalnumber}{5}
\fancyhf{}
-\fancyhfoffset[R,L]{\marginparsep+\marginparwidth}
-\lhead{\helv The \texttt{\TC{blue}{xwatermark}} Package}
+\fancyhfoffset[R,L]{\dimexpr\marginparsep+\marginparwidth\relax}
+\lhead{\helv The \texttt{\textcolor{blue}{xwatermark}} Package}
\rhead{\helv Page~\thepage~of~\pageref*{LastPage}}
\renew\def\headrule{\color{blue}\hrule height1pt width\headwidth\relax
\vspace{2pt}\hrule height1pt width\headwidth\vspace{-2pt}}
@@ -121,51 +122,49 @@
\xwcolorbox{fillcolor=gray!55,width=\paperheight,align=center,
framesep=5pt,framerule=2pt,framecolor=white,%
text={\color{white}\framebox[2cm][c]{\phantom{Hello}}\hspace{1cm}\color{black}%
- \TC{red}{\textbullet}\hspace{1cm}The marks on these pages were placed effortlessly
- by using the \TC{blue}{xwatermark} package\hspace{1cm}%
- \TC{red}{\textbullet}\hspace{1cm}\color{white}\framebox[2cm][c]{\phantom{Hello}}%
+ \textcolor{red}{\textbullet}\hspace{1cm}The marks on these pages were placed effortlessly
+ by using the \textcolor{blue}{xwatermark} package\hspace{1cm}%
+ \textcolor{red}{\textbullet}\hspace{1cm}\color{white}\framebox[2cm][c]{\phantom{Hello}}%
\rotatebox[origin=c]{90}{\makebox[1.4cm][c]{\phantom{Hello}}}%
}}\\[0cm]%
\rotatebox[origin=c]{-90}{\raisebox{-13.8cm}[0cm][0cm]{%
- \hspace*{-1.2mm}%
- \xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=yellow!75,
- framecolor=white,align=center,width=.81\paperwidth,%
+ \hspace*{-.1mm}%
+ \xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=yellow!75,framecolor=white,
+ align=center,width=.81\paperwidth,%
text={%
\color{white}\framebox[2cm][c]{\phantom{Hello}}\hspace{1cm}\color{black}%
- \TC{red}{\textbullet}%
+ \textcolor{red}{\textbullet}%
\hspace{1cm}Page~\thepage~of~\pageref*{LastPage}\hspace{1cm}%
- \TC{red}{\textbullet}\hspace{1cm}%
+ \textcolor{red}{\textbullet}\hspace{1cm}%
\color{white}\framebox[2cm][c]{\phantom{Hello}}%
\rotatebox[origin=c]{90}{\makebox[1.4cm][c]{\phantom{Hello}}}%
}}}}\\[0cm]%
- \rotatebox[origin=c]{-90}{\raisebox{13.6cm}[0cm][0cm]{%
- \hspace*{-.12mm}%
- \makebox[0cm][r]{%
+ \rotatebox[origin=c]{-90}{\raisebox{13.45cm}[0cm][0cm]{\makebox[0cm][r]{%
\xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=yellow!55,framecolor=white,
align=justified,width=.81\paperwidth,%
- text={\normalfont\small\\[\baselineskip]\color{xblue1}%
- Copyright (c) 2009 Ahmed Musa \TC{red}{\textbullet}~%
- This work may be distributed and/or modified for non-commercial purposes only.
- The LPPL maintenance status of this software is \emph{author-maintained}.
+ text={\normalfont\small\color{blue}\vspace*{-1ex}%
+ \begin{center}\colorbullet{red}\copyrightyear Ahmed Musa \colorbullet{red}\end{center}%
+ This work (i.e., all the files in the \stya{xwatermark} manifest) may be distributed and/or modified under the conditions of the \LaTeX\ Project Public License (LPPL), either version 1.3 of this license or any later version.
+ 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.
}}}}}%
\\[0cm]%
\xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=gray!55,framecolor=white,
- align=center,width=\paperheight,%
+ align=center,width=\paperheight,
text={%
\color{white}\framebox[2cm][c]{\phantom{Hello}}\hspace{1cm}\color{black}%
- \TC{red}{\textbullet}%
- \hspace{4.3cm}User manual for the \TC{blue}{xwatermark} package\hspace{4.3cm}%
- \TC{red}{\textbullet}\hspace{1cm}%
+ \textcolor{red}{\textbullet}%
+ \hspace{4.3cm}User manual for the \textcolor{blue}{xwatermark} package\hspace{4.3cm}%
+ \textcolor{red}{\textbullet}\hspace{1cm}%
\color{white}\framebox[2cm][c]{\phantom{Hello}}%
- \rotatebox[origin=c]{90}{\makebox[1.4cm][c]{\phantom{Hello}}}
- }}
+ \rotatebox[origin=c]{90}{\makebox[1.4cm][c]{\phantom{Hello}}}%
+ }}%
}%
\new\long\def\xtempb{%
\centering\xwcolorbox{align=center,fillcolor=white,width=.5\hsize,
- text={\bfseries Abstract}}\\[1ex]
+ text={\bfseries Abstract}}\\[1ex]%
The \stya{xwatermark} package enables the user to effortlessly put customized text and graphic watermarks on select pages of documents at desired positions and orientations. The features of the individual watermarks are specified by means of user-friendly key-value interfaces.
}
\new\long\def\xtempc{%
@@ -173,28 +172,29 @@
framesep=5pt,framerule=2pt,framecolor=magenta,
text={\color{white}\framebox[2cm][t]{\phantom{Hello}}%
\hspace{1cm}\color{orange!85!red!55}%
- \TC{red}{$\blacktriangleright$}\hspace{1cm}The \texttt{\TC{white}{xwatermark}}~
- package\hspace{1cm}\TC{red}{$\blacktriangleleft$}\hspace{1cm}\color{white}%
+ \textcolor{red}{$\blacktriangleright$}\hspace{1cm}The~%
+ \texttt{\textcolor{white}{xwatermark}}~%
+ package\hspace{1cm}\textcolor{red}{$\blacktriangleleft$}\hspace{1cm}\color{white}%
\framebox[2cm][t]{\phantom{Hello}}%
\rotatebox[origin=c]{90}{\makebox[1.4cm][c]{\phantom{Hello}}}%
}}\\[0cm]%
\rotatebox[origin=c]{-90}{\raisebox{-14.35cm}[0cm][0cm]{%
- \hspace*{-1.2mm}%
- \xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=red!75,framecolor=white,
+ \hspace*{-.1mm}%
+ \xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=red!75!blue!45,framecolor=white,
align=center,width=.81\paperwidth,%
text={a.musa@rocketmail.com},textcolor=white}}}%
\\[0cm]%
\rotatebox[origin=c]{-90}{\raisebox{14.34cm}[0cm][0cm]{%
\makebox[0cm][r]{%
- \xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=red!55,framecolor=white,
+ \xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=green!75!blue!50,framecolor=white,
align=center,width=.81\paperwidth,textcolor=white,
- text={Copyright (c) 2009 Ahmed Musa}%
+ text={\copyrightyear Ahmed Musa}%
}}}}\\[0cm]%
\xwcolorbox{framesep=5pt,framerule=2pt,fillcolor=teal,framecolor=magenta,
align=center,width=\paperheight,text={%
\color{white}\framebox[2cm][t]{\phantom{Hello}}\hspace{1cm}\color{orange!85!red!55}%
- \TC{red}{$\blacktriangleright$}\hspace{2.1cm}Page~\thepage~of~\pageref*{LastPage}%
- \hspace{2cm}\TC{red}{$\blacktriangleleft$}\hspace{1cm}%
+ \textcolor{red}{$\blacktriangleright$}\hspace{2.1cm}Page~\thepage~of~\pageref*{LastPage}%
+ \hspace{2cm}\textcolor{red}{$\blacktriangleleft$}\hspace{1cm}%
\color{white}\framebox[2.1cm][t]{\phantom{Hello}}%
\rotatebox[origin=c]{90}{\makebox[1.4cm][c]{\phantom{Hello}}}%
}}%
@@ -202,10 +202,13 @@
\newcommand\xtempd{%
\xwcolorbox{framesep=5pt,framerule=2pt,framecolor=blue!35,
align=center,width=\paperheight,textcolor=magenta!60!blue!25,
- text={Hello world,}}
+ text={Hello world,}}%
\\[.25ex]%
\xwcolorbox{framesep=5pt,framerule=2pt,framecolor=white,
fillcolor=brown!55,align=center,width=\paperheight,
textcolor=red!45,text={We're here}}%
}
-\endinput \ No newline at end of file
+\makeatother
+\endinput
+
+%%% End of file xwatermark.cfg %%% \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.pdf b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.pdf
new file mode 100644
index 00000000000..38a07294461
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.tex b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.tex
index 280fe75c114..e665403dd1c 100644
--- a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot3.tex
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide-1dot4.tex
@@ -1,11 +1,11 @@
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% This is file xwatermark-guide.tex, the documentation for the %
-% xwatermark package, version 1.3. %
+% xwatermark package, version 1.4. %
% %
-% (c) Ahmed Musa 2009 (a.musa@rocketmail.com) %
+% (c) Ahmed Musa 2010 (a.musa@rocketmail.com) %
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\documentclass[a4paper,11pt,final]{article}
-\InputIfFileExists{xwatermark-guide.cfg}{}{%
+\InputIfFileExists{xwatermark-guide-1dot4.cfg}{}{%
\errmessage{No file xwatermark-guide.cfg or wrong path}}
\begin{document}
\MakeShortVerb{\+}
@@ -15,11 +15,11 @@
}
\label{page:one}
-\title{\bfseries The \texttt{\TC{blue}{xwatermark}}
+\title{\bfseries The \texttt{\textcolor{blue}{xwatermark}}
\xcopyright{Package}{red}\kern-.25em\FootnoteB{\ding{'111}}{The \stya{xwatermark}
bundle is available at the Comprehensive \nTeX Archive Network
\citeurl{http://tug.ctan.org/tex-archive/macros/latex/contrib/xwatermark}}
- \\[1ex]\large Version 1.3
+ \\[1ex]\large Version 1.4
}
\author{Ahmed Musa\\[1ex]University of Central Lancashire\\
Preston PR1 2HE, United Kingdom\\[1ex]
@@ -27,7 +27,7 @@
}
\xmaketitle[empty]
-\ywcolorbox{framesep=5pt,framerule=2pt,framecolor=red!55,
+\ywcolorbox{framesep=5pt,framerule=2pt,framecolor=red!55!brown,
align=justified,fillcolor=gray!25,width=\hsize,
text=\xtempb
}
@@ -42,11 +42,11 @@
\section{Introduction}
-\lletter{T}{his package} puts user-specified watermarks, pictures and/or arbitrary texts on select pages of documents. It has more functionality and dynamism than, for example, the packages \styb{draftcopy}~\cite{JVollmer2002}, \styb{draftwatermark}~\cite{SCallegari2006}, \styb{watermark}~\cite{ARozhenko2004}, and \styb{draftmark}~\cite{AMusa2009}. The advantages of \stya{xwatermark} package over these earlier packages include: both text and graphic watermarks are admissible; the user can specify his/her own watermark and color, the watermark position, orientation, the page(s) (all pages, odd pages, even pages, a particular page, and a range of pages) on which the watermark should appear; and all the options are passed directly to the package instead of being defined in the source file by several macros. Moreover, all these options can be customized for individual pages and segments of the document. This is achieved by the provision of the user-friendly \wmsetup macro, by which the user can dynamically set the watermark properties for each page or range of pages. The user is relieved of the need to remember and deploy several macros.
+\lletter{T}{his package} puts user-specified watermarks, pictures and/or arbitrary texts on select pages of documents. It has more functionality and dynamism than, for example, the packages \styb{draftcopy}, \styb{draftwatermark}, \styb{watermark}, and \styb{draftmark}\footnote{ These and other packages are available at the TUG CTAN website (\url{http://tug.ctan.org/cgi-bin/}).}. The advantages of \stya{xwatermark} package over these earlier packages include: both text and graphic watermarks are admissible; the user can specify his/her own watermark and color, the watermark position, orientation, the page(s) (all pages, odd pages, even pages, a particular page, and a range of pages) on which the watermark should appear; and all the options are passed directly to the package instead of being defined in the source file by several macros. Moreover, all these options can be customized for individual pages and segments of the document. This is achieved by the provision of the user-friendly \wmsetup macro, by which the user can dynamically set the watermark properties for each page or range of pages. The user is relieved of the need to remember and deploy several macros.
With the \styb{xcolor} package (loaded by this package), all colors (including \styb{white}, shades like \styb{-red!75!green!50}, and those defined within the user document) can be passed to this package. And, as mentioned above, both texts and pictures can be submitted as watermarks to the package.
-This package uses Heiko Oberdiek's shipout hooks from the \styb{atbegshi} package~\cite{HOberdiek2008}.
+This package uses Heiko Oberdiek's shipout hooks from the \styb{atbegshi} package.
There are global and local package options. These are listed and explained in Appendix~\ref{sec:PackageOptions}.
@@ -71,9 +71,9 @@ or
textmark=CONFIDENTIAL]{xwatermark}.
\end{xwverbatim}
-By design, the boolean option \stya{printwatermark} should not appear in the macro \wmsetup but in the statement \usepackxwm or in the \dclass options list. It is disabled before \cmdb{\begin\{document\}}.
+By design, the boolean option \stya{printwatermark} should not appear in the macro \wmsetup but in the statement \usepackxwm or in the \dclass options list. It is disabled before \cmdb{begin\{document\}} and any attempt to change it thereafter will trigger an error.
-When boolean options (\eg, \stya{printwatermark} and \stya{allpages}) are passed without values, they are assumed implicitly \stya{true} by the package. The option \stya{printwatermark} may be set (\stya{printwatermark(=true)} or \stya{printwatermark=false}) when invoking the package, within the options list of either \dclass or \usepackxwm. Otherwise, the package will assume it to be \stya{true}.
+When boolean options (\eg, \stya{printwatermark} and \stya{allpages}) are passed without values, they are assumed implicitly \stya{true} by the package. The option \stya{printwatermark} may be set (\stya{printwatermark} or \stya{printwatermark=false}) when invoking the package, within the options list of either \dclass or \usepackxwm. Otherwise, the package will assume it to be \stya{true}.
The \stya{textmark} key applies to text watermarks, for which all the font properties can be selected. It does not apply to graphic watermarks. For graphic watermarks you need the keys: \stya{picfile} (the graphic/picture filename, with its full path but without its extension), and \stya{picfilex} (the file extension). Admissible file extensions are \stya{eps}, \stya{pdf}, \stya{png}, and \stya{jpeg}; they should be submitted without the dot. Additional information is needed (see section~\ref{ssec:Picture-waterma}).
@@ -83,10 +83,10 @@ The following points should be noted about the values of the \stya{textmark} key
\begin{xwverbatim}
textmark={Hello world,\\[.25\baselineskip] We're here},
\end{xwverbatim}
-\item The value of \stya{textmark} may be arbitrary (blocks of) texts or even kernel or package commands, but not filenames on their own (except when submitted within, \eg, \cmdb{\includegraphics}).
-\item If the \stya{textmark}'s value contains one or more commas, then it has to be enclosed in braces (as above), otherwise \texorlatex will report an error. In any case, it is always safer to enclose long mark texts in braces. However, \emph{active characters} need further special treatment (see section~\ref{sec:Active-charact}).
-\item The \stya{width} (=markwidth) should be properly selected to match user's taste and the length of the \stya{textmark}. It may be set to \cmdb{\paperwidth} or \cmdb{\paperheight}, or any arbitrary length. Its default value is preset to \cmdb{\paperheight}. Sometimes it might also be necessary to suitably select the \stya{height} (=markheight), whose default value is \cmdb{\paperwidth}.
-\item If the longest line of a \stya{textmark} is longer than the parameters \cmdb{\paperwidth} and/or \cmdb{\paperheight} (depending on the orientation of the \stya{textmark}), then the \stya{fontsize} and \stya{scale} options will have to be suitably chosen.
+\item The value of \stya{textmark} may be arbitrary (blocks of) texts or even kernel or package commands, but not filenames on their own (except when submitted within, \eg, \cmdb{includegraphics}).
+\item If the \stya{textmark}'s value contains one or more commas, then it has to be enclosed in braces (as above), otherwise \TeXL will report an error. In any case, it is always safer to enclose long mark texts in braces. However, \emph{active characters} need further special treatment (see section~\ref{sec:Active-charact}).
+\item The \stya{width} (=markwidth) should be properly selected to match user's taste and the length of the \stya{textmark}. It may be set to \cmdb{paperwidth} or \cmdb{paperheight}, or any arbitrary length. Its default value is preset to \cmdb{paperheight}. Sometimes it might also be necessary to suitably select the \stya{height} (=markheight), whose default value is \cmdb{paperwidth}.
+\item If the longest line of a \stya{textmark} is longer than \cmdb{paperwidth} and/or \cmdb{paperheight} (depending on the orientation of the \stya{textmark}), then the \stya{fontsize} and \stya{scale} options will have to be suitably chosen.
\end{itemize}
The package boolean option \stya{allpages} in
@@ -99,7 +99,7 @@ firstpage, oddpages, evenpages, page=x, pages=x-x,
\end{xwverbatim}
where \stya{x} means any page number. If you enter, for example, \stya{pages=0-10}, all pages from 1~to 10 will have watermark. On the other hand, an entry like \stya{pages=10-0} will print watermark on page 10 only. If no page-specifying option is given, watermark will appear only on the first page and a warning message will be entered in the transcript file. When passing \stya{page=x} or \stya{pages=x-x} as option to package, don't forget to include the equality sign (\stya{=}), otherwise the option will be ignored by the package and a warning message will logged in the transcript file.
-When setting package options either in \cmdb{\usepackage} or \dclass (or indeed in \wmsetup, \cmda{\xwminipage} or \cmda{\xwcolorbox}), the following points should be noted:
+When setting package options either in \cmdb{usepackage} or \dclass (or indeed in \wmsetup, \cmda{xwminipage} or \cmda{xwcolorbox}), the following points should be noted:
\begin{itemize}
\item Multiple lines are permitted but not blank lines.
\item Extra paces between options and words are ignored.
@@ -150,7 +150,7 @@ or in the \dclass options list:
\usepackage[evenpages]{xwatermark}.
\end{xwverbatim}
-The remaining options can be set dynamically using the \wmsetup macro. These other options can be set for each page, as on the pages of the accompanying file of examples (\stya{xwatermark-examples.tex}). The \wmsetup macro can be used as in
+The remaining options can be set dynamically using the \wmsetup macro. These other options can be set for each page, as on the pages of the accompanying file of examples (\stya{xwatermark-examples.tex}). The macro \wmsetup can be used as in
\begin{xwverbatim}
\watermarksetup{fontfamily=bch,color=gray!25,textmark=DRAFT,
angle=45,scale=0.8,xcoord=0,ycoord=0
@@ -174,7 +174,7 @@ If you follow an option key with an equality sign but without a value, as in, \e
angle=45,scale=0.8,xcoord=0,ycoord=0
},
\end{xwverbatim}
-then there will be no problem but the outcome may be unpredictable, depending on the key that has no value. In the above example, no watermark will be printed (not even the default mark, which is \stya{DRAFT}) because the entry \stya{textmark=} is valid and implies that no watermark should be printed. The absence of fontfamily in \stya{fontfamily=} will compel \texorlatex to use an arbitrary fontfamily that isn't the default (the default fontfamily is \stya{phv} if the key \stya{fontfamily} is not passed, and \stya{cmr} otherwise).
+then there will be no problem but the outcome may be unpredictable, depending on the key that has no value. In the above example, no watermark will be printed (not even the default mark, which is \stya{DRAFT}) because the entry \stya{textmark=} is valid and implies that no watermark should be printed. The absence of fontfamily in \stya{fontfamily=} will compel \TeXL to use an arbitrary fontfamily that isn't the default (the default fontfamily is \stya{phv} if the key \stya{fontfamily} is not passed, and \stya{cmr} otherwise).
\subsection{Emptying the watermarks of some pages}
@@ -183,10 +183,10 @@ If you issue any of the statements
allpages=true, evenpages=true, oddpages=true, pages=x-x,
page=x
\end{xwverbatim}
-together with \stya{printwatermark=true} but you don't want the mark on any particular page, you can simply set \cmda{\watermarksetup\{textmark=\}} or, to the same effect, \cmda{\watermarksetup\{textmark=\{\}\}} on that page. In the case of picture watermarks, you will set \cmda{\watermarksetup\{picfile=\{\}\}}. These both imply that the watermark for that page is empty. This can be useful when transiting from text watermarks to picture watermarks or vice versa. Some examples are available in \stya{xwatermark-examples.tex}, the example source file that shipped with this package.
+together with \stya{printwatermark=true} but you don't want the mark on any particular page, you can simply set \cmda{watermarksetup\{textmark=\}} or, to the same effect, \cmda{watermarksetup\{textmark=\{\}\}} on that page. In the case of picture watermarks, you will set \cmda{watermarksetup\{picfile=\{\}\}}. These both imply that the watermark for that page is empty. This can be useful when transiting from text watermarks to picture watermarks or vice versa. Some examples are available in \stya{xwatermark-examples.tex}, the example source file that shipped with this package.
\subsection{The usefulness of the \stya{\bf white} color}
-If you set \stya{allpages=true} or \stya{evenpages=true} or \stya{oddpages=true} together with \stya{printwatermark=true} but you don't want the mark on any particular page, you can simply enter \stya{color=white} in the \wmsetup on that page. This applies only to text watermarks, as such a declaration has no effect on picture watermarks. This may be convenient in circumstances where you may change your mind as to whether to place a watermark on a particular page or not. In this way you don't have to set \cmda{\watermarksetup\{textmark=\}} or remove (or comment out) the \wmsetup command for that (or indeed any) page.
+If you set \stya{allpages=true} or \stya{evenpages=true} or \stya{oddpages=true} together with \stya{printwatermark=true} but you don't want the mark on any particular page, you can simply enter \stya{color=white} in the \wmsetup on that page. This applies only to text watermarks, as such a declaration has no effect on picture watermarks. This may be convenient in circumstances where you may change your mind as to whether to place a watermark on a particular page or not. In this way you don't have to set \cmda{watermarksetup\{textmark=\}} or remove (or comment out) the \wmsetup command for that (or indeed any) page.
\section{Other aspects of package architecture and use}
@@ -197,7 +197,7 @@ The package is set to inherit the \dclass options, if the options apply to the p
\end{xwverbatim}
and vice versa.
-If you don't need the watermark on any page of your document, simply replace the \stya{printwatermark(=true)} option in \cmdb{\usepackage} or \dclass with the choice \stya{printwatermark=false}. If you have specified \stya{printwatermark(=true)} in the \dclass options list but you still don't need the watermark on any page of your document, then you would have to enter \stya{printwatermark=false} when loading the package.
+If you don't need the watermark on any page of your document, simply replace the \stya{printwatermark(=true)} option in \cmdb{usepackage} or \dclass with the choice \stya{printwatermark=false}. If you have specified \stya{printwatermark(=true)} in the \dclass options list but you still don't need the watermark on any page of your document, then you would have to enter \stya{printwatermark=false} when loading the package.
\subsection{The size of the watermark}
In the case of text watermarks, the size of the watermark is controlled by three parameters, namely, \stya{fontsize}, \stya{fontseries} and \stya{scale}. All can be set dynamically. Their default values are \stya{5cm}, \stya{b} and \stya{1}, respectively. For picture watermarks, the size is determined by \stya{picscale}.
@@ -216,7 +216,7 @@ Acceptable units of length include \styb{mm} (millimeter), \styb{cm} (centimeter
\end{xwverbatim}
\subsubsection{Wrong location of the watermark}
-If you discover that the watermark is wrongly positioned on the page(s) of your document, the chances are that you have submitted wrong coordinates (values of \stya{xcoord} and \stya{ycoord}) to the package or the markwidth (\stya{width}) is not optimal or both reasons. The package does not take responsibility for this and will normally not warn you in this respect. Since the output file provides a direct and simple indication of the occurrence of this error, no attempt has been made in the package to warn users in this regard. If you do not specify the keys \stya{xcoord} and/or \stya{ycoord} at all in the call to the package, their immediate past values will be used by the package. On the other hand, if you list these keys without their values in the call to the package, their default values (\stya{xcoord=0} and \stya{ycoord=0}, which yield the center of paper) will be assumed by the package. The default value of the markwidth is \cmda{\paperheight}.
+If you discover that the watermark is wrongly positioned on the page(s) of your document, the chances are that you have submitted wrong coordinates (values of \stya{xcoord} and \stya{ycoord}) to the package or the markwidth (\stya{width}) is not optimal or both reasons. The package does not take responsibility for this and will normally not warn you in this respect. Since the output file provides a direct and simple indication of the occurrence of this error, no attempt has been made in the package to warn users in this regard. If you do not specify the keys \stya{xcoord} and/or \stya{ycoord} at all in the call to the package, their immediate past values will be used by the package. On the other hand, if you list these keys without their values in the call to the package, their default values (\stya{xcoord=0} and \stya{ycoord=0}, which yield the center of paper) will be assumed by the package. The default value of the markwidth is \cmda{paperheight}.
When the \styb{geometry} package is loaded together with \styb{xwatermark}, page layout scale changes by the \styb{geometry} package may result in the watermarks being positioned wrongly. See section~\ref{sec:Xwatermark:Geometry} for further details.
@@ -227,8 +227,8 @@ The grayness applies to only text watermarks and is chosen according to the sche
It is possible to break text watermarks into lines, as in the following examples:
\begin{xwverbatim}
\watermarksetup{fontfamily=ptm,angle=45,scale=.7,
- textmark=|color(red){Directorate\\[.25ex]Only},align=center|color(blue),color=green,
- xcoord=0,ycoord=0
+ textmark=|color(red){Directorate\\[.25ex]Only},align=center|color(blue),
+ color=green,xcoord=0,ycoord=0
}
\watermarksetup{fontfamily=ptm,angle=45,scale=.8,
@@ -265,7 +265,7 @@ An example is given in the example file (\stya{xwatermark-examples.tex}). If aft
\end{xwverbatim}
\subsection{Active characters}\label{sec:Active-charact}
-Active characters (\ie, those of category 13) can normally be used as values of the \stya{textmark} key in the \usepackxwm statement and in the \wmsetup macro. However, such values cannot be passed via the \dclass. The \styb{xkvltxp} patch package can be used to obviate this problem---as suggested in the \styb{xkeyval} package documentation. That is, the following should work:
+Active characters (\ie, those of category 13) can normally be used as values of the \stya{textmark} key in the \wmsetup macro. However, such values cannot be passed via the \dclass or the \usepackxwm statement. The \styb{xkvltxp} package (or \styb{kvoptions-patch} package) can be used to obviate this problem. That is, the following should work:
\begin{xwverbatim}
\RequirePackage{xkvltxp}
@@ -276,7 +276,7 @@ Active characters (\ie, those of category 13) can normally be used as values of
\end{document}
\end{xwverbatim}
-To pass active characters and expandable commands as values of \stya{textmark} to the \stya{xwatermark} package, it is necessary to first load the \styb{xkvltxp} package as above, or as follows:
+To pass active characters and expandable commands as values of \stya{textmark} to the \stya{xwatermark} package via \usepackxwm, it is necessary to first load the \styb{xkvltxp} package as above, or as follows:
\begin{xwverbatim}
\documentclass{class-type}
@@ -313,16 +313,16 @@ In fact, in this way even expandable commands can be passed to the package, as f
The accompanying file \stya{xwatermark-examples.tex} contains some complex examples.
-In plain \nTeX the only active character is the tie character \raisebox{-1ex}{\ \textcolor{teal}{$\widetilde{}$}\ } (that is, \cmdb{\nobreakspace}). However, some packages do make some other characters active. For example, after issuing the command \cmdb{\MakeShortVerb\{\string\x\}}, the packages \styb{doc} and \styb{shortvrb} make the character \styb{x} active. The user can use such active characters in values of the \stya{textmark} key without locally changing their catcode to 11 (\ie, letters). In the case of \cmdb{\MakeShortVerb\{\string\x\}}, you can issue \cmdb{\DeleteShortVerb\{\string\x\}} to revert to normal use of character \styb{x}. As another example, the option \styb{turkish} of the \styb{babel} package uses the equal sign as active shorthand character.
+In plain \nTeX the only active character is the tie character \raisebox{-1ex}{\ \textcolor{teal}{$\widetilde{}$}\ } (that is, \cmdb{nobreakspace}). However, some packages do make some other characters active. For example, after issuing the command \cmdb{MakeShortVerb\{\textbackslash x\}}, the packages \styb{doc} and \styb{shortvrb} make the character \styb{x} active\footnote{The \styb{fancyvrb} package has, \eg, \cmdb{DefineShortVerb[key=value pairs]\{\textbackslash x\}}.}. The user can use such active characters in values of the \stya{textmark} key without locally changing their catcode to 11 (\ie, letters). In the case of \cmdb{MakeShortVerb\{\textbackslash x\}}, you can issue \cmdb{DeleteShortVerb\{\textbackslash x\}} to revert to normal use of character \styb{x}. As another example, the option \styb{turkish} of the \styb{babel} package uses the equal sign (\styb{=}) as active shorthand character.
\section{The \XWCB and \XWMP macros}\label{sec:colorbox}
-\lletter{T}{o make} it easier for users to create paragraph boxes and color boxes of texts and watermarks, the \stya{xwatermark} package provides the macros \cmda{\xwcolorbox} and \cmda{\xwminipage}. The macro \cmda{\xwcolorbox} calls the macro \cmda{\xwminipage}. The \cmda{\xwminipage} macro is a \styb{minipage} environment that may be used for framing watermarks. Like the \wmsetup macro, these two macros are set with key-value lists as follows:
+\lletter{T}{o make} it easier for users to create paragraph boxes and color boxes of texts and watermarks, the \stya{xwatermark} package provides the macros \cmda{xwcolorbox} and \cmda{xwminipage}. The macro \cmda{xwcolorbox} calls the macro \cmda{xwminipage}. The \cmda{xwminipage} macro is a \styb{minipage} environment that may be used for framing watermarks. Like the \wmsetup macro, these two macros are set with key-value lists as follows:
\begin{xwverbatim}
\xwminipage{key=value list}
\xwcolorbox{key=value list}.
\end{xwverbatim}
-The \stya{textcolor} in \cmda{\xwminipage} is the color of the text. In the case of \cmda{\xwcolorbox}, two color values are expected: \stya{textcolor} and \stya{fillcolor}. Texts with commas need to be enclosed in braces when submitted to these macros. The default values of the options of these macros are described in section~\ref{sec:LocalOptions}.
+The \stya{textcolor} in \cmda{xwminipage} is the color of the text. In the case of \cmda{xwcolorbox}, two color values are expected: \stya{textcolor} and \stya{fillcolor}. Texts with commas need to be enclosed in braces when submitted to these macros. The default values of the options of these macros are described in section~\ref{sec:LocalOptions}.
These macros can call one/each other iteratively, \eg,
\begin{xwverbatim}
@@ -333,14 +333,14 @@ These macros can call one/each other iteratively, \eg,
text={%
\xwminipage{width=\paperwidth,align=left,
textcolor=magenta,text={\TeX\\[.1ex] \LaTeX}
- }
+ }%
\\[1ex]
\xwminipage{width=\paperwidth,align=center,
textcolor=green,text={\TeX\\[.1ex] \LaTeX}
- }
+ }%
\\[1ex]
\xwminipage{width=\paperwidth,align=right,
- textcolor=orange,text={\TeX\\[.1ex] \LaTeX}
+ textcolor=orange,text={\TeX\\[.1ex] \LaTeX}%
}}}}}
\end{xwverbatim}
which is one of the examples in the file \stya{xwatermark-examples.tex}.
@@ -355,37 +355,37 @@ The left and right watermarks on page~\pageref{page:one} were produced with the
align=center,framesep=5pt,framerule=2pt,
framecolor=white,
text={\color{white}\framebox[2cm][c]{%
- \phantom{Hello}}\hspace{1cm}\color{black}
- \TC{red}{\textbullet}\hspace{1cm}The marks %
+ \phantom{Hello}}\hspace{1cm}\color{black}%
+ \textcolor{red}{\textbullet}\hspace{1cm}The marks %
on these pages were placed effortlessly %
- by using the \TC{blue}{xwatermark} package
- \hspace{1cm}\TC{red}{\textbullet}\hspace{1cm}
- \color{white}\framebox[2cm][c]{\phantom{Hello}}
- \rotatebox[origin=c]{90}{%
- \makebox[1.4cm][c]{\phantom{Hello}}}
- }
- }
+ by using the \textcolor{blue}{xwatermark} package
+ \hspace{1cm}\textcolor{red}{\textbullet}%
+ \hspace{1cm}\color{white}\framebox[2cm][c]%
+ {\phantom{Hello}}\rotatebox[origin=c]{90}{%
+ \makebox[1.4cm][c]{\phantom{Hello}}}%
+ }%
+ }%
\\[17.2cm]
\xwcolorbox{framesep=5pt,framerule=2pt,
fillcolor=gray!55,framecolor=white,
align=center,width=\paperheight,
text={%
- \color{white}\framebox[2cm][c]{\phantom{Hello}}
- \hspace{1cm}\color{black}\TC{red}{\textbullet}
- \hspace{4.3cm}User manual for the %
- \TC{blue}{xwatermark} package\hspace{4.3cm}
- \TC{red}{\textbullet}\hspace{1cm}
- \color{white}\framebox[2cm][c]{\phantom{Hello}}
+ \color{white}\framebox[2cm][c]{\phantom{Hello}}%
+ \hspace{1cm}\color{black}\textcolor{red}%
+ {\textbullet}\hspace{4.3cm}User manual for the %
+ \textcolor{blue}{xwatermark} package\hspace{4.3cm}%
+ \textcolor{red}{\textbullet}\hspace{1cm}
+ \color{white}\framebox[2cm][c]{\phantom{Hello}}%
\rotatebox[origin=c]{90}{%
- \makebox[1.4cm][c]{\phantom{Hello}}}
- }
- }
- }
+ \makebox[1.4cm][c]{\phantom{Hello}}}%
+ }%
+ }%
+ }%
}
\end{xwverbatim}
\subsection{The \YWCB macro}\label{sec:ywcolormacro}
-This macro has the same syntax and options as the \cmda{\xwcolorbox} macro except that the resulting \styb{colorbox} is centered by using the \styb{center} environment and the markup box \cmdb{\makebox[0pt][c]\{\}}. It is intended for producing \styb{colorbox}es such as the one for the abstract on \pageref{page:one}. The abstract was produced with the following settings:
+This macro has the same syntax and options as the \cmda{xwcolorbox} macro except that the resulting \styb{colorbox} is centered by using the \styb{center} environment and the markup box \cmdb{makebox[0pt][c]\{\}}. It is intended for producing \styb{colorbox}{}es such as the one for the abstract on \pageref{page:one}. The abstract was produced with the following settings:
\begin{xwverbatim}
\ywcolorbox{framesep=5pt,framerule=2pt,framecolor=red!55,
align=justified,fillcolor=gray!25,width=\hsize,
@@ -393,12 +393,12 @@ This macro has the same syntax and options as the \cmda{\xwcolorbox} macro excep
\centering\xwcolorbox{align=center,fillcolor=white,
width=.5\hsize,text={\bfseries Abstract}}\\[1ex]
The \stya{xwatermark} package enables the user ...
- }
+ }%
}
\end{xwverbatim}
-Notice here that the macro \cmda{\ywcolorbox} calls the macro \cmda{\xwcolorbox} with its (\cmda{\ywcolorbox}'s) \stya{framesep} and \stya{framerule}.
+Notice here that the macro \cmda{ywcolorbox} calls the macro \cmda{xwcolorbox} with its (\cmda{ywcolorbox}{}'s) \stya{framesep} and \stya{framerule}.
-Users may also like to consider the possible use of the \cmdb{\fcolorbox} macro of the \styb{xcolor} package in setting the textmarks.
+Users may also like to consider the possible use of the \cmdb{fcolorbox} macro of the \styb{xcolor} package in setting the textmarks.
\section{Using \stya{\bf xwatermark} with the \styb{\bf geometry} package}
\label{sec:Xwatermark:Geometry}
@@ -406,50 +406,51 @@ Users may also like to consider the possible use of the \cmdb{\fcolorbox} macro
Reconciling the \stya{xwatermark} package with the \styb{geometry} package at the very low level requires more effort than I can afford now. The interim solution is that the user should set his/her watermarks before loading the \styb{geometry} package, or use the \styb{geometry} package with the option \styb{pass} in the preliminary runs (when setting the watermarks). The \styb{pass} option is available from version~4.2 of the \styb{geometry} package. It disables auto-layout and all of the \styb{geometry} settings except \styb{verbose} and \styb{showframe}. It can be used to determine the page layout of the \dclass and layouts created by other packages and manual settings. The user can also employ the option \styb{showframe} of the \styb{geometry} package to view how the scaling factors used by the \styb{geometry} package might change native layout dimensions. The option \styb{reset} of the \styb{geometry} package is also useful in this regard.
-The \styb{geometry} package saves native \texorlatex dimensions and switches in the macro \cmdb{\Gm@dorg} before processing \styb{geometry} package options. This macro is called by \styb{geometry} when the options \styb{pass} and \styb{reset} are passed to it. Reconciling the two packages (\stya{xwatermark} and \styb{geometry}) at a high level will involve simply calling this macro within \stya{xwatermark} whenever \stya{xwatermark} detects that the \styb{geometry} package has been loaded by the user. This is what has been done in the \stya{xwatermark} package: the package has a boolean option called \stya{dgeometry} (meaning ``disable geometry''), which, if true, invokes the command \cmdb{\Gm@dorg} of the \styb{geometry} package to disable \styb{geometry} package settings and enforce native paper layout dimensions. First the \stya{xwatermark} package detects at the very last moment of the document preamble (just before \cmdb{\begin\{document\}}) if the \styb{geometry} package has been loaded by the user. If yes, and if the user has set \stya{dgeometry=true} in the call to \stya{xwatermark}, then \stya{xwatermark} issues the command \cmdb{\geometry\{pass\}}, which, as mentioned earlier, calls \cmdb{\Gm@dorg}.
+The \styb{geometry} package saves native \TeXL dimensions and switches in the macro \cmdb{Gm@dorg} before processing \styb{geometry} package options. This macro is called by \styb{geometry} when the options \styb{pass} and \styb{reset} are passed to it. Reconciling the two packages (\stya{xwatermark} and \styb{geometry}) at a high level will involve simply calling this macro within \stya{xwatermark} whenever \stya{xwatermark} detects that the \styb{geometry} package has been loaded by the user. This is what has been done in the \stya{xwatermark} package: the package has a boolean option called \stya{dgeometry} (meaning ``disable geometry''), which, if true, invokes the command \cmdb{Gm@dorg} of the \styb{geometry} package to disable \styb{geometry} package settings and enforce native paper layout dimensions. First the \stya{xwatermark} package detects at the very last moment of the document preamble (just before \cmdb{begin\{document\}}) if the \styb{geometry} package has been loaded by the user. If yes, and if the user has set \stya{dgeometry=true} in the call to \stya{xwatermark}, then \stya{xwatermark} issues the command \cmdb{geometry\{pass\}}, which, as mentioned earlier, calls \cmdb{Gm@dorg}.
After the effects of the \styb{geometry} package are re-introduced (\ie, after setting \styb{pass=false}), it might still be necessary to fine-tune the positions of the watermarks.
-Because the \styb{geometry} package stipulates that the command \cmdb{\Gm@dorg} can be issued only in the document preamble, the switch \stya{dgeometry} can appear only in \usepackxwm, as in, \eg,
+Because the \styb{geometry} package stipulates that the command \cmdb{Gm@dorg} can be issued only in the document preamble, the switch \stya{dgeometry} can appear only in \usepackxwm, as in, \eg,
\begin{xwverbatim}
\usepackage[printwatermark,allpages,dgeometry]{xwatermark},
\end{xwverbatim}
-but it matters not which of the two packages (\styb{geometry} and \stya{xwatermark}) is loaded first. To call \cmdb{\Gm@dorg}, the \stya{xwatermark} package uses the hook \cmdb{\AtEndPreamble} from the \styb{etoolbox} package~\cite{PLehman2008}. The native \nLaTeX hook \cmdb{\AtBeginDocument} is inapplicable in this case.
+but it matters not which of the two packages (\styb{geometry} and \stya{xwatermark}) is loaded first. To call \cmdb{Gm@dorg}, the \stya{xwatermark} package uses the hook \cmdb{AtEndPreamble} from the \styb{etoolbox} package. \cmdb{AtBeginDocument}, a native \nLaTeX hook, is inapplicable in this case.
The user should also remember that he/she can set his/her own margins without using the \styb{geometry} package, although many users find the \styb{geometry} package more convenient.
\section{Support for Unicode and UTF encodings}
-\lletter{T}{he} \stya{xwatermark} package can be used with any font encoding, provided the \stya{fontfamily} is properly declared before use. For example, with the following declarations on \XeTeX, Rembrandt Wolpert (\url{wolpert@uark.edu}) obtained some +.pdf+ outputs that he is willing to share with other users:
+\lletter{T}{he} \stya{xwatermark} package can be used with any font encoding, provided the \stya{fontfamily} is properly declared before use. For example, with the following declarations on \XeTeX, Rembrandt Wolpert (\url{wolpert@uark.edu}) obtained some {}+.pdf+ outputs that he is willing to share with other users:
\begin{xwverbatim}
\newfontfamily{\chinese}{STFangsong} % SinoType FangSong
\newcommand{\chtext}[1]{{\chinese \XeTeXlinebreaklocale%
- "jp" \XeTeXlinebreakskip=0pt plus 1pt #1}}
+ "jp" \XeTeXlinebreakskip=0pt plus 1pt #1}%
+}
\watermarksetup{fontsize=5cm,align=center,
color=red!75!blue!25,angle=90,xcoord=-65,ycoord=-38,
scale=.49,textmark={=\fbox{\color{red!65}\chtext{%
- |color(red)watermark in Chinese or Japanese script|color(blue)}}=}
+ |color(red)watermark in Chinese or Japanese script|color(blue)}}=}%
}
\newfontfamily{\Gara}{Garamond Premier Pro}
\watermarksetup{fontsize=5cm,scale=.46,align=center,
angle=90,color=red!75!blue!25,xcoord=-72,ycoord=-38,
- textmark={=\fbox{\color{red!65}\Gara The different%
- ligature}=\\[.35ex]}
+ textmark={=\fbox{\color{red!65}\Gara The different %
+ ligature}=\\[.35ex]}%
}.
\end{xwverbatim}
-It doesn't matter what the user declares as a \stya{fontfamily} provided he/she declares it before using it and provided the declaration is valid. It is thus possible to mix scripts in one watermark (\eg, Latin, Chinese, Korean, Japanese, Arabic, Russian scripts, you name it). Unicode and UTF encodings and their recent \nTeX implementations are described in, \eg,~\cite{VEijkhout2008}.
+It doesn't matter what the user declares as a \stya{fontfamily} provided he/she declares it before using it and provided the declaration is valid. It is thus possible to mix scripts in one watermark (\eg, Latin, Chinese, Korean, Japanese, Arabic, Russian scripts, you name it).
\section{Further examples of use of \stya{\bf xwatermark} package}
\lletter{T}{he file} \stya{xwatermark-examples.tex}, a source file of examples of use of the \stya{xwatermark} package, together with its \stya{pdf} version, are provided with this guide in the \stya{xwatermark} bundle.
\section{Future extension}
-\lletter{C}{urrently the package} cannot put more than one watermark on the same page in a simple manner. To be able to do so, some tricks are necessary, as was done with the watermarks on the pages of this document. To position more than one mark on the same page, complicated tricks may be necessary, but are often possible. Markup boxes (especially zero-width boxes) can be handy in this respect, but the user should note the displeasure that unintended spaces can cause in boxes. It will be useful to relieve the user of such complications. This is an obvious track for extension of the package. One possible way to tackling this challenge is to accumulate the watermarks for each page before calling the shipout hooks, or loop over the watermarks (meant for the same page) within the shipout hooks.
+\lletter{C}{urrently the package} cannot put more than one watermark on the same page in a simple manner. To be able to do so, some tricks are necessary, as was done with the watermarks on the pages of this document. To position more than one mark on the same page, complicated tricks may be necessary, but are often possible. Markup boxes (especially zero-width boxes) can be handy in this respect, but the user should note the displeasure that unintended spaces can cause in boxes. It will be useful to relieve the user of such complications. This is an obvious track for extension of the package. One possible way to tackling this challenge is to accumulate the watermarks for each page before calling the shipout hooks, or loop over the watermarks (meant for the same page) within the shipout hooks, or write the watermarks to the auxiliary file and make more than one run to get them to the right pages.
-The user should note the real meanings of saved-box commands (such as \cmdb{\newsavebox}, \cmdb{\savebox}, and \cmdb{\usebox}) before using them. The are actually bins and not all declarations made outside the bins may be visible inside them.
+The user should note the real meanings of saved-box commands (such as \cmdb{newsavebox}, \cmdb{savebox}, and \cmdb{usebox}) before using them. They are actually bins and not all declarations made outside the bins may be visible inside them.
There is also the issue with the \styb{geometry} package mentioned in section~\ref{sec:Xwatermark:Geometry}.
@@ -459,16 +460,9 @@ There is also the issue with the \styb{geometry} package mentioned in section~\r
\section{Acknowledgement}
I thank Joseph Wright (\url{joseph.wright@morningstar2.co.uk}) for his time in helping me resolve some of the challenges I encountered in coding this package---and for his continued support.
-\begingroup
-\normalcolor
-\bibfont
-\bibliographystyle{abbrv}
-\bibliography{xwatermark-guide}
-\endgroup
-
\appendix
\section{Package options}\label{sec:PackageOptions}
-\lletter{W}{e categorize} the package options into global and local. Global options are those set either in \dclass or in \usepackxwm or with the macro \wmsetup, while local options are those set with the macros \cmda{\xwminipage}, \cmda{\xwcolorbox} and \cmda{\ywcolorbox}.
+\lletter{W}{e categorize} the package options into global and local. Global options are those set either in \dclass or in \usepackxwm or with the macro \wmsetup, while local options are those set with the macros \cmda{xwminipage}, \cmda{xwcolorbox} and \cmda{ywcolorbox}.
\subsection{Global options}
The global package options are listed and described in table~\vref{tab:GlobalOptions}.
@@ -488,7 +482,7 @@ The global package options are listed and described in table~\vref{tab:GlobalOpt
\endfoot
\hline
\endlastfoot
-+printwatermark+ & +true+ & Global boolean switch that determines whether watermark should be printed or not. This option can be passed to package as either \stya{true} or \stya{false} and can appear in the \dclass options list or \cmdb{\usepackage}. If for any reason you don't the watermark printed in any run, you can enter \stya{printwatermark=false}. If the option \styb{draft} or \styb{final} appears in the \dclass or \cmdb{\usepackage}, it won't affect the printing or otherwise of the watermark. The printing of the watermark is determined by the option \stya{printwatermark}.\\\hline
++printwatermark+ & +true+ & Global boolean switch that determines whether watermark should be printed or not. This option can be passed to package as either \stya{true} or \stya{false} and can appear in the \dclass options list or \cmdb{usepackage}. If for any reason you don't want the watermark printed in any run, you can enter \stya{printwatermark=false}. If the option \styb{draft} or \styb{final} appears in the \dclass or \cmdb{usepackage}, it won't affect the printing or otherwise of the watermark. The printing of the watermark is determined by the option \stya{printwatermark}.\\\hline
+allpages+, +evenpages+, +oddpages+, +pages+,~+page+ & & These determine the pages on which the watermarks are to be printed. The options \stya{allpages}, \stya{evenpages}, \stya{oddpages} are boolean keys, while \stya{pages} and \stya{page} require values, \eg, \stya{pages=x-x} and \stya{page=x}. If the package is loaded and none of these options is passed to it, the default watermark (DRAFT) will be printed on the first page of the document and a warning message logged in the transcript file.\\\hline
+textmark+ & DRAFT & The text watermark.\\\hline
+angle+ & $45^\circ$ & The orientation of the watermark (text and/or picture). \\\hline
@@ -497,7 +491,7 @@ The global package options are listed and described in table~\vref{tab:GlobalOpt
+color+ & +gray+ & The color of the text watermark.\\\hline
+fontfamily+ & +cmss+ & The fontfamily of the text watermark.\\\hline
+fontsize+ & 5cm& The fontsize of the text watermark. If for some reason you need other fontsizes (\eg, 10pt, 11pt or 12pt for printing text watermarks in +\normalfont+), you will need to submit them as values of \stya{fontsize}.\\\hline
-+fontseries+ & +b+ & The font series of the text watermark. If you need normal document text, put \stya{fontseries=m}, which implies medium weight and width. Package users who have asked about other font series should please refer to~\cite[\S 7.9]{MittelbachGoossens2004}.\\\hline
++fontseries+ & +b+ & The font series of the text watermark. If you need normal document text, put \stya{fontseries=m}, which implies medium weight and width.\\\hline
+xcoord+ & 0 & x-coordinate of watermark (with reference to the center of paper and not the text center).\\\hline
+ycoord+ & 0 & y-coordinate of watermark (coinciding with center of paper). Both \stya{xcoord} and \stya{ycoord} should be submitted without units, since the unit is set separately by \stya{coordunit}.\\\hline
+coordunit+ & +mm+ & The unit for x- and y-coordinates. \\\hline
@@ -513,7 +507,7 @@ The global package options are listed and described in table~\vref{tab:GlobalOpt
\end{tabularx}
\subsection{Local options}\label{sec:LocalOptions}
-Local package options are those associated with the macros \cmda{\xwminipage}, \cmda{\xwcolorbox} and \cmda{\ywcolorbox}. They are described in table~\ref{tab:LocalOptions}.
+Local package options are those associated with the macros \cmda{xwminipage}, \cmda{xwcolorbox} and \cmda{ywcolorbox}. They are described in table~\ref{tab:LocalOptions}.
\begin{tabularx}{\linewidth}{|m{3cm}|m{2.5cm}|X|}
\caption{Local options of the package\label{tab:LocalOptions}}\\\hline
@@ -528,25 +522,25 @@ Local package options are those associated with the macros \cmda{\xwminipage}, \
\endfoot
\hline
\endlastfoot
-\multicolumn{3}{|>{\columncolor{gray!25}}c|}{\bf\cmda{\xwminipage} macro}\\\hline
+\multicolumn{3}{|>{\columncolor{gray!25}}c|}{\bf\cmda{xwminipage} macro}\\\hline
+width+ & +\paperwidth+ & Width of the boxedminipage.\\\hline
+textcolor+ & +black+ & Color of text inside boxedminipage.\\\hline
+framecolor+ & +white+ & Color of frame of boxedminipage.\\\hline
+text+ & No text passed & Text that goes inside the boxedminipage.\\\hline
-+align+ & +center+ & Alignment of the text inside the boxedminipage of \cmda{\xwminipage} (expected values are \stya{center}, \stya{left}, \stya{right} and \stya{justified}).\\\hline
++align+ & +center+ & Alignment of the text inside the boxedminipage of \cmda{xwminipage} (expected values are \stya{center}, \stya{left}, \stya{right} and \stya{justified}).\\\hline
+framesep+ & +3pt+ & +\fboxsep+ of the boxedminipage.\\\hline
+framerule+ & +0.4pt+ & +\fboxrule+ of the boxedminipage.\\\hline
-\multicolumn{3}{|>{\columncolor{gray!25}}c|}{\bf\cmda{\xwcolorbox} macro}\\\hline
+\multicolumn{3}{|>{\columncolor{gray!25}}c|}{\bf\cmda{xwcolorbox} macro}\\\hline
+width+ & +\paperwidth+ & Width of the colorbox.\\\hline
+textcolor+ & +black+ & Color of text inside colorbox.\\\hline
+framecolor+ & +white+ & Color of frame of colorbox.\\\hline
+text+ & No text passed & Text that goes inside the colorbox.\\\hline
-+align+ & +center+ & Alignment of the text inside the colorbox of \cmda{\xwcolorbox} (expected values are \stya{center}, \stya{left}, \stya{right} and \stya{justified}).\\\hline
++align+ & +center+ & Alignment of the text inside the colorbox of \cmda{xwcolorbox} (expected values are \stya{center}, \stya{left}, \stya{right} and \stya{justified}).\\\hline
+framesep+ & +3pt+ & +\fboxsep+ of the colorbox.\\\hline
+framerule+ & +0.4pt+ & +\fboxrule+ of the colorbox.\\\hline
-\multicolumn{3}{|>{\columncolor{gray!25}}c|}{\bf\cmda{\ywcolorbox} macro}\\\hline
+\multicolumn{3}{|>{\columncolor{gray!25}}c|}{\bf\cmda{ywcolorbox} macro}\\\hline
\multicolumn{3}{|m{\hsize-1.5cm}|}{%
-The options of the macro \cmda{\ywcolorbox} are the same as those of the related macro \cmda{\xwcolorbox}. Refer to section~\ref{sec:ywcolormacro} for the syntax of this macro.
+The options of the macro \cmda{ywcolorbox} are the same as those of the related macro \cmda{xwcolorbox}. Refer to section~\ref{sec:ywcolormacro} for the syntax of this macro.
}\\
\end{tabularx}
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-manifest-1dot4.tex b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-manifest-1dot4.tex
new file mode 100644
index 00000000000..65e1fe1f161
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-manifest-1dot4.tex
@@ -0,0 +1,17 @@
+
+2010/01/10
+
+The xwatermark bundle (version 1.4) consists of the following files:
+
+xwatermark.sty - The style file
+xwatermark-guide-1dot4.tex - The user manual
+xwatermark-examples-1dot4.tex - The examples file
+xwatermark-guide-1dot4.cfg - The configuration file for the user
+ manual and example files
+xwatermark-bugreport-1dot4.tex - The bug report file
+
+Readme - The README file
+xwatermarkpic.tex - Sample .tex graphics file
+xwatermarkpic.eps - Sample .eps graphics file
+xwatermarkpic.pdf - Sample .pdf graphics file
+
diff --git a/Master/texmf-dist/tex/latex/xwatermark/keyreader.sty b/Master/texmf-dist/tex/latex/xwatermark/keyreader.sty
deleted file mode 100644
index 1de651a1221..00000000000
--- a/Master/texmf-dist/tex/latex/xwatermark/keyreader.sty
+++ /dev/null
@@ -1,113 +0,0 @@
-%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-% This is file 'keyreader.sty', version 0.1. %
-% %
-% This package reads multiple keys to be defined by xkeyval.sty. %
-% %
-% This work 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 in 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 Ahmed Musa (a.musa@rocketmail.com). %
-%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-\begingroup
-\catcode064=11% @
-\catcode123=01% {
-\catcode125=02% }
-\def\x{\endgroup
- \edef\kr@restorecodeatend{%
- \catcode035=\the\catcode035\relax
- \catcode064=\the\catcode064\relax
- \catcode123=\the\catcode123\relax
- \catcode125=\the\catcode125\relax
- }%
-}
-\x
-\catcode035=06% #
-\catcode064=11% @
-\catcode123=01% {
-\catcode125=02% }
-\def\kr@ensurecode#1#2{%
- \edef\kr@restorecodeatend{%
- \kr@restorecodeatend
- \catcode#1=\the\catcode#1\relax
- }%
- \catcode#1=#2\relax
-}
-\AtEndOfPackage{\kr@restorecodeatend}
-\kr@ensurecode{044}{12}% ,
-\kr@ensurecode{059}{12}% ;
-\kr@ensurecode{038}{03}% &
-\ProvidesPackage{keyreader}%
- [2009/12/15 v0.1 Read keys for the xkeyval package (AM)]
-\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\RequirePackage{xkeyval}[2008/08/13]
-\newcommand\kr@warn[1]{\PackageWarningNoLine{keyreader}{#1}}
-\newcommand\kr@err[1]{\PackageError{keyreader}{#1}{\@ehc}}
-\define@cmdkey[KV]{keyreader}[kr@]{parser}[;]{}
-\define@cmdkey[KV]{keyreader}[kr@]{keyprefix}[KV]{}
-\define@cmdkey[KV]{keyreader}[kr@]{keyfamily}[fam]{}
-\define@cmdkey[KV]{keyreader}[kr@]{macroprefix}[mp@]{}
-\DeclareOptionX*{\kr@warn{Unknown option '\CurrentOption' ignored}}
-\ExecuteOptionsX[KV]<keyreader>{parser,keyprefix,keyfamily,macroprefix}
-\ProcessOptionsX*[KV]<keyreader>\relax
-\@ifdefinable\krsetup{%
- \def\krsetup#1{\setkeys[KV]{keyreader}{#1}}%
-}
-\long\def\ifblank#1{\kr@ifblank#1&&\@secondoftwo\@firstoftwo:}
-\long\def\kr@ifblank#1#2&#3#4#5:{#4}
-\@ifdefinable\stopread{%
- \long\def\stopread#1&{\long\def\kr@remainder{#1}}%
-}
-\def\kr@allist{}
-\gdef\kr@define@key#1,#2,#3,#4&{%
- \edef\kr@keytype{#1}%
- \edef\kr@key{#2}%
- \edef\kr@default{#3}%
- \def\kr@func{#4}%
- \ifcase\number\kr@keytype\relax
- \or
- \edef\x{\noexpand\define@key[\kr@keyprefix]{\kr@keyfamily}%
- {\kr@key}[\kr@default]{\expandafter\noexpand\kr@func}%
- }\x
- \or
- \edef\x{\noexpand\define@cmdkey[\kr@keyprefix]{\kr@keyfamily}%
- [\kr@macroprefix]{\kr@key}[\kr@default]{\expandafter\noexpand\kr@func}%
- }\x
- \or
- \edef\x{\noexpand\define@boolkey[\kr@keyprefix]{\kr@keyfamily}%
- [\kr@macroprefix]{\kr@key}[\kr@default]{\expandafter\noexpand\kr@func}%
- }\x
- \or
- \ifx\kr@allist\@empty
- \kr@err{'\string\kr@allist' is empty: choicekey can't be defined.
- \MessageBreak You need to first define '\string\kr@allist'
- \MessageBreak as a nonempty set}%
- \fi
- \edef\x{\noexpand\define@choicekey*[\kr@keyprefix]{\kr@keyfamily}{\kr@key}%
- [\noexpand\kr@val\noexpand\kr@nr]{\kr@allist}[\kr@default]%
- {\expandafter\noexpand\kr@func}%
- }\x
- \else
- \kr@err{Unknown key type/identifier '\kr@keytype'}%
- \fi
-}
-\newcount\kr@cnta
-\newcommand\define@keylist[1]{%
- \kr@cnta=\z@\relax\romannumeral-`\q\expandafter\kr@readlist#1;&}
-\expandafter\def\expandafter\kr@readlist\expandafter#\expandafter 1\kr@parser#2&{%
- \ifblank{#1}{}{%
- \ifx#1\stopread\stopread#2&\kr@cnta=1\relax\else\kr@define@key#1&\fi
- }%
- \ifnum\kr@cnta=\z@\ifblank{#2}{}{\kr@readlist#2&}\fi
-}
-
-\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty b/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty
index bce397e73a3..b7973759d62 100644
--- a/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty
+++ b/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty
@@ -1,14 +1,15 @@
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-% This is file 'xwatermark.sty', version 1.3. %
+% This is file 'xwatermark.sty', version 1.4. %
% %
% This package puts user-specified watermarks (graphics and arbitrary %
% texts) on select pages of documents. See package documentation %
% for further details. %
% %
-% This work 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 in http://www.latex-project.org/lppl.txt and version 1.3 or later %
+% 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 in %
+% 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'. %
@@ -18,21 +19,23 @@
% implied warranties of merchantability and fitness for a particular %
% purpose. %
% %
-% Copyright (c) 2009 Ahmed Musa (a.musa@rocketmail.com). %
+% Copyright (c) 2010 Ahmed Musa (a.musa@rocketmail.com). %
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\begingroup
-\catcode064=11% @
-\catcode123=01% {
-\catcode125=02% }
+\catcode064 11% @
+\catcode123 01% {
+\catcode125 02% }
\def\x{\endgroup
\edef\xwm@RestoreCodeAtEnd{%
- \catcode035=\the\catcode035\relax
- \catcode064=\the\catcode064\relax
- \catcode123=\the\catcode123\relax
- \catcode125=\the\catcode125\relax
+ \catcode035 \the\catcode035% #
+ \catcode064 \the\catcode064% @
+ \catcode123 \the\catcode123% {
+ \catcode125 \the\catcode125% }
+ \catcode061 \the\catcode061% =
}%
}
\x
+\@makeother{\=}%
\catcode035=06% #
\catcode064=11% @
\catcode123=01% {
@@ -57,7 +60,6 @@
\xwm@EnsureCode{047}{12}% /
\xwm@EnsureCode{058}{12}% :
\xwm@EnsureCode{060}{12}% <
-\xwm@EnsureCode{061}{12}% =
\xwm@EnsureCode{062}{12}% >
\xwm@EnsureCode{094}{07}% ^ (superscript)
\xwm@EnsureCode{096}{12}% `
@@ -68,28 +70,43 @@
\def\filedate{#4}%
\def\fileversion{v#3}%
\def\filetime{#5}%
- \def\fileauthor{#6\space#7}
+ \def\fileauthor{#6\space#7}%
}
\def\filedesc{%
Puts user-specified watermarks on select document pages (\fileauthor)}
\readRCS
-$Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
+$Id: xwatermark.sty,v 1.4 2010/01/10 09:00:00 Ahmed Musa Exp $
\ProvidesPackage{xwatermark}[\filedate\space\fileversion\space\filedesc]
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\RequirePackage{etoolbox}[2009/08/06]
-\RequirePackage{ltxnew}[2009/07/22]
+\@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}[2009/08/06]}
+\@ifpackageloaded{ltxnew}{}{\RequirePackage{ltxnew}[2009/07/22]}
\newrobustcmd\xwm@info[1]{\PackageInfo{xwatermark}{#1\@gobble}}
\newrobustcmd\xwm@warn[1]{\PackageWarningNoLine{xwatermark}{#1}}
\newrobustcmd\xwm@err[1]{\PackageError{xwatermark}{#1}{\@ehc}}
+\new\def\xwm@car#1#2\@nil{#1}
+\new\def\xwm@testarg#1{%
+ \begingroup
+ \escapechar=92\relax
+ \edef\tmp@a{\expandafter\xwm@car\string#1\@nil}%
+ \if\tmp@a\@backslashchar
+ \aftergroup\@firstoftwo
+ \else
+ \aftergroup\@secondoftwo
+ \fi
+ \endgroup
+}
\newrobustcmd*\xwm@numdef[2]{%
+ \xwm@testarg{#1}{}{\xwm@err{Unacceptable argument '#1' for number}}
\ifstrempty{#2}{\xwm@err{Empty argument for counter}}{}
\ifundef{#1}{\new\count#1\relax #1=\numexpr#2\relax}{#1=\numexpr#2\relax}
}
\newrobustcmd*\xwm@dimdef[2]{%
- \ifstrempty{#2}{\xwm@err{Empty argument for dimension}}{}
+ \xwm@testarg{#1}{}{\xwm@err{Unacceptable argument '#1' for dimension}}
+ \ifstrempty{#2}{\xwm@err{Empty argument for dimension}}{}
\ifundef{#1}{\new\dimen#1\relax #1=\dimexpr#2\relax}{#1=\dimexpr#2\relax}
}
\new\long\def\xwm@afterfi#1\fi{\fi#1}
+\new\long\def\xwm@afterelsefi#1\else#2\fi{\fi#1}
\new\let\xwm@pagestart\@empty
\new\let\xwm@pageend\@empty
\new\def\xwm@pagerange#1{%
@@ -97,10 +114,10 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\renew\def\xwm@pageend{}%
\xwm@pagerange@ifhyphen#1-\@nil{%
\ifx\xwm@pagestart\@empty
- \expandafter\xwm@err{Empty page range passed to package}
+ \xwm@afterelsefi\xwm@err{Empty page range passed to package}%
\else
- \expandafter\xwm@err{Only page \xwm@pagestart\MessageBreak
- was passed as page range}
+ \xwm@afterfi
+ \xwm@err{Only page \xwm@pagestart\space was passed as page range}%
\fi
}{%
\xwm@pagerange@split#1\@nil
@@ -111,29 +128,28 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\renew\def\xwm@pageend{#2}%
\xwm@pagerange@ifhyphen#2-\@nil{%
\ifx\xwm@pagestart\@empty
- \expandafter\xwm@err{No starting page for page range}
+ \expandafter\xwm@err{No starting page for page range}%
\else
\ifx\xwm@pageend\@empty
- \expandafter\expandafter\expandafter%
- \xwm@err{No ending page for page range}
+ \xwm@afterelsefi
+ \xwm@err{No ending page for page range}%
\else
- \expandafter\expandafter\expandafter%
- \xwm@info{Page range:\space
- \xwm@pagestart\space to \xwm@pageend}
+ \xwm@afterfi
+ \xwm@info{Page range:\space\xwm@pagestart\space to \xwm@pageend}%
\fi
\fi
}{%
- \xwm@err{Too many hyphens in page range}
+ \xwm@err{Too many hyphens in page range}%
}%
}
\new\def\xwm@pagerange@ifhyphen#1-#2\@nil{%
- \ifstrempty{#2}{\expandafter\@firstoftwo}{\expandafter\@secondoftwo}
+ \ifstrempty{#2}{\@firstoftwo}{\@secondoftwo}%
}
-\RequirePackage{fix-cm}
-\RequirePackage{graphicx}
-\RequirePackage{xkeyval}[2008/08/13]
-\RequirePackage{atbegshi}[2008/07/31]
-\RequirePackage{picture}[2008/11/26]
+\@ifpackageloaded{fix-cm}{}{\RequirePackage{fix-cm}[2006/03/24]}
+\@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}[1999/02/16]}
+\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}[2008/08/13]}
+\@ifpackageloaded{atbegshi}{}{\RequirePackage{atbegshi}[2008/07/31]}
+\@ifpackageloaded{picture}{}{\RequirePackage{picture}[2008/11/26]}
\@ifpackageloaded{xcolor}{%
\xwm@info{You have loaded 'xcolor' package\MessageBreak
with options that possibly differ\MessageBreak
@@ -143,14 +159,16 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\xwm@info{'xcolor' package loaded with\MessageBreak
options 'table', 'hyperref'}
}
-\RequirePackage{xifthen}[2009/04/17]
-\RequirePackage{boxedminipage}
+\@ifpackageloaded{xifthen}{}{\RequirePackage{xifthen}[2009/04/17]}
+\@ifpackageloaded{boxedminipage}{}{\RequirePackage{boxedminipage}}
+\@ifpackageloaded{keyreader}{}{\RequirePackage{keyreader}[2010/01/01]}
+\krsetup{parser=;,macroprefix=xwm@,keyprefix=XWM,keyfamily=xwatermark}
\xwm@dimdef{\xwm@xcoord@a}{\z@}
\xwm@dimdef{\xwm@ycoord@a}{\z@}
\xwm@numdef{\xwm@minmark}{\z@}
\xwm@numdef{\xwm@c@printmark}{\z@}
\new\let\xwm@papercenter\relax
-\newtoggle{pdf}
+\providetoggle{pdf}
\ifundef\pdfoutput{}{\unless\ifnum\pdfoutput<1\toggletrue{pdf}\fi}
\define@boolkey[XWM]{xwatermark}[xwm@]{printwatermark}[true]{%
\ifxwm@printwatermark\xwm@minmark=\@ne\fi}
@@ -177,9 +195,9 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\fi
}%
}
-\define@choicekey*+[XWM]{xwatermark}{align}[\xwm@val\xwm@nr]%
+\define@choicekey*+[XWM]{xwatermark}{align}[\val\nr]%
{center,right,left,justified}[center]{%
- \ifcase\xwm@nr\relax
+ \ifcase\nr\relax
\def\xwm@align{\centering}%
\or
\def\xwm@align{\flushright}%
@@ -189,23 +207,20 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\let\xwm@align\relax
\fi
}{%
- \xwm@err{Inadmissible value '#1' for align}
+ \xwm@err{Inadmissible value '\string#1' for align}%
}
\define@cmdkey[XWM]{xwatermark}[xwm@]{page}[1]{%
- \xwm@bool@onepageonlytrue
- \xwm@minmark=\@ne\relax
+ \xwm@bool@onepageonlytrue\xwm@minmark=\@ne
}
\define@key[XWM]{xwatermark}{pages}[1-1]{%
\xwm@bool@prangetrue
- \xwm@pagerange{#1}%
- \xwm@minmark=\@ne\relax
+ \xwm@pagerange{#1}\xwm@minmark=\@ne
}
\iftoggle{pdf}{\new\def\xwm@picfilex{pdf}}{\new\def\xwm@picfilex{eps}}
\define@cmdkey[XWM]{xwatermark}[xwm@]{picfile}[]{%
\ifstrempty{#1}{\xwm@bool@pmarkfalse}{%
- \xwm@bool@pmarktrue
- \xwm@minmark=\@ne\relax
- }
+ \xwm@bool@pmarktrue\xwm@minmark=\@ne
+ }%
}
\define@cmdkey[XWM]{xwatermark}[xwm@]{textmark}[DRAFT]{%
\ifstrempty{#1}{\xwm@bool@tmarkfalse}{\xwm@bool@tmarktrue}%
@@ -223,12 +238,10 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
{\def\xwm@picfilex{eps}}{}%
}%
}
-\RequirePackage[parser=;,macroprefix=xwm@,keyprefix=XWM,
- keyfamily=xwatermark]{keyreader}
\define@keylist{2,color,gray!25,;2,fontfamily,bch,;2,angle,45,;
2,scale,1,;2,coordunit,mm,;2,fontsize,5cm,;2,fontseries,b,;
2,height,\paperwidth,;2,width,\paperheight,;2,xcoord,\z@,;
- 2,ycoord,\z@,;2,picscale,1,;2,picbb,0 0 100 100,;}
+ 2,ycoord,\z@,;2,picscale,1,;2,picbb,0 0 100 100,}
\presetkeys[XWM]{xwatermark}{tmark,angle,scale,color,
textmark,fontfamily,fontsize,fontseries,coordunit,
align,height,width,xcoord,ycoord,picscale,picbb}{}
@@ -236,15 +249,8 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\ExecuteOptionsX[XWM]<xwatermark>{printwatermark}
\ProcessOptionsX*[XWM]<xwatermark>\relax
\newrobustcmd\watermarksetup[1]{\setkeys[XWM]{xwatermark}{#1}}
-\def\xwm@nolateoptions{printwatermark}
\AtBeginDocument{%
- \@for\@mem:=\xwm@nolateoptions\do{%
- \expandafter\edef\expandafter\@mem\expandafter{\expandafter
- \expandafter\expandafter\zap@space\expandafter\@mem\space\@empty}%
- \key@ifundefined[XWM]{xwatermark}{\@mem}{}{%
- \xwm@disable@keys[XWM]{xwatermark}{\@mem}%
- }%
- }%
+ \xwm@disable@keys[XWM]{xwatermark}{printwatermark,dgeometry}%
}
\new\def\xwm@coords{\begingroup%
\protected@edef\@tempa{\endgroup%
@@ -252,7 +258,7 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\number\xwm@xcoord\xwm@coordunit}%
\xwm@dimdef{\xwm@ycoord@a}{-0.5\paperheight+
\number\xwm@ycoord\xwm@coordunit}%
- }\@tempa%
+ }\@tempa
}
\unless\ifxwm@printwatermark
\xwm@info{printwatermark=false: no watermark printed}
@@ -262,28 +268,29 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\put(0,-0.5\paperheight){\line(1,0){\paperwidth}}%
\put(0.5\paperwidth,0){\line(0,-1){\paperheight}}%
\put(0.5\paperwidth,-0.5\paperheight){\circle{10}}%
-}%
+ \normalcolor
+}
\newcommand\xwm@insert@textmark@a{%
\leavevmode\removelastskip\noindent%
\makebox(0,0){\rotatebox[origin=c]{\xwm@angle}{\scalebox{\xwm@scale}{%
\parbox[c][\xwm@height][c]{\xwm@width}{%
\color{\xwm@color}%
\fontfamily{\xwm@fontfamily}\fontseries{\xwm@fontseries}%
- \fontsize{\xwm@fontsize}{1.2\xwm@fontsize}\selectfont%
- \xwm@align\xwm@textmark%
- }}}}\relax
- \removelastskip\normalcolor%
-}%
+ \fontsize{\xwm@fontsize}{1.2\xwm@fontsize}\selectfont
+ \xwm@align\xwm@textmark
+ }}}}%
+ \removelastskip\normalcolor
+}
\newcommand\xwm@insert@picmark@a{%
\xwm@align
- \makebox(0,0){\rotatebox{\xwm@angle}{\xwm@insertpic}}\relax
-}%
+ \makebox(0,0){\rotatebox{\xwm@angle}{\xwm@insertpic}}%
+}
\newcommand\xwm@insert@textmark@b{%
\put(\xwm@xcoord@a,\xwm@ycoord@a){\xwm@insert@textmark@a}%
-}%
+}
\newcommand\xwm@insert@picmark@b{%
\put(\xwm@xcoord@a,\xwm@ycoord@a){\xwm@insert@picmark@a}%
-}%
+}
\newcommand\xwm@insert@mark@a{%
\xwm@coords
\ifxwm@bool@tmark\xwm@insert@textmark@b\fi
@@ -317,89 +324,81 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
\fi
\fi\fi\fi\fi\fi\fi\fi
\fi
-}%
+}
\ifxwm@printwatermark
\AtBeginShipout{\AtBeginShipoutUpperLeft{\xwm@insertmark}}%
\xwm@info{Option 'printwatermark=true': watermark printed}%
\fi
-\krsetup{keyfamily=minipage,macroprefix=mp@}
+\krsetup{keyfamily=minipage,macroprefix=mp@}%
\define@keylist{2,width,\paperwidth,;2,textcolor,black,;
2,framecolor,white,;2,framesep,3pt,;2,framerule,0.4pt,;
- 2,text,No text passed.,}
-\define@cmdkey[XWM]{minipage}[mp@]{align}[center]{%
- \protected@edef\mp@align{\mp@align}%
- \def\@tempa{center}%
- \ifx\mp@align\@tempa
- \gdef\mp@align{\centering}%
+ 2,text,No text passed.,}%
+\define@key[XWM]{minipage}{align}[center]{%
+ \begingroup
+ \edef\x{\endgroup\noexpand\XKV@cc*+[\noexpand\val\noexpand\nr]{#1}%
+ {center,right,left,justified}{}{}}%
+ \x
+ \ifcase\nr\relax
+ \def\mp@align{\centering}%
+ \or
+ \def\mp@align{\flushright}%
+ \or
+ \def\mp@align{\flushleft}%
+ \or
+ \let\mp@align\relax
\else
- \def\@tempa{right}%
- \ifx\mp@align\@tempa
- \gdef\mp@align{\flushright}%
- \else
- \def\@tempa{left}%
- \ifx\mp@align\@tempa
- \gdef\mp@align{\flushleft}%
- \else
- \def\@tempa{justified}%
- \ifx\mp@align\@tempa
- \global\let\mp@align\relax
- \else
- \xwm@err{Inadmissible value '#1' for minipage's align}
- \fi
- \fi
- \fi
+ \xwm@err{Inadmissible value '\string#1' for minipage's align}%
\fi
-}
+}%
\presetkeys[XWM]{minipage}{align,width,textcolor,text,framesep,
framerule,framecolor}{}%
\long\def\xwminipage#1{%
\setkeys[XWM]{minipage}{#1}%
- \begingroup
- \fboxsep=\mp@framesep\relax
- \fboxrule=\mp@framerule\relax
+ \begingroup%
+ \fboxsep=\mp@framesep\fboxrule=\mp@framerule%
\removelastskip
\color{\mp@framecolor}%
\noindent
\begin{boxedminipage}{\mp@width}%
\mp@align\textcolor{\mp@textcolor}{\mp@text}%
- \end{boxedminipage}\relax
+ \end{boxedminipage}%
\removelastskip
\endgroup
-}
+}%
\krsetup{keyfamily=colorbox,macroprefix=cb@}
\define@keylist{2,width,\textwidth,;2,textcolor,black,;
2,fillcolor,yellow!55,;2,framecolor,white,;
2,text,No text passed.,;2,framesep,3\p@,;2,framerule,0.4\p@,}
\define@choicekey*+[XWM]{colorbox}{align}[\val\nr]%
{center,right,left,justified}[center]{%
- \protected@edef\cb@align{\val}
+ \protected@edef\cb@align{\val}%
}{%
- \xwm@err{Inadmissible value '#1' for colorbox's align}
-}
+ \xwm@err{Inadmissible value '\string#1' for colorbox's align}%
+}%
\presetkeys[XWM]{colorbox}{align=center,width,fillcolor,textcolor,text,
framesep,framerule,framecolor}{}
\newcommand\xwcolorbox[1]{%
\setkeys[XWM]{colorbox}{#1}%
\color{\cb@framecolor}%
- \removelastskip\noindent
- \colorbox{\cb@fillcolor}{\relax
+ \removelastskip\noindent%
+ \colorbox{\cb@fillcolor}{%
\xwminipage{framesep=\cb@framesep,framerule=\cb@framerule,
framecolor=\cb@framecolor,align=\cb@align,width=\cb@width,
- text=\cb@text,textcolor=\cb@textcolor%
- }\relax
+ text=\cb@text,textcolor=\cb@textcolor
+ }%
}%
- \removelastskip\normalcolor
+ \removelastskip\normalcolor%
}%
\newcommand\ywcolorbox[1]{%
\setkeys[XWM]{colorbox}{#1}%
\color{\cb@framecolor}%
\begin{center}%
\makebox[\z@][c]{%
- \colorbox{\cb@fillcolor}{\relax
+ \colorbox{\cb@fillcolor}{%
\xwminipage{framesep=\cb@framesep,framerule=\cb@framerule,
framecolor=\cb@framecolor,align=\cb@align,width=\cb@width,
text=\cb@text,textcolor=\cb@textcolor
- }\relax
+ }%
}%
}%
\end{center}%
@@ -419,28 +418,30 @@ $Id: xwatermark.sty,v 1.3 2009/10/27 09:00:00 Ahmed Musa Exp $
}{\xwm@err{No file \xwm@picfile.\xwm@picfilex\space or wrong path}}%
}%
}\@tempa%
-}
+}%
\newrobustcmd\xwm@dis@ble@keys[1]{%
- \XKV@checksanitizeb{#1}\XKV@tempa
- \XKV@for@o\XKV@tempa\XKV@tempa{%
- \XKV@ifundefined{\XKV@header\XKV@tempa}{%
- \XKV@err{key '\XKV@tempa' undefined}%
+ \XKV@checksanitizeb{#1}\xwm@tempa
+ \XKV@for@o\xwm@tempa\xwm@tempa{%
+ \XKV@ifundefined{\XKV@header\xwm@tempa}{%
+ \xwm@warn{Key '\xwm@tempa' undefined: can't be disabled}%
}{%
- \edef\XKV@tempb{%
- \noexpand\xwm@err{Key '\XKV@tempa' has been disabled.\MessageBreak
+ \edef\xwm@tempb{%
+ \noexpand\xwm@err{Key '\xwm@tempa' has been disabled.\MessageBreak
You can't set or reset it at this late stage.\MessageBreak
You should have set it earlier in the\MessageBreak
\string\documentclass\space or \string\usepackage}%
}%
- \XKV@ifundefined{\XKV@header\XKV@tempa @default}{%
- \edef\XKV@tempc{\noexpand\XKV@define@key{\XKV@tempa}}%
+ \XKV@ifundefined{\XKV@header\xwm@tempa @default}{%
+ \edef\xwm@tempc{\noexpand\XKV@define@key{\xwm@tempa}}%
}{%
- \edef\XKV@tempc{\noexpand\XKV@define@key{\XKV@tempa}[]}%
+ \edef\xwm@tempc{\noexpand\XKV@define@key{\xwm@tempa}[]}%
}%
- \expandafter\XKV@tempc\expandafter{\XKV@tempb}%
+ \expandafter\xwm@tempc\expandafter{\xwm@tempb}%
}%
}%
-}
-\newcommand\xwm@disable@keys{\XKV@testoptb\xwm@dis@ble@keys}
+}%
+\newrobustcmd\xwm@disable@keys{\XKV@testoptb\xwm@dis@ble@keys}%
\endinput
+
+%%% End of file xwatermark.sty %%% \ No newline at end of file