[XeTeX] papersize special and memoir (and other?) documentclasses

William Adams will.adams at frycomm.com
Tue May 23 15:02:38 CEST 2006

On May 22, 2006, at 4:45 PM, Jonathan Kew wrote:

> I haven't looked at memoir in particular, but I'm fairly confident
> that this means the class is doing something to generate output
> before the \special from \AtBeginDvi. This can happen if the class
> modifies the \output routine, for example, and wraps something around
> the normal output (to which \AtBeginDvi gets prefixed). There was a
> similar problem with crop.sty, IIRC, and some discussion of a patch/
> workaround... try the list archives. That might point you towards a
> solution for memoir.

I dunno.

The following file %!TEX encoding = UTF-8 Unicode
\documentclass[dvips, showtrims]{memoir}
\renewcommand*{\trimmarks}{\special{papersize=\the\stockwidth, \the 
   \vbox to \z@{\vskip-1in \vskip\trimtop % top of logical page
     \hb at xt@\z@{\hskip-1in
       \ifodd\c at page
         \hskip\stockwidth \hskip-\trimedge \hskip-\paperwidth
         \if at twoside
           \hskip\trimedge  % left of logical page
           \hskip\stockwidth \hskip-\trimedge \hskip-\paperwidth
       \vbox to \paperheight{%
         \let\protect\relax        % <- v1.4 addition
         \hb at xt@\paperwidth{\tmarktl\hfil\tmarktm\hfil\tmarktr}%
         \hb at xt@\paperwidth{\tmarkml\hfil\tmarkmr}%
         \hb at xt@\paperwidth{\tmarkbl\hfil\tmarkbm\hfil\tmarkbr}}%
test\clearpage test

works on the first page when generated w/ latex at the command line  
and checked out with dvitype (starts with 87: xxx  
'papersize=650.43pt, 849.17249pt' ).

But it comes out with two different page sizes when I switch to  
processing it with xelatex.

Looking at the xdv file it looks like the papersize is about as close  
to the top as in the dvi --- is there an equivalent to dvitype for  
xdv files?


William Adams
senior graphic designer
Fry Communications

This email message and any files transmitted with it contain information
which is confidential and intended only for the addressee(s). If you are
not the intended recipient(s), any usage,  dissemination, disclosure, or
action taken in  reliance on it is prohibited.  The reliability of  this
method of communication cannot be guaranteed.  Email can be intercepted,
corrupted, delayed, incompletely transmitted, virus-laden,  or otherwise
affected during transmission. Reasonable steps have been taken to reduce
the risk of viruses, but we cannot accept liability for damage sustained
as a result of this message. If you have received this message in error,
please immediately delete it and all copies of it and notify the sender.

More information about the XeTeX mailing list