summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/zwpagelayout
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-15 23:01:45 +0000
committerKarl Berry <karl@freefriends.org>2013-01-15 23:01:45 +0000
commitdffe72142c5e94e572ecfc220bfe7abcaa4c2e00 (patch)
tree6eed987fbd49aac0c00776f93115f876b3733748 /Master/texmf-dist/tex/latex/zwpagelayout
parent6f1244d9726f935d1e653b0e86102ea044bc1963 (diff)
zwpagelayout (15jan13)
git-svn-id: svn://tug.org/texlive/trunk@28846 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zwpagelayout')
-rw-r--r--Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty42
1 files changed, 27 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty b/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty
index 67a9f34d11f..6dc256aa633 100644
--- a/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty
+++ b/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty
@@ -1,7 +1,7 @@
-\ProvidesPackage{zwpagelayout}[2012/05/20 ZW Page Layout]
-\PackageInfo{zwpagelayout}{$Id: zwpagelayout.sty 435 2012-05-20 18:02:14Z zw $\@gobble}
+\ProvidesPackage{zwpagelayout}[2013/01/13 ZW Page Layout]
+\PackageInfo{zwpagelayout}{$Id: zwpagelayout.sty 453 2013-01-13 17:12:17Z zw $\@gobble}
-%% Copyright 2008--2012 Z. Wagner, http://icebearsoft.euweb.cz
+%% Copyright 2008--2013 Z. Wagner, http://icebearsoft.euweb.cz
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -158,7 +158,7 @@
\DeclareBoolOption{color}
\DeclareStringOption[cmyk]{colormodel}
\DeclareStringOption[1,1,1,1]{cropcolor}
-\DeclareStringOption[{CYAN:1,0,0,0},{MAGENTA:0,1,0,0},{YELLOW:0,0,1,0},{BLACK:0,0,0,1}]{colors}
+\DeclareStringOption[{CYAN:1,0,0,0},{MAGENTA:0,1,0,0},{*YELLOW:0,0,1,0},{BLACK:0,0,0,1}]{colors}
\DeclareBoolOption{redefineblack}
\DeclareBoolOption{redefinetocmyk}
@@ -259,6 +259,7 @@
% This part used always
+\let\ZWPL@XeTeXboxes\relax
\AtBeginDocument{\ifcaseZWdriver \or
\pdfpagewidth\paperwidth \pdfpageheight\paperheight
\else
@@ -282,14 +283,14 @@
\zwpl@bleedwidth\space \zwpl@bleedheight]
/TrimBox [\zwpl@trimorig\space \zwpl@trimorig\space
\zwpl@trimwidth\space \zwpl@trimheight]
- /ArtBox [\zwpl@trimorig\space \zwpl@trimorig\space
- \zwpl@trimwidth\space \zwpl@trimheight]}
+ %/ArtBox [\zwpl@trimorig\space \zwpl@trimorig\space
+ %\zwpl@trimwidth\space \zwpl@trimheight]
+ }
\ifcaseZWdriver
\or
\expandafter\pdfpageattr\expandafter{\zw@tmp}
\or
- \edef\zw@tmpx{pdf:put @pages <<\zw@tmp>>}
- \expandafter\special\expandafter{\zw@tmpx}
+ \edef\ZWPL@XeTeXboxes{\noexpand\special{pdf:put @thispage <<\zw@tmp>>}}
\else
\special{! userdict begin
userdict /bop-hook known {/bop-hook load cvx /ZWBox-hook exch def} if
@@ -298,8 +299,8 @@
\zwpl@bleedwidth\space \zwpl@bleedheight] /PAGE pdfmark
[/TrimBox [\zwpl@trimorig\space \zwpl@trimorig\space
\zwpl@trimwidth\space \zwpl@trimheight] /PAGE pdfmark
- [/ArtBox [\zwpl@trimorig\space \zwpl@trimorig\space
- \zwpl@trimwidth\space \zwpl@trimheight] /PAGE pdfmark
+ %[/ArtBox [\zwpl@trimorig\space \zwpl@trimorig\space
+ %\zwpl@trimwidth\space \zwpl@trimheight] /PAGE pdfmark
userdict /ZWBox-hook known {ZWBox-hook} if
} def
end}
@@ -762,13 +763,14 @@
\def\@evenhead{\OverprintXeTeXExtGState \zwpl@evenhead}%
\fi
\fi
- \def\@oddfoot{\zwpl@cropbox\zwpl@oddfoot}%
- \def\@evenfoot{\zwpl@cropbox\zwpl@evenfoot}}
+ \def\@oddfoot{\zwpl@cropbox\zwpl@oddfoot\zw@tinyfil}%
+ \def\@evenfoot{\zwpl@cropbox\zwpl@evenfoot\zw@tinyfil}}
-\def\zw@tinyfil{\tolerance\@M \hskip \z@ plus .000001fil \relax}
+\def\zw@tinyfil{\tolerance\@M \hskip \z@ plus .00001fil \relax}
% We must use the knockout mode in the cropmarks (added 2010-12-21)
\def\zwpl@cropbox{{\globaldefs=0\relax \ifzwpl@overprint\SetKnockout\fi
+ \csname ZWPL@XeTeXboxes\endcsname
\rlap{% Some parameters may be changed within the document
\raisebox{\zwpl@low}[\z@][\z@]{\everyvbox{}\offinterlineskip\boxmaxdepth\z@
\hskip -\hoffset \hskip -1in \hskip -
@@ -1005,13 +1007,23 @@
\def\thePageNumber{\#\,\arabic{page}}
+\def\zwpl@xprintcolor{\@ifstar\zwpl@s@printcolor\zwpl@printcolor}
+
\def\zwpl@printcolor#1:#2:{\edef\zwpl@temp{\noexpand\textcolor[\zwpl@colormodel]{#2}{#1}}\zwpl@temp\space}
-\def\zwpl@showcolors#1,#2*{\zwpl@printcolor#1:%
+\def\zwpl@s@printcolor#1:#2:{\bgroup
+ \setbox\@tempboxa=\hbox{\space \ignorespaces #1 \unskip \space}\@tempdima=\wd\@tempboxa
+ \@tempdimb=\ht\@tempboxa \advance\@tempdimb .5pt
+ \@tempdimc=\dp\@tempboxa \advance\@tempdimc .5pt
+ \edef\zwpl@temp{\noexpand\textcolor[\zwpl@colormodel]{#2}{\rlap{\vrule
+ width \@tempdima height \@tempdimb depth \@tempdimc}}}\zwpl@temp
+ \color{white}\box\@tempboxa \egroup \space}
+
+\def\zwpl@showcolors#1,#2*{\zwpl@xprintcolor#1:%
\ifcat$#2$\let\zwpl@next\relax
\else\def\zwpl@next{\zwpl@showcolors#2*}\fi \zwpl@next}
-\def\zwpl@showallcolors{\raisebox{.2ex}[\z@][\z@]{\expandafter\zwpl@showcolors\zwpl@colors,*}}
+\def\zwpl@showallcolors{\raisebox{.25ex}[\z@][\z@]{\expandafter\zwpl@showcolors\zwpl@colors,*}}
% Reflect (should be at the end of the package)