[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66054] [troff] permit special characters as source hyphenation cod
From: |
G. Branden Robinson |
Subject: |
[bug #66054] [troff] permit special characters as source hyphenation codes |
Date: |
Sat, 10 Aug 2024 20:31:32 -0400 (EDT) |
Follow-up Comment #9, bug #66054 (group groff):
[comment #8 comment #8:]
> [comment #5 comment #5:]
> > I would further note that `hcode`'s behavior seems pretty
> > analogous to that of `tr` and `ftr`.
> >
> > .tr a b \" sets up a mapping
> > .tr a a \" undoes that mapping
> > .ftr TR PR \" sets up a mapping
> > .ftr TR TR \" undoes that mapping
>
> $ file resume
> resume: troff or preprocessor input, ISO-8859 text
> $ iconv -f iso-8859-1 resume
> .ll 1n
> r\['e]sum\['e]
> .hcode é e \" sets up a mapping
> r\['e]sum\['e]
> .hcode é é \" undoes that mapping
> r\['e]sum\['e] \" ... but not really
> $ groff -Wbreak -a resume
> <beginning of page>
> r<'e>sum<'e>
> r<'e><hy>
> sum<'e>
> r<'e><hy>
> sum<'e>
>
> (Run with groff 1.23 so the recently defined .hcodes loaded in tmac/en.tmac
aren't a confounding factor.)
Running with _groff_ 1.23 adds a different confounding factor.
$ cat EXPERIMENTS/resume-redux.groff
.ll 1n
r\['e]sum\['e]
.hcode é e \" sets up a mapping
r\['e]sum\['e]
.hcode é é \" undoes that mapping
r\['e]sum\['e]
.pl \n[nl]u
$ ./build/test-groff -K utf8 -W break -T utf8 EXPERIMENTS/resume-redux.groff
ré‐
sumé
ré‐
sumé
ré‐
sumé
Specifically this:
commit f66f771c22690f5f0e6dec3c9a53adb7243bb7fe
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Thu Aug 1 18:16:19 2024 -0500
[troff]: Fix Savannah #66054 (hcode & spec chars).
* src/roff/troff/input.cpp (set_hyphenation_codes): Accept a special
character as a source for hyphenation code assignment.
* doc/groff.texi.in (Manipulating Hyphenation) <hcode>:
* man/groff_diff.7.man (New requests) <hcode>: Document loosened
restriction.
Fixes <https://savannah.gnu.org/bugs/?66054>. Thanks to Carsten Kunze
for the report and Dave Kemper for a test case that clarified matters.
...a.k.a. comment #1. The impact is a little broader than stated due to the
synonymy of Latin-1 supplement letters with special characters. (Consult the
`trin` requests in "latin1.tmac".)
$ git checkout f66f771c22690f5f0e6dec3c9a53adb7243bb7fe^
$ make -C build troff
$ ./build/test-groff -K utf8 -W break -T utf8 EXPERIMENTS/resume-redux.groff
troff:EXPERIMENTS/resume-redux.groff:5: error: second member of hyphenation
code pair must be an ordinary character
résumé
ré‐
sumé
ré‐
sumé
...but that diagnostic was a little confusing given that é _looks_ like an
ordinary character. Fortunately we no longer throw it.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66054>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/01
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/01
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/04
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/07
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/07
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/08
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/09
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/09
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes,
G. Branden Robinson <=
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/10
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/12
- [bug #66054] [troff] permit special characters as source hyphenation codes, G. Branden Robinson, 2024/08/13
- [bug #66054] [troff] permit special characters as source hyphenation codes, Dave, 2024/08/15