Mail Archives: djgpp/2000/06/27/05:45:32
Eli Zaretskii wrote:
> Groff is a document-formatting and typesetting package. It belongs to an
> older generation of word-processing software that is not WYSIWYG;
> instead, you edit the document source with a text editor, intersperse the
> text with special directives that specify fonts and formatting
> parameters, and then submit the source to a batch processor which produces
> a ready-to-print or ready-to-read document. troff, a program that is
> standard on Unix, is used, even today, to write manual pages (those *.1
> files you find in the man subdirectory of the DJGPP installation tree),
> but it can also be used for writing very large and complex documents.
> (Another, more modern program from the family of batch word-processors is
> TeX.)
I was once (when my interent access was spare) left with some man pages
(of RCS - the version I downloaded didn't include preformatted versions) and
no ?roff anywhere around my computer. The sources were not too friendly too
read but I had "that book" on unix explaining ?roff basics and listing its
standard library macros. So I sat down and worte a monsterous `sed' script that
proccessed them into readable text. I added some bells-and-whisteles:
extracting the macro definistion in the source to another sed script,
highlighting things with ^H (use `less' to view) and stiffing dummy characters
between non-highlighted chars, running `fold' to fill paragraphs and removing
that dummy chars. It's 5 or 6 sed scripts together and a batch file to run it.
If anybody is interested in it, for curiosity or because he doesn't want to
download groff (the later is not a recommended reason; it outputs only text and
not always good) reply and i'll post the scripts or put them on a web page and
post a pointer.
Only mess-dos could have inspired such a dirty hack. Have a nice hacking,
people.
--
Beni Cherniavsky <cben AT crosswinds DOT net>
(also scben AT t2 in technion)
The world is the greatest of all hacks. Admire its bulletproofness -
only one reboot was ever done, even it was a soft (wet) one!
- Raw text -