Dear Frank,

Oxygen uses the open source DITA Open Toolkit processor to publish DITA content to various output format.

First of all, the default DITA publishing does not have support for using embedded MathML equations in PDF and XHTML-based outputs.

In order to overcome this limitation we added a special

**mathml** plugin to the DITA Open Toolkit bundled with Oxygen:

**OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\mathml**
This plugin does two things:

1) It adds a new DITA specialization which allows you to create that

**Composite with MathML** file type.

2) It adds custom XSLT stylesheets which contribute to properly render the mathml equation in the output.

The DITA 1.3 standard which is planned to be released at the end of this year will have support of embedding MathML code directly in any kind of DITA topic, task, concept or anything else.

Please see some answers below:

How to change equation alignment from "left" to "centered"?

Right now there is no such a built-in possibility. You can probably try to set a special attribute on the equation like:

Code: Select all

```
<equation outputclass="center">
```

.........

and then via an XSLT customization you can match that particular element with that particular outputclass value and create the appropriate XSL-FO elements like:

Code: Select all

` <fo:block text-align="center">`

....

How to automatically assign numbers to selected equations?

Again this is not possible without additional XSLT customizations.

How to refer to these equations?

Probably like you did, assign an ID to the figure and then refer to that ID in other places.

I found that the <equation> element is a specialisation of the <fig> element, thus we can assign a title to the equation and a equation can be referred like a figure. But the result after rendering PDF looks figure-like not equation-like. How can i get a result like:

Einstein discoverd

E = m c² (11)

In equation (11) the letter c represents the vacuum light speed.

Again, not without a customization.

Furthermore, is there a way to omit the "mml:" prefix in "<mml:mrow>"?

In the DITA DTD specialization there is already a DITA element called

**mathml** which inside it includes the <math> element from the MathML namespace. Unfortunately the DTD is not namespace aware so we are forced to have a prefix for all mathml elements in the DITA content. Maybe by modifying the DTD specialization you could make that prefix be

**m:** instead of

**mml:** if you can insert that easier.

One more thing, as an alternative to having the mathml content embedded inside the topic, you can save it to a separate file and then refer to it using the DITA

**image** element, as if it would be an image like:

Code: Select all

`<fig id="fig_y5t_qvn_rs">`

<image placement="break" id="image_b4w_qvn_rs" href="test.mml" align="center"/>

</fig>

This works in the PDF output but does not work in the XHTML output because web browsers require the MathML equations to be embedded in the content.

Regards,

Radu