URL: <https://savannah.gnu.org/bugs/?66837>
Summary: hyphen inhibitor nodes should suppress hyphenation in HTML output Group: GNU roff Submitter: gbranden Submitted: Mon 24 Feb 2025 04:28:52 AM UTC Category: General Severity: 3 - Normal Item Group: Rendering/Cosmetics Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Mon 24 Feb 2025 04:28:52 AM UTC By: G. Branden Robinson <gbranden> Resolving this issue may involve _troff_, _post-grohtml_, or both. Benno Schulenberg pointed out that use of a hyphenation control escape sequence isn't completely effective when producing HTML. https://lists.gnu.org/archive/html/groff/2025-02/msg00074.html I [mused https://lists.gnu.org/archive/html/groff/2025-02/msg00116.html]: With other output formats we have control over breaking decisions. With (X)HTML specifically, we don't. Not without taking steps to seize it, which as I understand it can't happen without throwing CSS at the problem. Which we probably should do, to avoid setting 200 letters per line and similar. In the shorter run, wiring up an HTML "<nobr>" element may be the thing to do. I'll have to check my copy of HTML 5 to see if that's not deprecated or if I need to use a span and CSS as you suggest. But wiring up to what? Well, let's give the new `pline` request some exercise. $ printf '\\%%\\-\\-restricted\n.pline\n' | groff -a <beginning of page> {type: line_start_node, diversion level: 0}, {type: hyphen_inhibitor_node, diversion level: 0}, {type: glyph_node, character: "\-", diversion level: 0}, {type: glyph_node, character: "\-", diversion level: 0}, {type: glyph_node, character: "r", diversion level: 0}, {type: glyph_node, character: "e", diversion level: 0}, {type: glyph_node, character: "s", diversion level: 0}, {type: glyph_node, character: "t", diversion level: 0}, {type: glyph_node, character: "r", diversion level: 0}, {type: glyph_node, character: "i", diversion level: 0}, {type: glyph_node, character: "c", diversion level: 0}, {type: glyph_node, character: "t", diversion level: 0}, {type: glyph_node, character: "e", diversion level: 0}, {type: glyph_node, character: "d", diversion level: 0} <-><->restricted The hyphen inhibitor node, of course! I think I know where to poke my fingers to attack this problem, but we'll _also_ need to inject a closing element at the point hyphenation becomes uninhibited again, and I'm much less certain where in grohtml that can be done. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66837> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature