*BSD News Article 98621


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!newsfeed.internetmci.com!news.cmc.net!sloth.swcp.com!not-for-mail
From: crs@quail.swcp.com (Charlie Sorsby)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Printer Filters
Date: 27 Jun 1997 11:30:23 -0600
Organization: Just me, Los Alamos, NM
Lines: 89
Message-ID: <5p0tbf$3an@quail.swcp.com>
References: <33B0D219.227E@ubs.ch> <5otsqq$dlh@ui-gate.utell.co.uk>
Reply-To: crs@swcp.com
NNTP-Posting-Host: lappp06.swcp.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:43642

In article <5otsqq$dlh@ui-gate.utell.co.uk>,
Brian Somers <brian@awfulhak.org, brian@utell.co.uk> wrote:
= In article <33B0D219.227E@ubs.ch>,
= 	Georg Wagner <Georg.Wagner@ubs.ch> writes:
= > Hallo
= > 
= > Does anybody know in which port package I would find filters like
= > dvi2ps, troff2ps etc
= 
= dvi2ps is actually dvips (in /usr/ports/print/dvips).  I don't
= know offhand about troff, but have a wander 'round in /usr/ports/print.

If you're using the "troff" that comes with FreeBSD (at least with
2.1.5) you shouldn't need a troff2ps filter:

The following is based on a FreeBSD 2.1.5 system.  I don't know if
anything has changed since that release:

From "man troff":

DESCRIPTION
       This manual page describes the GNU version of troff, which
       is part of the groff document formatting  system.   It  is
       highly  compatible  with Unix troff.  Usually it should be
       invoked using the groff command, which will also run  pre-
       processors and postprocessors in the appropriate order and
       with the appropriate options.

and later:

       -Tname    Prepare  output for device name, rather than the
                 default ps.
		 ^^^^^^^ ^^
I.e. the troff supplied with FreeBSD produces PostScript output by
default.  So, the -T option isn't needed.

And from "man groff":

GROFF(1)                                                 GROFF(1)

NAME
       groff - front end for the groff document formatting system

SYNOPSIS
       groff [ -tpeszaivhblCENRVXZ ] [ -wname  ]  [  -Wname  ]  [
       -mname  ] [ -Fdir ] [ -Tdev ] [ -ffam ] [ -Mdir ] [ -dcs ]
       [ -rcn ] [ -nnum ] [ -olist ] [ -Parg ] [ files... ]

DESCRIPTION
       groff is a front-end to the groff document formatting sys-
       tem.  Normally it runs the troff program and a postproces-
       sor  appropriate  for  the  selected  device.    Available
       devices are:

       ps     For PostScript printers and previewers

       dvi    For TeX dvi format

       [...]

       The default device is ps.  It  can  optionally  preprocess
       with any of pic, eqn, tbl, refer, or soelim.

       [...]

End of man-page excerpts.

I use an alias for troff:

alias troff     '/usr/bin/groff -tpe \!* | /usr/bin/lpr'

My "lpr" uses a print filter that detects PostScript and uses
GhostScript (gs) if necessary.

The -tpe options to groff run tbl, pic, and/or eqn as needed,
saving me the effort of remembering the proper order of running
those preprocessors.  Note that, because the default output of
groff/troff is PostScript, no option is needed for that and because
of my print filter, none is needed for lpr.

I hope this helps.



-- 
Best regards,

Charlie "Older than dirt" Sorsby      Los Alamos, NM     "I'm the NRA!"
       crs@swcp.com www.swcp.com/~crs		     Life Member since 1965