bug-groff
[Top][All Lists]
Advanced

[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: Wed, 7 Aug 2024 10:28:02 -0400 (EDT)

Update of bug #66054 (group groff):

                  Status:                   Fixed => In Progress            
             Open/Closed:                  Closed => Open                   

    _______________________________________________________

Follow-up Comment #2:

This wasn't fully baked.

It's also too hard to troubleshoot hyphenation codes, so I moved up the
schedule on something I'd been contemplating: a `phcode` request that--you
guessed it--reports the hyphenation code of each of its character arguments to
the standard error stream.

Doing so revealed problems with Git HEAD.


$ cat EXPERIMENTS/phcode-works.groff
.phcode a
.phcode A
.phcode $
.tm invoking .hcode \['a] $
.hcode \['a] $
.phcode \['a]
.tm invoking .hcode \['a] \['a]
.hcode \['a] \['a]
.phcode \['a]
.phcode \[vS]
$ ./build/test-groff EXPERIMENTS/phcode-works.groff
a       97
A       97
$       0
invoking .hcode \['a] $
\['a]   36
invoking .hcode \['a] \['a]
\['a]   36
\[vS]   0


There are two breakages in evidence here:

1.  `.hcode \['a] $` should have assigned `\['a]``\['a]` a hyphenation code of
0, not 36.

2.  `.hcode \['a] \['a]` should have altered `\['a]`'s hyphenation code.

Item 2 reveals a decision to be made when implementing the fix for bug
#66051--should GNU _troff_ just mint the next hyphenation code value number
for a special character self-assignment, or scan through the list of existing
ordinary characters for a synonym?

I'm not sure, but I lean toward the former: it's simpler.  If you need to save
a hyphenation code value, you can copy it to that of a user-defined character,
perhaps one created specifically for this purpose.  Or so I say.  Haven't
tested this yet, because I haven't _implemented_ it yet!

More precisely, I've got point (1) fixed but not yet (2).  Need to write the
int-minting thing.

Finally, `\[vS]` is in the example to illustrate that a special character
corresponding to an ordinary character code point that is undefined in the
(8-bit) encoding in use has a hyphenation code value of zero--no other default
makes sense.  Until we internally represent Unicode.


$ printf '.phcode \\[vS]\n' | ./build/test-groff -ww -mcs
\[vS]   185




    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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