【问题标题】:list-item-label XML:FO vertical alignment列表项标签 XML:FO 垂直对齐
【发布时间】:2013-08-27 04:38:23
【问题描述】:

我正在尝试将项目符号与正文垂直对齐。所以子弹应该在中间(垂直)。但我做不到。

<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 中做过吗,请分享一些关于此的信息。

非常感谢您。

问候, 莫娜

【问题讨论】:

  • 我也有同样的问题。
  • 我红了一个人使用 vertical-align="baseline" 作为列表项并为她工作,但它对我不起作用。我也试过 relative-align="baseline" 但没有。

标签: xml xslt xml-formatting


【解决方案1】:

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

我测试过,现在我确定了。如果您在列表项标签上设置边框,您会看到块边界仅与列表项标签所需的一样大。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-07
    • 2013-05-02
    相关资源
    最近更新 更多