DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T d

⟦dcf64ae1b⟧ TextFile

    Length: 3818 (0xeea)
    Types: TextFile
    Names: »dvi.cmt«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/doc/ps/dvi.cmt« 

TextFile

#!/bin/sh
# DVI v2.2 LA Carr, University of Southampton, England. 17/2/88
# Script to push a dvi file through dvi2ps (with all the local options)
# and out to the printer (using the correct PostScript prologues)
# Comments and clean up by Sylvain Langlois (sylvain@chorus.fr) 05/07/88
#
# print command for Apple LaserWriter
PRINT="lpr -h -c"
# how to call dvi2ps stuff
DVI2PS="/usr/local/bin/dvi2ps"
# usual TeX Prolog
TEXPRO=/usr/local/lib/postscript/ps/tex.pro
# psfig Prolog
FIGPRO=/usr/local/lib/postscript/ps/figtex.pro
#MacIntosh Prolog
MACPRO=/usr/local/lib/postscript/ps/mac.pro
# multiple TeX pages in a single PostScript page hacks
DIFF=/usr/local/lib/postscript/ps/8.diff
DIFF4=/usr/local/lib/postscript/ps/4.diff
DIFF2=/usr/local/lib/postscript/ps/2.diff
# temporary files
TEMP=/tmp/a$$
TEMPB=/tmp/b$$
PARTS=0
# boolean set to 1 if a "from"-page is specified (-f option)
F=0
# boolean set to 1 if a "to"-page is specified (-t option)
T=0
# boolean set to 1 if a set a pages is specified (-x option)
P=0
# size of "easy-to-handle chunks" (in pages)
step=12
# starting page
from=0
# ending page
to=0
# list of pages to print
pagelist=
# page layout (U.S. legal or European a4)
pagetype=
# stack of needed prologs (TeX, Fig, Mac or any other specified)
PROLOGS=
# dvi target file
dvifile=
PFLAGS=
OFLAGS=-oh
# parse the arguments line and check for options
while true; do
	case $1 in
		-8) shift; patch -n -s -o $TEMP $TEXPRO $DIFF8 || exit 1;
		    TEXPRO=$TEMP; DVI2PS="$DVI2PS -r";;
		-4) shift; patch -n -s -o $TEMP $TEXPRO $DIFF4 || exit 1;
		    TEXPRO=$TEMP; DVI2PS="$DVI2PS -r";;
		-2) shift; patch -n -s -o $TEMP $TEXPRO $DIFF2 || exit 1;
		    TEXPRO=$TEMP; DVI2PS="$DVI2PS -r";;
		-a4)shift; pagetype=a4;;
		-legal)shift; pagetype=legal;;
		-fig) shift; PROLOGS="$PROLOGS $FIGPRO";;
		-mac) shift; PROLOGS="$PROLOGS $MACPRO";;
		-h) shift; PROLOGS="$PROLOGS $1"; shift;;
		-f) shift; from=$1; shift; F=1;;
		-t) shift; to=$1; shift; T=1;;
		-s) shift; step=$1; shift;;
		-o) shift; PRINT="cat";;
		-x) shift; pagelist="$pagelist -x $1"; shift; P=1;;
 		-u) shift;
 		    if test $# = 1  ; then
 			OFLAGS="$OFLAGS -ouDRAFT"
 		    else
 			case $1 in
 				-*) OFLAGS="$OFLAGS -ouDRAFT";;
 			 	*) WORD=`echo $1 | sed -e 's/ /_/g'`;
 				   OFLAGS="$OFLAGS -ou$WORD"; shift;;
 			esac
 		    fi;;
 		-fl) shift; PFLAGS="$PFLAGS"f; OFLAGS="$OFLAGS "-of;;
		-*) echo $0: illegal option - $1; shift;;
		 *) dvifile=$1; break;;
	esac
done
#
# check if DVI file is specified
test -z "$dvifile" && { echo dvi: please specify dvi file; exit 1; }
#
# check if DVI file readability and notation: can be "file" or "file.dvi"
if test ! -r $dvifile
then
	if test -r $dvifile.dvi
	then
		dvifile=$dvifile.dvi
	else
		echo dvi: cannot open $dvifile
		exit 1
	fi
fi
#
# always prepend standard TeX Prolog
PROLOGS="$TEXPRO $PROLOGS"
#
# ?????
test -n "$PFLAGS" && PFLAGS=-$PFLAGS
#
# gather single pages in a chunk
if test "$pagetype"x != x
then
	cat $PROLOGS | sed -e /{\ @letter/s/letter/$pagetype/ > $TEMPB
	PROLOGS=$TEMPB
fi
#
# if no chunk specified by the user print file as a whole lot, otherwise
# cut it into easy-to-handle pieces...
if test $T = 0 -o $P = 1
   then
       LIST=$pagelist
       test $F = 0 || LIST="$LIST -f $from"
       test $to = 0 || LIST="$LIST -t $to"
       (cat $PROLOGS ; $DVI2PS -h $LIST $dvifile) | $PRINT $PFLAGS $OFLAGS
   else
       base=$from; top=`expr $from + $step - 1`
       while test $top -lt $to; do
	     echo Printing pages $base to $top
	     (cat $PROLOGS ; $DVI2PS -h -f $base -t $top $dvifile) | \
		  $PRINT $PFLAGS $OFLAGS
             echo
	     base=`expr $base + $step`
	     top=`expr $top + $step`
       done
       (cat $PROLOGS; $DVI2PS -h -f $base -t $to $dvifile) | \
	    $PRINT $PFLAGS $OFLAGS
fi
#
# clean up things
rm -f $TEMP $TEMPB
exit 0