[XeTeX] book size options --- help

William Adams will.adams at frycomm.com
Wed May 27 13:47:15 CEST 2009


Please note the following creates a .pdf which will cause Acrobat 8  
Professional to complain of problems in the .pdf if metric  
measurements are mixed in. Not sure if the problem is in Acrobat,  
xdvipdfmx, xetex or memoir.


On May 26, 2009, at 7:04 PM, Nicolas Vaughan wrote:

> What does the
>   \AtBeginShipout{\special{pdf: put @thispage <</TrimBox [9.0 9.0
> 621.0 801.0]>>}}
> line do?
>
> I think I get the same result in the output PDF.


It sets the .pdf to have 9 pts of bleed working w/ the other settings  
in the example file.

If you're setting crop marks you'll probably want to have the trim box  
set up to match the crop marks. Adobe Acrobat Professional has an  
option to show boxes --- xetex can also place a .pdf according to box  
information.

For your specifications, something like:

\documentclass[showtrims,10pt]{memoir}

\usepackage[xetex]{color}
\usepackage{fixltx2e}
\usepackage[xetex]{graphicx}
\usepackage{xltxtra}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{ifthen}

%170mm x 240mm. I must have these margins: top: 25mm, bottom: 30mm;
%outside: 25mm; inside: 25mm.

\setstocksize{752.315bp}{553.89bp}
%\stockheight \stockwidth
%\settrimmedsize{240mm}{170mm}{*}
\settrimmedsize{680.304bp}{481.882bp}{*}
%converted to BP 'cause using mm made Acrobat 8 report an error
%\paperheight \paperwidth
\settrims{36bp}{36bp}
%\trimtop \trimedge
%\setxlvchars[]
%\settypeblocksize{17\onelineskip}{.75\xlvchars}{*}
\settypeblocksize{524.41bp}{340.158bp}{*}
%top form, first argument is preferred version ---
%figure out your typesize leading and set the proper number of lines
%\textheight \textwidth
\setlrmargins{70.865bp}{*}{1}
%\spinemargin \foremargin
\setulmargins{70.865bp}{*}{1.2}%25mm * 1.2 == 30mm
%\uppermargin \lowermargin
\setheadfoot{1\onelineskip}{1\onelineskip}
%\headheight \footskip
\setheaderspaces{0bp}{*}{*}
%\headdrop \headsep
\setmarginnotes{1\onelineskip}{.125\xlvchars}{1\onelineskip}
%\marginparsep \marginparwidth \marginparpush

\checkandfixthelayout

\quarkmarks

\usepackage{atbegshi}
\AtBeginShipout{\special{pdf: put @thispage <</TrimBox [36.0 36.0  
517.9 716.3]>>}}
\special{pdf: put @thispage <</TrimBox [36.0 36.0 517.9 716.3]>>}

\begin{document}
Test\clearpage Test
\end{document}

Should work as a rough start. You'll need to adjust where your folios  
&c. fall. If anyone asks, tell them you did your layout using Quark  
and they won't complain about the .pdfs when it's time to print ;)

Please try converting all units to mm and removing any rounding  
errors / odd decimals and see how that works out --- FWIW I had a  
strange error in the .pdf when I introduced some values in mm and  
opened it in Acrobat 8, hence my use of only (PostScript) Big Points  
--- if using all mm doesn't fix it, please file a bug report w/ Peter  
Wilson, Jonathan Kew and Jin-Hwan Cho.

William

-- 
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.



More information about the XeTeX mailing list