Xdg*_*Xdg 7 xml xslt docbook apache-fop
我正在使用Docbook 5(docbook-xsl-ns),使用Apache FOP生成PDF,我想将所有文本移到左侧.我该怎么做?
源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>...
Run Code Online (Sandbox Code Playgroud)

谢谢.
由body.start.indent参数添加的段落缩进.
您应该使用measurement为此参数设置值,因为它在其他XSLT模板中用于计算.例如,下一行将删除段落缩进:
<xsl:param name="body.start.indent">0pt</xsl:param>
Run Code Online (Sandbox Code Playgroud)
所有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>
Run Code Online (Sandbox Code Playgroud)
也可以使用其他缩进选项:
page.margin.inner - 左页边距page.margin.outer - 右页边距例如,下一个参数将使这个页面布局3:
<xsl:param name="page.margin.inner">20mm</xsl:param>
<xsl:param name="page.margin.outer">10mm</xsl:param>
<xsl:param name="page.margin.top">12.5mm</xsl:param>
<xsl:param name="page.margin.bottom">15mm</xsl:param>
<xsl:param name="region.before.extent">10mm</xsl:param>
<xsl:param name="region.after.extent">5mm</xsl:param>
<xsl:param name="body.margin.top">15mm</xsl:param>
<xsl:param name="body.margin.bottom">15mm</xsl:param>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
995 次 |
| 最近记录: |