[publican-list] Another foible with Publican 3.2.0

Jeff Fearn jfearn at redhat.com
Wed Aug 21 04:03:22 UTC 2013


On 08/21/2013 02:33 AM, Norman Dunbar wrote:
> Evening all,
>
> I've found something else in Publican 3.2 that affects one of my books. I haven't noticed this before, so it might not be related to 3.2 itself.
>
> I have a page, A4 sized, which has a <procedure> on it with a number of <step>s. If a <step>s has an <orderedlist spacing="compact"> or <itemizedlist spacing="compact"> and those particular lists are at the bottom of a page, then when rendered to pdf, using fop, the ordered list renders all over the footer details at the bottom of the page.
>
> I also see pages where the actual <step> is rendered on the footer area as well. These steps have an <itemizedlist spacing="compact"> rather than an ordered one.
>
> Pages where the <step> reaches the bottom of the page, and which have simple <para>s do not obliterate the footer, it only appears to be where lists are involved.
>
> It also seems to only occur on those pages where the entire page is one or more <step>s from a <procedure>
>
> The following should demonstrate the problem:
>
> $ publican create --type=article --name=steps --version="1.0-0"
>
> $ cd steps
>
> $ vi en-US/steps.xml, the following is what the stuff between the <article> tags looks like on saving:
>
> <article>
>      <xi:include href="Article_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
>          <xi:include href="article.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
>          <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
>      <index />
> </article>
>
>
> I have added the second include line, and removed the other test cruft!
>
> Create article.xml as follows:
>
> <?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">
>
> <section>
>
> <title>How Procedure Steps Will Obliterate PDF Page Footer</title>
>
> <procedure>
>
> <xi:include href="onestep.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
> <xi:include href="onestep.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
>
> <!-- the above line is repeated 10 times in total -->
>
> </procedure>
>
> </section>
>
>
> And finally, create onestep.xml as follows:
>
> <?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">
>
> <step>
>          <itemizedlist spacing="compact">
>                  <listitem><para>This is a list item.</para></listitem>
>                  <listitem><para>This is a list item.</para></listitem>
>                  <listitem><para>This is a list item.</para></listitem>
>                  <listitem><para>This is a list item.</para></listitem>
>                  <listitem><para>This is a list item.</para></listitem>
>                  <listitem><para>This is a list item.</para></listitem>
>                  <listitem><para>This is a list item.</para></listitem>
>          </itemizedlist>
> </step>
>
>
> $ publican build -langs=en-US --formats=pdf
>
>
> When rendered as pdf, using fop, the first page of the article is fine, the steps stop just above the footer area's horizontal rule. In my pdf I see step 2 on page one, has two items from the list, which then continues on page 2.
>
> One page two, however, the list items are rendered all down the page to the actual paper edge. Step 8 has 3 items below the horizontal rule and the beginning of step 9 is rendered partly off the page.

We had a lot of problems with rendering steps and sub-steps. It has something to do with the way FOP allocates rendering space to blocks and how it'd cant reallocate a parent blocks space when the child node flows over a greater space than expected. We never worked out how to fix this.

If this works with the upstream XSL and is broken in Publican, then it's probably something we can fix, but if it's broken with the upstream XSL then it's unlikely we can resolve it.

> I have to use fop for pdf rendering as I have indexes in my books etc and the wkhtmltopdf utility renders the page numbers as sections as if it was a normal html page.

An index or a table of contents? It's standard to use the same page numbering for indexes as the rest of the book. WE could probably workout how to change the TOC to use Roman numerals. i'd just want to get our version online with upstream and that's a bit of effort.

Cheers, Jeff.


-- 
Jeff Fearn <jfearn at redhat.com>
Senior Software Engineer
Infrastructure Engineering & Development (AEU)
Red Hat Asia Pacific Pty Ltd
GPG: 0x0357E8F0




More information about the publican-list mailing list