[comp.text.tex] Boklet Style; A summary

msh@math.canterbury.ac.nz (Mark Hickman) (05/20/91)

With reference to my previous posting about producing booklets under La/Tex,
there appears (judging from my mailbox) enough interest to justify a summary.

There appears to be three methods to achieve the booklet re-ordering.

(i) Use of an appropriate dvi driver such as dvidvi

(ii) Use of a set of TeX macros such as quire.tex

(iii) Use of postscript macros such as psbook, pstops etc.

I am currently using dvips which I am very satisfied with and so I didn't
investigate the first option (I don't believe that there is any convenient
way to get dvips to product booklets).

Quire.tex is available from ymir.claremont.edu [134.173.4.23]. (see recent 
posting called Midnight Macros).

The third alternative is, for me, the most convenient. The set of macros 
psbook, pstops etc were written by Angus Duggan [ajcd@uk.ac.ed.lfcs] of the 
University of Edinburgh (and, I believe, were posted recently which I missed).
These macros will re-order a postscript file and then print in landscape two
pages on one etc (among other useful things). However this requires 
(obviously) the use of a postscript printer (and a postscript driver such as 
dvips). Also it requires, in my opinion, the use of postscript fonts (CM fonts
scaled under postscript are less than satisfactory) in order to print two 
pages on one sheet. Luckily I already use postscript fonts for almost 
everything (except the extension fonts cmex). 

Thanks to all those who replied.

-- 
Mark Hickman

email: msh@math.canterbury.ac.nz

smail: Department of Mathematics
       University of Canterbury
       Christchurch, NEW ZEALAND

purtill@morley.rutgers.edu (Mark Purtill) (05/20/91)

msh@math.canterbury.ac.nz (Mark Hickman) writes:
>There appears to be three methods to achieve the booklet re-ordering.

>(i) Use of an appropriate dvi driver such as dvidvi
...
>I am currently using dvips which I am very satisfied with and so I didn't
>investigate the first option (I don't believe that there is any convenient
>way to get dvips to product booklets).
	Dvidvi is a program to change dvi files (well, create new dvi
files from old dvi files), not a replacement for dvips.  They would
probably work together fine (first useing dvidvi to create a booklet
version of the dvi file, then dvips to convert that to postscript).  I
did once have trouble with dvidvi and postscript pictures, though (the
pictures got printed in the wrong places).

