Hi Jan, Jan Driesen wrote: > Dear all, > > > Thanks for the useful comments. > I went with the Chris' solution, including Vincent's correction: in my > XSL-file I have now added the following templates: > <snip/> > > Working with non-breaking spaces here would however not be a good solution, > as there is no space present nor required between "n" and "°". That is > exactly what I think is strange about this case. Although there are very > "near" opportunities to set a line break (before "n" or after "°", the break > is was put in between).
Sorry, I didn’t read your message carefully enough. I thought the line break was between ‘n°’ and ‘16’, in which case the non-breaking space is a working solution. FOP implements the Unicode line breaking algorithm (UAX#14 [1]). That standard specifies, among other things, where it is allowed to break a line. And it appears that it is allowed to break between a letter and the degree character. If there were a number instead of the letter, no break would be allowed. [1] http://unicode.org/reports/tr14/ > Even though my current case is solved, I'm a bit eager to know whether there > is any way to influence FOP, not to split between certain characters? Would > that go into hyphenation rules? Technically speaking, you can use a Word Joiner character (U+2060) to prevent line-breaking between two characters. In your particular case though, you should not use the degree character as an abbreviation for number (which I guess it is). Looking on the web, the correct abbreviation seems to be ‘no’ or ‘no.’ [2]. In which case you wouldn’t have that line-breaking issue (you may still want to use non-breaking spaces to prevent line breaking between ‘no.’ and ‘16’ though). [2] http://forum.wordreference.com/showthread.php?t=264328 HTH, Vincent > > > > Jan Driesen > > > Hi, > > Chris Bowditch wrote: >> Jan Driesen wrote: >>> Dear all, >> Hi Jan, >> >>> >>> While outputting PDF using FOP 0.95, I'm encountering an issue in PDF >>> markup. >>> >>> The (XSLT-generated) FO code is: >>> >>> <fo:table-row> >>> <fo:table-cell padding-right="1mm" padding-top="9pt" >>> text-align="justify" line-height="11pt" font-size="9pt" >>> font-family="Times New Roman" number-columns-spanned="2"> <fo:block> >>> <fo:inline font-style="italic">XaV Latin 9598 fol. 88 ; Reg Antwerp >>> 146 fol. 252, 194 fol. 190v ; G 109 n° 16, G 660, 951</fo:inline> >>> </fo:block> </fo:table-cell> </fo:table-row> >>> >>> >>> In the PDF output, this line is wrapped between "G 109 n" and "° 16, G >>> 660, 951". Rather than choosing a white-space to wrap the line. Is >>> there any way to avoid this? I need wrapping here to fit the content, >>> but preferably not between the "n°" sequence... >> >> How about: >> >> <fo:table-cell padding-right="1mm" padding-top="9pt" >> text-align="justify" line-height="11pt" font-size="9pt" >> font-family="Times New Roman" number-columns-spanned="2"> <fo:block> >> <fo:inline font-style="italic">XaV Latin 9598 fol. 88 ; Reg Antwerp 146 >> fol. 252, 194 fol. 190v ; <fo:inline keep-together.within-line="true">G >> 109 n° 16</fo:inline>, G 660, 951</fo:inline> </fo:block> >> </fo:table-cell> </fo:table-row> > > (Small correction: that’s keep-together.within-line="always".) > > Alternatively you can use non-breaking spaces (U+00A0): > <fo:inline font-style="italic">XaV Latin 9598 fol. 88 ; Reg Antwerp > 146 fol. 252, 194 fol. 190v ; G 109 n° 16, > G 660, 951</fo:inline> > > Just choose the method that is easiest to achieve for you. This may > depend on your processing chain. > > > HTH, > Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
