2018-03-05 Troff
================

When writing for this wiki, I am always conscious of how it will look
using Gopher. Basically raw mode. This includes thinking about line
breaks. And I end up not liking inline linking so much. It makes the
plain text really hard to read. But writing the plain text with manual
line breaks on a handheld device runs into the problem that iOS will
autocapitalize all line beginnings. You have to “fix” that manually.
And it uses “real” quotes, which are neither ASCII nor Latin-1 so
older Gopher clients fail to display them correctly.

Into all this mess comes a Gopher post by dbucklin about using Troff.
That’s an old formatting tool from the very early days. Way older than
LaTeX, and that’s pretty old, too. It’s an excellent introduction for
somebody who knows nothing about it. I want to give it a try because
all the the things that are old but that have been kept alive by
enthusiasts have their own ways of being super efficient.

I guess that’s why I use Emacs, too. It’s weird, but it works, if you
adapt to it’s way of working. These things are like living fossils. We
like to think that those are species that split off from the rest
millennial ago and thus they are “primitive” but not so: they just
evolved on their own, for exactly the same amount of time, and they
are just as adapted to their niche as whatever mainstream is to its
niche.

Anyway, looking at troff was very cool, but I think I will continue
to manually write Markdown on these wiki pages and I just hope that
future changes to this site will be able to automatically migrate from
one format to the next. Then again, if you look at the old pages, you
will see how well that worked in past as I switched markup rules. If
you look hard enough, you will see how badly it worked, actually.

There is a lot of cover-up at work. HTML is being cached, for example.
But every global search-and-replace operation that touches a page
discards the cached HTML and regenerates it and therefore if those
global search-and-replace operations don’t do their job, the leftover
markup is broken, and the HTML cache is useless.

Oh well. Here is to hoping that Markdown will last longer than
WikiWiki markup, UseModWiki markup, or WikiCreole markup. At least
it’s not limited to just the wiki world!

I’m sure there is a Troff markup wiki somewhere. It would be beautiful
in plain text, HTML, or PDF. (I assume?) but I will stick to manually
formatting the text I write in Markdown, for now.

That reminds me that my implementation of CommonMark is still sorely
lacking.

* This page as raw text

* dbucklin on Troff

* Commenting on the Oddmuse Markdown extension

​#Oddmuse #Text #Troff ​#Text #Troff ​#Troff

Comments
--------

(Please contact me if you want to remove your comment.)



Some links:

* troff macros

* mom to produce nice PDFs

* @cms says ronn to convert Markdown to man pages

– Alex Schroeder 2018-11-15 13:42 UTC

----------------------------------------------------------------------

rnkn on tag(emacs) recommends lowdown for Markdown → groff → PDF.

They added:

> the thing that tripped me up was reading groff_ms(7) and how to
> set a groff register, e.g. to set the line width it’s groff -d
> LL=5.5i – so to get 12pt with 5.5in width and 1.5in margins:
> lowdown -s -Tms --nroff-no-numbered file.md | groff -mspdf -rPS=12p
> -rLL=5.5i -rPO=1.5i > file.ps.

Just keeping notes for later! 🙂

– Alex 2021-07-22 15:36 UTC

----------------------------------------------------------------------

vuori on tag(emacs) sad neatroff also does Unicode when I was
complaining about LaTeX (pdflatex) being unable to handle some English
text with a few embedded Arabic words. Thinking of this page, I asked
how the mom package and neatroff relate.

> It’s a newer and simpler (in both a good and a bad way)
> implementation of the engine. I seem to recall mom doesn’t support
> it, but at least utroff does if you prefer all-encompassing macro
> packages. – vuori

artefact added that they’ve embedded Chinese and Arabic into otherwise
mostly English just fine with xelatex and xdvipdfmx. It was just a
matter of defining and using a font with the glyphs.

– Alex 2022-06-30 09:17 UTC

----------------------------------------------------------------------

Found this on net news:

> Does anyone know any good resources for learning groff?

Troff quick tutorial:

* https://www.troff.org/TheGroffFriendsHowto.pdf

* https://github.com/SubhadityaMukherjee/groffTutorial

MS format, very good handy info:

* https://l04db4l4nc3r.github.io/groff-cheatsheet/

* https://troff.org/using-ms.pdf

There is a UNIX Text Processing free ebook:

* https://www.oreilly.com/openbook/utp/

Also the documentation and links from the MOM Groff macro author:

* http://www.schaffter.ca/mom/mom-01.html

Somebody used these:

* https://www.rfc-editor.org/materials/nroff.html

* http://www.gno.org/gno/man/man1/nroff.1.html

* ftp://ftp.rfc-editor.org/in-notes/rfc-editor/

(especially 2-nroff.template and 3-nroff.template)

– Alex 2023-06-03 20:28 UTC