Customize image display for the note tag

Oxygen general issues.
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Customize image display for the note tag

Post by BogdanM777 »

Hi,

Is it possible to change the standard images for the note tag so that in function of the value of the importance attribute to display different images?
E.g. for default to display image1.jpg, for high to display image2.jpg, and for normal to display the image3.jpg at the left hand side of the note (instead of the pointing finger).
I know that in the ...plugins\org.dita.pdf2\cfg\common\artwork there are some images for the standard display, however I do not know which is the configuration file that is controlling their display.

Thank you
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

I managed to do that changing the images of the type attribute of the note tag.
The issue I have right now is how I can get rid of the text following the image.

Thank you.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Customize image display for the note tag

Post by Radu »

Hi Bogdan,

We had a topic in our user's manual about changing the note image:

http://www.oxygenxml.com/doc/ug-oxygen/ ... mages.html

In the same en.xml which can be overwritten by the PDF customization folder you have a variable like:

Code: Select all

<variable id="Note">Note</variable>
which you can set to have empty content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Thank you so much Radu.
I managed to change several types of <note> and now it is working very nicely for me.
The output is not so easy to make it exactly as one wishes, but it is getting there.
For some reason I did not receive the notification that you responded to my query, do you know why it would happen?
Thank you.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Customize image display for the note tag

Post by Radu »

Hi Bogdan,

I'm glad this works for you.
You have the checkbox "Notify me when a reply is posted" checked, right?
I received an email notification that you replied on the thread, so if it was a problem it should be fixed now.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Thank you so much Radu.
The request was clearly answered.
How can I close this?
Or it is not necessary to do that?
Costin
Posts: 829
Joined: Mon Dec 05, 2011 6:04 pm

Re: Customize image display for the note tag

Post by Costin »

Hello,

It is not necessary to close the topic.

We are happy that the solution works for you and feel free to contact us whenever you might need any other information.

Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

I love your customer service guys!
You are awesome!
Thank you!
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

I moved from the DITA-OT that I was having as stand-alone on another machine to the DITA-OT from the oXygen machine, and now all my customizations for images for the note element do not work anymore.
I copied the en.xml file from one machine to the other, and the path is correct inside the definition of the image, e.g. <variable id="warning Note Image Path">Configuration/OpenTopic/cfg/common/artwork/careful.png</variable> and right now it does not work anymore.
Before I was generating my pdf using a batch file having a DITA command: dita -i "D:/G4DS Documentation/en/dita_guide/g4ds.ditamap" -o "D:/G4DS Documentation/en/Output/html/usersguide" -f pdf, and now I generate it from oXygen, and where there were before the images I defined now there is an empty space.
I do not quite understand what I did wrong...
And I hoped that I had all the pdf customization behind me, but it looks that I need to tweak it some more.
Thank you.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Customize image display for the note tag

Post by Radu »

Hi Bogdan,

The external DITA OT installation you were using seems to be DITA Open Toolkit 2.0.
Oxygen comes with a bundled version of DITA Open Toolkit 1.8 (a slightly older but yet more stable version of the DITA Open Toolkit). But I'm not sure the version mismatch would explain the problem.

Also, Oxygen does not force you to use a certain DITA Open Toolkit (the one which comes with it for example). So you can configure the Oxygen transformations to use your customized DITA OT installation:

http://www.oxygenxml.com/doc/versions/1 ... ta-ot.html

For example we sometimes advice our users who use version control to commit the customized version of DITA Open Toolkit along with their project and use that customized DITA Open Toolkit to produce the output from Oxygen (instead of the bundled one).

As I previously told you, the PDF output can either be customized by using a separate located customization folder or by implementing a DITA Open Toolkit plugin. If you did this, then using the customizations with another DITA Open Toolkit should be easier.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Hi Radu,
Sorry to get back to you with this again.
I wanted to use your DITA-OT because you have some very nice plugins, and I wanted to take advantage of them.
We tried to just copy the plugins directory to our DITA-OT, and it did not work, so we copied everything.
As you were saying in your response, I do not think either that what I am experiencing is an issue of version, because something else I am experiencing is that I cannot use my batch file I was using before for the pdf build.
It throws me an error message as I use your DITA-OT, and I do not understand why as the folder structure is similar.
My batch file has only one line: dita -i "D:/G4DS Documentation/en/dita_guide/g4ds.ditamap" -o "D:/G4DS Documentation/en/Output/html/usersguide" -f pdf
It was working previous to switching to your DITA-OT, and my note tag issue was solved before the switch, so I was wondering if there is not something else different with your DITA-OT...
Tnank you for your support.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Customize image display for the note tag

