Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2012 08:11:21 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Lars Eighner <lars@larseighner.com>
Cc:        pwnedomina <pwnedomina@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: text format
Message-ID:  <20120613081121.9efe53d5.freebsd@edvax.de>
In-Reply-To: <alpine.BSF.2.00.1206121632070.23999@abbf.ynefrvtuareubzr.pbz>
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> <alpine.BSF.2.00.1206121632070.23999@abbf.ynefrvtuareubzr.pbz>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120613081121.9efe53d5.freebsd>