Page 1 of 1

xref formatting problem

Posted: Wed May 11, 2016 4:38 pm
by Boreas
I am trying to give a special font to my xref and related links output in PDF

I found where to do the formatting. I used odd colors to clearly see the changes and not get mixed up.
My default font is Open Sans.

in commons-attr.xsl
[Codebox=]
<xsl:attribute-set name="common.link">
<xsl:attribute name="color">green</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-size">10pt</xsl:attribute>
</xsl:attribute-set>
[/Codebox]

in links-attr.xsl

[Codebox=]
<xsl:attribute-set name="xref" use-attribute-sets="common.link">
<xsl:attribute name="color">pink</xsl:attribute>
<xsl:attribute name="font-size">10pt</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="link__page" >
<xsl:attribute name="color">orange</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-size">10pt</xsl:attribute>
</xsl:attribute-set>
[/Codebox]

The result is
related links are in green, Helvetica with page number in orange Open Sans
xref are in pink, Open Sans with page number in orange Open sans.


I want my xref to be green Helvetica. If I remove the color definition in <xsl:attribute-set name="xref" I get the green color, but I can't figure how to pick up that Helvetica font.
I tried forcing Helvetica in the xref, with <xsl:attribute name="font">Helvetica</xsl:attribute> with no success.

My font mappings includes Helvetica.

any idea where to look?

Regards
Carole

There is

Re: xref formatting problem

Posted: Thu May 12, 2016 11:05 am
by radu_pisoi
Hi Carole,
Boreas wrote:I want my xref to be green Helvetica. If I remove the color definition in <xsl:attribute-set name="xref" I get the green color, but I can't figure how to pick up that Helvetica font.
I tried forcing Helvetica in the xref, with <xsl:attribute name="font">Helvetica</xsl:attribute> with no success.
I think that the problem is you use the 'font' instead of the 'font-family' property. The value specified in the 'font-family' property is handled as a logical font and it is expanded to a physical font in the 'DITA-OT\plugins\org.dita.pdf2\xsl\fo\i18n-postprocess.xsl' stylesheet.