Page 1 of 1

Change the font color

Posted: Tue Jun 10, 2014 2:33 pm
by Le Basque
Hi,

I want to know if there is an attribute to change the color of text without modifying the stylesheet

thank you

Re: Change the font color

Posted: Tue Jun 10, 2014 4:55 pm
by sorin_ristache
Hi,

In what output do you want to set a text color? Is it DITA PDF output? If yes, you have to add a color attribute for the DITA element that you want to set the color. For example to set a green color for the text that comes from DITA codeblock elements you have to add the following:

Code: Select all

  <xsl:attribute name="color">rgb(0, 250, 0)</xsl:attribute>
in the attribute set with the attribute name="codeblock" in the following file, or in the customized version of the following file if you set the customization.dir parameter in your DITA PDF transformation:

Code: Select all

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\fo\attrs\pr-domain-attr.xsl

Regards,
Sorin