list-item-label XML:FO vertical alignment

1.3k views Asked by At

I am trying to vertically align bullet with the body text. so that bullet should be in middle (vertically). but i am not able achieve it.

<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<xsl:call-template name="gbl-bullet-tick-circle"/>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block font-size="10pt">
 here is hell lot of text paragraph i want to print...
 here is hell lot of text paragraph i want to print...here is hell lot of text   
 paragraph i want to print...here is hell lot of text paragraph i want to print...
</fo:block>
</fo:list-item-body>
</fo:list-item>

it is printing something like below

 .   here is hell lot of text paragraph i want to print...
     here is hell lot of text paragraph i want to print...here is hell lot of text   
     paragraph i want to print...here is hell lot of text paragraph i want to print...

but actually i want it to be printed as below

     here is hell lot of text paragraph i want to print...
 .   here is hell lot of text paragraph i want to print...here is hell lot of text   
     paragraph i want to print...here is hell lot of text paragraph i want to print...

Is anybody done that before in XML:FO, could please share some info on this.

Thank you very much in advance.

Regards, Mona

1

There are 1 answers

0
Kevin Brown On

Quick answer would be to use a table with two columns. Use display-align for the bullet. I can test a few things for lists but I would imagine that the progression dimension of the block with the bullet may not be controlled by the list body, I am not sure.

And I tested and I am now sure. If you put a border on the list-item-label you would see that the block boundary is only as large as is needed for the list-item-label.

To accomplish this layout, use a two-column table with the first cell having "display-align="center" and your bullet and the second cell containing the content.