Page 1 of 1

How do I change the formatting of elements in the output

Posted: Mon Mar 18, 2013 8:17 pm
by OxUser
How do I change the formatting of elements in the output? For example, I want to change to size and font color of all the headings. I'd also like this change to apply to all of the topics contained in a DITA map, rather than to only one topic at a time.

Do I add a CSS file? If so, where do I add/refer to this in the DITA map?

Do I edit the existing oxygen xsl file?

Thanks for your help

Re: How do I change the formatting of elements in the output

Posted: Mon Mar 18, 2013 11:32 pm
by OxUser
I have created a CSS stylesheet with the desired formatting, but even if I add a link in the DITA map file (or in the individual topic files) to the CSS file, the output processing ignores my custom CSS file and instead uses the default stylesheet. As a result, my custom stylesheet is not applied and the output is not custom formated.

What do I need to edit to get the output processing to use my custom CSS? And if I require more than 1 CSS (say for a differnt department) how do I switch between them?

Thanks

Re: How do I change the formatting of elements in the output

Posted: Tue Mar 19, 2013 1:06 pm
by Radu
Hi,

I will assume you want this for XHTML-based output like WebHelp.
If you edit the transformation scenario in the Parameters tab you have two parameters:

args.copycss should be set to yes.
args.css should point to the custom CSS.

If you set these parameters, all generated HTML files will contain a link to the custom CSS which will also be copied to the output folder.

You can open one of the generated HTML files and see that the generated HTML elements contain by default class attributes which come from the original DITA elements from which they were generated. In your CSS you can match based on those @class attribute values.

Regards,
Radu