svg default parameters

Oxygen general issues.
bulbab
Posts: 4
Joined: Wed Jan 09, 2013 1:03 am

svg default parameters

Post by bulbab »

Hi,

I have xml text with embedded svg containing subscripts. These subscripts are too big, too low and too far from the preceding text.

Is there a way to change the default rendering parameters of svg in oXygen ?

Best regards,
Bulbab
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: svg default parameters

Post by Radu »

Hi,

Do you have a problem with how SVG images are rendered when editing in Oxygen (in the Author mode) or with the way in which they appear in the published output (PDF, XHTML, etc)?
Could you give us some sample files? You can attach them to an email for support@oxygenxml.com.

In order to render SVG images when editing, Oxygen uses the open-source Batik library.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bulbab
Posts: 4
Joined: Wed Jan 09, 2013 1:03 am

Re: svg default parameters

Post by bulbab »

Hi Radu,

I have a problem with how SVG images are rendered when editing in Oxygen in the Author mode.

I just send a sample file to support@oxygenxml.com.

My point is : is there a way to set Batik's default values ?

Best regards,
Bulbab
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: svg default parameters

Post by Radu »

Hi Bulbab,

Thanks for the samples.

So your complaint is about how the visual Author mode in Oxygen renders the images, right?
The SVG images embedded in the Docbook XML document already have fonts specified in them.
I opened the SVG images rendered in the Oxygen Author mode in Inkscape (an open source SVG editor) and they look identical. So Batik renders them OK.
It's tricky to vertically align an image so that it perfectly flows with the surrounding text. I see that you have set valign="middle" to the second image, Oxygen does not yet consider this attribute when rendering XML content in the Author mode. We'll see if we can improve on this.

As a hint, why don't you use the Docbook way of building subscripts and superscripts instead of referencing inline images?
This would be something like:

Code: Select all

k<subscript>i</subscript>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: svg default parameters

Post by Radu »

Related to my previous content:
I see that you have set valign="middle" to the second image, Oxygen does not yet consider this attribute when rendering XML content in the Author mode. We'll see if we can improve on this.
You can edit this CSS (used to render Docbook content in the Author visual editing page):

OXYGEN_INSTALL_DIR/frameworks/docbook/css/docbook.css

and add the following CSS selectors to it:

Code: Select all

graphic[valign=bottom],
inlinegraphic[valign=bottom],
imagedata[valign=bottom]{
vertical-align:bottom;
}

graphic[valign=middle],
inlinegraphic[valign=middle],
imagedata[valign=middle]{
vertical-align:middle;
}

graphic[valign=top],
inlinegraphic[valign=top],
imagedata[valign=top]{
vertical-align:middle;
}
I will also add this modification on our side for the next Oxygen release.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply