Skip to search.
dita-users · DITA users group

Group Information

  • Members: 2549
  • Category: XML
  • Founded: May 21, 2004
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
How to remove page breaks after level-1 topic in the output pdf   Message List  
Reply Message #21935 of 27372 |
Re: How to remove page breaks after level-1 topic in the output pdf


My understanding is that the XMetaL Enhanced PDF output is based on the
fo plugin, also known as pdf2. We had a similar requirement. The reason
each first-level topic starts on a new page is because each first-level
topic gets its own page-sequence. So you have to remove the page
sequence that is created for those topics and add it to the
rootTemplate. Here is how I did it in our overrides.

In rootTemplate, I create the one page-sequence and flow for all body
content. Note that I deliberately chose to use the ditamap-body-sequence
for all our output. Normally body-sequence is used for bookmaps, but we
had some static content requirements that made it easier to always use
ditamap-body-sequence. I also create the flow in this template to allow
for page break overrides, which our team allows authors to set in our
DITA maps. Here is the relevant snippet from rootTemplate. Our
customizations appear after createToc and before createIndex.

<xsl:call-template name="createToc"/>
<fo:page-sequence master-reference="ditamap-body-sequence"
xsl:use-attribute-sets="__force__page__count">
<xsl:call-template name="insertBodyStaticContents"/>
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
<xsl:call-template name="createIndex"/>

Here is the other template that you need to override by removing the
fo:page-sequence. I will include the entire template so that you can
compare it to your own. Depending on which version of the toolkit is
installed with XMetaL, you might need to remove the page-sequence setup
for the concept/concept, task/task, and reference/reference templates.
It would be the same process for each. I am not sure in which toolkit
version the topic/topic template was introduced. We are using the fo
plugin that comes with version 1.5.1 of the OT. The customization is
between the EPICOR comments.

<xsl:template match="*[contains(@class, ' topic/topic ')]">
<xsl:variable name="topicType">
<xsl:call-template name="determineTopicType"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$topicType = 'topicChapter'">
<xsl:call-template name="processTopicChapter"/>
</xsl:when>
<xsl:when test="$topicType = 'topicAppendix'">
<xsl:call-template name="processTopicAppendix"/>
</xsl:when>
<xsl:when test="$topicType = 'topicPart'">
<xsl:call-template name="processTopicPart"/>
</xsl:when>
<xsl:when test="$topicType = 'topicPreface'">
<xsl:call-template name="processTopicPreface"/>
</xsl:when>
<xsl:when test="$topicType = 'topicNotices'">
<!-- Suppressed in normal processing, since it goes at the beginning
of the book. -->
<!-- <xsl:call-template name="processTopicNotices"/> -->
</xsl:when>
<xsl:when test="$topicType = 'topicSimple'">
<!-- EPICOR: Removed outer xsl:choose which set up a new
page-sequence for each first
level topic. -->
<xsl:choose>
<xsl:when test="contains(@class,' concept/concept ')">
<xsl:call-template name="processConcept"/>
</xsl:when>
<xsl:when test="contains(@class,' task/task ')">
<xsl:call-template name="processTask"/>
</xsl:when>
<xsl:when test="contains(@class,' reference/reference ')">
<xsl:call-template name="processReference"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="processTopic"/>
</xsl:otherwise>
</xsl:choose>
<!-- End EPICOR -->
</xsl:when>
<!--BS: skipp abstract (copyright) from usual content. It will be
processed from the front-matter-->
<xsl:when test="$topicType = 'topicAbstract'"/>
<xsl:otherwise>
<xsl:call-template name="processUnknowTopic">
<xsl:with-param name="topicType" select="$topicType"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Feel free to contact me offline if you have other questions about how to
implement this on your system.

Best regards,
Severin Foreman


--- In dita-users@yahoogroups.com, "Manish" <manish9487@...> wrote:
>
> I am using modefied Xmetal EnhacedPDF via RenderX XEP to generate
output for my DITAMAP(xmetal 6).
> But in the output, Every new topic appear on a new page. means there
is page break after every level-1 topic.
> I want to remove dis page break after every new topic. What
modification are required in the stylesheets.
>
> Below is the root template i m using
> <xsl:template name="rootTemplate">
>
> <xsl:call-template name="validateTopicRefs"/>
> <fo:root xsl:use-attribute-sets="__fo__root">
> <fo:layout-master-set xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:call-template name="addCoverPageLayoutMaster"/>
> <xsl:call-template name="addSTMDitamapLayoutMasters"/>
> <xsl:call-template name="addStmFmLayoutMasters"/>
> </fo:layout-master-set>
> <xsl:call-template name="createBookmarks"/>
> <xsl:call-template name="createCoverPage"/>
> <xsl:call-template name="createToc"/>
> <xsl:call-template name="createLOT"/>
> <xsl:call-template name="createLOF"/>
> <xsl:apply-templates select="map/*[position() > 2]"/>
> <xsl:call-template name="createIndex"/>
> </fo:root>
> </xsl:template>
>






Thu Mar 10, 2011 2:54 pm

severin.fore...
Offline Offline
Send Email Send Email

Message #21935 of 27372 |
Expand Messages Author Sort by Date

I am using modefied Xmetal EnhacedPDF via RenderX XEP to generate output for my DITAMAP(xmetal 6). But in the output, Every new topic appear on a new page....
Manish
maneesh9487 Offline Send Email
Mar 10, 2011
8:16 am

My understanding is that the XMetaL Enhanced PDF output is based on the fo plugin, also known as pdf2. We had a similar requirement. The reason each...
severin.foreman@...
severin.fore... Offline Send Email
Mar 10, 2011
2:54 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help