Getting an unwanted second title page when processing docbook to PDF via fop

空扰寡人 提交于 2019-12-13 04:42:21

问题


I'm constructing a standard book format in dockbook xml then formatting it to PDF via fop.

When I construct the final PDF however i'm getting a second broken title page that has the title and the inline image again. On this page the title is justified across the whole page (so spread oddly) and the image is off-centre.

The title also has an additional colon after it that is not present in the book title.

If I remove the title page using XSL parameters, the title page is removed, but the broken title page still remains in the PDF.

I can see the extra line that is generating the second page in the .fo file, but can't work out how it's getting there via xsltproc. My first assumption is that it is automatically creating the title page then reinterpreting the title again before it goes through the other chapters.

I don't get this title page problem if I export via oXygen, which makes it more baffling.

Here's the book code:

<!DOCTYPE book [
<!ENTITY chap1 SYSTEM "01_n.xml">
<!ENTITY chap2 SYSTEM "02_n.xml">
<!ENTITY chap3 SYSTEM "03_n.xml">
<!ENTITY chap4 SYSTEM "04_n.xml">
<!ENTITY chap5 SYSTEM "05_n.xml">
<!ENTITY chap6 SYSTEM "06_n.xml">
<!ENTITY chap7 SYSTEM "07_n.xml">
<!ENTITY chap8 SYSTEM "08_n.xml">
<!ENTITY chap9 SYSTEM "09_n.xml">
<!ENTITY chap10 SYSTEM "10_n.xml">
<!ENTITY chap11 SYSTEM "11_n.xml">
<!ENTITY chap12 SYSTEM "12_n.xml">
<!ENTITY chap13 SYSTEM "13_n.xml">
<!ENTITY chap14 SYSTEM "14_n.xml">
<!ENTITY chap15 SYSTEM "15_n.xml">
<!ENTITY chap16 SYSTEM "16_n.xml">
<!ENTITY chap17 SYSTEM "17_n.xml">
<!ENTITY chap18 SYSTEM "18_n.xml">
]>

<book xmlns="http://docbook.org/ns/docbook" version="5.0">
    <info>
        <title>Manual</title>
         <subtitle>
            <inlinemediaobject>
                <imageobject>
                    <imagedata fileref="logo.png" format="image_format" scalefit="1" width="100%" contentdepth="100%" />
                </imageobject>
            </inlinemediaobject>
        </subtitle>
    </info>

    &chap1;
    &chap2;
    &chap3;
    &chap4;
    &chap5;
    &chap6;
    &chap7;
    &chap8;
    &chap9;
    &chap10;
    &chap11;
    &chap12;
    &chap13;
    &chap14;
    &chap15;
    &chap16;
    &chap17;
    &chap18;
</book>

And the pdf part of the makefile:

pdf:   
    xsltproc  \
    --output  myfile.fo  \
    --stringparam  paper.type  A4  \
    /docbook/format.xsl \
    book.xml

    fop  -fo  myfile.fo  -pdf  myfile.pdf

    open myfile.pdf

There is nothing particularly special about the formal.xsl I am using, and I get the same result if I use the standard docbook xsl file.

Thanks for any help! I've already gained a lot useful tips for docbook formatting by searching though existing questions.


回答1:


mzjn provided the clue:

I was using: <xsl:template name="book.titlepage.before.verso"/>

When I should have used: <xsl:template name="book.titlepage.verso"/>

The latter code removes the second wonky page, whereas the former only removes the page break.



来源:https://stackoverflow.com/questions/9407275/getting-an-unwanted-second-title-page-when-processing-docbook-to-pdf-via-fop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!