The Nbsp character would add a space in between the “C” and the “$” though.  If 
you need the C and the $ to stick together, try the Word Joiner character:

<fo:character character="&#8288;"/>

It prohibits a line break at its position.  Seems to work for me in FOP.

If you can only fix the xsl-fo, not the input xml, you can try adding a 
wrap-option attribute (


That would probably serve you best in a <fo:inline> surrounding your currency 
string like <fo:inline wrap-option="no-wrap">, but it doesn’t look like it 
would work in FOP right now:

 §7.16.13              wrap-option       Basic      partial   partial   partial 
  partial   partial   partial   Only supported on fo:block.


From: Simon Steiner []
Sent: Tuesday, June 28, 2022 09:31
Subject: RE: Letter and currency symbol being split when at end of line

***ATTENTION*** This email originated from outside of the NRC. ***ATTENTION*** 
Ce courriel provient de l'extérieur du CNRC

What about using a non breaking space character between letters.


From: Mark Gibson 
Sent: 28 June 2022 14:15
Subject: Letter and currency symbol being split when at end of line


I’ve googled this, but have got nowhere.  I’m hoping it’s just an easy “use 
this xsl-fo tag” …

When we specify different currencies, it’s typically in the format of C$ for 
Canadian dollar, etc.  We’re finding, if C$ is at the end of a line, it can get 
split between the C and the $.  Is there a way of forcing a sequence of 
characters to keep together, similar to how keep-together keeps 
lines/paragraphs together?


Reply via email to