
| Current Path : /bin/X11/X11/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //bin/X11/X11/a5booklet |
#!/bin/sh
# dvidvi 1.0, Copyright (C) 1988-91, Radical Eye Software
# a5booklet (c) 1997 David van Leeuwen
# Takes a .dvi file as argument. The .dvi file should contain
# A5 sized pages. Output are two .dvi files with A4, landscape
# pages that can be printed on front and back. Reshuffle pages
# before stapling them!
# We don't use TeX page numbers, but real ones.
file=$1
[ $# -gt 0 ] || { echo "No input .dvi file specified"; exit; }
[ -e $file -o -e $file.dvi ] || { echo "Input file $file not found"; exit; }
name=`basename $file .dvi`
name1=$name-1
name2=$name-2
# from manpage dvidvi:
dvidvi -m '4:-1,2(14.85cm,0)' $name $name1
dvidvi -m '4:-3,0(14.85cm,0)' $name $name2
cat <<EOF
You can view the files by issuing
xdvi -paper a4r $name1
xdvi -paper a4r $name2
You can print the files using
dvips -ta4 -tlandscape $name1
dvips -ta4 -tlandscape $name2
EOF