3 ms·
I learned troff/groff pretty recently. Two reasons: 1) I hate WYSIWYG with the passion of a thousand suns, but sometimes you need pretty documents; 2) troff is
by davegauer 9y ago
I learned troff/groff pretty recently. Two reasons: 1) I hate WYSIWYG with the passion of a thousand suns, but sometimes you need pretty documents; 2) troff is a fast, tiny, ubiquitous tool.
I found that the existing macro packages (such as Mom) can produce beautiful documents, but they are limited to the specific types of documents for which they were created. Going "against the grain" of a macro package is nothing but pain and heartache.
A macro package can be learned in an hour.
Without existing macro packages, troff source is just control lines and text lines. It can be learned in a day or two. The "Troff User's Manual" technical report by Ossanna and Kernighan (yes, THAT Kernighan) is very readable.
* NOT A STORAGE FORMAT *
Troff (with or without macros) is meant to be read as a stream, top-down, producing a formatted document split into pages on the fly. Its formatting structure was not meant for specifying semantics or using the document outside of troff.
Therefore I think troff can be a wonderful output format. Its battle-tested tools are capable of directly generating, say, PDFs. But I'm personally not going to write anything I want to keep directly in troff.
Jeez, now I need to go write that *roff_mom backend for acsciidoctor...
Edit: unwanted italics via asterisks - the irony!
- cat199 9y agoReal V7/PWB UNIX pros write m4/cpp macros to cross-compile their custom semantic/structural macros + document body fragments into troff and then generate final output from that..
- deleted 9y ago[deleted]
- dhimes 9y agoAnd use a typewriter to put on the page numbers- because of that $%#& margin requirement...