No description
Find a file
2025-03-30 03:06:14 +02:00
bin Notes on troffrc + groff options. 2022-01-07 13:32:50 +01:00
.source-highlight_groff-output-definition First commit. 2021-10-11 05:57:55 +02:00
are-you.pdf First commit. 2021-10-11 05:57:55 +02:00
bibliography First commit. 2021-10-11 05:57:55 +02:00
grofftut.ms No number on the first section. 2022-01-21 17:44:32 +01:00
header.ms Header: date fixed. 2022-01-07 09:40:32 +01:00
macros.ms Remove useless macros. 2022-01-19 17:56:26 +01:00
Makefile main -> grofftut 2021-10-29 04:43:52 +02:00
Makefile.in Remove uuoc and utf8 script filter (preconv just works). 2022-01-19 17:18:18 +01:00
README.md Remove useless comment. 2025-03-30 03:06:14 +02:00

Troff template (batteries included)

This repository is an introduction to the good old tools to produce documents:

  • roff as the language to describe documents (groff is the implementation)
  • tbl and hdtbl for tables
  • eqn for math equations
  • pic for drawing images
  • grap for drawing graphs
  • refer for handling references and bibliography
  • etc.

It also includes a few examples of custom macros and images.

Furthermore, this repository includes:

  • UTF-8 characters translation into ms macros (via a script)
  • source code highlight (via the source-highlight software and a script)
  • A makefile to automatically call every tool in right order; just type make!

How to compile

You need groff installed on your system, and source-highlight (or remove the right line in the makefile).

Then:

make

If you have entr on your system, you can also recompile your file each time you modify it:

make serve

Read the makefile for more options.

Preview

https://t.karchnu.fr/doc/grofftut.pdf

Limitations

Images are poorly handled, and they aren't easily managed with roff by default. Some macros exist to do it properly, but it still is to include in custom macros then to document.

TODO

Besides fixing minor problems (image inclusion), other tools should be tested:

  • neatroff: roff but with a modern implementation
  • SILE: not roff, but allows way more complex layouts while still remaining simple