Re: Creating booklets with Latex

2000-05-11 Thread Christophe TROESTLER
On Sat, 29 Apr 2000, Chanop Silpa-Anan <[EMAIL PROTECTED]> wrote:
> 
> Once upon a time, I heard Nils-Erik Svangård say
> 
> > I've gotten in trouble again, bragging about how good Debian is
> > and that I write all my reports in Latex. Well now I might gone
> > under. I'm supposed to produce a booklet i A6 (folded A5) with
> > students songs.  I have read some docs on the web, it seems I can
> > create a booklet by using either lpr -Cduplex or using a program
> > called psbook. But I havent figured out how to print it on A5
> > paper (A6 booklets).  Does anyone have experiance makeing
> > booklets?
>
> I did sth like this a while ago. What I did was, fist use psresize
> to resize A4->A5, then psnup to fit two A5s into one A4, then psbook
> to split them in booklets, and viola print them.
> 
> I guess that you might need psnup to fit two A6s into one A5, then
> psbook and print it

Depending on what you aim to, "resize" may not be the answer because
it will shrink the chars (and is unecessary here).  Rather, create A5
(or A6) documents directly in LaTeX, psbook and psnup them, then
print.  I had to make booklets in a very different context a while
ago.  Maybe the files at

http://cantorumh.dyndns.org/preprints/index.dir/index2.html

may provide you with some inspiration.

ChriS



Re: Creating booklets with Latex

2000-04-29 Thread John Pearson
On Sat, Apr 29, 2000 at 08:14:02AM +0200, Nils-Erik Svangård wrote
> 
> Hi!
> 
> I've gotten in trouble again, bragging about how good Debian is and that I
> write all my reports in Latex. Well now I might gone under. I'm supposed
> to produce a booklet i A6 (folded A5) with students songs.
> I have read some docs on the web, it seems I can create a booklet by using
> either lpr -Cduplex or using a program called psbook. But I havent figured
> out how to print it on A5 paper (A6 booklets).
> Does anyone have experiance makeing booklets?
> 

I've attached a Makefile fragment that I use for preparing
A5 booklets (A4 folded), using psutils.  That may give you
a start...


John P.
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.mdt.net.au/~john Debian Linux admin & support:technical services

%.dvi : %.tex
jadetex $< 
jadetex $< 
jadetex $< 
rm $*.{log,aux}

%.tex : %.sgml %.dsl
-rm $*.{tex,dvi,log,aux}
jade -t tex -o $@ -iprint -d $*.dsl#print $<

%.ps : %.dvi 
dvips -o $<.ps.tmp $<
psselect -p1-_2 $<.ps.tmp $@
rm $<.ps.tmp

%-book: %-book-odd.ps %-book-even.ps %-book.ps
@echo
@echo About the target $*-book
@echo
@echo This produces A5 pages on A4 sheets, 4 pages to the sheet. 
@echo For duplexing printers, $*-book.ps is ready to feed
@echo to your printer once you set it to duplex mode.  For printers
@echo that place output face down first page on the bottom, print
@echo $*-book-odd.ps and then place the output back in the
@echo tray and print $*-book-even.ps.  Be careful which way
@echo it goes back in - if you get it wrong pages 3,4,7,8,11,12,...
@echo will be upside down. 
@echo

%-book-odd.ps: %-book.ps
psselect -o -p- $< $@

%-book-even.ps: %-book.ps
psselect -e -r -p- $< $@

%-book-cover.ps: %.ps huiac.logo
psselect -q -p 1 $< $*-page1.ps
gs -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -sDEVICE=pswrite 
-sOutputFile=$*-cover-temp.ps $*-page1.ps huiac.logo
pstops -pa4 '2:0L(593,424)@[EMAIL PROTECTED](500,506)' $*-cover-temp.ps 
$@
rm $*-cover-temp.ps  $*-page1.ps


%-book.ps: %.ps
psbook $< | psnup -2 -pa4 > $@


binary-install: $(binary-docs)
install -d $(DESTDIR)
cp -a $(binary-docs) $(DESTDIR)

source-install: $(source-docs)
install -d $(DESTDIR)
cp -a $(source-docs) $(DESTDIR)


Re: Creating booklets with Latex

