xsl fo 的脚注参考



我在 xsl fo "脚注"脚注引用中遇到问题,无法对齐如何对齐 我希望脚注显示在左对齐而不是缩进。 编码如下:-

正文:-

"<footnoteref refid="FN0001">1</footnoteref>"any action taken by the Central
Government under the Resolution of the Government of India, Planning Commission
bearing Notification Number A-43011/02/2009-Admin.

XSLT:-

<xsl:template match="footnoteref">
<xsl:variable name="fnoteid" select="@refid"/>
<fo:footnote>
<fo:inline font-size="70%" baseline-shift="super">
<xsl:apply-templates/>
</fo:inline>
<fo:footnote-body>
<fo:list-block provisional-label-separation="2.5mm" provisional-distance-between-starts="10mm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="right"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:value-of select="//footnote[@id=$fnoteid]/footnum"/>
<xsl:choose>
<xsl:when test="$fnoteid = 1 to 9000"><xsl:text>.</xsl:text></xsl:when>
</xsl:choose>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block text-align="justify"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:apply-templates select="//footnote[@id=$fnoteid]"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:template>

我的脚注看起来像

  1. 2016年3月25日获得总统同意,并发表在

    1. 2016年3月25日获得总统同意并公布

      3. Received the assent of the President on March
      

但我想

  1. 2016年3月25日获得总统同意,并发表在

  2. 2016年3月25日获得总统同意并公布

  3. 3月获得总统同意

这似乎违反直觉,但fo:footnote元素从其祖先格式化对象继承属性

因此,如果脚注从带有start-indent="1cm"fo:block元素(或其他块级格式化对象(衍生而来,则脚注正文也将缩进!

要获得预期的结果,请修改模板以向fo:footnote-body内的fo:list-block元素添加start-indent="0cm"。同样,您将不得不"重置"您不希望fo:footnote-body继承的其他属性(end-indent、空格、font-size、...

最新更新