]> git.lyx.org Git - lyx.git/blob - 3rdparty/dtl/man2ps
Update sk.po
[lyx.git] / 3rdparty / dtl / man2ps
1 #!/bin/sh
2 # This file is public domain.
3 # Originally written 1995, Geoffrey Tobin.
4 # The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation.
5 # This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.
6 #
7 # Filter for converting "troff -mxx" to PostScript.  This script is
8 # normally linked to the names man2ps, ms2ps, me2ps, and mm2ps.
9 #
10 # Usage:
11 #       man2ps [<] cc.1   >cc.ps
12 #       me2ps  [<] foo.me >foo.ps
13 #       mm2ps  [<] foo.mm >foo.ps
14 #       ms2ps  [<] foo.ms >foo.ps
15 #
16 # [08-May-1993]
17
18 # Choose a troff format according to the scrip name.
19 case `basename $0` in
20         man*)   FORMAT=-man ;;
21         me*)    FORMAT=-me ;;
22         mm*)    FORMAT=-mm ;;
23         ms*)    FORMAT=-ms ;;
24         *)      echo "Unknown troff format:" ; exit 1 ;;
25 esac
26
27 # We can use either GNU groff or Sun Solaris troff + dpost
28 if [ which groff > /dev/null ]
29 then    # GNU groff
30         TROFF="groff $FORMAT"
31         TROFF2PS="cat"
32 +elif [ which dpost > /dev/null ]
33 then    # Solaris 2.1
34         TROFF="troff $FORMAT"
35         TROFF2PS="/usr/lib/lp/postscript/dpost"
36 else
37 +       echo "Cannot find troff-to-PostScript filter" >&2
38         exit 1
39 fi
40
41 tbl $* | eqn | $TROFF | $TROFF2PS