Hi Branden,
On Tue Feb 4, 2025 at 11:08 AM CET, G. Branden Robinson wrote:
> I have another puzzler.
[...]
> Consider the following input:
> $ cat EXPERIMENTS/multilingual-trivia-challenge.groff
> .sp
> .ce 1
> A Study in Redheads
> .sp
> .ev epigram
> .hla fr
> .hy 6
> .ad r
> L'homme c'est rien\[em]l'\[oe]uvre c'est tout.
> .br
> \[em] Flaubert
> .br
> .ev
> .sp
> My life is spent in one long effort to escape from the commonplaces of
> existence.
> These little problems help me to do so.
>
> ...and another that differs only slightly.
> $ diff -u EXPERIMENTS/multilingual-trivia-challenge{,2}.groff
[...]
> @@ -3,12 +3,12 @@
> A Study in Redheads
> .sp
> .ev epigram
> -.hla fr
> .hy 6
> .rj 100
> .nf
> -L'homme c'est rien\[em]l'\[oe]uvre c'est tout.
> -\[em] Flaubert
> +Populus me sibilat, at mihi plaudo Ipse domi
> +simul ac nummos contemplar in arca.
> +\[em] Horace
> .rj 0
> .ev
> .sp
>
> Now regard their outputs, using groff 1.23.0 (or earlier).
[...]
> Your challenge, should you choose to accept it, is to explain why the
> word "commonplaces" hyphenates in the second exhibit but not the first.
[...]
Let nroff explain it:
$ nroff -ww << EOF
.tm \n[.hla]
.ev epigram
.hla fr
.tm \n[.hla]
.ev
.tm \n[.hla]
EOF
en
fr
fr
In other words, hyphenation language setting is not local to the
environment... which seems like a really unintuitive behavior,
by the way. I hope there are plans to change this?
~ onf