Why is my guide using first and last page layouts, not odd?
Posted: Wed Feb 14, 2018 9:15 pm
I'm using Oxygen 19.1 and have two projects that build PDFs using a customized, PDF2 DITA Map PDF transform scenario from a bookmap. I believe I want all of the PDFs generated in each project to use a customized "first" at the start of a chapter and "odd" body or "odd" TOC pages (there's no index or preface). My customization layout works in both projects. Each transform using the parameter args.chapter.layout setting of "BASIC".
PROBLEM I can't solve: Each project uses odd body and TOC page layouts consistently and correctly (page numbering is both odd and even), while the "first" page only works on odd page numbers. For even-numbered pages at the beginning of chapters in one project, there's no header or footer on the first page of a chapter, while in the second project, the page uses an odd body page layout. I played around with configuring even page layouts but they only appear when I set <xsl:variable name="mirror-page-margins" select="true()"/> and in this case, the even-odd pages work as you'd expect.
I am using this folder architecture:
C:DITA-files-customization (contains our customization files like catalog.xml, common\vars\en.xml, and fo\attrs\custom.xsl)
C:DITA-files-project1
C:DITA-files-project2
I force the page layout like this in customization\fo\attrs\custom.xsl:
<xsl:attribute-set name="__force__page__count">
<xsl:attribute name="force-page-count">
<xsl:choose>
<xsl:when test="name(/*) = 'bookmap'">
<xsl:value-of select="'no-force'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'no-force'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
I found this setting online but don't know if it's correct.
But I get the same results with this alternative approach (https://github.com/oxygenxml/com.oxygen ... s-attr.xsl) that prevents chapters from starting on an odd page:
<xsl:attribute-set name="__force__page__count">
<xsl:attribute name="force-page-count">auto</xsl:attribute>
</xsl:attribute-set>
I am missing how to overcome the logic that printed books shouldn't start on an even page but it's ok in my customization for a chapter to start on either even or odd page number. boohoohoo
I'd appreciate any thoughts or comments.
PROBLEM I can't solve: Each project uses odd body and TOC page layouts consistently and correctly (page numbering is both odd and even), while the "first" page only works on odd page numbers. For even-numbered pages at the beginning of chapters in one project, there's no header or footer on the first page of a chapter, while in the second project, the page uses an odd body page layout. I played around with configuring even page layouts but they only appear when I set <xsl:variable name="mirror-page-margins" select="true()"/> and in this case, the even-odd pages work as you'd expect.
I am using this folder architecture:
C:DITA-files-customization (contains our customization files like catalog.xml, common\vars\en.xml, and fo\attrs\custom.xsl)
C:DITA-files-project1
C:DITA-files-project2
I force the page layout like this in customization\fo\attrs\custom.xsl:
<xsl:attribute-set name="__force__page__count">
<xsl:attribute name="force-page-count">
<xsl:choose>
<xsl:when test="name(/*) = 'bookmap'">
<xsl:value-of select="'no-force'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'no-force'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
I found this setting online but don't know if it's correct.
But I get the same results with this alternative approach (https://github.com/oxygenxml/com.oxygen ... s-attr.xsl) that prevents chapters from starting on an odd page:
<xsl:attribute-set name="__force__page__count">
<xsl:attribute name="force-page-count">auto</xsl:attribute>
</xsl:attribute-set>
I am missing how to overcome the logic that printed books shouldn't start on an even page but it's ok in my customization for a chapter to start on either even or odd page number. boohoohoo
I'd appreciate any thoughts or comments.