summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-23 00:22:47 +0000
committerKarl Berry <karl@freefriends.org>2010-12-23 00:22:47 +0000
commitbdea9ce1af1e711d925e2522f9b299f49c9a4afe (patch)
tree7cff6292e556bc8c33724231bb67e4f6c080af76
parent4bd653572e321c0a03ec5d592861c60d56e9aaf2 (diff)
zwpagelayout 1.1 (22dec10)
git-svn-id: svn://tug.org/texlive/trunk@20828 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/README11
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdfbin91078 -> 92248 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdfbin90875 -> 92044 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdfbin82939 -> 66290 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/coversample.tex3
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdfbin479141 -> 522839 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex694
-rw-r--r--Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty378
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds3
9 files changed, 927 insertions, 162 deletions
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/README b/Master/texmf-dist/doc/latex/zwpagelayout/README
index 5075fc62a9e..b8529959e8c 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.0a 28 February 2009
+Package: zwpagelayout Version 1.1 21 December 2010
=============================================================================
This package was developed as a typographers toolbox offering the most
@@ -7,3 +7,12 @@ important features for everyday work. First it allows setting the paper size
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.1 adds a few features: support of black overprint, possibility
+of setting PDF information without the need of loading the hyperref package,
+automatic setting of ArtBox, TrimBox and BleedBox (can be disabled) and
+partial compliance with PDF/X-1a.
+
+The license of the package is LPPL.
+
+Author: Z. Wagner, http://icebearsoft.euweb.cz
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf
index ea6c15f452e..759d9676bd5 100644
--- a/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf
+++ b/Master/texmf-dist/doc/latex/zwpagelayout/adjustfoot.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf
index 182a297b95f..5eb0bcd0d44 100644
--- a/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf
+++ b/Master/texmf-dist/doc/latex/zwpagelayout/adjusthead.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf
index ab91925ea02..99addcdb5f2 100644
--- a/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf
+++ b/Master/texmf-dist/doc/latex/zwpagelayout/coversample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/coversample.tex b/Master/texmf-dist/doc/latex/zwpagelayout/coversample.tex
index 3124acae229..35ad4a3a08b 100644
--- a/Master/texmf-dist/doc/latex/zwpagelayout/coversample.tex
+++ b/Master/texmf-dist/doc/latex/zwpagelayout/coversample.tex
@@ -4,7 +4,6 @@
botmargin,strictheight,
leftmargin=0mm,flap=40mm,textwidth=50mm,spine=8mm,
cropmarks,cropframe,croptitle=Cover]{zwpagelayout}
-\usepackage[SC0,ISBN=978-80-7340-097-2]{ean13isbn}
\usepackage[T1]{fontenc}
\usepackage{lmodern,rotating}
\pagestyle{empty}
@@ -16,7 +15,7 @@
\vbox to \textheight{\hsize \CropFlap \centering
Back flap\vfill}\hss
\vbox to \textheight{\hsize \UserWidth \centering
- Back cover\vfill \leavevmode \EANisbn}\hss
+ Back cover\vfill \leavevmode ISBN+EAN}\hss
\vbox to \textheight{\hsize \CropSpine \centering
\vfill
\begin{sideways}Spine\end{sideways}\vfill}\hss
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf
index c010e7f8b8f..b54c2f988ae 100644
--- a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf
+++ b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex b/Master/texmf-dist/doc/latex/zwpagelayout/zwpagelayout.tex
index 3291d9da76e..42860154c76 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 290 2008-12-26 17:43:49Z zw $
+%% $Id: zwpagelayout.tex 375 2010-12-21 11:27:31Z zw $
\input utf8-t1 % encTeX required
\documentclass[11pt]{article}
\usepackage{zwgetfdate}
-\usepackage[footskip=30pt,topmargin=2cm,leftmargin=2cm,rightmargin=5cm,botmargin]{zwpagelayout}
+\usepackage[footskip=30pt,topmargin=2cm,leftmargin=2cm,rightmargin=5cm,botmargin,nopdfinfo]{zwpagelayout}
\usepackage[T1]{fontenc}
\usepackage{lmodern,array,dcolumn,verbatim,graphicx}
\usepackage[figuresright]{rotating}
@@ -34,6 +34,11 @@
\def\bool#1{\texorpdfstring{\textit{#1}}{#1}}
\def\is{\unskip\nobreak\space =\penalty200 \space\ignorespaces}
+\DeclareRobustCommand\XeTeX{X\kern-.125em\lower.5ex\hbox{\csname
+ reflectbox\endcsname{E}}\kern-.1667em\TeX}
+\DeclareRobustCommand\XeLaTeX{X\kern-.125em\lower.5ex\hbox{\csname
+ reflectbox\endcsname{E}}\LaTeX}
+
\makeatletter
\newcommand*\papdims[2][.]{\bgroup
\def\zw@papdim##1,##2\zw@{\sepunit{##1}#1\sepunit{##2}}%
@@ -57,8 +62,11 @@
\let\zwcomma\,
\def\,{\texorpdfstring{\zwcomma}{}}
+\clubpenalty10000
+\widowpenalty10000
+
\begin{document}
-\hyphenation{allow-with-height-switching}
+\hyphenation{post-script ghost-script allow-with-height-switching Output-Condition Output-Condition-Identifier}
\title{Page Layout with Crop Marks}
\author{Zdeněk Wagner\\\url{http://icebearsoft.euweb.cz}}
\date{Package date: \DateOfPackage{zwpagelayout}}
@@ -90,6 +98,13 @@ will calculate it from the page width, the flap width and the spine thickness. W
value of the spine thickness is known, you change it in the list of options and the whole layout
will adapt automatically.
+The files usually fail to meet PDF/X conformance due to silly reasons. It is always mandatory to
+set the title, creation date and modification date in any PDF file. It can be done by the
+\pkg{hyperref} package. However, \pkg{hyperref} is a complex package that may cause clashes with
+other packages. We do not want to kill ants by cannon balls, therefore we do simple things by simple
+means. Options for partial PDF/X conformance were added but may be switched off if a user wishes to
+use \pkg{hyperref}.
+
The package is a result of a long-term development inspired by author's everyday needs. It is a
collection of macros that were manually copied from document to document, later placed into private
packages and finally it matured into a package prepared for general use.
@@ -101,13 +116,25 @@ proof-reading is time consuming and expensive. This package therefore allows the
to be switched off and just add the crop marks provided the paper dimensions are correctly
supplied. The details will be explained later when describing the package options.
+\section{Package dependence}
+As written in the introduction, the goal was to implement as much within this single package in
+order to reduce the risk of clashes. Yet a few packages may be loaded. The package needs to know
+what engine is being used. For this purpose the \pkg{ifxetex} and \pkg{ifpdf} packages are used. If
+any of these packages is not found, it is assumed that the corresponding engine is not available.
+No error is reported. The color support requires the \pkg{color} package. It is loaded only if the
+color support is requested. The algorithm for deciding when the package is needed will be described
+in detail in section~\ref{color}.
+
+Option setting is implemented via the \pkg{kvoptions} package which in turn loads the \pkg{keyval}
+package. These packages should be available in any nowaday's \TeX\ distribution.
+
\section{Usage}
The package is loaded simply by:
\vb
\verb;\usepackage[;$\langle$options$\rangle$\verb;]{zwpagelayout};
-\vb
+\vb\noindent
Remember that the options cannot be given later, all of them must be present either here or as
options to the \cmd{documentclass} command. The package will set some dimensions based upon
\cmd{normalsize}. The package that modifies font sizes must therefore be loaded before
@@ -119,6 +146,30 @@ Some options accept a value. If the option is not specified, it may have a \text
option may be given without a value. It will then have a \textbf{standard} value. The default and standard
values will be given in the option description.
+The option value may sometimes contain spaces and commas. However, commas are used to separate
+options, and during parsing the spaces are ignored. The spaces must therefore be preceded by a
+backslash and an option value containing commas must be enclosed in braces, for example:
+
+\vb
+\begin{verbatim}
+\usepackage[a4,subject=Some\ subject,
+ keywords={keyword\ 1,\ keyword\ 2}]{zwpagelayout}
+\end{verbatim}
+
+\section{Driver selection}\label{driver.selection}
+The driver is usually selected automatically. The package makes use of the \pkg{ifxetex} and
+\pkg{ifpdf} packages to detect either \XeTeX\ or pdftex. If none of them is detected, dvips is
+assumed.
+
+\omg{driver}
+It may sometimes be necessary to set the driver manually by giving the \opt{driver} option. This
+option recognizes drivers \texttt{unknown}, \texttt{pdftex}, \texttt{xetex}, and \texttt{dvips}. In
+addition \texttt{other} is an alias to \texttt{unknown}, \texttt{dvipdfm} and \texttt{xdvipdfmx}
+are aliases to \texttt{xetex}.
+
+The package shows the driver in the log file. If the driver is set to \texttt{unknown}, all driver
+specific features will be disabled.
+
\section{Paper size and orientation}
The first task of the package is to define paper size and orientation. Remember that the package is
intended for use in real life where we cannot be limitted to standard papers sizes. However, the
@@ -206,6 +257,23 @@ milimeters. For instance, the A6 size is \papdims[\krat]{a6}. The package also s
\opt{AllowWidthHeightSwitching} and \opt{Portrait} are assumed. The page orientation may be
switched by option \opt{Landscape} (see section~\ref{orientation}).
+\subsection{Page bounding boxes}\label{Bboxes}
+The drivers usually set MediaBox to the physical size of the page. If cropmarks are requested (see
+section~\ref{cropmarks}), the package sets also BleedBox, TrimBox and ArtBox. CropBox is
+intentionally unset since it causes cropped display in Adobe Reader. Since page size setting is
+delayed, MediaBox contains the whole page including the area for the cropmarks. MediaBox is
+calculated by the driver, the other boxes are calculated by \TeX. Their dimensions are therefore
+not exact because \TeX\ does not use floating point arithmetic. The difference is negligible.
+
+\omg{noBboxes}
+Option \opt{noBboxes} disables setting the above mentioned boxes. Currently there is a known bug
+causing fatal error in Adobe Distiller if these boxes are set.
+
+\cmg{noBboxes}
+Macro \cmd{noBboxes} performs exactly the same action as the \opt{noBboxes} option. The only
+advantage is that it can be used later in the preamble of the document. It cannot be used after
+\verb.\begin{document}. because the boxes are already set at that time.
+
\section{Page layout options}
These options define the layout of the odd page. The layout of the even page is assumed to be a mirror image.
The values of \cmd{oddsidemargin} and \cmd{evensidemargin} are calculated from the values of the options.
@@ -246,7 +314,7 @@ The following options are used to specify the height and width of the text.
\subsubsection{Option \opt{textwidth}, default --1\,in}
\omg{textwidth}
This option specifies the width of the text without marginal notes. Its meaning is different for
-book covers. The option specifies the width of the cover without the extra spine (\opt{xsipne}),
+book covers. The option specifies the width of the cover without the extra spine (\opt{xspine}),
flap (\opt{flap}) and trimming (\opt{xtrim} or \opt{trim}).
\subsubsection{Option \opt{textheight}, default --1\,in}
@@ -290,7 +358,7 @@ total height. If \opt{adjustfootskip} is set to \false, the difference is added
\includegraphics{adjustfoot}\hfill
\includegraphics{adjusthead}
-\medskip
+\vb
\caption{Compensation of \cmd{textheight} by changing \cmd{footskip} (on the left) and
\cmd{headsep} (on the right)}\label{adj}
\end{figure}
@@ -298,17 +366,17 @@ total height. If \opt{adjustfootskip} is set to \false, the difference is added
The difference betweem these two options is shown in figure~\ref{adj}. Adjustment of \cmd{footskip}
was achieved by:
-\medskip
+\vb
\begin{verbatim}
\usepackage[c8,margins=6mm,headheight=4mm,headsep=4mm,
croplength=3mm,cropgap=2mm,
cropmarks,cropframe,croptitle=Adjust\ footskip]{zwpagelayout}
\end{verbatim}
-\medskip \noindent
+\vb \noindent
The sample on te right side of the figure was created by:
-\medskip
+\vb
\begin{verbatim}
\usepackage[c8,margins=6mm,headheight=4mm,headsep=4mm,adjustheadsep,
croplength=3mm,cropgap=2mm,
@@ -319,6 +387,140 @@ The sample on te right side of the figure was created by:
\omg{adjustheadsep}
This is a complementary option to \opt{adjustfootskip}.
+\section{Calculation of missing dimensions}\label{missing}
+The package can either calculate paper size from the page layout dimensions or calculate missing
+page layout dimensions if the paper size and some dimensions are known. It operates separately for
+the height and width. You can \eg. define the paper height and calculate the text height from it
+and the margins but specify all width layout dimensions and calculate the paper width.
+
+When designing simple pages it is better to define the paper size and calculate some page layout
+dimensions. However, for bok covers it is recommended to calculate at least the paper width from
+the layout dimensions of the front cover, the spine and the flap width.
+
+\subsection{Calculation of the paper size}
+Remember that paper size can be calculated only if all page layout dimensions for the corresponding
+orientation (height, width) are specified. There is no diagnostics for warning you if some
+important options are missing, the resukt will just be wrong or the package may even report an
+error. All dimensions are considered \emph{without} the area for the crop marks.
+
+\subsubsection{Paper height}
+Calculation of the paper height is very simple. The formula is:
+
+\vb
+\cmd{paperheight} = \opt{topmargin} + \opt{textheight} + \opt{botmargin} + 2 \opt{ytrim}
+
+\vb \noindent
+Remember that \opt{textheight} includes also \cmd{headheight}, \cmd{headsep}, and \cmd{footskip}.
+It is not necessary to specify \opt{ytrim}, the package checks the existence of this option and
+removes it from the formula if not given.
+
+\subsubsection{Paper width}
+Algorithm for calculating the paper width differs for simple pages and book covers. In the simple
+case the paper width is calculated as follows:
+
+\vb
+\cmd{paperwidth} = \opt{leftmargin} + \opt{textwidth} + \opt{rightmargin}
+
+\vb \noindent
+The value of \cmd{textwidth} will be equal to \opt{textwidth}. The same value will be stored in
+macro \cmd{UserWidth}, see section~\ref{crop.macros}.
+
+If the book cover is designed, the \opt{textwidth} option refers to the width of the text at the
+front cover but \opt{leftmargin} and \opt{rightmargin} are used to set \cmd{oddsidemargin} and
+\cmd{evensidemargin}. It is therefore better to set these options to zero, or alternatively to the
+same value as \opt{flap} or \opt{xtrim} if the corresponding area will be left empty. The value of
+\cmd{textwidth} will then be calculated from the final paper width by:
+
+\vb
+\cmd{textwidth} = \cmd{paperwidth} -- \opt{leftmargin} -- \opt{rightmargin}
+
+\vb
+If the \opt{flap} option is used without the \opt{spine} option in order to emulate the front cover
+and spine with an empty back cover, the paper width is calculated as:
+
+\vb
+\cmd{paperwidth} = \opt{leftmargin} + \opt{flap} + \opt{textwidth} + \opt{xtrim} +
+\opt{rightmargin}
+
+\vb \noindent
+The value of \opt{xtrim} may be omitted. The value of \opt{xspine} will be silently ignored. It is
+not allowed to have just the spine, the front cover and the flap while leaqving the back cover
+empty.
+
+The case of a book cover with the spine given is a bit more complicated:
+
+\vb
+\textit{width} = \opt{xspine} + \opt{textwidth} + \opt{flap} + \opt{xtrim}
+
+\cmd{paperwidth} = \opt{leftmargin} + \opt{spine} + 2 \textit{width} + \opt{rightmargin}
+
+\vb \noindent
+Options \opt{xspine}, \opt{flap}, and \opt{xtrim} need not be specified if these elements are not
+needed.
+
+\subsection{Calculation of page layout dimensions}\label{calc.pg.layout}
+Algorithm for calculating the page layout dimensions is intended for simple pages, not for book
+covers. Options \opt{xtrim}, \opt{ytrim}, \opt{spine}, \opt{xspine}, and \opt{flap} are silently
+ignored but will be taken into account when producing the crop marks. You can still make use of
+this algorithm if you understand what you are doing and if you wish to do extra calculations
+yourself.
+
+The dimensions may be overdetermined. In such a case the algorithm disregards one of the dimensions
+and calculates it.
+
+\subsubsection{Vertical dimensions}\label{vert.dim}
+The algorithm first looks whether \opt{textheight} was given. If not it is assumed that the user
+wishes to have it calculated from the paper height and the margins. If the \opt{botmargin} option was
+not set, it will be set to the same valu as \opt{topmargin}.
+
+In the second step the package looks whether \opt{botmargin} is defined, either by the user or from
+the previous step. If so, the text height is calculated, otherwise the bottom margin is calculated
+from the top margin and the text height. As a matter of fact, the bottom margin is never used by
+\TeX.
+
+Finally the value of \cmd{textwidth} is reduced by \cmd{headheight}, \cmd{headsep}, and
+\cmd{footskip}. If \opt{strictheight} is \cmd{false}, the values are later adjusted according to
+options \opt{adjustfootskip} and \opt{adjustheadsep} so that \cmd{textheight} -- \cmd{topskip} is
+an integer multiple of \cmd{baselineskip}.
+
+\subsubsection{Horizontal dimensions}
+The sum of the horizontal dimensions must be equal to the paper width according to the relation:
+
+\vb
+\opt{leftmargin} + \opt{textwidth} + \opt{rightmargin} = \cmd{paperwidth}
+
+\vb \noindent
+If all three dimensions are specified, \opt{textwidth} is disregarded and calculated from the other
+dimensions. If any two dimensions are given, the missing one is calculated from the above formula.
+If only one dimension is given, it is assumed that both margins have the same size and the above
+formula is applied. It is even possible to omit all dimensions. In such a case the margins are
+assumed to have the same size as \opt{topmargin} and the text width can thus be calculated.
+
+\section{Page reflection}\label{reflection}
+\omg{Reflect\-Horizontally}
+\omg{ReflectVertically}
+We sometimes need to print the whole document as a mirror image. Although there are external tools
+that can provide such a job taking PDF or PS as input, it is useful to do everything in a single
+step. The package provides options \opt{ReflectHorizontally} for horizontal reflection and
+\opt{ReflectVertically} for vertical reflection, respectively. If you specify both, some drivers
+may interpret both of them and print rotated 180$^{\circ}$, some interpret only one of them.
+
+The PostScript to PDF converters optionally rotate pages according to the text direction. They may
+be confused by reflected text and add undesired rotation. If the horizontally reflected text is
+roteted 180$^{\circ}$, it looks as if it were reflected vertically instead.
+
+Remember that these options are intended for printing only.
+The hypertext links made by the \pkg{hyperref} package will be wrong. If you wish to rotate parts
+of texts and preserve hyperlinks, use \pkg{rotating} instead.
+
+A word of warning has to be said. In \texttt{pdftext} reflection is implemented by redefininng
+\cmd{shipout}. We add PDF literal code to the beginning of each page. For \texttt{dvips} we add
+code to the \texttt{bop-hook}. If you need your own code in the \texttt{bop-hook}, you have to
+store the old definition and execute it. For \texttt{xetex} we add code to \texttt{bop} and
+\texttt{eop}. It seems that only one \texttt{bop} and one \texttt{eop} can be used. That is why the
+page is reflected vertically if both options are used. As a result you are not allowed to use your
+own \texttt{bop} and \texttt{eop} code together with these options.
+
\section{Crop marks}\label{cropmarks}
The crop marks must appear outside the print area. The package assumes that \cmd{paperheight} and
\cmd{paperwidth} contain the page size after trimming. These dimensions will then be increased and the page
@@ -328,7 +530,7 @@ will be shifted by setting \cmd{hoffset} and \cmd{voffset}. If you wish to print
The values of \cmd{hoffset} and \cmd{voffset} will be set to the sum of \opt{croplength} and \opt{cropgap}, see the following
text.
-\subsection{Basic crop marks options}
+\subsection{Basic crop marks options}\label{cropmarks}
Options described in this section define basic behaviour of the crop marks.
\subsubsection{Option \opt{onlycropmarks}, default \false, standard \true}
@@ -444,11 +646,28 @@ not be clipped. It may be useful if you know that nothing extends to the crop ma
\pkg{color} package may clash with other packages required by your document.
-\subsection{Color support for crop marks}
+\section{Color support}\label{color}
The package is able to produce basic color support, namely it prints the names of separations. The
color support is implemented via a few options. Color printing is performed using the \pkg{color}
package that is loaded automatically. The package does not use predefined color names.
+The package recognizes the \pkg{color} package by existence of the \cmd{definecolor} macro. If this
+macro is not defined, the \pkg{color} package will be added if:
+\begin{itemize}
+\item option \opt{color} is \true
+\item option \opt{nobleedclip} is \false\ and \opt{cropmarks} is \true
+\item option \opt{redefineblack} is \true
+\item option \opt{redefinetocmyk} is \true
+\item option \opt{overprint} is \true
+\end{itemize}
+If none of the above applies, the color support is not needed and the package will not be loaded.
+
+If the \pkg{color} package is being loaded, no options are given to it. Especially the driver
+selected by the \opt{driver} option (see section~\ref{driver.selection}) is not sent. If you must
+specify any option for the \pkg{color} package, you have to load it yourself before loading
+\pkg{zwpagelayout}.
+
+\subsection{Color support for cropmarks}
\omg{color}
Option \opt{color} asks for the color support. Without setting this option to \true\ all other
color options are silently ignored.
@@ -473,7 +692,7 @@ following examples.
Suppose that for some strange reason you prepare the document in the RGB space. Your specification
will then be:
-\medskip
+\vb
\begin{verbatim}
\usepackage[cropmarks,color,colormodel=rgb,cropcolor={1,1,1},
@@ -481,7 +700,7 @@ will then be:
croptitle=RGB\ example]{zwpagelayout}
\end{verbatim}
-\medskip
+\vb
Now we show a more realistic example. The document should be printed in custom colors. Since the
true specification of custom colors requires much work and is rarely worth the trouble, we make use
@@ -490,7 +709,7 @@ of the CMYK model. We will use cyan instead of Pantone 298 (blue), magenta inste
produce anything on the yellow separation and we should provide proper color names. The
specification will therefore look as:
-\medskip
+\vb
\begin{verbatim}
\usepackage[cropmarks,color,cropcolor={1,1,0,1},
@@ -499,131 +718,170 @@ specification will therefore look as:
croptitle=Example\ with\ custom\ colors]{zwpagelayout}
\end{verbatim}
-\medskip
+\vb
Notice that the \opt{colormodel} option was not specified. Its default value was used. The
\opt{cropcolor} option left zero for the yellow separation.
-\section{Calculation of missing dimensions}\label{missing}
-The package can either calculate paper size from the page layout dimensions or calculate missing
-page layout dimensions if the paper size and some dimensions are known. It operates separately for
-the height and width. You can \eg. define the paper height and calculate the text height from it
-and the margins but specify all width layout dimensions and calculate the paper width.
-
-When designing simple pages it is better to define the paper size and calculate some page layout
-dimensions. However, for bok covers it is recommended to calculate at least the paper width from
-the layout dimensions of the front cover, the spine and the flap width.
-
-\subsection{Calculation of the paper size}
-Remember that paper size can be calculated only if all page layout dimensions for the corresponding
-orientation (height, width) are specified. There is no diagnostics for warning you if some
-important options are missing, the resukt will just be wrong or the package may even report an
-error. All dimensions are considered \emph{without} the area for the crop marks.
-
-\subsubsection{Paper height}
-Calculation of the paper height is very simple. The formula is:
-
-\medskip
-\cmd{paperheight} = \opt{topmargin} + \opt{textheight} + \opt{botmargin} + 2 \opt{ytrim}
-
-\medskip \noindent
-Remember that \opt{textheight} includes also \cmd{headheight}, \cmd{headsep}, and \cmd{footskip}.
-It is not necessary to specify \opt{ytrim}, the package checks the existence of this option and
-removes it from the formula if not given.
-
-\subsubsection{Paper width}
-Algorithm for calculating the paper width differs for simple pages and book covers. In the simple
-case the paper width is calculated as follows:
-
-\medskip
-\cmd{paperwidth} = \opt{leftmargin} + \opt{textwidth} + \opt{rightmargin}
-
-\medskip \noindent
-The value of \cmd{textwidth} will be equal to \opt{textwidth}. The same value will be stored in
-macro \cmd{UserWidth}, see section~\ref{crop.macros}.
-
-If the book cover is designed, the \opt{textwidth} option refers to the width of the text at the
-front cover but \opt{leftmargin} and \opt{rightmargin} are used to set \cmd{oddsidemargin} and
-\cmd{evensidemargin}. It is therefore better to set these options to zero, or alternatively to the
-same value as \opt{flap} or \opt{xtrim} if the corresponding area will be left empty. The value of
-\cmd{textwidth} will then be calculated from the final paper width by:
-
-\medskip
-\cmd{textwidth} = \cmd{paperwidth} -- \opt{leftmargin} -- \opt{rightmargin}
-
-\medskip
-If the \opt{flap} option is used without the \opt{spine} option in order to emulate the front cover
-and spine with an empty back cover, the paper width is calculated as:
-
-\medskip
-\cmd{paperwidth} = \opt{leftmargin} + \opt{flap} + \opt{textwidth} + \opt{xtrim} +
-\opt{rightmargin}
+\subsection{CMYK colors}\label{cmykcolors}
+\mg{cmykblack}\mg{cmykread}\mg{cmykgreen}\mg{cmykblue}
+The \pkg{color} package defines \textit{black} using the GRAY model and colors \textit{red},
+\textit{green}, \textit{blue} by the RGB model. The GRAY model rarely causes any problem but the
+RGB model is not acceptable for printing. The \opt{zwpagelayout} package therefore defines the
+corresponding colors using the CMYK model. Different names are selected so that there is no clash
+in case you really need these colors in RGB.
+
+\subsection{Overprinting support, default \false, standard \true}\label{overprinting}
+\omg{overprint}
+The overprinting support must be requested by the \opt{overprint} option. If the option remains
+\false, the overprinting commands will be defined but will do nothing. Remember that you can
+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{SetOverprint}\cmg{SetKnockout}
+These macros change the mode to \textit{overprint} or \textit{knockout}, respectively. They act as
+declarative macros, similarly as \eg. \cmd{itshape}. You have to use them within a group. The
+macros are intended to be used for changing the mode for a longer part of text. Due to the way how
+environments are handled in \LaTeX, it is also possible to write:
-\medskip \noindent
-The value of \opt{xtrim} may be omitted. The value of \opt{xspine} will be silently ignored. It is
-not allowed to have just the spine, the front cover and the flap while leaqving the back cover
-empty.
-
-The case of a book cover with the spine given is a bit more complicated:
-
-\medskip
-\textit{width} = \opt{xspine} + \opt{textwidth} + \opt{flap} + \opt{xtrim}
+\vb
+\begin{verbatim}
+\begin{SetOverprint}
+Some long text to be overprinted...
+\end{SetOverprint}
+\end{verbatim}
-\cmd{paperwidth} = \opt{leftmargin} + \opt{spine} + 2 \textit{width} + \opt{rightmargin}
+\vb
-\medskip \noindent
-Options \opt{xspine}, \opt{flap}, and \opt{xtrim} need not be specified if these elements are not
+\cmg{textoverprint}\cmg{textknockout}
+If a short part of text should be printed in a different mode, one-argument macros
+\cmd{textoverprint} and \cmd{textknockout} can be used. They act similarly as the \cmd{textit}
+macro.
+
+\omg{redefineblack}
+Overprinting works only if both the background and forground colors are in the CMYK model. However,
+the \textit{black} color, which is most often overprinted, is defined in the GRAY model as default.
+This package defines the \texttt{cmykblack} color that may be used for this purpose. In addition if
+\opt{redefineblack} is set to \true, the standard \textit{black} color will be redefined in CMYK.
+
+\omg{redefinetocmyk}
+Although \textit{red}, \textit{green}, \textit{blue} will rarely be used for overprinting (maybe
+just as a background), option \opt{redefinetocmyk} requests redefinition of these colors to CMYK.
+The \textit{black} color will be redefined as well.
+
+\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
+need them. For this purpose \textit{grblack}, \textit{rgbred}, \textit{rgbgreen}, \textit{rgbblue}
+colors are always available.
+
+\section{PDF information}\label{pdfinfo}
+The package writes the basic information that is required by PDF/X even if PDF/X conformace is not
+requested. The basic pieces of information are \texttt{CreationDate} and \texttt{ModDate}.
+Implementation is driver dependent and some information is supplied by the driver itself. Thus
+\texttt{pdftex} inserts both, (x)dvipdfm(x) (\XeTeX) adds \texttt{CreationDate} only, dvips adds
+none. The missing information is supplied by this package based on \cmd{date} and \cmd{time}. The
+next subsections will explain how other fields can be defined and how they can be disabled if
needed.
-\subsection{Calculation of page layout dimensions}\label{calc.pg.layout}
-Algorithm for calculating the page layout dimensions is intended for simple pages, not for book
-covers. Options \opt{xtrim}, \opt{ytrim}, \opt{spine}, \opt{xspine}, and \opt{flap} are silently
-ignored but will be taken into account when producing the crop marks. You can still make use of
-this algorithm if you understand what you are doing and if you wish to do extra calculations
-yourself.
-
-The dimensions may be overdetermined. In such a case the algorithm disregards one of the dimensions
-and calculates it.
-
-\subsubsection{Vertical dimensions}\label{vert.dim}
-The algorithm first looks whether \opt{textheight} was given. If not it is assumed that the user
-wishes to have it calculated from the paper height and the margins. If the \opt{botmargin} option was
-not set, it will be set to the same valu as \opt{topmargin}.
-
-In the second step the package looks whether \opt{botmargin} is defined, either by the user or from
-the previous step. If so, the text height is calculated, otherwise the bottom margin is calculated
-from the top margin and the text height. As a matter of fact, the bottom margin is never used by
-\TeX.
+\subsection{PDF title}\label{pdftitle}
+\omg{title}
+The \opt{title} option is used to set the title field. The default is to take the contents of the
+\opt{croptitle} option even if the cropmarks are switched off. If \opt{croptitle} is empty,
+\cmd{jobname} is used. If you specify this option without a value, it has a special meaning of
+suppressing creation of PDF information field. Since this is not mnemonic, there is a
+\opt{nopdfinfo} option with the same effect, see subsection~\ref{nopdfinfo}.
+
+\subsection{PDF author}
+\omg{author}
+The \opt{author} option sets the author of the document. The field is not required by PDF/X,
+therefore it has no default value.
+
+\subsection{PDF subject}
+\omg{subject}
+The \opt{subject} option defines the subject of the document.
+
+\subsection{PDF keywords}
+\omg{keywords}
+The \opt{keywords} option is used to set the list of keywords. Usually the keywords will be given
+as a comma separated list. They must therefore be enclosed in braces.
+
+\subsection{Option \opt{nopdfinfo}}\label{nopdfinfo}
+\omg{nopdfinfo}
+The above mentioned fields may also be set in the PDF file by the \pkg{hyperref} package. If
+\pkg{hyperref} is used, it may not be desirable if \pkg{zwpagelayout} wrote the PDF information. If
+you specify \opt{nopdfinfo} in the list of options, setting all above mentined information (including
+\texttt{ModDate}) will be disabled. This option is not boolean, it just erases the contents of the
+\opt{title} option, see subsection~\ref{pdftitle}. Since options are procesed in the order in which
+they are declared in the package, \opt{nopdfinfo} will always erase the PDF title even if it is
+specified before \opt{title}.
+
+\section{PDF/X-1a compliance}\label{pdfx1a}
+The package partially implements the PDF/X-1a standard. Remember that implementation is driver
+dependent and not everything can be achieved with all drivers. The following sections will give you
+more detail. Unlike the \pkg{pdfx} package we try to do as much in \texttt{xetex} and set the
+bounding boxes according to the real page size.
+
+\subsection{Option \opt{pdfminorversion}}
+\omg{pdfminorversion}
+This option allows you to set the version of the PDF file. It works with \texttt{pdftex} only. There
+is no \cmd{special} for sending this information to (x)dvipdfm(x), it can only be set on the
+command line. Similarly PostScript to PDF converters accept such setting from the command line or a
+configuration file although there is a PS command for setting it.
+
+\cmg{SetPDFminorversion}
+The same effect can also be achieved by \cmd{SetPDFminorversion} from a preamble. The macro accepts
+a single argument and is implemented for \texttt{pdftex} only. It does nothing for other drivers.
+
+\subsection{Option \opt{pdfx}}
+\omg{pdfx}
+This option ask the package to create PDF/X-1a file. The first requirement is to set PDF version
+to~1.3, thus it sets the minor version to~3 and then disables macro \cmd{SetPDFminorversion}. Other options
+have reasonable default values but they can be changed as described in the following subsections.
+
+PDF/X-1a compliance is not handled for \texttt{dvips} and some features are not available for
+\texttt{xetex}.
+
+\subsection{Options \opt{OutputCondition} and \opt{OutputConditionIdentifier}, default Euroscale
+Coated~v2}
+\omg{OutputCondition}
+\omg{OutputConditionIdentifier}
+These options specify the ICC profile. I am not sure how to obtain the correct names. The default
+values correspond to the ICC profiles used in Europe but you can easily set another value. From my
+personal experience I prefer \textit{eucmyk50} when converting my images from AdobeRGB to CMYK.
+
+\subsection{Option \opt{ICCfile}}
+\omg{ICCfile}
+This option specifies the name of the file containing the ICC profile. There is no default
+definition and no profile is embedded. The profiles usually accompany commercial products as
+printers and scanners or can be downloaded from the web. If you have a CMYK profile that you wish
+to embed, you can specify its name with the opt{ICCfile} option. The profile can only be embedded
+by \texttt{pdftex}.
+
+\subsection{Font embedding}
+PDF/X requires all fonts to be embedded. The \pkg{zwpagelayout} package cannot ensure it. You have
+to verify your configuration files and make sure that fonts are embedded.
+
+\subsection{Page bounding boxes}
+It is mandatory to set BleedBox, TrimBox, and ArtBox in addittion to MediaBox. Setting these boxes
+is explained in section~\ref{Bboxes}.
+
+\subsection{PDF information}
+Mandatory fields are title, CreationDate and ModDate. All these fields are set automatically unless
+they are disabled as described in section~\ref{pdfinfo}.
+
+\subsection{MPT metadata}
+Emdedding MPT metadata is currently not implemented. It will be implemented in the future but only
+for \texttt{pdftex}.
+
+\subsection{Color}
+PDF/X-1a allows only CMYK colors and spot colors. Since \pkg{zwpagelayout} does not handle colors
+itself but makes use of the \pkg{color} package, it cannot verify that only allowed colors are
+used.
-Finally the value of \cmd{textwidth} is reduced by \cmd{headheight}, \cmd{headsep}, and
-\cmd{footskip}. If \opt{strictheight} is \cmd{false}, the values are later adjusted according to
-options \opt{adjustfootskip} and \opt{adjustheadsep} so that \cmd{textheight} -- \cmd{topskip} is
-an integer multiple of \cmd{baselineskip}.
-
-\subsubsection{Horizontal dimensions}
-The sum of the horizontal dimensions must be equal to the paper width according to the relation:
-
-\medskip
-\opt{leftmargin} + \opt{textwidth} + \opt{rightmargin} = \cmd{paperwidth}
-
-\medskip \noindent
-If all three dimensions are specified, \opt{textwidth} is disregarded and calculated from the other
-dimensions. If any two dimensions are given, the missing one is calculated from the above formula.
-If only one dimension is given, it is assumed that both margins have the same size and the above
-formula is applied. It is even possible to omit all dimensions. In such a case the margins are
-assumed to have the same size as \opt{topmargin} and the text width can thus be calculated.
-
-\section{Page reflection}
-\omg{Reflect\-Horizontally}
-\omg{ReflectVertically}
-We sometimes need to print the whole document as a mirror image. Although there are external tools
-that can provide such a job taking PDF or PS as input, it is useful to do everything in a single
-step. The package provides options \opt{ReflectHorizontally} for horizontal reflection and
-\opt{ReflectVertically} for vertical reflection, respectively. If you specify both, some drivers
-may interpret both of them and print rotated 180$^{\circ}$, some interpret only one of them and
-some driver may get totally confused. Remember that these options are intended for printing only.
-The hypertext links made by the \pkg{hyperref} package will be wrong. If you wish to rotate parts
-of texts and preserve hyperlinks, use \pkg{rotating} instead.
\section{Useful macros}\label{macros}
The package offers two types of useful macros. The macros from the first group help in designing
@@ -664,10 +922,10 @@ dimensions.
However, you have no control over the page style of the inserted empty even page. This feature is
enabled in the \cmd{NewOddPage} macro. Its syntax is:
-\medskip
+\vb
\verb;\NewOddPage*[;$\langle$style$\rangle$\verb;];
-\medskip\noindent
+\vb\noindent
Optional parameter $\langle$style$\rangle$ defines the style of the empty even page that should be
fed to the \cmd{thispagestyle} command. The default is \texttt{empty}. The starred version displays
a warning in the log file if an empty page was inserted.
@@ -717,7 +975,7 @@ macros: \cmd{CropFlap}\is\opt{flap}, \cmd{CropSpine}\is\opt{spine}, \cmd{CropXSp
The use of these macros can be shown by an example. The book cover with flaps displayed in
Figure~\ref{cover} was prepared by the following code:
-\medskip
+\vb
\verbatiminput{coversample}
\begin{sidewaysfigure}[p]
@@ -734,7 +992,7 @@ the \opt{trim} option fills both \opt{xtrim} and \opt{ytrim}. You can take advan
your document more general. You can \eg. define the book cover in two variants, with or without
flaps, using this trick:
-\medskip
+\vb
\begin{verbatim}
\ifcat$\CropFlap$
% no flaps
@@ -745,7 +1003,7 @@ flaps, using this trick:
\fi
\end{verbatim}
-\medskip
+\vb
\cmg{thePageNumber}
Macro \cmd{thePageNumber} is used to print the page number together with the crop mark text. We have
@@ -754,6 +1012,58 @@ to redefine it. We can \eg. define the book title with the \opt{croptitle} optio
text ``Cover'' instead of the page number when typesetting the cover. Usage of this macro is also
demonstrated in Figure~\ref{cover}.
+\subsection{Driver switching macros}\label{driver.switching}
+These macros provides conditional branching according to the currently selected driver no matter
+whether it is chosen automatically or by specifying the \opt{driver} option described in
+section~\ref{driver.selection}. The macros do not change page layout, they are therefore available
+even if the \opt{onlycropmarks} option was given.
+
+\cmg{ifcaseZWdriver}
+Macro \cmd{ifcaseZWdriver} expands to an open \cmd{ifcase} primitive. You can thus branch the code
+according to the driver. The numeric values are 0 for \texttt{unknown}, 1 for \texttt{pdftex}, 2
+for \texttt{xetex}, 3 for \texttt{dvips}. The branching may look as follows:
+
+\vb
+\begin{verbatim}
+\ifcaseZWdriver
+ Code for unknown
+\or
+ Code for pdftex
+\or
+ Code for xetex
+\or
+ Code for dvips
+\else
+ Error, it may not happen!
+\fi
+\end{verbatim}
+
+\vb
+Since \cmd{ifcaseZWdriver} is a macro, it cannot by used inside another conditional statement. If
+it falls to the \false\ branch, it will not be expanded and \TeX\ will complain that it sees
+misplaced \cmd{else} etc. You would have to enter all corresponding contidional as \cmd{csname}
+constructions or define the condition in a separate macro that will be invoked from the condition.
+
+\textbf{Important note:} It is not guaranteed that the numerical assignment will be kept unchanched
+in future versions.
+
+\cmg{ZWifdriver}
+The \cmd{ZWifdriver} allows conditional execution of a code for a specified driver. It requires two
+parameters. The first parameter is the driver name, the second parameter is the code to be
+executed. The macro recognizes all driver names and aliases as given in
+section~\ref{driver.selection}. It can be used \eg. in cases when you have to perform some action
+for a specific driver only. Suppose that you do not want to set the page bounding boxes
+(see~\ref{Bboxes}) if \texttt{dvips} is used but want to set them if the same document is
+processed by any other driver. You can thus put the following command to the preamble of the
+document:
+
+\vb \noindent
+\verb.\ZWifdriver{dvips}{\noBboxes}.
+
+\vb
+\textbf{Note:} This macro does not depend on the numerical assignment given above. It will
+therefore work the same way in the future versions.
+
\section{Customizing crop styles}
This section is intended for real \TeX perts. The package tries to provide a lot of options that
enable to customize the default crop style. Try to live with them because here you are touching the
@@ -764,7 +1074,7 @@ your stomach is strong enough, then read on, but remember, you have been warned.
You ask for a different crop style by the \opt{cropstyle} option as described in
section~\ref{cropstyle} on page~\pageref{cropstyle}. Assume that you load the package with:
-\medskip
+\vb
\begin{verbatim}
\usepackage[cropmarks,cropstyle=special,...]{zwpagelayout}
\end{verbatim}
@@ -782,11 +1092,123 @@ therefore only mention that the package defines a few useful macros that can be
style definition. If your temptation to design your own crop style is really strong, you should
better study the package internals yourself.
-\enlargethispage*{2in}
+\section{Summary of driver specific features}
+The driver specific features are described throughout the manual but it may not be clear from the
+option or macro description that it is driver dependent. These features with the reference to the
+section, where it is described, are written below. All these features are disabled if an
+\texttt{unknown} driver is being used (section~\ref{driver.selection}).
+\begin{itemize}
+\item Page bounding boxes, section~\ref{Bboxes}
+\item Page reflection, section~\ref{reflection}
+\item Overprinting, section~\ref{overprinting}
+\item Setting PDF information, section~\ref{pdfinfo}
+\item PDF/X-1a compliance, section~\ref{pdfx1a}
+\end{itemize}
+Color support is, of course, driver dependent too. However, the \pkg{zwpagelayout} has no
+pretention to deal with it. It is fully handled within the \pkg{color} package.
+
+\section{Known bugs and unimplemented features}
+This section describes features that are known not to work in all case or those that do not work with
+all drivers.
+
+\subsection{Driver repertoire}
+Only a few most frequent drivers are automatically detected and supported. Their list is presented
+in section~\ref{driver.selection}. If you use another driver, you should probably disable all
+driver specific features.
+
+\subsection{Page style inheritance}
+It is not possible to inherit part of the definition of another page style. Suppose you need
+``plain'' pages but with a fixed running head. You will try to define it as:
+
+\vb
+
+\begin{verbatim}
+\def\ps@mypagestyle{\ps@plain
+ \def\@oddhead{\hfill My running head}\let\@evenhead\@oddhead}
+\pagestyle{mypagestyle}
+\end{verbatim}
+
+\vb
+
+This will work fine if cropmarks are not requested. If you request cropmarks, \LaTeX\ will sooner
+or later fall into an endless loop which will stop when memory is exhausted. You have to define
+page styles from scratch.
+
+\subsection{Shifted cropmarks when the running foot overflows}
+If there is not enough space for the running foot, the cropmarks will most likely be shifted. It
+usually happens if you set option \opt{footskip} to zero (which is its default value) and forget to
+use \verb.\pagestyle{empty}..
+
+\subsection{Page boxes and Adobe Distiller}
+Setting page boxes causes a fatal error in Adobe Distiller (verified with versions 4 and~9). See
+section~\ref{Bboxes}.
+
+\subsection{Page reflection}
+Option \opt{ReflectVertically} seems to produce slightly shifted output. If any of these options is
+used in \XeTeX\ or more specifically with (x)dvipdfm(x) drivers, other \texttt{bop} or \texttt{eop}
+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.
+
+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
+GhostScript~8.x is used.
+
+The effect of oveprinting was tested in Adobe Acrobat~9 Pro in MS~Windows~XP Home Service Pack~3.
+
+\subsection{Inconsistent dates}
+Values of \texttt{CreationDate} and \texttt{ModDate} (see section~\ref{pdfinfo}) supplied by the driver contain information on
+the time zone. Unfortunatelly, time zone setting is not available in \TeX. If both fields come from
+the same origin, they are set consistently. If one of them is set by the driver and the other by
+the \pkg{zwpagelayout} package, then only the field set by he driver will contain the time zone
+value. Depending on your time zone it may look as if the document were modified before it was
+created.
+
+\subsection{PDF/X conformance}
+The PDF/X conformance is only partial. The details are given in section~\ref{pdfx1a} and its
+subsections.
+
+\section{Changes}
+This section summarizes the changes. The version and the package date is given. It may be useful to
+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.1, 2010/12/xx}
+Two bugs were fixed and a few new features were introduced. Documentation is modified and extended as
+well.
+\begin{itemize}
+\item Bug fix, if \cmd{pagestyle} or \cmd{thispagestyle} was issued within a group while cropmarks
+were active, the package often failed into an endless loop which resulted in exhausting the memory.
+\item Bug fix, the code for page reflection for \texttt{dvips} did not preserve properly the old
+\texttt{bop-hook}.
+\item New feature, the driver can be explicitly selected (section~\ref{driver.selection}) and the
+code can be branched according to the driver (section~\ref{driver.switching}).
+\item New feature, page reflection implemented for (x)dvipdfm(x) drivers, \ie. for \XeTeX\
+(section~\ref{reflection}).
+\item New feature, CMYK and RGB colors explicitly defined (section~\ref{color}).
+\item New feature, colors may be redefined to use the CMYK model (section~\ref{color}).
+\item New feature, overprinting implemented for \texttt{pdftex} and \texttt{dvips}
+(section~\ref{overprinting}).
+\item New feature, PDF information can be set without the need of loading the \pkg{hyperref}
+package (section~\ref{pdfinfo}).
+\item New feature, partial PDF/X-1a compliance (section~\ref{pdfx1a}).
+\end{itemize}
+
+\subsection{Version 1.0a, 2008/12/26}
+The sample files distributed with the package no longer require enc\TeX\ and private macro
+packages.
\section{License}
The package can be used and distributed according to the \LaTeX\ Project Public License version~1.3 or later the
text of which can be found at the \texttt{License.txt} file in the \texttt{doc} directory or at
\url{http://www.latex-project.org/lppl.txt}
+\section{Trade marks}
+This document makes use of trade marks owned by Adobe Systems Incorporated and Microsoft
+Corporation when refering to their products.
+
\end{document}
diff --git a/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty b/Master/texmf-dist/tex/latex/zwpagelayout/zwpagelayout.sty
index cd5e9af9cd6..fe33debd52e 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}[2008/12/26 ZW Page Layout]
-\PackageInfo{zwpagelayout}{$Id: zwpagelayout.sty 290 2008-12-26 17:43:49Z zw $\@gobble}
+\ProvidesPackage{zwpagelayout}[2010/12/21 ZW Page Layout]
+\PackageInfo{zwpagelayout}{$Id: zwpagelayout.sty 377 2010-12-21 14:29:56Z zw $\@gobble}
-%% Copyright 2008 Z. Wagner, http://icebearsoft.euweb.cz
+%% Copyright 2008--2010 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
@@ -16,11 +16,34 @@
% The Current Maintainer of this work is Z. Wagner.
%
% This work consists of the files: zwpagelayout.sty and
-% the documentation files zwpagelayout.tex, zwpagelayout.pdf.
+% the documentation files zwpagelayout.tex, zwpagelayout.pdf together with
+% adjustfoot.tex, adjustfoot.pdf, adjusthead.tex, adjusthead.pdf,
+% coversample.tex, coversample.pdf, LoremIpsumDolor.tex.
-\RequirePackage{kvoptions,ifpdf}
+\IfFileExists{ifpdf.sty}{\RequirePackage{ifpdf}}{\newif\ifpdf}
+\IfFileExists{ifxetex.sty}{\RequirePackage{ifxetex}}{\newif\ifxetex}
+\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=zwpl,prefix=zwpl@}
+% Backspace character with catcode=12
+
+{\lccode`\!`\\ \lowercase{\gdef\PDFbksp{!}}}
+
+% Driver selection macros and options
+
+\def\zwpl@useunknown{0}
+\def\zwpl@usepdftex{1}
+\def\zwpl@usexetex{2}
+\def\zwpl@usedvips{3}
+\let\zwpl@usedvipdfm\zwpl@usexetex
+\let\zwpl@usexdvipdfmx\zwpl@usexetex
+\let\zwpl@useother\zwpl@useunknown
+\newcount\zwpl@Driver
+\zwpl@Driver\ifpdf \zwpl@usepdftex \else \ifxetex \zwpl@usexetex \else \zwpl@usedvips \fi \fi
+\relax
+
+\DeclareStringOption{driver}
+
% Landscape/Portrait
\DeclareBoolOption{Landscape}
@@ -113,23 +136,51 @@
%%%\DeclareStringOption[\fontsize{10}{10}]{cropfontsize}
%%%\DeclareStringOption[\normalfont]{cropfont}
\DeclareBoolOption{nobleedclip}
+\DeclareBoolOption{noBboxes}
-% Color support for cropmarks
+% Color support for cropmarks and black overprint
\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}
+\DeclareBoolOption{redefineblack}
+\DeclareBoolOption{redefinetocmyk}
+
+% Overprint support, it will automatically request color
+\DeclareBoolOption{overprint}
+
+% PDF information
+\DeclareStringOption[\zwpl@default@title]{title}[]
+\DeclareStringOption{author}
+\DeclareStringOption{subject}
+\DeclareStringOption{keywords}
+\DeclareVoidOption{nopdfinfo}{\setkeys{zwpl}{title}}
+
+\def\zwpl@default@title{\ifcat$\zwpl@croptitle$\jobname\else\zwpl@croptitle\fi}
+
+% PDF/X-1a support etc.
+\DeclareStringOption{pdfminorversion}
+\DeclareBoolOption{pdfx}
+\DeclareStringOption[Euroscale Coated v2]{OutputCondition}
+\DeclareStringOption[Euroscale Coated v2]{OutputConditionIdentifier}
+\DeclareStringOption{ICCfile}
-% Reflect, works with pdftex and dvips
+% Reflect, works with pdftex, (x)dvipdfm(x) aa well as dvips
-\def\zwpl@makeHreflect{\AtBeginDocument{\ifpdf
+\def\zwpl@makeHreflect{\AtBeginDocument{\ifcaseZWdriver
+ \or
\let\zwpl@Hship\shipout
\def\shipout{\zwpl@Hreflect\zwpl@Hship}\zwpl@Hreflect
+ \or
+ \zwpl@XHreflect
\else\zwpl@psHreflect\fi}}
-\def\zwpl@makeVreflect{\AtBeginDocument{\ifpdf
+\def\zwpl@makeVreflect{\AtBeginDocument{\ifcaseZWdriver
+ \or
\let\zwpl@Vship\shipout
\def\shipout{\zwpl@Vreflect\zwpl@Vship}\zwpl@Vreflect
+ \or
+ \zwpl@XVreflect
\else\zwpl@psVreflect\fi}}
\DeclareVoidOption{ReflectHorizontally}{\zwpl@makeHreflect}
@@ -137,6 +188,30 @@
\ProcessKeyvalOptions*
+% Define the driver
+
+\ifcat$\zwpl@driver$ \else
+ \expandafter\ifx\csname zwpl@use\zwpl@driver\endcsname\relax
+ \PackageErrorNoLine{zwpagelayout}{Unsupported driver \zwpl@driver}
+ \else
+ \zwpl@Driver\csname zwpl@use\zwpl@driver\endcsname\relax
+ \fi
+\fi
+\def\ifcaseZWdriver{\ifcase\zwpl@Driver}
+\DeclareRobustCommand\ZWifdriver[2]{\expandafter\ifx\csname zwpl@use#1\endcsname\relax
+ \PackageWarningNoLine{zwpagelayout}{Driver #1 not recognized, code ignored}%
+ \else
+ \ifnum\csname zwpl@use#1\endcsname=\zwpl@Driver\relax #2\fi}
+
+\PackageInfo{zwpagelayout}{Driver mode used:
+ \ifcaseZWdriver unknown\or pdftex\or xetex\else dvips\fi.\MessageBreak}
+
+% Define pdfmark if the RIP does not know it
+
+\ifnum\zwpl@Driver=\zwpl@usedvips
+ \special{!/pdfmark where {pop}{userdict /pdfmark /cleartomark load put} ifelse}
+\fi
+
% Other packages
\ifzwpl@onlycropmarks
@@ -165,11 +240,158 @@
\fi
\fi
-\AtBeginDocument{\ifpdf
+\AtBeginDocument{\ifcaseZWdriver \or
\pdfpagewidth\paperwidth \pdfpageheight\paperheight
\else
\special{papersize=\the\paperwidth,\the\paperheight}\fi}
+\def\zwpl@setbpdim#1#2{\@tempdimc#2 \@tempdimc .99626\@tempdimc
+ \edef#1{\strip@pt\@tempdimc}}
+
+\def\zwpl@setboxex{\zwpl@setbpdim\zwpl@bleedorig\zwpl@croplength
+ \@tempdima\paperwidth \advance\@tempdima-\zwpl@croplength
+ \zwpl@setbpdim\zwpl@bleedwidth\@tempdima
+ \@tempdima\paperheight \advance\@tempdima-\zwpl@croplength
+ \zwpl@setbpdim\zwpl@bleedheight\@tempdima
+ \@tempdimb\zwpl@croplength \advance\@tempdimb\zwpl@cropgap
+ \zwpl@setbpdim\zwpl@trimorig\@tempdimb
+ \@tempdima\paperwidth \advance\@tempdima-\@tempdimb
+ \zwpl@setbpdim\zwpl@trimwidth\@tempdima
+ \@tempdima\paperheight \advance\@tempdima-\@tempdimb
+ \zwpl@setbpdim\zwpl@trimheight\@tempdima
+ \edef\zw@tmp{/BleedBox [\zwpl@bleedorig\space \zwpl@bleedorig\space
+ \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]}
+ \ifcaseZWdriver
+ \or
+ \expandafter\pdfpageattr\expandafter{\zw@tmp}
+ \or
+ \edef\zw@tmpx{pdf:put @pages <<\zw@tmp>>}
+ \expandafter\special\expandafter{\zw@tmpx}
+ \else
+ \special{! userdict begin
+ userdict /bop-hook known {/bop-hook load cvx /ZWBox-hook exch def} if
+ /bop-hook {
+ [/BleedBox [\zwpl@bleedorig\space \zwpl@bleedorig\space
+ \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
+ userdict /ZWBox-hook known {ZWBox-hook} if
+ } def
+ end}
+ \fi}
+
+\ifzwpl@cropmarks
+ \ifzwpl@noBboxes \else \AtBeginDocument{\zwpl@setboxex}\fi
+\fi
+
+\def\noBboxes{\def\zwpl@setboxex{}}
+\@onlypreamble\noBboxes
+
+% Two digits
+\def\zwpl@num#1{\ifnum #1<10 0\fi \the#1}
+
+% Date of TeXing in PDF format (without parentheses and D:)
+\def\SetTeXingDate#1{\xdef#1{\the\year\zwpl@num\month\zwpl@num\day}}
+\SetTeXingDate\DateOfTeXing
+
+% Time of TeXing, you can modify Date of TeXing by:
+% \edef\DateOfTeXing{\DateOfTeXing\TimeOfTeXing}
+\count@=\time \divide\count@ by 60
+\edef\@temp{\zwpl@num\count@}%
+\multiply\count@ by -60 \advance\count@ by \time
+\edef\TimeOfTeXing{\@temp\zwpl@num\count@}%
+
+% Default version of the modification date
+\def\zwpl@modt{(D:\DateOfTeXing\TimeOfTeXing)}
+
+% PDF info + PDF/X-1a
+\def\SetPDFminorversion#1{\ZWifdriver{pdftex}{\pdfminorversion#1 \relax}}
+\@onlypreamble\SetPDFminorversion
+
+\ifzwpl@pdfx
+ \setkeys{zwpl}{pdfminorversion=3}
+ \let\SetPDFminorversion\@gobble
+\fi
+
+\ifcat$\zwpl@pdfminorversion$ \else \ZWifdriver{pdftex}{\pdfminorversion3 \relax}\fi
+\def\zwpl@pdfxinfo{}
+\ifzwpl@pdfx
+ \def\zwpl@pdfxinfo{ /GTS_PDFXVersion (PDF/X-1:2001) /GTS_PDFXConformance (PDFX-1a:2001)}
+ \ifcat$\zwpl@ICCfile$ \else
+ \ifcase\zwpl@Driver
+ \or
+ \immediate\pdfobj stream attr{/N 4} file{\zwpl@ICCfile}
+ \edef\zwpl@iccobj{\the\pdflastobj}
+ \fi
+ \fi
+\fi
+
+\edef\zwpl@pdftitle{\zwpl@title}
+\ifcat$\zwpl@pdftitle$
+ \ifzwpl@pdfx
+ \ifcase\zwpl@Driver
+ \or
+ \pdfinfo{\zwpl@pdfinfo}
+ \or
+ \ifxetex \def\zwpl@crt{XeTeX}\else \def\zwpl@crt{TeX+dvipdfm}\fi
+ \edef\zwpl@pdfcrt{ /Creator (\zwpl@crt) }
+ \special{pdf:docinfo << \zwpl@pdfmoddate \zwpl@pdfcrt \zwpl@pdfxinfo >>}
+ \fi
+ \fi
+\else
+ \edef\zwpl@pdftitle{/Title (\zwpl@pdftitle)}
+ \ifcat$\zwpl@author$\def\zwpl@pdfauthor{}\else
+ \edef\zwpl@pdfauthor{ /Author (\zwpl@author)}\fi
+ \ifcat$\zwpl@subject$\def\zwpl@pdfsubject{}\else
+ \edef\zwpl@pdfsubject{ /Subject (\zwpl@subject)}\fi
+ \ifcat$\zwpl@keywords$\def\zwpl@pdfkeywords{}\else
+ \edef\zwpl@pdfkeywords{ /Keywords (\zwpl@keywords)}\fi
+ \edef\zwpl@pdfcreationdate{ /CreationDate \zwpl@modt}
+ \edef\zwpl@pdfmoddate{ /ModDate \zwpl@modt}
+ \ifcase\zwpl@Driver
+ \or
+ \pdfinfo{\zwpl@pdftitle \zwpl@pdfauthor \zwpl@pdfsubject \zwpl@pdfkeywords \zwpl@pdfxinfo}
+ \or
+ \ifxetex \def\zwpl@crt{XeTeX}\else \def\zwpl@crt{TeX+dvipdfm}\fi
+ \edef\zwpl@pdfcrt{ /Creator (\zwpl@crt) }
+ \special{pdf:docinfo << \zwpl@pdftitle \zwpl@pdfauthor \zwpl@pdfsubject \zwpl@pdfkeywords
+ \zwpl@pdfmoddate \zwpl@pdfcrt \zwpl@pdfxinfo >>}
+ \else
+ \def\zwpl@pdfcrt{ /Creator (TeX+dvips) }
+ \special{ps:[ \zwpl@pdftitle \zwpl@pdfauthor \zwpl@pdfsubject \zwpl@pdfkeywords
+ \zwpl@pdfcreationdate \zwpl@pdfmoddate \zwpl@pdfcrt /DOCINFO pdfmark}
+ \fi
+\fi
+
+% Catalog entry for PDF/X
+\ifzwpl@pdfx
+ \ifx\zwpl@iccobj\undefined
+ \def\zwpl@profile{}
+ \else
+ \def\zwpl@profile{ /DestOutputProfile \zwpl@iccobj\space 0 R}
+ \fi
+ \def\zwpl@catalog{/OutputIntents [ <<
+ /Type/OutputIntent
+ /S/GTS_PDFX
+ /OutputCondition (\zwpl@OutputCondition)
+ /OutputConditionIdentifier (\zwpl@OutputConditionIdentifier)
+ /RegistryName (http://www/color.org)\zwpl@profile
+ >> ]}
+ \ifcase\zwpl@Driver
+ \or
+ \pdfcatalog{\zwpl@catalog}
+ \or
+ \special{pdf: put @catalog <<\zwpl@catalog>>}
+ \fi
+\fi
+
+% Page margins
\ifcat$\zwpl@margins$ \else
\setkeys{zwpl}{topmargin=\zwpl@margins,botmargin,
leftmargin=\zwpl@margins,rightmargin=\zwpl@margins}
@@ -380,8 +602,114 @@
\def\UserTopMargin{\zwpl@topmargin}
\def\UserBotMargin{\zwpl@botmargin}
-% Handle cropmarks
+% Handling color, needed in several cases
+\ifzwpl@redefinetocmyk \zwpl@redefineblacktrue \fi
+\def\zwpl@next{}
+\def\zwpl@reqclr{\def\zwpl@next{\RequirePackage{color}}}
+\expandafter\ifx\csname definecolor\endcsname\relax
+ \ifzwpl@color \zwpl@reqclr \fi
+ \ifzwpl@cropmarks \ifzwpl@nobleedclip \else \zwpl@reqclr \fi \fi
+ \ifzwpl@redefineblack \zwpl@reqclr \fi
+ \ifzwpl@overprint \zwpl@reqclr \fi
+\fi
+\zwpl@next
+\expandafter\ifx\csname definecolor\endcsname\relax \else
+ \definecolor{cmykblack}{cmyk}{0,0,0,1}
+ \definecolor{grblack}{gray}{0}
+ \ifzwpl@redefineblack
+ \definecolor{black}{cmyk}{0,0,0,1}\color{black}
+ \fi
+ \definecolor{cmykred}{cmyk}{0,1,1,0}
+ \definecolor{cmykgreen}{cmyk}{1,0,1,0}
+ \definecolor{cmykblue}{cmyk}{1,1,0,0}
+ \definecolor{rgbred}{rgb}{1,0,0}
+ \definecolor{rgbgreen}{rgb}{0,1,0}
+ \definecolor{rgbblue}{rgb}{0,0,1}
+ \ifzwpl@redefinetocmyk
+ \definecolor{red}{cmyk}{0,1,1,0}
+ \definecolor{green}{cmyk}{1,0,1,0}
+ \definecolor{blue}{cmyk}{1,1,0,0}
+ \fi
+\fi
+% Black overprint user macros
+\DeclareRobustCommand\SetOverprint{\zwpl@optrue \zwpl@setop \ignorespaces}
+\DeclareRobustCommand\SetKnockout{\zwpl@opfalse \zwpl@setop \ignorespaces}
+\DeclareRobustCommand\textoverprint[1]{{\SetOverprint#1}}
+\DeclareRobustCommand\textknockout[1]{{\SetKnockout#1}}
+
+% Black overprint implementation
+\let\zwpl@setop\relax
+\let\zwpl@resetop\relax
+\newif\ifzwpl@op
+
+\ifzwpl@overprint
+\ifcase\zwpl@Driver
+\or % pdftex
+ \AtBeginDocument{%
+ \immediate\pdfobj{<< /Type /ExtGState /op false /OP false /OPM 0 >>}
+ \edef\op@off{\the\pdflastobj}
+ \immediate\pdfobj{<< /Type /ExtGState /op true /OP true /OPM 1 >>}
+ \edef\op@on{\the\pdflastobj}
+ \immediate\pdfobj{ << %
+ /GSko \op@off\space 0 R %
+ /GSop \op@on\space 0 R >>}
+ \edef\@extgs{\the\pdflastobj}
+ \edef\next{\global\noexpand\pdfpageresources={\the\pdfpageresources
+ \space /ExtGState \@extgs\space 0 R }}
+ \next
+ }
+ % macros for setting and resetting the overprint state
+ \def\zwpl@setop{\zwpl@resetop
+ \aftergroup\zwpl@resetop}
+ \def\zwpl@resetop{%
+ \ifzwpl@op
+ \pdfliteral direct {/GSop gs}%
+ \else
+ \pdfliteral direct {/GSko gs}%
+ \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 0 R /GSop @opon 0 R >>}
+ \special{pdf: put @resources << /ExtGState @extgs 0 R >>}
+ % macros for setting and resetting the overprint state
+ \def\zwpl@setop{\zwpl@resetop
+ \aftergroup\zwpl@resetop}
+ \def\zwpl@resetop{%
+ \ifzwpl@op
+ \special{pdf: content /GSop gs}%
+ \else
+ \special{pdf: content /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}
+ \def\zwpl@resetop{%
+ \ifzwpl@op
+ \special{ps:true setoverprint}%
+ \else
+ \special{ps:false setoverprint}%
+ \fi
+ }
+\fi
+\SetKnockout
+\else
+ \def\zwpl@setop{\global\let\zwpl@setop\relax
+ \PackageWarningNoLine{zwpagelayout}{Use the "overprint" option to enable overprint.}}
+\fi
+
+
+
+% Handle cropmarks
\newdimen\zwpl@low \zwpl@low 1in
\advance\zwpl@low\topmargin
\advance\zwpl@low \headheight
@@ -391,11 +719,6 @@
\advance\zwpl@low -\paperheight
\ifzwpl@cropmarks
- \ifzwpl@color
- \RequirePackage{color}
- \else \ifzwpl@nobleedclip \else
- \RequirePackage{color}
- \fi \fi
\let\zwpl@pagestyle\pagestyle
\let\zwpl@thispagestyle\thispagestyle
\def\pagestyle{\let\zwpl@next\zwpl@pagestyle \zwpl@testps}
@@ -404,14 +727,16 @@
\def\zwpl@testps#1{\@ifundefined{zwpl@ps@#1}{\zwpl@patchps{#1}}{}\zwpl@next{#1}}
-\def\zwpl@patchps#1{\expandafter\let\csname zwpl@ps@#1\expandafter\endcsname\csname ps@#1\endcsname
- \expandafter\def\csname ps@#1\endcsname{\csname zwpl@ps@#1\endcsname \zwpl@patchfoot}}
+\def\zwpl@patchps#1{\global\expandafter\let\csname zwpl@ps@#1\expandafter\endcsname\csname ps@#1\endcsname
+ \expandafter\gdef\csname ps@#1\endcsname{\csname zwpl@ps@#1\endcsname \zwpl@patchfoot}}
\def\zwpl@patchfoot{\let\zwpl@oddfoot\@oddfoot \let\zwpl@evenfoot\@evenfoot
\def\@oddfoot{\zwpl@cropbox\zwpl@oddfoot}%
\def\@evenfoot{\zwpl@cropbox\zwpl@evenfoot}}
-\def\zwpl@cropbox{\rlap{% Some parameters may be changed within the document
+% We must use the knockout mode in the cropmarks (added 2010-12-21)
+\def\zwpl@cropbox{{\ifzwpl@overprint\SetKnockout\fi
+ \rlap{% Some parameters may be changed within the document
\raisebox{\zwpl@low}[\z@][\z@]{\everyvbox{}\offinterlineskip\boxmaxdepth\z@
\hskip -\hoffset \hskip -1in \hskip -
\ifodd\c@page \oddsidemargin \else \evensidemargin \fi
@@ -434,7 +759,7 @@
\normalfont \fontsize{10}{10}\selectfont
\csname cropmarkstyle@\zwpl@cropmarkstyle\endcsname
}%
-}}}
+}}}}
\ifzwpl@cropmarks \zwpl@patchfoot \fi
@@ -591,13 +916,22 @@
\def\zwpl@Hreflect{\zwpl@calcshift\zwpl@Hshift\hsize
\pdfliteral{-1 0 0 1 \the\zwpl@Hshift\space 0 cm}}
-\def\zwpl@Vreflect{\zwpl@calcshift\zwpl@Vshift\vsize
+\def\zwpl@Vreflect{\@tempdima\vsize
+ \advance\@tempdima-\topmargin
+ \zwpl@calcshift\zwpl@Vshift\@tempdima
\pdfliteral{1 0 0 -1 0 -\the\zwpl@Vshift\space cm}}
+% (x)dvipdfm(x) version, modifies bop and eop
+\def\zwpl@XHreflect{\zwpl@calcshift\zwpl@Hshift\paperwidth
+ \special{pdf: bop q -1 0 0 1 \the\zwpl@Hshift\space 0 cm}\special{pdf: eop Q}}
+
+\def\zwpl@XVreflect{\zwpl@calcshift\zwpl@Vshift\paperheight
+ \special{pdf: bop q 1 0 0 -1 0 \the\zwpl@Vshift\space cm}\space{pdf: eop Q}}
+
% dvips version (modifies bop-hook)
\def\zwpl@psreflect#1#2#3#4{\zwpl@calcshift#3#4
\special{! userdict begin
- userdict /bop-hook known {bop-hook load cvx /ZW#1-hook exch def} if
+ userdict /bop-hook known {/bop-hook load cvx /ZW#1-hook exch def} if
/bop-hook {
[#2] concat
userdict /ZW#1-hook known {ZW#1-hook} if
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index bb9fb48f3fd..c17579c2ef2 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -703,7 +703,7 @@ $Master = "$mydir/../..";
'texdraw', "&MAKEtexdraw",
'texlipse', "die 'skipping, plugin for Eclipse'",
'texlog-extract', "die 'skipping, Ruby, not self-locating'",
- 'texlog_extract', "die 'skipping, Ruby, not self-locating'",
+ 'texmacs', "die 'skipping, binary'",
'texpower', "&MAKEnosymlinks",
'texsis', "&MAKEtexsis",
'tfrupee', "&MAKEflatten",
@@ -781,6 +781,7 @@ $Master = "$mydir/../..";
'zefonts', "&MAKEflatten",
'zhmetrics', "&MAKEcopy",
'zwgetfdate', "&MAKEcopy",
+ 'zwpagelayout',"&MAKEcopy",
);