Manuel Mall wrote:
This solves the first supposed problem (interaction between nbsp and
pretty-printing spaces), but the second one is still open: what
happens if we have
*IF* (and I'm not at all sure about this) there can be a break , then
both spaces should be discarded:
IMO yes there can be a break and no only the space needs to be removed.
Again the argument is that nbsp is not whitespace as per XSL-FO
definition and need not to be removed.
What makes you think that both the nbsp and the space needs to be
removed around a fop generated linebreak?
Oops, I forgot to add an importand condition: if the user explicitly
states that the nsbp must be discarded around a line break:
<fo:inline suppress-at-line-break="suppress"> </fo:inline>
Well, the more I look at this, the more it seems unlikely to ever happen
... we are probably having a highly theoretical disquisition! :-)
Anyway, I was still not sure whether there could be a break so I looked
back at the Unicode Annex #14.
GL Non-breaking (Glue) (XB/XA) (normative)
Non-breaking characters prohibit breaks on either side, but that
prohibition can be overridden by SP or ZW. In particular, when NBSP
follows SPACE, there is a break opportunity after the SPACE and NBSP will
go as visible space onto the next line. See also WJ. The following lists
the characters of line break class GL with additional description.
00A0 NO-BREAK SPACE (NBSP)
202F NARROW NO-BREAK SPACE (NNBSP)
180E MONGOLIAN VOWEL SEPARATOR (MVS)
NO-BREAK SPACE is the preferred character to use where two words should be
visually separated but kept on the same line, as in the case of a title
and a name Dr.<NBSP>Joseph Becker. When SPACE follows NBSP, there is no
break, because there never is a break in front of SPACE. NARROW NO-BREAK
SPACE is used in Mongolian. The mongolian vowel separator acts like a
NNBSP in its line breaking behavior. It additionally affects the shaping
of certain vowel characters as described in [Unicode] Section 12.3,
So, it seems there could be a break between SPACE and NBSP (with NBSP
starting the next line), but not between NBSP and SPACE. Can we say this