[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.23 prints some strange error
From: |
Walter Alejandro Iglesias |
Subject: |
Re: 1.23 prints some strange error |
Date: |
Tue, 12 Sep 2023 11:16:58 +0200 |
Hi Branden,
On Mon, Sep 11, 2023 at 03:33:03PM -0500, G. Branden Robinson wrote:
> This suggests to me that preconv(1) _must_ be run before you try to
> process your documents with this technique.
> [...]
> Please share input file(s) that reproduce the problem, and a command
> line that produces the diagnostic message you quoted above.
I cleaned up a bit the quoted text to make room for the following. Here
we go:
$ uname -a
Linux bell 6.4.0-4-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.4.13-1 (2023-08-31)
x86_64 GNU/Linux
$ groff --version | head -1
GNU groff version 1.23.0
$ mkdir test
$ cd test
$ cat << EOF > doc.tr
.mso list.tr
EOF
$ cat << EOF > list.tr
.hw a-hí
.hw a-ño
.hw ár-bol
.hw cu-brí-a
.hw e-té-re-o
.hw ca-mión
.hw ú-te-ro
.hw pin-güi-no
EOF
$ GROFF_TMAC_PATH=. nroff doc.tr
troff:./list.tr:1: error: expected ordinary or special character, got an
escaped '%'
troff:./list.tr:4: error: expected ordinary or special character, got an
escaped '%'
As you see, from the UTF-8 chars used in Spanish (á, é, í, ó, ú, ü, ñ),
groff seems to only have problems with the 'í' in particular. Let's try
another test using preconv(1).
$ export GROFF_TMAC_PATH=.
$ cat << EOF > doc.tr
.hla es
.mso list.tr
Ahí, el árbol nos cubría con su sombra.
Un pingüino pasaba caminando por la playa.
EOF
$ cat << EOF > list.tr
.hw a-hí
.hw ár-bol
.hw cu-brí-a
.hw som-bra
.hw pin-güi-no
.hw pa-sa-ba
.hw ca-mi-nan-do
.hw pla-ya
EOF
$ preconv -e UTF-8 doc.tr | nroff | cat -s
troff:./list.tr:1: error: expected ordinary or special character, got an
escaped '%'
troff:./list.tr:3: error: expected ordinary or special character, got an
escaped '%'
Ahí, el árbol nos cubría con su sombra. Un pingüino pasaba cami‐
nando por la playa.
The errors remain. Finally, I told you that changing .mso request to
.so made the error messages disappear, that's because in my Makefile I
run soelim(1) before. Last test:
$ cat << EOF > doc.tr
.hla es
.so list.tr \" notice here I changed the request
Ahí, el árbol nos cubría con su sombra.
Un pingüino pasaba caminando por la playa.
EOF
$ preconv -e UTF-8 doc.tr | nroff | cat -s
troff:./list.tr:1: error: expected ordinary or special character, got an
escaped '%'
troff:./list.tr:3: error: expected ordinary or special character, got an
escaped '%'
Ahí, el árbol nos cubría con su sombra. Un pingüino pasaba cami‐
nando por la playa.
$ soelim doc.tr | preconv -e UTF-8 | nroff | cat -s
Ahí, el árbol nos cubría con su sombra. Un pingüino pasaba cami‐
nando por la playa.
This last command throws no error, that's because soelim(1) allows
preconv(1) to process the list.tr file.
Anyways. My doubt comes from the fact that so far (with groff 1.22.4
under OpenBSD) I haven't needed to preprocess that .hw list with
preconv, and that only the 'í' (iacute) triggers the error. All
suggests that that error is just noise.
>
> Regards,
> Branden
--
Walter