diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-26 23:58:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-26 23:58:37 +0000 |
commit | cb1f34f8bcabffe0473d760bf9dd3343f8db537c (patch) | |
tree | e5ab8f61ef2d5f8a2e641e760b21e3edd118cc05 /Master/texmf-dist/scripts/texlive-extra/dvired.sh | |
parent | 767a4e654de5f47d7bb5c671f0df58918cc6347b (diff) |
tetex.tlpsrc: remove.
scheme-infraonly.tlpsrc,
collection-basic.tlpsrc: no more tetex.
texlive.infra.tlpsrc: move fmtutil-hdr.cnf and updmap-hdr.cfg
to texlive-scripts, where the scripts are.
texmf-dist/doc/tetex: also remove, too old.
texmf-dist/scripts/texlive-extra: add remaining auxiliary scripts from
tl_scripts, from tetex days.
<many>.sh, e2pall.pl: move there (from Build/../tlscripts/).
texlive-extra.tlpsrc: new package.
collection-binextra.tlpsrc: add texlive-extra here.
bin/*/all*: adjust symlinks.
Build/.../texlive/linked_scripts/texlive-extra: add new scripts.
Adjust Makefile.am, including creating mktexfmt symlink.
Build/.../texlive/tl_scripts: remove all scripts from here,
leaving only man pages.
tl-check-wrapper-consistency: no more scripts in tl_scripts
(will rename directory later).
git-svn-id: svn://tug.org/texlive/trunk@53554 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/texlive-extra/dvired.sh')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive-extra/dvired.sh | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/texlive-extra/dvired.sh b/Master/texmf-dist/scripts/texlive-extra/dvired.sh new file mode 100755 index 00000000000..4eb3586119d --- /dev/null +++ b/Master/texmf-dist/scripts/texlive-extra/dvired.sh @@ -0,0 +1,98 @@ +#!/bin/sh +#============================================================================== +# Version: 0.3 +# Module: dvired +# Purpose: Translate dvi-file into postscript with reduced output size. +# Two logical pages will be put on onto each physical sheet of +# paper. +# System: Linux. UNIX(tm) systems may work as well :-) +# Requires: pstops (http://www.dcs.ed.ac.uk/home/ajcd/psutils/), dvips +# Created: 19.11.1992 +# Last Change: 13.08.1999 +# Language: sh +# Author: Thomas Esser +# Address: te@dbs.uni-hannover.de +# Copyright: (c) 1994, 1999 by Thomas Esser +# Copying: GNU GENERAL PUBLIC LICENSE +#============================================================================== + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +help() +{ + cat <<eof + +Usage: dvired [options] file + +This programm behaves like dvips, execpt fot the fact that two logical +pages will be put on onto each physical sheet of paper. + +For options see dvips(1). This program only interprets the options +-o, -P and -f. All other options will directly be passed to dvips. + +If your paper is not in A4 format, you need to adjust the dimensions +in this program. + +Examples: (it is assumed that the PRINTER-variable is set) + dvired -Plw foo send output to printer lw + dvired -o foo.ps foo send output to file foo.ps + dvired -pp4-7 foo send 4 output-pages to printer + dvired foo -f | ghostview - preview output with ghostview +eof +} + +case $# in +0) help ; exit 1 ; ;; +esac + +# This will work for A4 paper. +paper=a4 ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-141.06mm)' + +# The following are *UNTESTED*. Please let me know whether they work +# or not, if you can test them. +#paper=a3 ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-202.56mm)' +#paper=letter ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-132.26mm)' +#paper=legal ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-170.36mm)' +#paper=ledger ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-132.26mm)' +#paper=tabloid ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-208.46mm)' + +of="" +lpr_opt="" + +case "$PRINTER" in +"") dvips_pre="" ;; +*) dvips_pre="-P$PRINTER" ;; +esac + +dvips_pre="$dvips_pre -t $paper -t landscape" + +while [ ! -z "$1" ] ; do + case $1 in + -P) of="" ; dvips_pre="$dvips_pre -P$2" ; lpr_opt="-P$2" + shift ;; + -P*) of="" ; dvips_pre="$dvips_pre $1" ; lpr_opt="$1" ;; + -o) of="$2" + shift ;; + -o*) of="`echo $1| sed 's/..//'`" ;; + -f) of="-" ;; + *) opt="$opt $1" + esac + shift +done + +case "$of" in +"") dvips -x707 $dvips_pre $opt -f | pstops -q $pstopsopt | lpr $lpr_opt + ;; +"-") dvips -x707 $dvips_pre $opt -f | pstops -q $pstopsopt + ;; +*) dvips -x707 $dvips_pre $opt -f | pstops -q $pstopsopt > "$of" + ;; +esac |