[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Boxing text.
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] Boxing text. |
Date: |
Thu, 28 Mar 2013 00:59:35 +0000 |
Hi Anonymous,
> I found a rough example out in the wild for how to box text using
> groff. This is my attempt to make it work:
>
> ===8<-----------------------------------------
> #!/bin/bash
>
> cat <<EOF | pic |groff -Tascii | sed '/^$/d'
> .B1
> &client
> &address1
> &address2
> &address3
> .B2
> EOF
> ===8<-----------------------------------------
>
> Any ideas why the text does not end up inside a box? Piping the text
> through "pic" was a guess.. but it does not make a difference either
> way.
The B1 and B2 macros seem to be from the mm macro set yet you aren't
stating they should be loaded.
$ printf '.B1\nfoo\n.br\nbar\nxyzzy\n.B2\n' |
> groff -Tascii -mm |
> cat -s
- 1 -
+-----------------------------------------------------------+
|foo |
+bar-xyzzy--------------------------------------------------+
$
Cheers, Ralph.