Hacker News new | ask | show | jobs
by massysett 2111 days ago
What macros do you use? I have some simple programs that generate documents to print out, and I use LaTeX and a bunch of packages. It takes hundreds of megabytes of software with all the packages. I've long toyed with using the MOM macros but can't get motivated to rewrite my programs and learn troff.

It used to bother me that groff doesn't support Unicode (as far as I can tell) but then realized that all I write is English so why am I fetishizing Unicode? groff will get me any accented character that I would realistically need.

3 comments

You can have UTF-8 with groff using the preconv [1] tool, just pass the "-k" or "-Kutf8" paramater. It will preprocess your source and replace Unicode symbols with its groff special character form. Of course, the built-in standard fonts do not support many glyphs but it is no big thing to use a more Unicode friendly font like DejaVu Sans or Noto, check [2].

So this is my setup using MOM macros for nice typesetting.

But I fully agree on your last point, in the end I seldom need the Unicode universe for most of my documents.

[1] https://www.man7.org/linux/man-pages/man1/preconv.1.html [2] http://www.schaffter.ca/mom/momdoc/appendices.html#fonts

Get heirloom-doctools. It supports Unicode just fine.

https://n-t-roff.github.io/heirloom/doctools.html

Just the plain .ms macros. Plus "pic", I like that a lot.