🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.emacs.lisp.manual
1 messages
1 total messages Started by Skip Montanaro Sat, 11 Nov 1989 16:07
Breaking up lispref.dvi
#19
Author: Skip Montanaro
Date: Sat, 11 Nov 1989 16:07
47 lines
1486 bytes
For those of you reading the Emacs Lisp Reference Manual with small paper
trays in their printers, or who must share your printer with other people,
here's a short shell script that uses Chris Torek's dviselect program to
split a dvi file into smaller chunks.

I modified dviselect slightly to exit with a 1 value if no pages of output
were generated. Let me know if you want it and I will mail it to you.

#!/bin/sh

# just a hack - invoke as
#	dvisplit NUM DVIFILE

NUM=$1
FIRST=1
LAST=$NUM
DOTSPERLINE=60
DOTS=0

dviselect -s -i $2 -o $2.$FIRST-$LAST $FIRST:$LAST

while [ $? = "0" ] ; do

    # a little feedback for the user
    echo -n "." ; DOTS=`expr $DOTS + 1`
    if [ $DOTS -ge $DOTSPERLINE ] ; then
	echo ""
	DOTS=0
    fi

    # select the pages
    FIRST=`expr $FIRST + $NUM`
    LAST=`expr $LAST + $NUM`
    dviselect -s -i $2 -o $2.$FIRST-$LAST $FIRST:$LAST

done

if [ $DOTS -gt 0 ] ; then
    echo ""
fi

rm -f $2.$FIRST-$LAST

exit 0

--
Skip Montanaro (montanaro@crdgw1.ge.com)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads