RE: Letter and currency symbol being split when at end of line

"Pilkey, Roger" <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
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:

U+2060
&#8288;
&NoBreak;
<fo:character character="&#8288;"/>

https://www.fileformat.info/info/unicode/char/2060/index.htm

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 (http://www.datypic.com/sc/fo11/a-wrap-option-1.html)

wrap-option=”no-wrap”

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:

Ref: https://xmlgraphics.apache.org/fop/compliance.html
 §7.16.13              wrap-option       Basic      partial   partial   partial   partial   partial   partial   Only supported on fo:block.


Roger

From: Simon Steiner [mailto:[email protected]]
Sent: Tuesday, June 28, 2022 09:31
To: [email protected]
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
Hi,

What about using a non breaking space character between letters.

Thanks

From: Mark Gibson <[email protected]<mailto:[email protected]>>
Sent: 28 June 2022 14:15
To: [email protected]<mailto:[email protected]>
Subject: Letter and currency symbol being split when at end of line

Hi

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?

Thanks
Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.