Second line of heading not aligned

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

Second line of heading not aligned

Mon Jul 04, 2016 10:50 pm

We sometimes have long task titles, and when we generate them they appear on 2 lines. This is fine, but the second line is not aligned with the first one.

I just can't figure out where to fix this.

This is my xsl for the second
[Codebox=]
<xsl:attribute-set name="topic.topic.title" use-attribute-sets="common.title">
<xsl:attribute name="font-family">Sans</xsl:attribute>
<xsl:attribute name="font">Open Sans</xsl:attribute>
<xsl:attribute name="space-before">0pt</xsl:attribute>
<xsl:attribute name="space-after">0pt</xsl:attribute>
<xsl:attribute name="font-size">16pt</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
<xsl:attribute name="padding-top">30pt</xsl:attribute> <!--Media5-->
<xsl:attribute name="padding-bottom">18pt</xsl:attribute>
<xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
<xsl:attribute name="color">#1f7cd3</xsl:attribute>
<xsl:attribute name="line-height">120%</xsl:attribute>[/Codebox]

[Codebox=] <xsl:attribute-set name="common.title">
<xsl:attribute name="font-family">Sans</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
<xsl:attribute name="font-size">13pt</xsl:attribute>
<xsl:attribute name="alignment">justify</xsl:attribute>
<xsl:attribute name="color">#213368</xsl:attribute>
</xsl:attribute-set>[/Codebox]

Any idea?

Regards
radu_pisoi
Posts: 327
Location: Craiova

Re: Second line of heading not aligned

Wed Jul 06, 2016 4:52 pm

Hi,

I cannot reproduce your problem with oXygen 18. I've tested with both DITA-OT 1.8 and DITA-OT2.x that comes bundled with oXygen.

Do you have a PDF customization?
If yes, maybe the problem is in your customization. To clarify this, you can use the default 'DITA Map PDF' transformation and check if the title's second line is aligned correctly.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Boreas
Posts: 82

Re: Second line of heading not aligned

Tue Jul 18, 2017 2:08 pm

I realized that had never solved this problem with my titles.

Yes we do use a plugin.
I tried publishing the document with the Oxygen's PDF scenario and alignment is perfect. So it is definitely something in my plugin.
I am not even sure If it is a problem from the attributes or xsl folder. Any suggestion where to start looking?

Regards
radu_pisoi
Posts: 327
Location: Craiova

Re: Second line of heading not aligned

Wed Jul 19, 2017 2:51 pm

Hi,

A solution is to make a diff between the topic.fo temporary files produces by the default PDF transformation and the one customized by you.

The topic.fo file is an temporary file generated in the temp folder(topic.fo file represents the input for the XSL-FO processor). The temp folder is deleted at the end of the transformation by default, but you can set the clean.temp parameter to avoid this.

After you discover the difference, you can search for it in your customization.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Boreas
Posts: 82

Re: Second line of heading not aligned

Fri Jul 21, 2017 4:05 pm

So checked the differences between both files, but could not pinpoint a difference that fixed the problem .
What I am realising it is not the second line that is not aligned, but rather all my headings that are not aligned. When the title is long, the second line is in fact well aligned with the rest.

So
the section.title aligns properly
the rel-links aligns properly
the x.topic.title is slightly indented.

I searched every indent, start, borders, and any other possible combination, played around with them with no success.
I tried using the commons file of Oxygen in my plugin, but alignment remained wrong.

I checked in the Dita to print book, and it seems that my formatting instructions (attributes file) are also ok

I will continue looking.
Boreas
Posts: 82

Re: Second line of heading not aligned

Thu Aug 03, 2017 6:45 pm

Found it.
in the customs.xsl file, in the conditional numbering instructions I had an extra space added <xsl:text> </xsl:text>
Of course I have no idea why this was there. The minute I removed it, bingo.


[Codebox=] <fo:inline>
<xsl:choose>
<xsl:when test="//othermeta[@name='ChapterNumbering'][@content='yes']">
<xsl:for-each select="$mapTopics[1]">
<xsl:choose>
<xsl:when test="ancestor-or-self::*[contains(@class, ' bookmap/frontmatter ') or contains(@class, ' bookmap/backmatter ')]" />
<xsl:when test="ancestor-or-self::*[contains(@class, ' bookmap/appendix ')]">
<xsl:number count="*[contains(@class, ' map/topicref ')] [ancestor-or-self::*[contains(@class, ' bookmap/appendix ')]]" format="A.1.1" level="multiple" />
</xsl:when>
<xsl:otherwise>
<xsl:number count="*[contains(@class, ' map/topicref ')] [not(ancestor-or-self::*[contains(@class, ' bookmap/frontmatter ')])]" format="1.1" level="multiple"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:inline>
<xsl:text> </xsl:text>
<xsl:apply-templates />[/Codebox]

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 1 guest