openSUSE / suse-xsl

DocBook XSL Stylesheets for SUSE branding
Other
11 stars 10 forks source link

Different length for same text in PDF #595

Open jfaltenbacher opened 10 months ago

jfaltenbacher commented 10 months ago

Problem Description

Hyphenation and sentence length changes in some cases in PDF output See comparison between SP4 and SP5 here:

image

Expected Behavior

Have same length for same text

tomschr commented 10 months ago

Thanks Julia. The short answer: Hyphenation is a hell hole and you can only loose. :wink:

A bit more background... I've spent hours on that. :roll_eyes: From the above screenshot it's likely that's an inline element (looks like option or literal is used.) The hyphenation changed between the SPs, but I don't know not all details anymore (need to look it up in Git).

I remember, that I've changed the hyphenation rules on some inline elements (that was mostly filename, but option could also be affected). The rule changed over time. Before it was the rule "don't hyphenate that element at all", "don't hyphenate, but only between specific characters" to "allow hyphenation". Neither change was really satisfying: either it breaks at the wrong position, leaves some visible gap, or it didn't work. I basically gave up on this. :cry: