summaryrefslogtreecommitdiff
path: root/Build/source/texk/dtl/man2ps
blob: 87f0164e925a0ab1af63d1cb7a489594062f1092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# This file is public domain.
# Originally written 1995, Geoffrey Tobin.
# 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.
# This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.
#
# Filter for converting "troff -mxx" to PostScript.  This script is
# normally linked to the names man2ps, ms2ps, me2ps, and mm2ps.
#
# Usage:
#	man2ps [<] cc.1   >cc.ps
#	me2ps  [<] foo.me >foo.ps
#	mm2ps  [<] foo.mm >foo.ps
#	ms2ps  [<] foo.ms >foo.ps
#
# [08-May-1993]

# Choose a troff format according to the scrip name.
case `basename $0` in
	man*)	FORMAT=-man ;;
	me*)	FORMAT=-me ;;
	mm*)	FORMAT=-mm ;;
	ms*)	FORMAT=-ms ;;
	*)	echo "Unknown troff format:" ; exit 1 ;;
esac

# We use GNU groff
gtbl $* | eqn | groff $FORMAT