This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] A lot of empty pages at the begining of a book





Hello to all,

I have at the moment a running solution, which converts a set of book's via
xml-fo to pdf.

But I'am wondering, why I get a lot of empty pages at the start of the book

So I explain what I get. The first page ist the cover page of the set. I
see the set title, a title picture and just under the picture the
copyright.
Afterwards I get an emty page (that is ok, because I am using the
double.sided parameter)

Then I get one page with the TOC of all books in the set and afterwards
again an empty page. (Is it possible to enumerate the book titles as well
as the chapter titles ?)

Now I see the first page of the first book. I see the title and the title
picture. But now I get an not expected pagebreak. On the next side I see
again the title of the book and just underneeth the copyright.
Why this happens ?

After that I get 2 (two !) empty pages. For what ? Is it possible to ommit
them ?

Now the dedication is printed out, followed by an empty page (thats
correct) and the toc of the book.

After the toc I have again an empty page (that is correct) followed by the
toc of tables used in the book. How can I switch of that table-toc ?

Then I get an emty page followed by the preface (is also correct) an
another empty page.

And then the first chapter starts.


Thanks again for your contributions in advance

Jochen Gerstl


PS:  My customization layer looks like that:


<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
      xmlns:fo="http://www.w3.org/1999/XSL/Format";
      exclude-result-prefixes="#default">

<!-- Das eigentliche XSL-File, welches durch nachfolgende Parameter
modifiziert wird -->
<xsl:import href="fo/docbook.xsl"/>
<xsl:param name="use.extension" select="1"/>
<xsl:param name="fop.extensions" select="1"/>
<xsl:param name="tablecolumns.extensions" select="1"/>

<xsl:param name="paper.type" select="'A4'"/>

<!-- Ersetzt lokalisierten Text "Kapitel" durch nichts -->
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
  <l:l10n language="de">
    <l:context name="title-numbered">
      <l:template name="chapter" text="%n. %t"/>
    </l:context>
  </l:l10n>
</l:i18n>

<!-- Nummeriert Sectionen automatisch -->
<xsl:param name="section.autolabel" select="1"/>
      <!-- Schreibt vor die Sectionsnummer die aktuelle Chapternummer -->
<xsl:param name="section.label.includes.component.label" select="1"/>

<!-- Fuegt Hinweisen Grafik-Symbole hinzu -->
<xsl:param name="admon.graphics" select="1"/>

<!-- Erstellt Dokumentation mit Doppelseitiger Ausgabe (Papierspar
Gedanke)-->
<xsl:param name="double.sided" select="1"/>

<!-- Hoehe des oberen Seitenrand  -->
<xsl:param name="page.margin.top" select="'0.5in'"></xsl:param>

<!-- Hoehe der Kopfzeile  -->
<xsl:param name="region.before.extent" select="'0.75in'"></xsl:param>

<!-- Titeleinzug Default ist '-4pc' -->
<xsl:param name="title.margin.left" select="'0pc'"></xsl:param>

<!-- Groesse des body-Fonts  Master angabe -->
<xsl:param name="body.font.master">10</xsl:param>
<!-- Echte groesse des Body Fonts -->
<xsl:param name="body.font.size">
 <xsl:value-of
select="$body.font.master"></xsl:value-of><xsl:text>pt</xsl:text>
</xsl:param>
<!-- Fuegt ein Titelbild auf erster Seite von Set ein -->
<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
      <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format";
         xsl:use-attribute-sets="set.titlepage.recto.style"
         text-align="center"
         font-size="24.8832pt"
         space-before="18.6624pt"
         font-weight="bold"
         font-family="{$title.font.family}">
       <xsl:call-template name="division.title">
            <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
       </xsl:call-template>
       </fo:block>
        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format";
            space-before="25mm"
            space-above="25mm">
            <fo:external-graphic
            src="../images/titelbild.gif"
            width="auto"
            height="auto"
            content-width="auto"
            content-height="auto"
            fo:space-before="2cm"/>
        </fo:block>
</xsl:template>

