0

I am a newbie at using unix tools, but I really want to use groff. However, problem is I write in spanish, and some accents aren't rendered right on the final pdf. When I use groff -mom -m pdfmark doc | ps2pdf - doc.pdf. I get this kind of mistakes with the accented characters such as ó

La letra escrita no implica gran comprensi³n.

This should read La letra escrita no implica gran comprensión.

I have read that groff doesn't support utf8 as the encoding of the input file, and that you have to preprocess it first. I tried to use the solution of this post https://apple.stackexchange.com/questions/341783/whats-the-simplest-way-to-process-files-with-utf-8-characters-in-groff-on-macos, but I found out that my groff doesn't have neither the -k flag nor my system has the ´preconv´ command. Here is my groff -h, no -k, -K flags:

usage: groff [-abceghilpstvzCENRSUVXZ] [-Fdir] [-mname] [-Tdev] [-ffam]
   [-wname] [-Wname] [-Mdir] [-dcs] [-rcn] [-nnum] [-olist] [-Parg]
   [-Larg] [-Idir] [files...

I presume this is because I have a MacosX version of the tool, but that really doesn't convince me. Im using:

GNU groff version 1.19.2

If I brew install the latest groff, my terminal still uses the groff at /usr/bin/groff, not the one on the cellar.

So I'm stuck, any suggestion would help. thanks,

J_A_code
  • 25
  • 5

3 Answers3

0

I talked to the groff mailing list and they confirmed this is only a version problem. MacOS comes shipped with very old versions of the software

J_A_code
  • 25
  • 5
0

I was exactly at your point, and if I remember correctly, all that was left for me to do was actually open a new terminal, for it to use the newer version of groff. Might that do the trick?

Paul
  • 165
  • 6
0

the problem is indeed related to groff version, so once you have installed the new one, you can use that by typing

/usr/local/Cellar/groff/1.22.4/bin/groff -k ...

which is awful, but can be fixed by adding an alias in your bash profile

alias groff1="/usr/local/Cellar/groff/1.22.4/bin/groff"

so you only have to type

groff1 -k ...