2000-04-29 Thread Jesse Jacobsen
On 04/29/00, Nils-Erik Svangård addressed "Creating booklets with Latex":
> I've gotten in trouble again, bragging about how good Debian is and that I
> write all my reports in Latex. Well now I might gone under. I'm supposed
> to produce a booklet i A6 (folded A5) with students songs.
> I have read some docs on the web, it seems I can create a booklet by using
> either lpr -Cduplex or using a program called psbook. But I havent figured
> out how to print it on A5 paper (A6 booklets).
> Does anyone have experiance makeing booklets?

I make lots of booklets, most of them on folded us-legal size paper.
I'm sure the procedures I use can be adapted for other sizes.  The
first step is to use the geometry LaTeX package to set the page size
to the final page size you want.
For example: \usepackage[papersize={7in,8.5in}]{geometry} 

The next step can be one of two things, depending on whether you want
to manipulate the pages into a booklet at the dvi level or the
postscript level.  I find the former a little simpler, but it doesn't
handle things like the color package or pstricks.  

To use dvi-level page manipulation, use the program dvidvi.  It has a
man page, but here's an example of how I would use it to make a
booklet on landscape-legal (14"X8.5") paper out of pages written to
fit on half that size (7"X8.5"):

% dvidvi -m "4:-1,2(7in,0in)" dvifile.dvi firstoutput.dvi
% dvidvi -m "4:-3,0(7in,0in)" dvifile.dvi secondoutput.dvi

This should make two output files which you can print sequentially on
the same stack of paper (depending somewhat on how your printer ejects
the paper) and end up with a booklet.  In other words, after printing
the first file, you can take that stack, place it in the printer
backwards, and print the second file.

To make this work right, you should *not* use a \papersize special in
the original LaTeX file.  That also means don't use the 'dvips' option
to the geometry package.  You then give certain options to dvips
(which has info documentation) to make sure it generates postscript
with the correct orientation.  An example from my legal-size bulletins:

% dvips -t landscape -t legal -f firstoutput.dvi | lpr
% dvips -t landscape -t legal -f secondoutput.dvi | lpr

OK - that was how I'd do it with dvi-level manipulation.  For
postscript level manipulation, I'd start by using the geometry package
as above, only I'd also include either the dvips package option or a
\papersize special.  For example: 

\documentclass[twocolumn]{article}
\usepackage[papersize={14in,8.5in},dvips]{geometry} 

   .. or ..

\usepackage[verbose,landscape,letterpaper,noheadfoot]{geometry}
\geometry{left=\Marginwidth, textwidth=\Textwidth}
\special{papersize=14in,8.5in}

Though it looks more complex, I use the latter.  It allows you to make
each page a real LaTeX page rather than one column in a larger page.
For me, the first two commands are hidden in a style file.  You can
see how the \geometry{} command makes it convenient to change geometry
options later on.  (\Marginwidth and \Textwidth are local to my style
file.)

To simplify the rest of the process, I wrote the following shell
script to manipulate the pages from the initial dvi file to the
printer.  All the tools I used have man pages.  The output should be
usable just like the output from the dvidvi method. An example of how
I use this script:

# To print the whole thing, one sheet at a time:
% mklegalbook dvioutput.dvi

# To print the whole thing without pausing between:
% mklegalbook dvioutput.dvi nopause

# To print only the first set of pages:
% mklegalbook dvioutput.dvi print 1

# To print only the second set of pages:
% mklegalbook dvioutput.dvi print 2


#!/bin/sh
#$Id: mklegalbook,v 1.4 1999/09/05 00:02:04 jesse Exp jesse $
dvifile=$1
nowait=$2
onepage=$3

dvips -f $dvifile -o /tmp/${$}raw.ps

# With \special{papersize=} for dvips}
if ( [ "$onepage" == 1 ] || [ -z "$onepage" ] ) ; then
pstops -plegal  "4:-1+2(0in,-7in)" /tmp/${$}raw.ps /tmp/${$}first.ps
ps2lj4 legal http://www.jvlnet.com/~jjacobsen/
Madison, Wisconsin  GnuPG public key ID: 2E3EBF13


Re: Creating booklets with Latex