<!-- Fuegt ein Titelbild auf erster Seite von Book ein -->
<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
      <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format";
         xsl:use-attribute-sets="book.titlepage.recto.style"
         text-align="center"
         font-size="24.8832pt"
         space-before="18.6624pt"
         font-weight="bold"
         font-family="{$title.font.family}">
       <xsl:call-template name="division.title">
            <xsl:with-param name="node"
select="ancestor-or-self::book[1]"/>
       </xsl:call-template>
       </fo:block>
        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format";
            space-before="25mm"
            space-above="25mm">
            <fo:external-graphic
            src="../images/titelbild.gif"
            width="auto"
            height="auto"
            content-width="auto"
            content-height="auto"
            fo:space-before="2cm"/>
        </fo:block>
</xsl:template>

<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format";
            xsl:use-attribute-sets="chapter.titlepage.recto.style"
            margin-left="{$title.margin.left}"
            font-size="16pt"
            font-weight="bold"
            font-family="{$title.font.family}">
    <xsl:call-template name="component.title">
      <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
    </xsl:call-template>
  </fo:block>
</xsl:template>

<xsl:attribute-set name="section.title.level1.properties">
  <xsl:attribute name="font-size">12pt</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="section.title.level2.properties">
  <xsl:attribute name="font-size">12pt</xsl:attribute>
</xsl:attribute-set>

<!-- Redefiniert die Kopfzeile einer PDF-Seite -->
<xsl:template name="header.content">
  <xsl:param name="pageclass" select="''"/>
  <xsl:param name="sequence" select="''"/>
  <xsl:param name="position" select="''"/>
  <xsl:param name="gentext-key" select="''"/>

  <fo:block>

    <!-- sequence can be odd, even, first, blank -->
    <!-- position can be left, center, right -->
    <xsl:choose>

        <xsl:when test="$sequence='first' and $position='right'" >
            <fo:external-graphic src="../images/ABB-Logo.gif" width="62px"
heigth="24px"/>
        </xsl:when>

        <xsl:when test="$sequence='odd' and $position='right'" >
            <fo:external-graphic src="../images/ABB-Logo.gif" width="62px"
heigth="24px"/>
        </xsl:when>

        <xsl:when test="$sequence='even' and $position='left'" >
            <fo:external-graphic src="../images/ABB-Logo.gif" width="62px"
heigth="24px"/>
        </xsl:when>

        <xsl:when test="$sequence='blank' and $position='left'" >
            <fo:external-graphic src="../images/ABB-Logo.gif" width="62px"
heigth="24px"/>
        </xsl:when>

      <xsl:when test="$sequence = 'blank'">
        <!-- nothing -->
      </xsl:when>

      <xsl:when test="$position='left'">
        <!-- Same for odd, even, empty, and blank sequences -->
        <xsl:call-template name="draft.text"/>
      </xsl:when>

      <xsl:when test="($sequence='odd' or $sequence='even') and
$position='center'">
        <xsl:if test="$pageclass != 'titlepage'">
          <xsl:choose>
            <xsl:when test="ancestor::book and ($double.sided != 0)">
              <fo:retrieve-marker retrieve-class-name="section.head.marker"

retrieve-position="first-including-carryover"
                                  retrieve-boundary="page-sequence"/>
                  </xsl:when>
            <xsl:otherwise>
              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
            </xsl:otherwise>
             </xsl:choose>
        </xsl:if>
      </xsl:when>

      <xsl:when test="$position='center'">
        <!-- nothing for empty and blank sequences -->
      </xsl:when>

      <xsl:when test="$position='right'">
        <!-- Same for odd, even, empty, and blank sequences -->
        <xsl:call-template name="draft.text"/>
      </xsl:when>

      <xsl:when test="$sequence = 'first'">
        <!-- nothing for first pages -->
      </xsl:when>

      <xsl:when test="$sequence = 'blank'">
        <!-- nothing for blank pages -->
      </xsl:when>
    </xsl:choose>
  </fo:block>
</xsl:template>

</xsl:stylesheet>


To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]