Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2012 16:32:40 -0500 (CDT)
From:      Lars Eighner <lars@larseighner.com>
To:        pwnedomina <pwnedomina@gmail.com>
Cc:        Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org
Subject:   Re: text format
Message-ID:  <alpine.BSF.2.00.1206121632070.23999@abbf.ynefrvtuareubzr.pbz>
In-Reply-To: <4FD7A937.5030607@gmail.com>
References:  <4C067C55-8320-4D12-A312-F8E2CC699B01@gmail.com> <CAHieY7TxEGJzEcmccXnq_mP8zwmXtVOnCHYPXfs0VMspA5MQ1Q@mail.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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1206121632070.23999>