Troff -ms output for psql

From: Roger Leigh <rleigh(at)whinlatter(dot)ukfsn(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: Troff -ms output for psql
Date: 2004-08-01 18:09:18
Message-ID: 8765823f3l.fsf@whinlatter.whinlatter.ukfsn.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hello,

I've created a patch which adds support for troff "-ms" output to
psql. i.e. "\pset format troff-ms". The patch also corrects some
problems with the "latex" format, notably defining an extra column in
the output table, and correcting some alignment issues; it also
changes the output to match the border setting as documented in the
manual page and as shown with the "aligned" format.

The troff-ms output is mostly identical to the latex output allowing
for the differences between the two typesetters.

The output should be saved in a file and piped as follows:

cat file | tbl | troff -T ps -ms > file.ps
or
tbl file | troff -T ps -ms > file.ps

Because it contains tabs, you'll need to redirect psql output or use
"script", rather than pasting from a terminal window, due to the tabs
which can be replaced with spaces.

I've attached the patch (against the current mainline), and example
output of each for each of border=[123] and expanded mode on and off
(both source and printable copy).

Regards,
Roger

PS. I'm not subscribed, so I would appreciate a CC on any replies.
Thanks!

--
Roger Leigh

Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.

Attachment Content-Type Size
pgsql-psql-troff-ms.diff text/x-patch 9.7 KB
mstest.ms.bz2 application/octet-stream 714 bytes
mstest.ps.bz2 application/octet-stream 4.4 KB
latextest.tex.bz2 application/octet-stream 913 bytes
latextest.pdf.bz2 application/octet-stream 36.6 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2004-08-01 18:59:29 Re: [subxacts] Last try before beta
Previous Message Peter Eisentraut 2004-08-01 17:54:23 Re: Traditional Chinese translations in UTF-8 for 7.5