Hacker News new | past | comments | ask | show | jobs | submit login
History of roff (man7.org)
63 points by bdeshi on April 23, 2022 | hide | past | favorite | 14 comments



There used to be a "purity test for programmers" which asked if you could solve the Towers of Hanoi using troff.

I wanted to get that point, so I learned enough troff to write a solution to Towers of Hanoi with it

http://www.loyalty.org/~schoen/troff-hanoi.txt


Today Groff+ms it's easy:

groff -step -k file.groff > file.pdf

Groff+mom it's like Texlive for TeX.

The last one it's best suited for writers.

With Groff+ms you can typeset equations, letters and articles with a 486 and less than 50MB of used space. It's a gem. Postscript can be set with -Tps for Groff, it may be lighter on rendering. The GV viewer opens both PDF and PS files.


> Groff+mom

Apparently mom and ms are some packages full of macros to use with Groff. I am not familiar with these tools and was a bit confused until I read some man pages.


"With Groff+ms you can typeset equations, letters and articles with a 486 and less than 50MB of used space. It's a gem."

A very useful feature, considering so many young kids, specially with not so doing well house income, can have Raspberry pi and produce good looking reports etc for school/ extra curricular activities, comparable to those produced by much powerful and costly hardware and software systems.

I used Groff+mom on a raspberry Pi 3b, and results were quite good for text heavy documents with some tablular data.


Personally I prefer pandoc+latex. Most kids know markdown and those that don't can learn it very easily. I actually did my homework in college on a Raspberry pi for a few semesters just because I'm cheap and knew I could get away with it. Also some professors insist on docx so being able to generate it is very nice.

There are also some that insist on exe submissions along with your source. That mingw can cross compile for X86_64 Windows from the Raspberry pi so easily is an awesome testament to how nice a dev environment GNU/Linux is.


I use the Heirloom Troff for my daily workflow: http://heirloom.sourceforge.net/doctools.html Support for Unicode, OTF fonts, Knuth's algorithm for formatting paragraphs, etc.


Curious if anyone came up with the idea to build a Linux distro based off heirloom.



What is groff's hyphenation format? I see that it has hyphenation data only for a handful of languages (not including mine).


I’ve wanted to learn the roff ecosystem since I learned W. Richard Stevens (RIP) used troff for his books. 25 years later it’s probably time to accept the fact that I won’t.


Given that we have latex, pandoc, markdown, asciidoc, etc., I really don't see the need to learn it. At the time it was probably a great and transformative tool, but using TeXMaker or TeXStudio and latex gives a far more comfortable writing environment and the documents you can make are much better looking.


I wouldn't manually write documents in groff these days, but I have found that it can still be useful for automatically generated PDF reports/documents.

Groff is lightweight and already installed on most Linux systems, and the build process is way cleaner than TeX. It's easy to make a Python script that reads some data and prints a nice-looking report (or a form letter, etc.)


Yes, integrating it into a scripted workflow, including dependency-based build systems, is vastly easier. The multiple runs of TeX don't fit well into this model, and the Unix heritage of troff vs the TeX is clearly apparent in the design, which permits all the bits to be piped together. It's clearly dated and limited in many ways, but it's still extremely powerful, and it can do automated document generation very well. I've used it for this in the past, and would recommend it.

While we do have more modern stuff like Markdown and ReStructured Text, these are in their own way extremely limited and are primarily focussed upon transformation to HTML. troff is focussed upon printing, and if you want nice PDF reports, and you don't want the slowness and excessive disk space consumption of TeX, it can be an excellent solution.


> still extremely powerful, and it can do automated document generation very well.

These days I am more likely to be working in org-mode and using elisp snippets to automate stuff, but roff is a solid fallback for things like quickly turning 100 paragraphs of individual feedback into 100 formatted pdf documents that can be mailed out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: