list-item-label XML:FO垂直对齐

时间:2013-08-27 04:38:24

标签: xml xslt xml-formatting

我试图将子弹与正文文本垂直对齐。这样子弹应该在中间(垂直)。但我无法实现它。

<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>

它打印的内容如下

 .   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...

但实际上我希望它打印如下

     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...

有人在使用XML之前完成了这项工作:FO,请在此分享一些信息。

非常感谢你。

此致 莫纳

1 个答案:

答案 0 :(得分:1)

快速回答是使用包含两列的表格。使用display-align作为项目符号。我可以为列表测试一些东西但是我会想到带有子弹的块的进展维度可能不受列表主体的控制,我不确定。

我测试了,我现在肯定了。如果在list-item-label上放置一个边框,您会看到块边界仅与list-item-label所需的一样大。

要完成此布局,请使用双列表,第一个单元格具有“display-align =”center“和您的项目符号,第二个单元格包含内容。