2000-04-29 Thread Antonio Rodriguez
Hi Nils-Erik. i am attaching instructions written by me for myself to work in 
windows
environment using MikTeX (based on Tetex) , ghostscript and psutilities (which 
we also
have in Linux). It uses usletter paper size, but should be easily adaptable if 
you
follow the main ideas, which are well explained. Everything should be portable 
to
Linux through pipes, i haven't done it because i still have to tune up better my
debian box before getting into this. Any way, hope it helps. If you run into 
trouble
please let me know, i will do my best to help you.

Nils-Erik Svangård wrote:

> Hi!
>
> I've gotten in trouble again, bragging about how good Debian is and that I
> write all my reports in Latex. Well now I might gone under. I'm supposed
> to produce a booklet i A6 (folded A5) with students songs.
> I have read some docs on the web, it seems I can create a booklet by using
> either lpr -Cduplex or using a program called psbook. But I havent figured
> out how to print it on A5 paper (A6 booklets).
> Does anyone have experiance makeing booklets?
>
> /nisse
>
> --
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
@echo off

REMImportant instructions follow:

REMTo run this, replace all instances of `veg' with
REMthe actual file name. Then run it. As a result, you
REMwill have a nice brochure, ready to be printed in
REMtwo passes through ghostscript, using USletter paper.

REMInstructions end here.


REM The instructions are designed for US letter paper. A4 ones in Europe
REM or otherwise is not difficult to implement slightly modifying the
REM numbers and/or possibly the 'ps' commands (psutilities, included
REM in MiKTeX).

REM To make a booklet or a book (set of booklets binded together),
REM follow the instructions:

REM 1. Make a file.tex (plain TeX) with the following parameters:
REM\vsize176mm \hsize115mm
REMDo not mess with \voffset, \hoffset commands. This way it will
REMfit nicely in a letter paper (US), two pages, landscape.

REM 2. TeX-it (MiKTeX 1.10b).

REM 3. Get the file.ps from file.dvi through dvips.

REM 4. From the command prompt, execute as follows:

REMa) psbook file.ps filebk.ps
REM  %re-arranges pages
REMb) pstops -pletter (-1.15cm,-7.5cm) filebk.ps filebk1.ps
REM  %this pulls the text down (-7.5 cm) and left (-1.15 cm)
REM ***
REM%The value -7.5cm above is needed when config.ps in the
REM%location C:\texmf\dvips\config\local has ``USletter'' as
REM%its default paper. If ``A4'' is the default, it may be
REM%needed -9cm instead.
REM ***
REMc) psnup -2 -pletter -s1 filebk1.ps filenu1.ps
REM  % -s1 ensures right size (scale 1).
REM 5. Open filenu1.ps using ghostscript, print it in two passes. You
REMwill have a nice booklet with a nice letter size to read.
REM **
REM **
REM A bat file is made following these instructions, makebook.bat,
REM In the directory TexTools, which contains this file.
REM *
REM *
psbook veg.ps vegbk.ps
pstops -pletter (-1.15cm,-7.5cm) vegbk.ps vegbk1.ps
psnup -2 -pletter -s1 vegbk1.ps vegnu.ps
pause


Re: Creating booklets with Latex

2000-04-29 Thread Chanop Silpa-Anan
Once upon a time, I heard Nils-Erik Svangๅrd say

> 
> Hi!
> 
> I've gotten in trouble again, bragging about how good Debian is and that I
> write all my reports in Latex. Well now I might gone under. I'm supposed
> to produce a booklet i A6 (folded A5) with students songs.
> I have read some docs on the web, it seems I can create a booklet by using
> either lpr -Cduplex or using a program called psbook. But I havent figured
> out how to print it on A5 paper (A6 booklets).
> Does anyone have experiance makeing booklets?
> 
> /nisse
I did sth like this a while ago. What I did was, fist use psresize to
resize A4->A5, then psnup to fit two A5s into one A4, then psbook to
split them in booklets, and viola print them.

I guess that you might need psnup to fit two A6s into one A5, then
psbook and print it

Chanop
-- 
,-.
| Chanop Silpa-Anan  <[EMAIL PROTECTED]> |
| Australian National University  |
| Tel. +61 2 6279 8826, +61 2 6279 8837 (office hour) |
|  +61 2 6249 5240 (home +voice mail) |
|   Debian GNU/Hurd   GPG key on request  |
`-'


pgpsQqZwqOli8.pgp
Description: PGP signature