RE: Text Formatting Problem
That was quite ingenious, and it worked beautifully. Thanks for the help. Eric Amick Legislative Computer Systems Office of the Clerk -Original Message- From: Vincent Hennebert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 17, 2008 6:12 To: fop-users@xmlgraphics.apache.org Subject: Re: Text Formatting Problem Hi Eric, Try something like the following: Here is some really long text for testing. 9 And now for some more text. The idea is to shift the table one line upwards by setting a negative margin on the block-container. This negative margin should have the value (font-size * 1.2) to match a regular line height. A block-container is needed to set its width to 1.5in instead of the page width. The table is then used for the two remaining columns, with an appropriate start-indent to leave room to the first "column". HTH, Vincent Amick, Eric wrote: > I should have pointed out that the first and third columns can both > have more than two lines, and that I can't guarantee both columns will > have the same number of lines. > > Here's what I'm currently trying; this is a greatly simplified test: > > > http://www.w3.org/1999/XSL/Format";> > > margin-left="1in" margin-right="1in" margin-top="2in" > margin-bottom="2in" master-name="foo"> > > > > > > > > > > > Here is some really long text for testing. > > > 9 > > > > And now for some more text. > > > > > >text-indent="-from-table-column(column-width)"> > And now for some more text. > > > > > > foo > > > 8 > > > Some text. > > > > > > > > > > This is close to what I need, but it has two problems: > 1) In the first table-row, the text in the third column gets clipped > in the middle of a letter during my testing, which is obviously > undesirable. > 2) This method works only if you can generate the extra table-row for > a given entry only when needed. I tried the empty-cells="hide" > property on that extra row, but the spec says hide works only when > there is no visible content, which they define as being completely > empty or containing only whitespace. If you shorten the text going > into the third column, you'll see the extra row still appears even > though it contains nothing that prints on the page. > > I wish there was some way to determine if a particular block was going > to wrap, or to specify that only N lines of a wrapped block should be > displayed. > > > Eric Amick > Legislative Computer Systems > Office of the Clerk > > -Original Message- > From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 15, 2008 16:40 > To: fop-users@xmlgraphics.apache.org > Subject: Re: Text Formatting Problem > > On Jan 15, 2008, at 18:03, Amick, Eric wrote: > > Hi > >> I have a three-column listing of phone numbers, and most of the time, >> each column entry has only one line of text. Sometimes, however, I >> have entries that look like this: >> >> Text that spans >> two lines ... 9 More text that >> spans two lines >> >> In case the format gets garbled, the number in the second column >> should line up with the last line of text in the first column and the >> first line of text in the third column. I've tried using >> display-align > >> and vertical-align, but I can't come up with a way that works. Does >> anyone have any suggestions? -- Vincent HennebertAnyware Technologies http://people.apache.org/~vhennebert http://www.anyware-tech.com Apache FOP Committer FOP Development/Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Text Formatting Problem
Hi Eric, Try something like the following: Here is some really long text for testing. 9 And now for some more text. The idea is to shift the table one line upwards by setting a negative margin on the block-container. This negative margin should have the value (font-size * 1.2) to match a regular line height. A block-container is needed to set its width to 1.5in instead of the page width. The table is then used for the two remaining columns, with an appropriate start-indent to leave room to the first “column”. HTH, Vincent Amick, Eric wrote: > I should have pointed out that the first and third columns can both have > more than two lines, and that I can't guarantee both columns will have > the same number of lines. > > Here's what I'm currently trying; this is a greatly simplified test: > > > http://www.w3.org/1999/XSL/Format";> > > margin-left="1in" margin-right="1in" margin-top="2in" > margin-bottom="2in" master-name="foo"> > > > > > > > > > > > Here is some really long text for testing. > > > 9 > > > > And now for some more text. > > > > > >text-indent="-from-table-column(column-width)"> > And now for some more text. > > > > > > foo > > > 8 > > > Some text. > > > > > > > > > > This is close to what I need, but it has two problems: > 1) In the first table-row, the text in the third column gets clipped in > the middle of a letter during my testing, which is obviously > undesirable. > 2) This method works only if you can generate the extra table-row for a > given entry only when needed. I tried the empty-cells="hide" property on > that extra row, but the spec says hide works only when there is no > visible content, which they define as being completely empty or > containing only whitespace. If you shorten the text going into the third > column, you'll see the extra row still appears even though it contains > nothing that prints on the page. > > I wish there was some way to determine if a particular block was going > to wrap, or to specify that only N lines of a wrapped block should be > displayed. > > > Eric Amick > Legislative Computer Systems > Office of the Clerk > > -Original Message- > From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 15, 2008 16:40 > To: fop-users@xmlgraphics.apache.org > Subject: Re: Text Formatting Problem > > On Jan 15, 2008, at 18:03, Amick, Eric wrote: > > Hi > >> I have a three-column listing of phone numbers, and most of the time, >> each column entry has only one line of text. Sometimes, however, I >> have entries that look like this: >> >> Text that spans >> two lines ... 9 More text that >> spans two lines >> >> In case the format gets garbled, the number in the second column >> should line up with the last line of text in the first column and the >> first line of text in the third column. I've tried using display-align > >> and vertical-align, but I can't come up with a way that works. Does >> anyone have any suggestions? -- Vincent HennebertAnyware Technologies http://people.apache.org/~vhennebert http://www.anyware-tech.com Apache FOP Committer FOP Development/Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Text Formatting Problem
I should have pointed out that the first and third columns can both have more than two lines, and that I can't guarantee both columns will have the same number of lines. Here's what I'm currently trying; this is a greatly simplified test: http://www.w3.org/1999/XSL/Format";> Here is some really long text for testing. 9 And now for some more text. And now for some more text. foo 8 Some text. This is close to what I need, but it has two problems: 1) In the first table-row, the text in the third column gets clipped in the middle of a letter during my testing, which is obviously undesirable. 2) This method works only if you can generate the extra table-row for a given entry only when needed. I tried the empty-cells="hide" property on that extra row, but the spec says hide works only when there is no visible content, which they define as being completely empty or containing only whitespace. If you shorten the text going into the third column, you'll see the extra row still appears even though it contains nothing that prints on the page. I wish there was some way to determine if a particular block was going to wrap, or to specify that only N lines of a wrapped block should be displayed. Eric Amick Legislative Computer Systems Office of the Clerk -Original Message- From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 15, 2008 16:40 To: fop-users@xmlgraphics.apache.org Subject: Re: Text Formatting Problem On Jan 15, 2008, at 18:03, Amick, Eric wrote: Hi > I have a three-column listing of phone numbers, and most of the time, > each column entry has only one line of text. Sometimes, however, I > have entries that look like this: > > Text that spans > two lines ... 9 More text that > spans two lines > > In case the format gets garbled, the number in the second column > should line up with the last line of text in the first column and the > first line of text in the third column. I've tried using display-align > and vertical-align, but I can't come up with a way that works. Does > anyone have any suggestions? Can you post the FO-snippet you currently have? I was thinking something like (only works in case you always have three lines, and they're all in the same font-size): Text that spans two lines .. 9 More text that spans two lines Another way to achieve something similar, would be by means of fo:block-containers (implemented) or fo:inline-containers (unimplemented, but being worked on). The display-align properties do not apply to fo:block or fo:inline. Maybe that's the reason why it doesn't work for you (? remote guess) HTH! Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Text Formatting Problem
On Jan 15, 2008, at 18:03, Amick, Eric wrote: Hi I have a three-column listing of phone numbers, and most of the time, each column entry has only one line of text. Sometimes, however, I have entries that look like this: Text that spans two lines ... 9 More text that spans two lines In case the format gets garbled, the number in the second column should line up with the last line of text in the first column and the first line of text in the third column. I've tried using display-align and vertical-align, but I can't come up with a way that works. Does anyone have any suggestions? Can you post the FO-snippet you currently have? I was thinking something like (only works in case you always have three lines, and they're all in the same font-size): Text that spans two lines .. 9 More text that spans two lines Another way to achieve something similar, would be by means of fo:block-containers (implemented) or fo:inline-containers (unimplemented, but being worked on). The display-align properties do not apply to fo:block or fo:inline. Maybe that's the reason why it doesn't work for you (? remote guess) HTH! Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Text Formatting Problem
I have a three-column listing of phone numbers, and most of the time, each column entry has only one line of text. Sometimes, however, I have entries that look like this: Text that spans two lines ... 9 More text that spans two lines In case the format gets garbled, the number in the second column should line up with the last line of text in the first column and the first line of text in the third column. I've tried using display-align and vertical-align, but I can't come up with a way that works. Does anyone have any suggestions? Eric Amick Legislative Computer Systems Office of the Clerk