Pages: 1
Print
Author Topic: Changing the page layout to two columns - PDF output  (Read 1052 times)
IF
Member

Posts: 65


« on: September 01, 2010, 05:24:27 PM »

Which file do I need to modify to create a PDF document in which body pages have two columns?

I tried to modify the file  "...\AppData\Roaming\SoftQuad\XMetaLShared\DITA_OT\demo\xmfo\Customization\fo\layout-masters.xml"
by  adding a  column-count="2" statement but it did not work.

For example:

<fo:simple-page-master
        master-name="body-even"
        page-width="215.9mm"
        page-height="279.4mm">
        <fo:region-body
            column-count="2"

Maybe it's because I'm supposed to be modifying the file xm_layout_masters_overrides.xls instead?

Using XMetal 6.0 on Windows 7
Logged
gcrews
Member

Posts: 175


« Reply #1 on: September 01, 2010, 05:45:35 PM »

Look around 77 and 88 in xm_layout_masters_overrides.xls , I had a devil of a time modifying the layout-masters.xml until I realized the attributes and values I put in there were being striped by the overrides and not passed though.
Logged
IF
Member

Posts: 65


« Reply #2 on: September 01, 2010, 06:00:50 PM »

Thanks! Editing the file xm_layout_masters_overrides to add a couple of " <xsl:attribute name="column-count">2</xsl:attribute>" worked.  I managed to make the TOC two-column in the process, but I'm sure that something I can fix. Thanks for the help.
Logged
DITALearner
Member

Posts: 11


« Reply #3 on: September 28, 2010, 10:47:23 AM »

Hello IF,

I am trying to achieve the same thing as you but failing to get it working. Would you please share your complete code?

Thank

Thanks! Editing the file xm_layout_masters_overrides to add a couple of " <xsl:attribute name="column-count">2</xsl:attribute>" worked.  I managed to make the TOC two-column in the process, but I'm sure that something I can fix. Thanks for the help.

Logged
IF
Member

Posts: 65


« Reply #4 on: September 28, 2010, 11:56:21 AM »

I added the    <xsl:attribute name="column-count">2</xsl:attribute> lines
in this section of the file %AppData%SoftQuad\XMetaL Shared\DITA_OT\demo\xmfo\Customization\fo\xsl\xm_layout_masters_overrides.xsl

Note that I am not an expert and that I am learning by trial&error and reverse engineeering...

 <xsl:template
      match="fo:region-body[contains(parent::*/@master-name,'even')] | fo:region-body[contains(parent::*/@master-name,'last')]"
      mode="layout-masters-processing">
      <xsl:element name="fo:region-body">     
           <xsl:attribute name="column-count">2</xsl:attribute>
           <xsl:attribute name="margin-top"><xsl:value-of select="$xm.page.margin.top"/></xsl:attribute>
          <xsl:attribute name="margin-right"><xsl:value-of select="$xm.page.margin.inner"/></xsl:attribute>
          <xsl:attribute name="margin-bottom"><xsl:value-of select="$xm.page.margin.bottom"/></xsl:attribute>     
          <xsl:attribute name="margin-left"><xsl:value-of select="$xm.page.margin.outer"/></xsl:attribute>
      </xsl:element>
    </xsl:template>

    <xsl:template match="fo:region-before" mode="layout-masters-processing">
        <xsl:element name="{name()}">
            <xsl:attribute name="extent"><xsl:value-of select="$xm.page.margin.top"/></xsl:attribute>
            <xsl:attribute name="display-align">after</xsl:attribute>
            <xsl:attribute name="region-name"><xsl:value-of select="@region-name"/></xsl:attribute>
        </xsl:element>
    </xsl:template>
« Last Edit: September 28, 2010, 12:37:42 PM by IF » Logged
DITALearner
Member

Posts: 11


« Reply #5 on: September 28, 2010, 12:35:03 PM »

Thank you very much.

Just tried the solution and it worked fine.
Logged
DITALearner
Member

Posts: 11


« Reply #6 on: September 28, 2010, 01:38:29 PM »

Hi again,

Now that I have manage to get the two-column working in my document, would you tell me if you did manage to make yours one-column? If yes, please share with me the changes you made.

Thanks.
Logged
IF
Member

Posts: 65


« Reply #7 on: September 28, 2010, 02:03:28 PM »

Are you asking if I managed to make the TOC one column? If so, the answer is that I did not try to do that because I don't need a TOC for that document type.
Logged
DITALearner
Member

Posts: 11


« Reply #8 on: September 28, 2010, 02:20:04 PM »

Yes, I was asking if you managed to. In any case would you know the way to do it, if so would you mind sharing or at least a hint in that direction?

Thanks.
Logged
Pages: 1
Print
Jump to: