Page 1 of 1
svg default parameters
Posted: Wed Jan 09, 2013 1:07 am
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
Re: svg default parameters
Posted: Wed Jan 09, 2013 9:30 am
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
Re: svg default parameters
Posted: Fri Jan 11, 2013 12:52 am
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
Re: svg default parameters
Posted: Fri Jan 11, 2013 3:11 pm
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:
Regards,
Radu
Re: svg default parameters
Posted: Fri Jan 11, 2013 3:20 pm
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