From owner-freebsd-questions@FreeBSD.ORG Wed Jun 13 06:11:24 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8CD61065701 for ; Wed, 13 Jun 2012 06:11:24 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 919948FC0C for ; Wed, 13 Jun 2012 06:11:24 +0000 (UTC) Received: from r56.edvax.de (port-92-195-32-177.dynamic.qsc.de [92.195.32.177]) by mx02.qsc.de (Postfix) with ESMTP id 3FEC427F07; Wed, 13 Jun 2012 08:11:22 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q5D6BLYQ001992; Wed, 13 Jun 2012 08:11:21 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 13 Jun 2012 08:11:21 +0200 From: Polytropon To: Lars Eighner Message-Id: <20120613081121.9efe53d5.freebsd@edvax.de> In-Reply-To: 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> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: pwnedomina , freebsd-questions@freebsd.org Subject: Re: text format X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 06:11:24 -0000 On Tue, 12 Jun 2012 16:32:40 -0500 (CDT), Lars Eighner wrote: > 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.. Depending on what your actual text input is (no markup, plain ASCII text), this _should_ work: groff -Tascii < normal.txt > formatted.txt But _you_ need to try yourself and _maybe_ adjust your input accordingly. Also consider using the "fmt" program as it has been suggested for "document preparation". > 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. I know that "Context Pro" can do this. Also "WordStar" or "TP" are able to apply margins and align text to "justify" ("solid column"). > 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. It's even possible to search the web for a simple LaTeX enclosing and put it into that, but then we leave the domain of ASCII text in the output. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...