Page 1 of 1

Really really basic formatting question

Posted: Fri Oct 11, 2013 7:31 pm
by Ajoten
So I'm now in tears regarding this "transformation" thing. All info I can find is extremely confusing XSLT instructions that are beyond me... I just want the answer to questions like:

How do I change body text to a different font?

It can't possibly require anything more than

1. Open File X.
2. Change the <p> font attribute.

But that appears not to be the case.

Regards,
Andrew

Re: Really really basic formatting question

Posted: Mon Oct 14, 2013 12:25 pm
by sorin_ristache
Hello,

Changing a font in the output of a DITA transformation is not always as easy as in Author editing mode because the transformations are executed by DITA Open Toolkit and we have to conform to the DITA-OT customization rules. For what output type do you want to change the body font: DITA PDF, DITA Webhelp, DITA Windows Help, etc?

For example changing the body font in Webhelp output is as easy as in Author mode: just modify the font-family property for the body element in the following CSS selector in the file [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\css\webhelp_topic.css:

Code: Select all

body {
background-color:white;
font-family: arial, helvetica, sans-serif;
line-height:18px;
font-size:12px;
}

Regards,
Sorin

Re: Really really basic formatting question

Posted: Mon Oct 14, 2013 5:23 pm
by Ajoten
It was the PDF output I wanted to change. I was hoping there was either a GUI-based style editing tool, or at least an easily-identified XSL file that held all style information (something equivalent to a CSS file).

Re: Really really basic formatting question

Posted: Tue Oct 15, 2013 10:26 am
by sorin_ristache
For the PDF output the styles for the body element are set in the file [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\fo\attrs\commons-attr.xsl. You can set the font in one of the attribute sets called base-font or body.


Regards,
Sorin

Re: Really really basic formatting question

Posted: Tue Oct 15, 2013 4:12 pm
by Ajoten
Thanks, that's very helpful.

Is there any document that lists which XSL file does what (for all output types)? I also want to work out which file I edit to change the title page that's generated automatically (PDF and RTF).

Re: Really really basic formatting question

Posted: Wed Oct 16, 2013 10:21 am
by sorin_ristache
Unfortunately there is no list with all configurable properties and parameters of the DITA PDF transformation or the other DITA transformations. The customizable stylesheets are grouped usually in the same directory, for example the DITA-OT\plugins\org.dita.pdf2\cfg\fo\attrs one that I specified above, and also textual descriptions of the DITA parameters are provided on the Parameters tab of the dialog box for editing a DITA transformation.

Please look at these instructions in the Oxygen User Manual for customizing the front page of the DITA PDF output.


Regards,
Sorin