^.-.^ Mark Purtill         purtill@dimacs.rutgers.edu         (908)932-4580 (O)
((")) DIMACS, P.O. Box 1179, Rutgers U., Piscataway, NJ 08855 (908)220-6905 (H)
********** Note new area code!  We are now (908) rather than (201)!  **********

jdm5548@tamsun.tamu.edu (James Darrell McCauley) (05/22/91)

It seems to me that the pagination problem should have
been addressed in Lamport's book.sty.  Does anyone know
why it wasn't?  Is there a way that the quire.tex macros
can be worked into it?
-- 
James Darrell McCauley, Grad Res Asst, Spatial Analysis Lab 
Dept of Ag Engr, Texas A&M Univ, College Station, TX 77843-2117, USA
(jdm5548@diamond.tamu.edu, jdm5548@tamagen.bitnet)

dhosek@euler.claremont.edu (Don Hosek) (05/22/91)

In article <16408@helios.TAMU.EDU>, jdm5548@tamsun.tamu.edu (James Darrell McCauley) writes:
> It seems to me that the pagination problem should have
> been addressed in Lamport's book.sty.  Does anyone know
> why it wasn't?  Is there a way that the quire.tex macros
> can be worked into it?

If you mean the imposition problem, it's because TeX really can't
handle that. Consider the 64page document to be printed 2-up
duplex and folded in half to form a booklet. Sheet one has pages
1 and 64 plus 2 and 63 on it. For TeX to know what goes where, it
has to know how many pages there are and hold the *whole* thing
in memory. Not really practical. Of course real-world imposition
involves printing large sheets which are folded in half several
times and trimmed to form signatures. Most paperbacks today are
printed in 16-page signatures (octavo) and the printed sheets
will have pages that are rotated ninety degrees. e.g.

V(9)  V(8) V(5) V(12)
A(16) A(1) A(4) A(13)

where the parenthesised number is the page number and the angle
of the letter shows where the top of the page would be. This, of
course, requires special DVI-processing abilities.

-dh

-- 
Don Hosek                  | To retrieve files from ymir via the mailserver,
dhosek@ymir.claremont.edu  | send a message to mailserv@ymir.claremont.edu 
Quixote Digital Typography | with a line saying send [DIRECTORY]FILENAME
714-625-0147               | where DIRECTORY is the FTP directory (sans 
---------------------------+ "anonymous") and FILENAME is the filename, e.g. 
"send [tex]00readme.txt". There is a list of files in each directory under the 
name 00files.txt. Binary files are not available by this technique.

marcel@cs.caltech.edu (Marcel van der Goot) (05/23/91)

jdm5548@tamsun.tamu.edu (James Darrell McCauley) wrote
> It seems to me that the pagination problem should have
> been addressed in Lamport's book.sty.  Does anyone know
> why it wasn't?  Is there a way that the quire.tex macros
> can be worked into it?

I'm not really sure which pagination problem you mean. Quire.tex
does its job through modification of \shipout. The page number is
already printed on the page when \shipout is called, so the normal
page numbers will come out correctly. The only problem with page
numbers is when the file contains \write commands. In LaTeX this
gives you trouble in particular when you have \pagerefs or make
a table of contents. The solution is as follows:
  - First run LaTeX on your document without saying \quire (or \makequire)
    (you have to do this anyway to get the number of pages). Make
    sure that all the references are right. (LaTeX warns you if labels
    have changed --- if so, rerun LaTeX as usual.)
  - Now, on the run where you say \quire (or \makequire), you should also
    say \nofiles in the preamble (nothing else changes). This will
    prevent LaTeX from changing the .aux and .toc files, so that you
    get all the correct page numbers. (It also prevents some junk from
    being written to your terminal when you use \quire.)
The reason that the use of \nofiles is not mentioned in quire.doc is
that I'm not a LaTeX user and didn't know about it at the time.

dhosek@euler.claremont.edu (Don Hosek) wrote in response
> If you mean the imposition problem, it's because TeX really can't
> handle that. Consider the 64page document to be printed 2-up
> duplex and folded in half to form a booklet. Sheet one has pages
> 1 and 64 plus 2 and 63 on it.

Quire.tex is intended to handle simple cases of imposition, namely
the case where each page is folded only once. For real book production
this is indeed insufficient, but for most ``average'' users it is
exactly what is needed to easily produce home-made booklets. In most
cases you don't want to fold standard letter size or A4 paper more
than once, and most laserprinters cannot handle larger paper.
For instance, if you say \quire{64}, TeX will produce 32 sheets; sheet 1
contains pages 1 and 64, sheet 2 pages 2 and 63, etc. If you print sheets
double-sided (by reinserting the printed sheets in the laserprinter, or
using a photocopier), you'll get 16 sheets that you can fold into a
booklet. (In this particular case I would suggest using \quire{32} to
get two 8-sheet sets --- that folds easier.)

> For TeX to know what goes where, it has to know how many pages there
> are and hold the *whole* thing in memory. Not really practical.

The first problem is easily solved by first running TeX normally.
After all, almost no one can produce a 64-page booklet in one run.
The second problem is indeed a problem. Quire.tex tries to solve it
by exchanging memory for computation: you can print only part of the
sheets, and then rerun TeX (several times if you have very little
memory) to generate the remaining sheets. (I must say that on a sun
I have never actually had any problems --- apparently there is quite
some memory available.)

I am well aware that the problem can also be solved through manipulation
of the dvi file, or even using PostScript. Doing everything in TeX
has the advantage that you don't have to install other programs or
buy a special printer.

(quire.tex and quire.doc are available from ymir.claremont.edu [134.173.4.23],
direcory [tex.inputs.midnight].)


                                          Marcel van der Goot
 .----------------------------------------------------------------
 | Blauw de viooltjes,                    marcel@vlsi.cs.caltech.edu
 |    Rood zijn de rozen;
 | Een rijm kan gezet
 |    Met plaksel en dozen.
 |