summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xwatermark
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-04 00:54:53 +0000
committerKarl Berry <karl@freefriends.org>2012-02-04 00:54:53 +0000
commitfdabda34df20d9dac78759fc2675cb52b6947666 (patch)
tree158b6952d226920f92abf30d5e33039c6867e36e /Master/texmf-dist/tex/latex/xwatermark
parent370b075ef6c7f53a7303af7b3d1e40fd7bfe5e20 (diff)
xwatermark 1.5.2a (1feb12)
git-svn-id: svn://tug.org/texlive/trunk@25285 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xwatermark')
-rw-r--r--Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty51
1 files changed, 31 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty b/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty
index f48af204ad6..e32d7e444f3 100644
--- a/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty
+++ b/Master/texmf-dist/tex/latex/xwatermark/xwatermark.sty
@@ -1,5 +1,5 @@
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-% This is file 'xwatermark.sty', version 1.5.2, November 2011. %
+% This is file 'xwatermark.sty', version 1.5.2a, February 2012. %
% %
% This package puts user-specified watermarks (graphics and arbitrary %
% texts) on select pages of documents. See package documentation %
@@ -19,7 +19,7 @@
% implied warranties of merchantability and fitness for a particular %
% purpose. %
% %
-% Copyright (c) 2009-2011 Ahmed Musa (amusa22@gmail.com). %
+% Copyright (c) 2009-2012 Ahmed Musa (amusa22@gmail.com). %
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\@ifpackageloaded{catoptions}{%
@@ -31,9 +31,9 @@
\RequirePackage{catoptions}[2011/10/22]%
}
\UseNormalCatcodes
-\StyleFilePurpose{Puts select watermarks on select pages}
+\StyleFilePurpose{A dynamic watermarking scheme}
\StyleFileRCSInfo
-$Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
+$Id: xwatermark.sty,v 1.5.2a 2012/02/01 09:00:00 Ahmed Musa Exp $
\ProvidesPackage{xwatermark}[\StyleFileInfo]
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\SetStyleFileMessages[xwm@]{info}{warn}{err}
@@ -77,8 +77,19 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
}%
\expandafter\reserved@a\xwm@boxframestack
}
-\newletcs\xwm@stripallbr\stripallouterbraces
-\newletcs\xwm@stripallbrincs\stripallouterbracesincs
+\robust@def\xwm@stripallouterbraces#1#2{%
+ \edef#2{\unexpanded\cptthreexp{\xwm@str@pallouterbraces#1\strip@nil}}%
+}
+\robust@def\xwm@str@pallouterbraces#1\strip@nil{%
+ \romannumeral\ifbracedTF{#1}{%
+ \expandafter\ifnullTF\expandafter{\@gobble#1}{%
+ \expandafter\@gobble\xwm@str@pallouterbraces#1\strip@nil
+ }{0 #1}%
+ }{0 #1}%
+}
+\robust@def\xwm@stripallouterbracesincs#1{%
+ \expandafter\xwm@stripallouterbraces\expandafter{#1}#1%
+}
\new@def*\xwmremoveleadparsers#1#2{%
\s@expandarg\ifbracedTF{#2}{%
\unexpanded\expandafter{#2}%
@@ -316,7 +327,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\ifmacroTF{#1}{}{\cpt@notcserr{#1}}%
\begingroup
\cptexpandmacro{#1}\xwm@tempa
- \cptexpandargonce{\endgroup\xwm@stripallbr}\xwm@tempa#1%
+ \cptexpandargonce{\endgroup\xwm@stripallouterbraces}\xwm@tempa#1%
\ltxkeys@trimspacesincs{#1}%
\cptexpandsecond{\def\reserved@a##1}{#1}##2##3\xwm@nil{%
\def\reserved@a{##2}%
@@ -528,7 +539,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\fi
\robust@def*\DeclareWatermarkParser#1{%
\begingroup
- \xwm@stripallbr{#1}\xwm@tempa
+ \xwm@stripallouterbraces{#1}\xwm@tempa
\xdef\xwm@watermarkparser{\cptoxdetok\xwm@tempa}%
\endgroup
}
@@ -554,7 +565,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\xwm@swbtrue
\cptgxaddtolist*\xwm@picfilesread{\usename{#2picfile}}%
}%
- \aftercsname\xwm@stripallbrincs{#2picfileext}%
+ \aftercsname\xwm@stripallouterbracesincs{#2picfileext}%
\ifboolTF{xwm@pdf}{%
\xifinsetTF{,\usename{#2picfileext},}{,pdf,png,jpeg,jpg,mps,}{}{%
\csn@def{#2picfileext}{pdf}%
@@ -633,7 +644,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
pmark=true;
graphicsoptions={}/
\ifbracedTF{##1}{%
- \aftercsname{\xwm@stripallbr{##1}}{#1graphicsoptions}
+ \aftercsname{\xwm@stripallouterbraces{##1}}{#1graphicsoptions}
}{%
\cpt@err{Values of key 'graphicsoptions' not braced}\@ehc
};
@@ -670,7 +681,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
fontsize=1cm/\aftercsname{\xwm@defaultunits{##1}}{#1fontsize};
fontseries=b;
fontfamily=bch;
- \needvalue{picfile}=/\aftercsname\xwm@stripallbrincs{#1picfile}
+ \needvalue{picfile}=/\aftercsname\xwm@stripallouterbracesincs{#1picfile}
\ifcsnnullTF{#1picfile}{\usename{#1pmarkfalse}}{\usename{#1pmarktrue}
\usename{#1minmarktrue}};
\needvalue{picture-file}=/\setaliaskey{picfile};
@@ -691,7 +702,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
picture-y-position=0/\setaliaskey{picypos};
mark=DRAFT/\setaliaskey{textmark};
textmark=DRAFT/
- \aftercsname\xwm@stripallbrincs{#1textmark}
+ \aftercsname\xwm@stripallouterbracesincs{#1textmark}
\ifcsnnullTF{#1textmark}{%
\usename{#1tmarkfalse}
}{%
@@ -713,7 +724,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\usename{#1minmarktrue}\fi
};
pages=1-1/
- \aftercsname\xwm@stripallbrincs{#1pages}
+ \aftercsname\xwm@stripallouterbracesincs{#1pages}
\aftercsname\xifstrcmpTF{#1pages}{0-0}{}{%
\usename{#1prangetrue}\usename{#1minmarktrue}
}
@@ -1579,10 +1590,10 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\cpt@useemptytrue
\def\xwm@tempa{#3}%
\ifboolTF{cpt@st}{%
- \ifbracedTF{#3}{\xwm@stripallbr{#3}\xwm@tempa}{}%
+ \ifbracedTF{#3}{\xwm@stripallouterbraces{#3}\xwm@tempa}{}%
\def\csv@do##1{%
\ifbracedTF{##1}{%
- \xwm@stripallbr{##1}\xwm@tempa
+ \xwm@stripallouterbraces{##1}\xwm@tempa
}{%
\def\xwm@tempa{##1}%
}%
@@ -1631,7 +1642,7 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\let\xwm@pathfound\@empty
\cpt@choicefdfalse
\def\tsv@do##1{%
- \xwm@stripallbr{##1}\xwm@tempa
+ \xwm@stripallouterbraces{##1}\xwm@tempa
\openin\@inputcheck\xwm@tempa#1\@space
\xwmifeofTF\@inputcheck{}{%
\let\xwm@pathfound\xwm@tempa
@@ -1829,8 +1840,8 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\catcode`\|=\catcode`\%
\robust@gdef*\xwm@boxedminipage[#1]{%
\ltxkeys@launchkeys[XWM]{boxedminipage}{#1}%
- \xwm@stripallbrincs\xwmbmp@width
- \xwm@stripallbrincs\xwmbmp@textcolor
+ \xwm@stripallouterbracesincs\xwmbmp@width
+ \xwm@stripallouterbracesincs\xwmbmp@textcolor
\leavevmode\@pboxswfalse
\begingroup
\color{\xwmbmp@framecolor}%
@@ -1908,8 +1919,8 @@ $Id: xwatermark.sty,v 1.5.2 2011/11/24 09:00:00 Ahmed Musa Exp $
\robust@def*\xwmminipage{\cpt@testopt\xwm@minipage{}}
\robust@def\xwm@minipage[#1]#2{%
\ltxkeys@launchkeys[XWM]{minipage}{#1}%
- \xwm@stripallbrincs\xwmmp@width
- \xwm@stripallbrincs\xwmmp@textcolor
+ \xwm@stripallouterbracesincs\xwmmp@width
+ \xwm@stripallouterbracesincs\xwmmp@textcolor
\xwm@pushboxframe
\fboxsep\xwmmp@framesep\fboxrule\xwmmp@framerule\relax
\cptdimdef\xwmmp@boxwidth{\xwmmp@width-2\fboxsep-2\fboxrule}%