From owner-freebsd-questions@FreeBSD.ORG Tue Jun 12 21:34:15 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF2B5106566C for ; Tue, 12 Jun 2012 21:34:15 +0000 (UTC) (envelope-from lars@larseighner.com) Received: from mail.team1internet.com (mail.team1internet.com [216.110.13.10]) by mx1.freebsd.org (Postfix) with ESMTP id 86CDC8FC12 for ; Tue, 12 Jun 2012 21:34:15 +0000 (UTC) Received: from larseighner.com (unknown [71.20.75.102]) by mail.team1internet.com (Postfix) with SMTP id 589A416B4E8; Tue, 12 Jun 2012 16:34:14 -0500 (CDT) Received: by larseighner.com (nbSMTP-1.00) for uid 1001 lars@larseighner.com; Tue, 12 Jun 2012 16:32:41 -0500 (CDT) Date: Tue, 12 Jun 2012 16:32:40 -0500 (CDT) From: Lars Eighner X-X-Sender: lars@noos.larseighnerhome.com To: pwnedomina In-Reply-To: <4FD7A937.5030607@gmail.com> Message-ID: References: <4C067C55-8320-4D12-A312-F8E2CC699B01@gmail.com> <4FD6A057.2070101@gmail.com> <20120612054431.b630e37a.freebsd@edvax.de> <7F5F7609-DB36-4E37-9196-92B797732C1D@gmail.com> <20120612102200.f5d0b981.freebsd@edvax.de> <4FD7A937.5030607@gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Polytropon , freebsd-questions@freebsd.org Subject: Re: text format X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2012 21:34:15 -0000 On Tue, 12 Jun 2012, pwnedomina wrote: > On 12-06-2012 08:22, Polytropon wrote: >> On Tue, 12 Jun 2012 09:06:07 +0100, i pwn wrote: >>> on groff i've used this cmd to format the text >>> groff -Tascii< normal.txt | sed 's/^/ /'$1> formatted.txt >>> on nroff what would be the cmd? >> Depending on your input data, I'd say the same command: >> groff -Tascii< normal.txt> formatted.txt. But you need >> to test this yourself with your input text format. >> >> See "man nroff" for details. >> >> For using roff macros, "man 7 mdoc" has a nice summary. >> >> >> > im only asking what cmd should i use to format an ascii text to be identical > to that one, centered and aligned.. I do not believe there is one. It seems to me there were some DOS "amusement" programs that would do this, and you might find one and run it in dosbox. There is very little demand for fully justified monospaced text because it is extremely ugly, hard to read, and error prone. Nonetheless, OpenOffice appears able to do this and so can MS-Word. I suspect many others can without the necessity of writing your own macro. There may be modules in perl and other scripting languages that might be helpful. Rivers are very difficult to avoid, but as Matthew suggests, you might start with fmt and fix up the output with whatever scripting language you know. If you could find a good hyphenation routine you might get better results. -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266