• Home
  • Blog
  • Contact
  • Projects
  • Content Mirror
  • Matrix Guide

  • Settling On Troff

    May 12, 2022

    Over the years, I've slowly descended into the depths of typesetting on computers. First, it was Microsoft Office 2010, running on Windows Vista, no less. As a child, I would spend hours reading the Office manuals, and playing around with Word and Publisher. Then, when I discovered Linux, the natural thing to do was abandon Microsoft Office for an open source alternative. I briefly played around with Open Office on Windows 7, and then LibreOffice was—and still is, in fact—built into Ubuntu, so for the longest time, LibreOffice was my go-to for documents.

    Up to this point, what I've said is probably nothing special. Most people wouldn't even really be able to tell a difference between MS Office and LibreOffice these days. In fact, LibreOffice has rather good support for MS Office documents. So you can most likely comfortably switch between the two softwares without much difficulty. But things start getting interesting when you get into more esoteric typesetting systems. I discovered LaTeX a few years ago, and it immediately got my attention. I saw that it rendered math far better than LibreOffice, and it just produced PDF documents that looked far better than anything produced by an office suite. I wrote a few papers here and there, and even submitted some high-stakes papers for some of my classes in high school and dual-enrollment years. But LibreOffice was still necessary for reading my older papers, and also for taking notes on handouts that were only in MS Word format.

    Even now, I still find myself requiring LibreOffice on my laptop so I can fill in the instructor-provided note sheets. But I just recently discovered perhaps the oldest typesetting system that still exists today. And of course, as you know if you've read my blog post on the Finger protocol, I like old software. The software is Troff, or, more accurately, Groff, which is the GNU implementation of it. Groff has some pretty interesting syntax, but it is very fast, and it is much more lightweight than LaTeX. One of my biggest problems with LaTeX was that it required such a massive package, and even then, dependencies have always been an issue. Want to use an APA template? Good luck trying to locate 57 other LaTeX packages just to compile the sample document!

    Eventually I got so sick of LaTeX that I abandoned it in favor of plain TeX. I built my own templates, and these worked for quite a while. But again, I found TeX to be bloated. A TeX installation on OpenBSD was a good few hundred megabytes.And it was also hard to type TeX. Reaching up for the backslash key and the bracket keys while writing a paper is something I got used to, but I still never liked it because I never got fast at it. That's where Troff really shines. It uses the period as its control character, and it is really easy to type very quickly. The macros are so much more consistent, and Troff manuscripts all look relatively similar.

    I'm still bummed that OpenBSD doesn't have a typesetting system built into it 1, but Groff is the next best alternative. It doesn't have any dependencies, making it a relatively cheap package to install. And it isn't super hard to learn. Given that the Troff format is rather old, manuals can be found all over the place, and the nice thing is that something that worked in the early Troff will most likely still work in Groff.

    I was able to pick up Groff pretty quickly, and I've already gotten an APA and MLA template written for it. This Friday, I will be submitting my first-ever Groff-generated paper for my anatomy class, so that's always exciting. Speaking of, I should probably mention here that I am very busy with school these days, so my blog posts will be pretty short and simple for the next few weeks as I get through a condensed summer semester. I want to keep writing, but I just don't have much time. When classes are done, and I'm just working, I should have a lot more time for writng some nice blog posts. Despite how busy I am, I have lots of good stuff cooking on my server.

    1. Well, it has mandoc(1), but that is only for man pages. I want something general purpose. 

    © 2019-2023 Jordan Bancino.