From owner-freebsd-questions@FreeBSD.ORG Fri Nov 21 16:52:43 2008 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 602991065679 for ; Fri, 21 Nov 2008 16:52:43 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (mail.oclc.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id C272B8FC23 for ; Fri, 21 Nov 2008 16:52:42 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id RAA17260; Fri, 21 Nov 2008 17:43:34 +0100 (CET) (envelope-from matthias.apitz@oclc.org) Received: from ppp-88-217-54-139.dynamic.mnet-online.de(88.217.54.139) by hunter.Sisis.de via smap (V2.1) id xma017254; Fri, 21 Nov 08 17:43:25 +0100 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id mALGpxCF002000; Fri, 21 Nov 2008 17:51:59 +0100 (CET) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Fri, 21 Nov 2008 17:51:59 +0100 From: Matthias Apitz To: pwn Message-ID: <20081121165159.GA1707@rebelion.Sisis.de> References: <4926922C.8050702@gmail.com> <200811211539.28898.jonathan+freebsd-questions@hst.org.za> <4926D965.8010104@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4926D965.8010104@gmail.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-questions@freebsd.org, Jonathan McKeown Subject: Re: ascii text format X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2008 16:52:43 -0000 El día Friday, November 21, 2008 a las 03:53:09PM +0000, pwn escribió: > Jonathan McKeown wrote: > >On Friday 21 November 2008 12:49:16 pwn wrote: > > > >>algouth this is not a freebsd specific text, i need to format some texts > >>under freebsd for they appear in the center of the page when opened in a > >>browser, but i dont want to use HTML for format them, i just want to add > >>tabulation to my *.txt. > >>what software/tool can i use for format my *.txt? there is command on > >>VIM like "set textwidth" but this is not suitable for me. any help i > >>appreciate. > >>i add an example on a temporary host for make sure all understand. > >>(i need to format the text for he appear like the example good.txt) > >>http://one.xthost.info/temphost/good.txt > >>http://one.xthost.info/temphost/bad.txt > >> > > > >You seem to be fighting against your tools rather than working with them - > >the browser will strip out your whitespace and reflow your text anyway > >unless you prevent it somehow (
 tags?) so you might be better off 
> >just using HTML/CSS to control the format.
> >
> >However, you could look at various tools for processing text, depending 
> >exactly what you're trying to do: the manpages for fmt, groff, and pr 
> >might all offer some ideas.
> >
> >Jonathan
> >  
> 
> 
> yes, i want that the text appears displayed such as manpages like, how 
> can i accomplish this task?

what about:

$ groff -Tascii < bad.txt

SOME TITLE



Dreaming  of space-flight, and predicting its future, have always
been favorite pastimes of science fiction. In  my  first  science
column  for  F&SF, I can't resist the urge to contribute a bit to
this grand tradition.

A science-fiction writer in 1991 has a  profound  advantage  over
the  genre's  pioneers. Nowadays, space-exploration has a past as
well as a future. "The conquest of space" can  be  judged  today,
not just by dreams, but by a real-life track record.


and some more tweakings after that with sed, ...

	matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
Q: What's the difference between an iphone and a freerunner?
A: One works but takes away your freedom, the other is free but needs your work.