Questions about 19.1 Floating images
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 24
- Joined: Tue Apr 15, 2014 6:43 pm
Questions about 19.1 Floating images
Hello,
I've had a look at the new features of 19.1 and the possibility to define floating images seems great. But I haven't found much information about how it works.
I currently have custom plugins to generate PDF files in various formats. In all my plugins, I'm already using the outputclass on many images to make sure they have all the same width (and easily modify them if needed). As far as I know, the outputclass attribute is not multi-value attributes, so here are my questions:
- First, when using a custom plug-in (let's say with no outputclass defined on images), would the new feature work?
- When using a custom plug-in with outputclass already defined, what happens? Is it possible to keep both behaviors (the float behavior and the one defined in the custom plug-in)? Would there be a way to benefit from this feature or to somehow integrate it in my plug-in?
- Last but not least, how does it work if the image is in step>info>fig? How does the text wrap? I would expect the top of the floating image to be aligned with the content of the cmd element and a "clear" so that the following step does not wrap around the floating image of the previous step.
Thanks & regards,
Annette Bouillin
I've had a look at the new features of 19.1 and the possibility to define floating images seems great. But I haven't found much information about how it works.
I currently have custom plugins to generate PDF files in various formats. In all my plugins, I'm already using the outputclass on many images to make sure they have all the same width (and easily modify them if needed). As far as I know, the outputclass attribute is not multi-value attributes, so here are my questions:
- First, when using a custom plug-in (let's say with no outputclass defined on images), would the new feature work?
- When using a custom plug-in with outputclass already defined, what happens? Is it possible to keep both behaviors (the float behavior and the one defined in the custom plug-in)? Would there be a way to benefit from this feature or to somehow integrate it in my plug-in?
- Last but not least, how does it work if the image is in step>info>fig? How does the text wrap? I would expect the top of the floating image to be aligned with the content of the cmd element and a "clear" so that the following step does not wrap around the floating image of the previous step.
Thanks & regards,
Annette Bouillin
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Questions about 19.1 Floating images
Hi Annette,
Please see some answers below:
So if you have outputclass="float-right auto-width" set on the image and the XSLT processing splits the value in tokens and recognizes each of the tokens, using their values, setting multiple values works.
https://github.com/oxygenxml/dita-image-float
As you see the XSLT for PDF output:
https://github.com/oxygenxml/dita-image ... stomFO.xsl
matches images for which the @outputclass attribute contains one of two values.
About the "clear" attribute somehow specified on other elements, we had a request about it:
https://github.com/oxygenxml/dita-image-float/issues/2
I did not implement it because the Apache FOP default processor does not have support for "clear".
The commercial ones (XEP, Antenna House) have it as far as I know.
Regards,
Radu
Please see some answers below:
The outputclass attribute receives a string value. How that value is interpreted is up to the XSLT processing.As far as I know, the outputclass attribute is not multi-value attributes
So if you have outputclass="float-right auto-width" set on the image and the XSLT processing splits the value in tokens and recognizes each of the tokens, using their values, setting multiple values works.
The floating capabilities are available as a DITA OT plugin. Besides bundling the plugin with Oxygen's bundled DITA Open Toolkit, it is also available as an open source plugin on GitHub:- First, when using a custom plug-in (let's say with no outputclass defined on images), would the new feature work?
https://github.com/oxygenxml/dita-image-float
As you see the XSLT for PDF output:
https://github.com/oxygenxml/dita-image ... stomFO.xsl
matches images for which the @outputclass attribute contains one of two values.
If your custom PDF plugin also matches the same xsl:template as ours, only one of the plugins will win. So you probably can enhance the XSLT code for your plugin to also do what our plugin does when looking at the @outputclass attribute value set on the image..- When using a custom plug-in with outputclass already defined, what happens? Is it possible to keep both behaviors (the float behavior and the one defined in the custom plug-in)? Would there be a way to benefit from this feature or to somehow integrate it in my plug-in?
I have no idea but you can try and find out. The default PDF processor bundled with Oxygen (Apache FOP) does not have very good support for floating images, but I only testing floating an image inside a paragraph and it looked nice.- Last but not least, how does it work if the image is in step>info>fig? How does the text wrap? I would expect the top of the floating image to be aligned with the content of the cmd element and a "clear" so that the following step does not wrap around the floating image of the previous step.
About the "clear" attribute somehow specified on other elements, we had a request about it:
https://github.com/oxygenxml/dita-image-float/issues/2
I did not implement it because the Apache FOP default processor does not have support for "clear".
The commercial ones (XEP, Antenna House) have it as far as I know.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Tue Apr 15, 2014 6:43 pm
Re: Questions about 19.1 Floating images
Hi Radu,
Thanks for the details!
I'll test the feature and have a look at your code. I'm using XEP and made tests for floats in steps, but eventually did not use it. I'll dig a little to remember what I did and may post the code here if it is of interest for someone.
It's good to know that we can enter multiple values in the outputclass attribute, I'll try it!
Best regards,
Annette
Thanks for the details!
I'll test the feature and have a look at your code. I'm using XEP and made tests for floats in steps, but eventually did not use it. I'll dig a little to remember what I did and may post the code here if it is of interest for someone.
It's good to know that we can enter multiple values in the outputclass attribute, I'll try it!
Best regards,
Annette
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service