[texhax] changing margins on left/right pages?

rwd Nickalls dicknickalls at compuserve.com
Mon May 29 20:39:41 CEST 2006


>> D. R. Evans wrote:
>
>> In order to position left and right pages correctly for printing, 
>>I need to have an addition 0.3" left gutter on even-numbered pages.
>> Can anyone give me a pointer as to how to do this in plain TeX?
>> (Oddly, the TeXbook doesn't seem to describe this in manmac, even though
>> the book itself clearly has different margins for the left and 
>>right pages.)
>> In case what I want isn't clear: \hsize stays the same but even-numbered
>> pages need to be shifted an extra 0.3" toward the right compared to
>> odd-numbered pages.


if you are needing different amounts of \hoffset  
on odd pages vs even pages, then this implies  that
 your `page' width is  not being printed centrally
 on the paper sheets. 
As Phil Taylor pointed out earlier   \hoffset is a  correction
which allows you to adjust  where the printer
starts printing on the paper.
 and so one way to resolve this problem is  as follows
(I am not too sure about all the necessary
 commands for use with plain text, but
the following works OK  with  LaTeX.)

Note that  we need to distinguish  between the `paper' width 
(of the cut paper  sitting in the paper tray)
 onto which the  `page' width is typeset/printed, where the 
pagewidth = the inner and outer margins plus the textwidth.
(see below regarding possible `bindingmargin' also)

(a)  first place lines around the `page edge'  using something like 
\usepackage{showfram}, and 
(b) make the text edge visible using something like
\usepackage[frame, a4, pdftex]{crop}

Now  determine  what inner and outer margins you 
want for  twosided printing (assuming you want back-to-back)
for a given textwidth and pagewidth.
ie pagewidth = inner margin + textwidth + outermargin.
(note that if you are binding the article/book, then
you will probably need to include /within/ the 
`pagewidth' an additional inner `bindingMargin')

now, we define
\oddsidemargin = binding + innermargin - 1inch
\evensidemargin = outermargin - 1inch

finally, we determine the  \hoffset.

First,  calculate  the equal  distance D  between 
the paperedge and the pageedge to make your pagewidth sit 
centrally  in the paperwidth
say, D= (0.5)X(paperwidth - pagewidth),

If the printer was perfect (zero adjustment)
, then in this case we would require
\hoffset = D.
However, to the extent that back-2-back printing
now reveals  the `pageedge' alignment on each side
of the paper (when viewed against the light) shows a 
separation of, say,  z units, then the required
 \hoffset =  D \pm (z/2)
the sign depending on the relative displacement of 
the typeset pages.

Once you have figured out all these values, 
( plus some experimentation very likely) then 
you will find that  you will generate perfect
 back-2-back output with  a constant
  \hoffset  (for a given printing device).

if you send pdf  to an outside printshop, then you may need to 
check out the working offset of the particular 
printing device they will be using  
(for this , the  CTAN file `testpage.tex' mentioned by
 someone earlier  is excellent )
 and make a corrective adjustment  accordingly.

Note that  commercial printshops may use
 different printmachines  for black and white pages vs 
colour pages, and so  you
may  have  to check out two printmachines.

Dick Nickalls
Dept Anaesthetics,
City hospital,
Nottingham, UK








More information about the texhax mailing list