我在 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>
我的脚注看起来像
2016年3月25日获得总统同意,并发表在
2016年3月25日获得总统同意并公布
3. Received the assent of the President on March
但我想
2016年3月25日获得总统同意,并发表在
2016年3月25日获得总统同意并公布
3月获得总统同意
这似乎违反直觉,但fo:footnote
元素从其祖先格式化对象继承属性。
因此,如果脚注从带有start-indent="1cm"
的fo:block
元素(或其他块级格式化对象(衍生而来,则脚注正文也将缩进!
要获得预期的结果,请修改模板以向fo:footnote-body
内的fo:list-block
元素添加start-indent="0cm"
。同样,您将不得不"重置"您不希望fo:footnote-body
继承的其他属性(end-indent
、空格、font-size
、...