Post by Radu »

Hi Bogdan,
I wanted to use your DITA-OT because you have some very nice plugins, and I wanted to take advantage of them.
You can install extra plugins in a DITA Open Toolkit installation. But the plugins need to be compatible with that installation. As you used the newest DITA OT 2.0 as the external DITA OT, most available plugins are not yet compatible with it. But you can also download and use DITA Open Toolkit 1.8.5:

https://sourceforge.net/projects/dita-o ... kit%201.8/

or copy the DITA Open Toolkit 1.8.5 which comes with Oxygen to an external location:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT
It throws me an error message as I use your DITA-OT, and I do not understand why as the folder structure is similar.
If you can send us an email (using our technical support email address) with the entire output received from the DITA OT ANT process (the Oxygen DITA OT console view should contain it after the transformation fails) I could try to look into that.
Also please send precise steps about the modifications you made to it.
My batch file has only one line: dita -i "D:/G4DS Documentation/en/dita_guide/g4ds.ditamap" -o "D:/G4DS Documentation/en/Output/html/usersguide" -f pdf
This particular mode of starting the processing from the command line did not exist before DITA OT 2.0 was released.
So if you are using DITA OT 1.8 (the one bundled with Oxygen for example) you have to use the previous way of running DITA OT builds from the command line:

http://www.dita-ot.org/1.8/readme/DITA-javacmd.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Hi Radu,
Thank you again for all your help.
There was somebody at the HQ who changed something in the DITA-OT and the changes did not update properly via the svn, and right now, as the svn update ran properly, everything is back to normal, the pdf transformation is running properly and the pdf is back to the shape I managed to achieve.
I would have another question though related also to the icons (images) used for different types of note this time in webhelp, not in pdf.
Is there also a file where all the picture references can be modified, or is it a different approach?
Thank you.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Customize image display for the note tag

Post by bogdan_cercelaru »

Hello Bogdan,

To change the icons (images) used for different types of note in webhelp you need to edit the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\css\webhelp_topic.css and modify "background-image" property to point to your custom image file. CSS selectors for different types of note are located between lines 363 and 435.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Thank you very much Bogdan.
I will give it a shot, and let you know how it goes.
Something else, I saw the webhelp and it looks very nice, however if I want to change the outlook in order to fit our company particularities (logo, colours, ...) there is not so much possible using the predefined skins available. Also the predefined skins are not applicable the webhelp as it is read-only, but to duplicates of it.
If I want to "revamp" the webhelp, are there any guidelines as which are the css files to modify?
Thank you.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Customize image display for the note tag

Post by bogdan_cercelaru »

Hi Bogdan,

To style your WebHelp output, you can try to use the WebHelp Skin Builder tool.

Please let me know if you need any further assistance.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Hi Bogdan,
Thank you for the suggestion, however I tried to use it, and I managed to make a skin that is acceptable for our need. The tool is very sleek. I like it.
One issue I found is that when trying to set a logo image, it does not take it as it should. I tried several formats for the URL, and it did not work. Also, the skin I created I cannot apply it to the webhelp I have available in oXygen, but to a duplicate.
An other thing, I replaced the images where you told me, and they are too big for the table, i.e. the table does not adjust itself to accommodate the images, but the images are truncated to accommodate the table.
Also, one table I have, I configured it to have a size that I see it very nicely in oXygen, however when I generate the webhelp the size is very small.
I have a lot of "problems", but I am happy to have you guys to help me.
Thank you.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Customize image display for the note tag

Post by bogdan_cercelaru »

Hello,

To set a logo using WebHelp Skin Builder, you need to specify an URL that points to an online image (it must be located on an HTTP server). It's not recommended to edit the built-in scenarios because you'll loose the changes when you will upgrade to the latest Oxygen version available. To apply the skin that you created you need to duplicate the built-in transformation scenario and edit it to suite your needs. Also, you can extend the DITA Map framework and edit the "DITA Map WebHelp" transformation scenario.

Regarding the images used for different types of notes, it's recommended to have a maximum size of 20px*20px. Otherwise you can set the background-size attribute so that your images will be scaled to fit inside the content area. e.g.: background-size:contain;
Note that the WebHelp output styles are different than styles applied in the Oxygen.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Customize image display for the note tag

Post by BogdanM777 »

Thank you very much Bogdan,
I will see how this works for me.
Post Reply