Really really basic formatting question

Ajoten
Posts: 3
Joined: Fri Oct 11, 2013 7:25 pm

Really really basic formatting question

Post by Ajoten » Fri Oct 11, 2013 7:31 pm

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

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Really really basic formatting question

Post by sorin_ristache » Mon Oct 14, 2013 12:25 pm

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

Ajoten
Posts: 3
Joined: Fri Oct 11, 2013 7:25 pm

Re: Really really basic formatting question

Post by Ajoten » Mon Oct 14, 2013 5:23 pm

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).

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Really really basic formatting question

Post by sorin_ristache » Tue Oct 15, 2013 10:26 am

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

Ajoten
Posts: 3
Joined: Fri Oct 11, 2013 7:25 pm

Re: Really really basic formatting question

Post by Ajoten » Tue Oct 15, 2013 4:12 pm

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).

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Really really basic formatting question

Post by sorin_ristache » Wed Oct 16, 2013 10:21 am

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

Post Reply