Another "Is this expected behaviour?"

CSS XPP 9.4.1

I have an interesting issue - the XML I have been supplied with has "xxx</close><open>Zzz". The requirement (apart from changing typeface etc) is to add a period and a space so I end up with:

xxx</close>. <open>Zzz

I am generating the period and space in the close::after pseudo-element selector and most of the time it is working perfectly. However if the last word before the </close> is a very long word (and its in 2 columns to a short measure) then the last word will not hyphenate. If I only generate the period and add space manually, either before or after the <open> element then the long word hyphenates perfectly and as expected. However is does act as you would expect if the justification means finishing a line! Interestingly if I remove the space altogether the word xxx.Zzz will hyphenate.

One option would be to transform and add the space but I am very nervous about that is this could cause issues if the XML is inconsistent.

Interested to hear if anyone else has encountered a similar issue.

Chris

Parents Reply
  • Hi Jonathan

    The routine is working perfectly in terms of adding the space either mid-line or doing the correct thing if the line needs turning over. However if the last word before where the space is added can hyphenate (when a traditional space is added) it does not hyphenate and turns over - this is leaving a very gappy line because hyphenation is not happening.

    So, where the generated space comes before the word Next, instead of getting:

    ... text that needs to hyphen-
    ate. Next sentence aaa here

    we end up with:

    ...      text      that     needs    to
    hyphenate. Next sentence aaa
    here ....

    This is OK on ragged text but not when justification is required which it is in this job.

    Chris

Children
No Data