OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Weird appendix title indent in PDF


Hi Ryan,
This is a strange one, actually. When I examine the FO output, both the section title and the appendix title (and the TOC title for that matter) all have fo:block elements with start-indent="0pt" and margin-left="0pt", which should put the titles at the left margin. When I process the file with RenderX XEP, that is what I get.

So at first I thought it was a bug in FOP, but I also tried Antenna House XSL Formatter, and that showed the same behavior as FOP. So now it seems there are two ways of interpreting the same FO file.

The body indent comes from a start-indent="4pc" on the fo:flow element that contains the page content. An fo:flow does not generate any areas, so putting that start-indent property there just ensures it is inherited by all descendant fo:blocks, *except* those that set their own start-indent. Since both the section title and the appendix title set the same property, I don't understand why they format differently.

I'm going to investigate this one some more. As a workaround, you can use this:

<xsl:attribute-set name="article.appendix.title.properties">
 <xsl:attribute name="margin-left">-4pc</xsl:attribute>
</xsl:attribute-set>

(or if you set the $body.start.indent parameter, set it to the negative of that value).

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

--------------------------------------------------
From: "Ryan Nowakowski" <ryan.nowakowski@gmail.com>
Sent: Thursday, January 31, 2013 7:18 AM
To: <docbook-apps@lists.oasis-open.org>
Subject: [docbook-apps] Weird appendix title indent in PDF

When I generate PDF from this document:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
]>

<article>
  <section>
<title>A Section</title>
<para>This is some section text.</para>
  </section>

  <appendix>
<title>An Appendix</title>
<para>This is some appendix text.</para>
  </appendix>
</article>

...the appendix title is indented to the right(see attached PDF).
I would expect it to line up with the section title.  The titles line
up in HTML just fine.

Here's my toolchain:
xsltproc /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl test.dbk > test.fo
fop -fo test.fo -pdf test.pdf

Here are the versions of docbook and toolchain:
docbook-xml: 4.5
docbook-xsl: 1.76.1
xsltproc: 1.1.26
fop: 1.0

Is this a bug in the stylesheets or in fop maybe?

Thanks!

Ryan





---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]