#!/bin/sh -f # presentation.cls を用いて作成された DVI file を # 適切なサイズのPostScriptに変換するスクリプト # if [ "$1" = '-a4landscape' ]; then dvips -x 2200 -t landscape -h forcea4.pro $2 -o - | pstops -pa4 "U(21cm,29.7cm)" elif [ "$1" = '-ohp' ]; then dvips -x 3740 -t landscape -h forcea4.pro $2 -o - | pstops -pa4 "U(21cm,29.7cm)" elif [ "$1" = '-a4landscapenup' ]; then dvips -x 2200 -t landscape $2 | pstops -pa4 "U(21cm,29.7cm)" | psnup -4 -r -c elif [ "$1" = '-a4portrait' ]; then dvips -x 2000 -h forcea4.pro $2 -o - elif [ "$1" = '-a4portraitnup' ]; then dvips -x 2000 $2 | psnup -4 elif [ "$1" = '-a3landscape' ]; then dvips -x 3000 -t a3 -t landscape -h forcea3.pro $2 -o - elif [ "$1" = '-a3landscapenup' ]; then dvips -x 2120 -t landscape $2 | psnup -4 -r -c elif [ "$1" = '-a3portrait' ]; then dvips -x 2500 -t a3 -h forcea3.pro $2 -o - elif [ "$1" = '-a3portraitnup' ]; then dvips -x 1767 $2 | psnup -4 else echo 'Usage:' 1>&2 echo 'dvipresentation -a4landscape infile.dvi' 1>&2 echo 'dvipresentation -a4portrait infile.dvi' 1>&2 echo 'dvipresentation -a3landscape infile.dvi' 1>&2 echo 'dvipresentation -a3portrait infile.dvi' 1>&2 echo '' 1>&2 echo 'dvipresentation -a4landscapenup infile.dvi' 1>&2 echo 'dvipresentation -a4portraitnup infile.dvi' 1>&2 echo 'dvipresentation -a3landscapenup infile.dvi' 1>&2 echo 'dvipresentation -a3portraitnup infile.dvi' 1>&2 exit 1 fi