Blank pages in PDF output when deleting Lists of figures, examples, tables...

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Christine
Posts: 11

Blank pages in PDF output when deleting Lists of figures, examples, tables...

Wed Mar 01, 2017 5:19 pm

Hello,

I am mostly using Oxygen XML Editor (17.1) in author mode (using Docbook) and I am not really confortable with configuring my file for the pdf output.
Anyway, I would like to delete the Lists of Figures, Tables, etc. coming after the TOC.
So far, I succeeded in removing the related data (their titles and corresponding references) but the corresponding blank pages are still generated in the PDF output...

Can anyone tell me what I need to add in my configuration file to get rid of these blank pages?
Many thanks for your help,
Christine

FYI, here is below the sample of my configuration file pdf.xsl :

Code: Select all

<!-- == TOC == -->
<xsl:attribute-set name="toc.line.properties">
  <xsl:attribute name="text-align-last">justify</xsl:attribute>
  <xsl:attribute name="font-family">sans-serif</xsl:attribute>
</xsl:attribute-set>
 
<xsl:template name="list.of.titles">
  <xsl:param name="titles" select="'table'"/>
  <xsl:param name="nodes" select=".//d:table"/>
  <xsl:param name="toc-context" select="."/>
   
  <xsl:variable name="id">
    <!--xsl:call-template name="object.id"/-->
  </xsl:variable>
   
  <xsl:if test="$nodes">
    <fo:block id="lot...{$titles}...{$id}">
      <xsl:choose>
      <xsl:when test="$titles='table'">
        <!--xsl:call-template name="list.of.tables.titlepage"/-->
      </xsl:when>
      <xsl:when test="$titles='figure'">
        <!--xsl:call-template name="list.of.figures.titlepage"/-->
      </xsl:when>
      <xsl:when test="$titles='equation'">
        <!--xsl:call-template name="list.of.equations.titlepage"/-->
      </xsl:when>
      <xsl:when test="$titles='example'">
        <!--xsl:call-template name="list.of.examples.titlepage"/-->
      </xsl:when>
      <xsl:when test="$titles='procedure'">
        <!--xsl:call-template name="list.of.procedures.titlepage"/-->
      </xsl:when>
      <xsl:otherwise>
        <!--xsl:call-template name="list.of.unknowns.titlepage"/-->
      </xsl:otherwise>
      </xsl:choose>
      <!--xsl:apply-templates select="$nodes" mode="toc">
        <xsl:with-param name="toc-context" select="$toc-context"/>
      </xsl:apply-templates-->
    </fo:block>
  </xsl:if>
</xsl:template>

<xsl:template match="d:figure|d:table|d:example|d:equation|d:procedure" mode="toc">
  <xsl:param name="toc-context" select="."/>
  <!--xsl:call-template name="toc.line">
  <xsl:with-param name="toc-context" select="$toc-context"/>
  </xsl:call-template-->
</xsl:template>
Radu
Posts: 5510

Re: Blank pages in PDF output when deleting Lists of figures, examples, tables...

Thu Mar 02, 2017 3:21 pm

Hi Christine,

We do not use Docbook much so we are not very good with Docbook customization.
Maybe for future Docbook customization related questions you could consider registering on the Docbook Apps users list and asking there:

http://docbook.org/help

Coming back to your question, if you look in the XSLT stylesheet:

OXYGEN_INSTALL_DIR\frameworks\docbook\xsl\fo\division.xsl

at some point it does something like this:

Code: Select all

  <xsl:if test="contains($toc.params,'figure') and .//d:figure">
    <xsl:call-template name="page.sequence">
      <xsl:with-param name="master-reference"
                      select="$lot-master-reference"/>
      <xsl:with-param name="element" select="'toc'"/>
      <xsl:with-param name="gentext-key" select="'ListofFigures'"/>
      <xsl:with-param name="content">
        <xsl:call-template name="list.of.titles">
          <xsl:with-param name="titles" select="'figure'"/>
          <xsl:with-param name="nodes" select=".//d:figure"/>
        </xsl:call-template>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:if>


If that entire xsl:if is commented, the entire list of figures + its extra space disappears. Because with your customization right now probably the page sequence still gets generated even if your "list.of.titles" template does nothing anymore.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Christine
Posts: 11

Re: Blank pages in PDF output when deleting Lists of figures, examples, tables...

Fri Mar 03, 2017 4:12 pm

Hi Radu,

Yes you were right and I understand now why the page sequence was still generated.
Thank you for your great help : it worked perfectly when I add to my custom configuration the part of the template you mentioned and I commented the parts related to the unwanted lists!

Best regards,
Christine

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 4 guests