summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/zwpagelayout
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-14 23:51:32 +0000
committerKarl Berry <karl@freefriends.org>2012-05-14 23:51:32 +0000
commit0c3f9432e0660b6ef2af2ea0c692a0ac33cb66be (patch)
treebe3f87cff767f50c9143bd5bf2852cdcbb27aad5 /Master/texmf-dist/tex/latex/zwpagelayout
parent55d1de51b1ff992d4bc2accd2f5756a72dde0428 (diff)
zwpagelayout 1.4 (14may12)
git-svn-id: svn://tug.org/texlive/trunk@26381 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zwpagelayout')
-rw-r--r--Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty35
1 files changed, 19 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty b/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty
index 947b459a46a..461383265d3 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/01/10 ZW Page Layout]
-\PackageInfo{zwpagelayout}{$Id: zwpagelayout.sty 424 2012-01-10 22:42:46Z zw $\@gobble}
+\ProvidesPackage{zwpagelayout}[2012/05/13 ZW Page Layout]
+\PackageInfo{zwpagelayout}{$Id: zwpagelayout.sty 432 2012-05-13 15:31:25Z zw $\@gobble}
-%% Copyright 2008--2011 Z. Wagner, http://icebearsoft.euweb.cz
+%% Copyright 2008--2012 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
@@ -662,6 +662,7 @@
% Black overprint implementation
\let\zwpl@setop\relax
\let\zwpl@resetop\relax
+\let\OverprintXeTeXExtGState\relax
\newif\ifzwpl@op
\ifzwpl@overprint
@@ -691,29 +692,22 @@
\fi
}
\or % xetex
- \iffalse % disabled because it does not work
\special{pdf: object @opoff << /Type /ExtGState /op false /OP false /OPM 0 >>}
\special{pdf: object @opon << /Type /ExtGState /op true /OP true /OPM 1 >>}
\special{pdf: object @extgs << /GSko @opoff /GSop @opon >>}
- %\special{pdf: object @ExtGS << /ExtGState @extgs >>}
- %\def\ZWAddResources{\special{pdf: put @thispage << /Resources @ExtGS >>}}
- %\def\ZWAddResources{\special{pdf: put @resources << /Resources @ExtGS >>}}
- \def\ZWAddResources{\special{pdf: put @resources << /ExtGState @extgs >>}}
% macros for setting and resetting the overprint state
+ % (x)dvipdfm(x) requires setting ExtGState at each page where overprint
+ % is going to be used, done automatically if cropmarks are enabled
+ \def\OverprintXeTeXExtGState{\special{pdf: put @resources << /ExtGState @extgs >>}}
\def\zwpl@setop{\zwpl@resetop
\aftergroup\zwpl@resetop}
\def\zwpl@resetop{%
\ifzwpl@op
- \special{pdf: content /GSop gs}%
+ \special{pdf: code /GSop gs}%
\else
- \special{pdf: content /GSko gs}%
+ \special{pdf: code /GSko gs}%
\fi
- }
- \else
- \def\zwpl@setop{%
- \PackageWarningNoLine{zwpagelayout}{Overprint not yet supported in (x)dvipdfm(x)}}
- \let\zwpl@resetop\zwpl@setop
- \fi % iffalse
+ }
\else % dvips
\def\zwpl@setop{\zwpl@resetop
\aftergroup\zwpl@resetop}
@@ -758,9 +752,18 @@
\def\zwpl@patchps#1#2{\expandafter\gdef\csname ps@#2\endcsname{\csname ps@#1\endcsname \zwpl@patchfoot}}
\def\zwpl@patchfoot{\let\zwpl@oddfoot\@oddfoot \let\zwpl@evenfoot\@evenfoot
+ \ifzwpl@overprint
+ \expandafter\ifx\csname OverprintXeTeXExtGState\endcsname\relax \else
+ \let\zwpl@oddhead\@oddhead \let\zwpl@evenhead\evenhead
+ \def\@oddhead{\OverprintXeTeXExtGState \zwpl@oddhead}%
+ \def\@evenhead{\OverprintXeTeXExtGState \zwpl@evenhead}%
+ \fi
+ \fi
\def\@oddfoot{\zwpl@cropbox\zwpl@oddfoot}%
\def\@evenfoot{\zwpl@cropbox\zwpl@evenfoot}}
+\def\zw@tinyfil{\tolerance\@M \hskip \z@ plus .000001fil \relax}
+
% We must use the knockout mode in the cropmarks (added 2010-12-21)
\def\zwpl@cropbox{{\globaldefs=0\relax \ifzwpl@overprint\SetKnockout\fi
\rlap{% Some parameters may be changed within the document