From 0c3f9432e0660b6ef2af2ea0c692a0ac33cb66be Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 14 May 2012 23:51:32 +0000 Subject: zwpagelayout 1.4 (14may12) git-svn-id: svn://tug.org/texlive/trunk@26381 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/zwpagelayout/README | 6 ++-- .../doc/latex/zwpagelayout/adjustfoot.pdf | Bin 89001 -> 89001 bytes .../doc/latex/zwpagelayout/adjusthead.pdf | Bin 88764 -> 88764 bytes .../doc/latex/zwpagelayout/coversample.pdf | Bin 65926 -> 65926 bytes .../doc/latex/zwpagelayout/zwpagelayout.pdf | Bin 467808 -> 468861 bytes .../doc/latex/zwpagelayout/zwpagelayout.tex | 35 +++++++++++++++------ .../tex/latex/zwpagelayout/zwpagelayout.sty | 35 +++++++++++---------- 7 files changed, 48 insertions(+), 28 deletions(-) diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/README b/Master/texmf-dist/doc/latex/zwpagelayout/README index 480e4dc3b04..40675167bcc 100644 --- a/Master/texmf-dist/doc/latex/zwpagelayout/README +++ b/Master/texmf-dist/doc/latex/zwpagelayout/README @@ -1,5 +1,5 @@ ============================================================================= -Package: zwpagelayout Version 1.3a 10 January 2012 +Package: zwpagelayout Version 1.4 13 May 2012 ============================================================================= This package was developed as a typographers toolbox offering the most @@ -8,8 +8,8 @@ as well as the page layout. The next important feature is the ability of printing crop marks both with TeX + dvips or (x)dvipdfm(x) and with pdfTeX. Finally it is possible to reflect pages both horizontally and vertically. -Version 1.3a is a bug release. It fixes a bug that occured when the -onlycropmark option was used. +Version 1.4 implements black overprint for (x)dvipdfm(x) family of drivers, +i.e. it now works also with XeLaTeX. The license of the package is LPPL. diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf index 0d8414a42b8..e7ca761b803 100644 Binary files a/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf and b/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf differ diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf index ef1ad71b190..ae3bf8a3ff4 100644 Binary files a/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf and b/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf differ diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf index 9a0dabda098..25fc90831cb 100644 Binary files a/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf and b/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf differ diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf index 52d03a50bc3..82d5a39e31e 100644 Binary files a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf and b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf differ diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex index b94e1674bd9..35d9a87890c 100644 --- a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex +++ b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex @@ -1,8 +1,8 @@ -%% $Id: zwpagelayout.tex 424 2012-01-10 22:42:46Z zw $ +%% $Id: zwpagelayout.tex 433 2012-05-13 17:22:20Z zw $ \input utf8-t1 % encTeX required \documentclass[11pt]{article} \usepackage{zwgetfdate} -\usepackage[footskip=30pt,topmargin=2cm,leftmargin=2cm,rightmargin=5cm,botmargin,nopdfinfo]{zwpagelayout} +\usepackage[footskip=30pt,topmargin=2cm,leftmargin=15mm,rightmargin=55mm,botmargin,nopdfinfo]{zwpagelayout} \usepackage[T1]{fontenc} \usepackage{lmodern,array,dcolumn,verbatim,graphicx} \usepackage[figuresright]{rotating} @@ -249,7 +249,7 @@ It is even possible to calculate both dimensions using \eg. \end{verbatim} \subsubsection{Standard paper sizes}\label{standard} -\omg{a0\,\ldots}\omg{\ldots\,c10}\omg{executive}\omg{legal}\omg{letter} +\omg{a0\,\ldots\,c10}\omg{executive}\omg{legal}\omg{letter} Options \opt{a0}\ldots\opt{a10}, \opt{b0}\ldots\opt{b10}, \opt{c0}\ldots\opt{c10} are used to select paper size according to the A, B or C series where the dimensions are rounded to integers in milimeters. For instance, the A6 size is \papdims[\krat]{a6}. The package also supports paper sizes @@ -803,8 +803,15 @@ The overprinting support must be requested by the \opt{overprint} option. If the overprint any color, not just black. You thus should not enable overprinting globally. The mode is therefore set to \textit{knockout} within the package. -Overprint support is currently implemented for pdftex and dvips only. Support for (x)dvipdfm(x) is -prepared but there is a bug in it. It will hopefully be fixed soon. +\cmg{OverprintXeTeXExtGState} +Overprint is implemented in all supported drivers. However, there is a minor problem with the +(x)dvipdfm(x) family of drivers. The definition of the graphic state must be present in the +resources of each page where overprinting is used. The (x)dvipdfm(x) drivers do not do it +automatically, it has to be done by the \cmd{OverprintXeTeXExtGState} macro. Since the cropmarks +switch overprint off, they require the definition of the graphic state and the macro is always +invoked from the running head. This requirement is thus a minor problem. The user usually does not +care whether overprint is enabled for preview and proof-reading. The final document will have +cropmarks and thus overprint will be enabled. \cmg{SetOverprint}\cmg{SetKnockout} These macros change the mode to \textit{overprint} or \textit{knockout}, respectively. They act as @@ -837,6 +844,14 @@ Although \textit{red}, \textit{green}, \textit{blue} will rarely be used for ove just as a background), option \opt{redefinetocmyk} requests redefinition of these colors to CMYK. The \textit{black} color will be redefined as well. +\vb +\textbf{Important note:} the (x)dvipdfm(x) drivers may switch to the gray colour model after +\cmd{textcolor} even if redefinition of black or even all colours to CMYK was requested. If black +overprint does not work, insert explicit \verb;\color{cmykblack};. This trick is not needed with +pdf\TeX\ or dvips. + +\vb + \mg{grblack}\mg{rgbred}\mg{rgbgreen}\mg{rgbblue} If the colors are redefined to CMYK, the original definitions are not available. Although you redefine them due to a printing process where the RGB colors are undesirable, you can sometimes @@ -1202,10 +1217,8 @@ used in \XeTeX\ or more specifically with (x)dvipdfm(x) drivers, other \texttt{b code must not be used. See section~\ref{reflection} for details on its implementation. \subsection{Overprinting} -Overprinting is not yet supported in (x)dvipdfm(x), thus it does not work in \XeTeX, see -section~\ref{overprinting}. The author will try to implement it soon. In fact the macros are prepared -but commented out because they cause an error message and resulting PDF file cannot be displayed. -Your help will be appreciated. +Overprinting works in (x)dvipdfm(x) drivers but may be cumbersome in some situations. More details +are given in section~\ref{overprinting}. It was also found that overprinting does not work if the PostScript file is converted to PDF by GhostScript version~7.x. This is a bug in GhostScript, overprinting works fine if @@ -1230,6 +1243,10 @@ This section summarizes the changes. The version and the package date is given. specify the date in the \cmd{usepackage} or \cmd{RequirePackage} command if you rely on a specific feature not available in the old version of the package. +\subsection{Version 1.4, 2012/05/13} +Black overprint is implemented for the (x)dvipdfm(x) family of drivers. It means that it now works +in \XeLaTeX, see section~\ref{overprinting}. + \subsection{Version 1.3a, 2012/01/10} \begin{itemize} \item Bug fix, code rearrangement in order to prevent an error message if \opt{onlycropmarks} is 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 -- cgit v1.2.3