2013-06-21 54 views
4

我正在使用Docbook 5(docbook-xsl-ns),使用Apache FOP生成PDF,我想將所有文本移到左側。 我該怎麼辦?XSL FO Docbook content left margin

源XML是:

<section> 
     <title>Usage</title> 
     <programlisting>mvn archetype:generate -DarchetypeGroupId=cz.csob.javor -DarchetypeArtifactId=javor-archetypes-subcomponent -DarchetypeVersion=X.Y.Z</programlisting> 
     <para>During the subcomponent project generation you will be asked for the following properties:</para> 
     <itemizedlist> 
      <listitem> 
       <para><emphasis>parent-component-id</emphasis> - ID of the parent component, should be the name of the directory the parent component project is placed in</para> 
      </listitem> 
      <listitem>... 

enter image description here

感謝。

+1

最重要DocBook中的物品的外觀之內被控制文件「param.xsl」在docbook/fo樣式表中。檢查它,找到你需要改變和改變它。 –

+0

@Xdg - 你找到解決方案嗎? –

回答

5

通過body.start.indent參數添加了段落縮進。

您應該使用度量爲此參數設置值,因爲它在其他XSLT模板中用於計算。例如,下一行會不惜一切刪除段落縮進:

<xsl:param name="body.start.indent">0pt</xsl:param> 

所有XSLT定製層應該是這樣的:

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:fo="http://www.w3.org/1999/XSL/Format" 
    version="1.0"> 
    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> 
    <xsl:param name="body.start.indent">0pt</xsl:param> 
</xsl:stylesheet> 

Reference documentation for this topic