Forcing a new line
Hi, I have a table with column headings. Sometimes the headings are quite long and I want to force a carrige return and display the heading text on two lines, for example: Currently looks like this: -- Portfolio Start Value 33 44 55 -- But I want it like this: -- Portfolio Start Value -- I also want to be able to force a blank line between the heading and the table body. Any advice would be greatly appreciated! Regards, Trevor. -- Trevor Keast Client Server Specialists Inc. Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forcing a new line
Hi Trevor, For your table/column headings - if you wrap the textual content of your fo:table-cell/ within a block it should by default wrap the text within it since the wrap-option attribute of fo:block/ defaults to wrap. The blank line between your table headings and table rows can be achieved by adding a extra row at the beginning of your table body which contains a fo:leader/ wrapped within an fo:block/. See my example FO below. --- ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:test=http://xmlgraphics.apache.org/fop/test; fo:layout-master-set fo:simple-page-master master-name=normal page-width=2in page-height=2in fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=normal fo:flow flow-name=xsl-region-body fo:table table-layout=fixed width=auto fo:table-column column-width=60pt/ fo:table-header fo:table-row fo:table-cell fo:blockStart Value Portfolio/fo:block /fo:table-cell /fo:table-row /fo:table-header fo:table-body fo:table-row fo:table-cell fo:block fo:leader/ /fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell fo:block33/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell fo:block44/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell fo:block55/fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:flow /fo:page-sequence /fo:root --- If this above example doesn't solve your problems then please attach your FO file that you are having the problem with. Adrian. Trevor Keast wrote: Hi, I have a table with column headings. Sometimes the headings are quite long and I want to force a carrige return and display the heading text on two lines, for example: Currently looks like this: -- Portfolio Start Value 33 44 55 -- But I want it like this: -- Portfolio Start Value -- I also want to be able to force a blank line between the heading and the table body. Any advice would be greatly appreciated! Regards, Trevor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forcing a new line
On Jun 27, 2007, at 16:17, Trevor Keast wrote: Hi, I have a table with column headings. Sometimes the headings are quite long and I want to force a carrige return and display the heading text on two lines, for example: On top of what Adrian already mentioned, you could also use simply: fo:block linefeed-treatment=preservePortfolio Start Value/fo:block Should work in 0.93 snip / I also want to be able to force a blank line between the heading and the table body. Not sure if I understand this issue correctly, but maybe you could achieve that effect by adding an extra row to your table-header: fo:table-row fo:table-cell number-columns-spanned={nr_of_columns_here} fo:block / /fo:table-cell /fo:table-row HTH! Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]