bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64502] [mdoc] macros should inhibit word breaking where sensible


From: G. Branden Robinson
Subject: [bug #64502] [mdoc] macros should inhibit word breaking where sensible
Date: Wed, 2 Aug 2023 12:35:35 -0400 (EDT)

Follow-up Comment #1, bug #64502 (project groff):


[comment #0 original submission:]
> "... The same as .MR implies \%, I think .Fn also should."

Strictly, _groff man_(7)'s `MR` doesn't imply `\%`, it implies `nh`
(temporarily).

This is different because `\%` has two different meanings depending on its
location within a word.  But `nh` (equivalently `hy 0`) always means "turn
automatic hyphenation off".  Even with automatic hyphenation off, words are
still broken at regular hyphens.  `\%` at the beginning of a word suppresses
that, too.


$ cat EXPERIMENTS/nh-versus-hy-0.roff 
.ll 8n
a-b-c-d-e-f-g-h
.br
.nh
a-b-c-d-e-f-g-h
.br
.hy 4
a-b-c-d-e-f-g-h
.br
.hy 0
a-b-c-d-e-f-g-h
.sp
Using \(rs% now.
.br
\%a-b-c-d-e-f-g-h
.br
.nh
\%a-b-c-d-e-f-g-h
.br
.hy 4
\%a-b-c-d-e-f-g-h
.br
.hy 0
\%a-b-c-d-e-f-g-h
$ nroff EXPERIMENTS/nh-versus-hy-0.roff | cat -s
troff:EXPERIMENTS/nh-versus-hy-0.roff:15: warning [p 1, 1.8i]: cannot break
line
troff:EXPERIMENTS/nh-versus-hy-0.roff:18: warning [p 1, 2.0i]: cannot break
line
troff:EXPERIMENTS/nh-versus-hy-0.roff:21: warning [p 1, 2.2i]: cannot break
line
troff:EXPERIMENTS/nh-versus-hy-0.roff:24: warning [p 1, 2.3i]: cannot break
line
a‐b‐c‐d‐
e‐f‐g‐h
a‐b‐c‐d‐
e‐f‐g‐h
a‐b‐c‐d‐
e‐f‐g‐h
a‐b‐c‐d‐
e‐f‐g‐h

Using \%
now.
a‐b‐c‐d‐e‐f‐g‐h
a‐b‐c‐d‐e‐f‐g‐h
a‐b‐c‐d‐e‐f‐g‐h
a‐b‐c‐d‐e‐f‐g‐h



 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64502>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]