Is there a limit to the number of heading levels for a PDF? #PDF


clum@...
 

We have merged several user manuals into a large DITA project that is used to output both WebHelp and PDF. For the PDF, we are using XSL-FO. 

Because there is so much material, the hierarchy runs quite deep--7 levels. We have customized our commons-attr.xsl to define the heading styles for six levels. Since the 7th level is not define, it comes out as plain body text in the PDF, which makes it all but invisible. So I went into commons-attr.xsl to define the style for a 7th level. It looks like this:

    <xsl:attribute-set name="topic.topic.topic.topic.topic.topic.topic.title"
        use-attribute-sets="base-font common.title">
        <xsl:attribute name="space-before">0.25in</xsl:attribute>
        <xsl:attribute name="space-after">0.1in</xsl:attribute>
        <xsl:attribute name="font-size">12pt</xsl:attribute>
        <xsl:attribute name="line-height">18pt</xsl:attribute>
        <xsl:attribute name="font-family">OpenSansSemibold</xsl:attribute>
        <xsl:attribute name="start-indent">0pt</xsl:attribute>
        <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
    </xsl:attribute-set>

However when I compile the PDF, the formatting shown here is not applied to my 7th level--it still comes out in plain text. All the formatting for the first six levels are correct.

Is there a limit to the number of heading levels that I can define for a PDF? 


Zoë Lawson
 

I’m replying from my phone, so can’t dig in, so did you make the similar change in the xsl file that calls the attribute set you defined?

Each style generally has two parts:
  •  a template in the not *-attr.xsl file that sets up the fo:blocks that call attribute sets
  • An attribute set in the *_attr.xsl file that defines the styles. 
Apologies I can’t remember the folder names. I’m going from memory. 

HTH,

Zoë Lawson


From: main@dita-users.groups.io <main@dita-users.groups.io> on behalf of clum@... <clum@...>
Sent: Tuesday, April 13, 2021 5:11:29 PM
To: main@dita-users.groups.io <main@dita-users.groups.io>
Subject: [dita-users] Is there a limit to the number of heading levels for a PDF? #PDF
 
We have merged several user manuals into a large DITA project that is used to output both WebHelp and PDF. For the PDF, we are using XSL-FO. 

Because there is so much material, the hierarchy runs quite deep--7 levels. We have customized our commons-attr.xsl to define the heading styles for six levels. Since the 7th level is not define, it comes out as plain body text in the PDF, which makes it all but invisible. So I went into commons-attr.xsl to define the style for a 7th level. It looks like this:

    <xsl:attribute-set name="topic.topic.topic.topic.topic.topic.topic.title"
        use-attribute-sets="base-font common.title">
        <xsl:attribute name="space-before">0.25in</xsl:attribute>
        <xsl:attribute name="space-after">0.1in</xsl:attribute>
        <xsl:attribute name="font-size">12pt</xsl:attribute>
        <xsl:attribute name="line-height">18pt</xsl:attribute>
        <xsl:attribute name="font-family">OpenSansSemibold</xsl:attribute>
        <xsl:attribute name="start-indent">0pt</xsl:attribute>
        <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
    </xsl:attribute-set>

However when I compile the PDF, the formatting shown here is not applied to my 7th level--it still comes out in plain text. All the formatting for the first six levels are correct.

Is there a limit to the number of heading levels that I can define for a PDF? 


Aliza Merzel
 

The topic title styles are not applied directly with xsl:use-attribute-sets

They are applied with a xsl:call-template name=”new-attr-set-reflection

 

So you need to add your style to:

plugins\org.dita.pdf2\xsl\common\attr-set-reflection.xsl

 

Aliza Merzel

Senior Developer and XML Specialist

Phone: +972 8-976-0323

Email: alizam@...

 

Connect with us:  twitter.png   linked-in.png  youtube.png

 

Logo-for-email-signatures - smaller

 

From: main@dita-users.groups.io [mailto:main@dita-users.groups.io] On Behalf Of Zoë Lawson via groups.io
Sent: Wednesday, April 14, 2021 5:10 AM
To: main@dita-users.groups.io
Subject: Re: [dita-users] Is there a limit to the number of heading levels for a PDF? #PDF

 

I’m replying from my phone, so can’t dig in, so did you make the similar change in the xsl file that calls the attribute set you defined?

 

Each style generally has two parts:

  •  a template in the not *-attr.xsl file that sets up the fo:blocks that call attribute sets
  • An attribute set in the *_attr.xsl file that defines the styles. 

Apologies I can’t remember the folder names. I’m going from memory. 

 

HTH,

 

Zoë Lawson


From: main@dita-users.groups.io <main@dita-users.groups.io> on behalf of clum@... <clum@...>
Sent: Tuesday, April 13, 2021 5:11:29 PM
To: main@dita-users.groups.io <main@dita-users.groups.io>
Subject: [dita-users] Is there a limit to the number of heading levels for a PDF? #PDF

 

We have merged several user manuals into a large DITA project that is used to output both WebHelp and PDF. For the PDF, we are using XSL-FO. 

Because there is so much material, the hierarchy runs quite deep--7 levels. We have customized our commons-attr.xsl to define the heading styles for six levels. Since the 7th level is not define, it comes out as plain body text in the PDF, which makes it all but invisible. So I went into commons-attr.xsl to define the style for a 7th level. It looks like this:


    <xsl:attribute-set name="topic.topic.topic.topic.topic.topic.topic.title"

        use-attribute-sets="base-font common.title">

        <xsl:attribute name="space-before">0.25in</xsl:attribute>

        <xsl:attribute name="space-after">0.1in</xsl:attribute>

        <xsl:attribute name="font-size">12pt</xsl:attribute>

        <xsl:attribute name="line-height">18pt</xsl:attribute>

        <xsl:attribute name="font-family">OpenSansSemibold</xsl:attribute>

        <xsl:attribute name="start-indent">0pt</xsl:attribute>

        <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>

    </xsl:attribute-set>


However when I compile the PDF, the formatting shown here is not applied to my 7th level--it still comes out in plain text. All the formatting for the first six levels are correct.

Is there a limit to the number of heading levels that I can define for a PDF?