bug-groff
[Top][All Lists]
Advanced

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

[bug #63635] [troff] support `hydefault` register or similar


From: G. Branden Robinson
Subject: [bug #63635] [troff] support `hydefault` register or similar
Date: Sat, 2 Mar 2024 21:58:03 -0500 (EST)

Follow-up Comment #5, bug #63635 (group groff):

[comment #4 comment #4:]
> [comment #3 comment #3:]
> > A) The hyphenation mode itself is already a property of the
> > environment.
> 
> True, but this to me doesn't argue either for or against having the
_default_ also be per-environment.  (The .hy default before this change was
global despite the hyphenation mode being per-environment.)

I think an idiom commonly seen in man pages, but which never* worked does the
arguing.


When processing input like this,
.nh
and we temporarily shut off automatic hyphenation,
.hy
the foregoing request does not do exactly what we expect.


(In fact this is the example I put in the NEWS entry.)

* "Never".  You might get lucky and words wouldn't be wrongly hyphenated
afterward, depending on the breaks (literally)--a roll of the dice.

> > C) Having the hyphenation mode default also be per-environment
> > means that you can invoke `hy` without arguments in any given
> > environment and it will "do the right thing".
> 
> This seems situational.  Since new environments can be created on the fly,
if one creates an environment to, say, handle a footnote region, and calls
argumentless ".hy" in that environment, it seems like the "right thing" is to
use the hydefault set for the rest of the document, and the less right thing
(which this request was specifically designed to avoid) is to set it to 1.

Yes, but that's a weirdness of the default environment having all of the
formatter's stock parameters no matter how early and how extensively they're
customized for environment 0.  There are many other such weirdnesses, which is
why `evc 0` is commonly seen in _groff_ macro packages.
 
> (Side note: comment #0 here mentions that hydefault defaults to 1, but the
Texinfo manual does not.)

I'm not sure how prominently it's worth documenting, given that the stock
_troffrc_ loads "en.tmac" which sets the hyphenation mode default to 4 (or 6),
and other localization macro packages work similarly.

> The multiple-language use case is compelling.  However, since the new knob
exists at all as a safety net for those who don't read the documentation
closely enough to know that .hy doesn't work like other requests, I wonder if
there's a case to be made for making it work best for those doing simple
things, and assuming advanced users have done their homework.

That's what my approach attempts to do, without complicating the formatter
with respect to its default hyphenation mode...default.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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