4 ms·
I still regularly use groff; letters, invoices, ad hoc formatting of one-off tasks. tbl(1) is nice and the overall speed makes it handy for producing PDF in the
by ralph 14y ago
I still regularly use groff; letters, invoices, ad hoc formatting of one-off tasks. tbl(1) is nice and the overall speed makes it handy for producing PDF in the back-end.
- fusiongyro 14y agoI was going to ask why one would prefer groff to some TeX variant. Speed is a pretty good reason; I'm impressed at how slow TeX is even on modern hardware. I usually generate HTML unless I want something beautiful, and then I usually use ConTeXt. I'm pretty fond of classic Unix stuff so maybe I'll delve more into groff.
- Surio 14y ago+1 on speed and memory.. Some table and figure heavy documents I've done have had internal memory overruns on latex. A lot of my forays into programming started with the Bell Labs books (with troff | pic | eqn ...) prominently on the copyright page. So, it was one of the first things I looked up when I got access to a UNIX terminal. Then I discovered that all the UNIX books by Stevens were done up with troff/groff. From there, it was all "steadily downhill" for me ;-) P.S: If you already know (La/Con)TeX then groff is literally a walk in the park. And it is always good to know more than one way to do things imho. Good luck with it.
- fusiongyro 14y agoMy knowledge of ConTeXt is pretty limited, but unlike LaTeX you don't need to be an expert to get good looking results. I find ConTeXt a lot more intuitive. I got a book on TeX coming soon because I want to get better at ConTeXt. ConTeXt is not shy about telling you that for better results you need to understand TeX and use it appropriately. I find it kind of absurd that I've been using TeX for so many years without actually understanding it. I have been curious about roff since trying to use Plan 9, but in a pretty absent-minded way. They're quite unashamed of providing roff at the expense of TeX, and I believe all of its documentation is roff-formatted, including the technical reports, but I could be mistaken about that.
- ralph 14y agoI've read _The TexBook_ and other material but just find the TeX mark-up so noisy to parse compared with the troff style of `.cmd' at the start of the line, cmd is often short, with the odd bit of \s+2 embedded within the line, depending on personal preference. troff and friends were developed on Unix in its early days by the originators of Unix and it shows in what a good fit they are to the environment and in their elegance; they are Unix programs. TeX was born outside of Unix; it runs on Unix.
- fusiongyro 14y agoFeel like answering a couple more questions? :) The kinds of questions I have are not "good" questions for S.O. I'm tempted to try redoing a project of mine from ConTeXt in troff just to see what it's like. Do you recommend any particular macro package? Without any other input I'd probably try the -me macros, just because they've been compared to Pascal (versus the FORTRAN of -ms and the PL/1 of -mm). Also, do you find yourself writing your own macros much? I haven't the faintest idea what that would require with troff, but I rely on this with TeX quite a bit, mostly to elevate stylistic markup into semantic markup. My impression is that if you want semantic macros you use a macro package, and even then you probably freely intersperse non-semantic macros. This project I've been working on for a while, uses LuaTeX so that I can connect to a local database, perform some queries and typeset them and their output. I imagine this kind of thing would not be difficult to do directly with a custom pipeline step using troff. Have you done that kind of thing before? If so, how unpleasant was it? Thanks for talking with me about this.
- ralph 14y agoYou'd do well to ask these on the https://lists.gnu.org/mailman/listinfo/groff https://lists.gnu.org/mailman/listinfo/groff list for a wider set of opinions. It depends on the style and complexity of the document. -ms is simple enough that people like W. Richard Stevens would tweak it for their books. I understand the relative newcomer, -mom, is comprehensive, modern, and well supported by its author on the above list. I don't recognise the Pascal, etc., analogies. :-) I do write my own macros. They can be just short-hands for a combination of others in the same way my ~/bin/l is exec ls -l "$@", or sometimes for a simple document I start with just troff and have some macros on top of that. Yes, any distinction over semantics is purely convention. You may wish to read Kernighan's _Nroff/Troff User's Manual_, http://troff.org/54.pdf http://troff.org/54.pdf, otherwise known as CSTR #54. It's original troff, not groff, but as a succinct reference with elegant prose we often refer back to it. At the end is a tutorial introducing simple macros. Integrating troff and friends in pipelines and scripts is easy. They take line-based text as input and produce it as output, only switching to binary for some output formats at the last hop. You can also run system(3) from within troff documents, e.g. to include the output of a command, but often that's not the easiest fit. I recommend again the groff@gnu.org list; they're friendly, patient with newcomers, and interested in showing how they tackle the task at hand.
- Surio 14y ago+1 for reminding me of tbl. :-) EDIT: Wanted to say, tbl nailed it for me that whatever conveniences WYSIWYG formatting might offer, it is never a good substitute for typesetting (a strong opinion to this day -- I still prefer typesetting for documents that need to 'travel') And yes the letter(heads) came rather nice too.
- swah 14y agoWould you use for a 200-page product manual?
- Surio 14y agoI have used LaTeX for 200+ page documents (various) in the past, so to your question, yes I would. Handing it over to someone else to maintain is a different thing though. Products like InDesign or PageMaker or Word understand that this is what eventually happens in reality. So, the not-so-steep learning curves that WYSIWYG tools offer have won out in the end. If the manual is written by techies, and maintained in-house like all those old Bell Labs manuals that used troff, then markup based typesetting is not such a pain, imho.
- swah 14y agoThanks - I know Latex is used, I was asking him about troff :)
- ralph 14y agoYes, sure I would. Doesn't sound like a glossy DTP kind of document. The document size wouldn't be a problem. Ask on the groff list with more of a description of the kind of content and what you might be worried about. Books like _The C Programming Language_, W. Richards Stevens' _Unix Network Programming_, and others are examples of what can be done. http://troff.org/pubs.html http://troff.org/pubs.html
- swah 14y agoMind blown dude! Whole dictionaries use troff!