The Sun Viewer

 

 

The issues in this topic are only applicable to the Sun viewer. That said, the solutions can be used to change the appearance of the help when viewed through the Oracle viewer if for some reason you cannot achieve the appearance you want from RoboHelp.

 

Let's first of all remind ourselves of the default appearance viewing the same topic in Internet Explorer and in the Sun viewer.

Internet Explorer

Sun Viewer

You may also wonder if there are other bear-traps waiting for you. In RoboHelp go the Help menu, click Contents and Index. In the index look for JavaHelp and then limitations. Be ready to scroll down the list!

Unless you are happy with the appearance, you will want to know how you can improve it and that is covered below.The end result will quite an improvement, click here to see it. In the example I have created something like the old Lotus Notes twisties where the icon points right for a closed book and points down for an open book.

Contrary to what was said in earlier versions of this topic, it is possible to apply the changes described below to the compressed form of javahelp. The reason is that the compressed form is contained in a .JAR file and that is effectively a winzip file for our purposes.

Right click on any .JAR file, select Open With and point to WinZip. You will now see all the files you need to edit so just extract those files, make the changes and put the changed files back into the jar file.

Font Size

The same style sheet was used to produce the help shown in the screenshots of the default appearance and you have seen the difference. I found it was necessary to add 2 point sizes to every style so that the topic retained the appearance required.

You have two options:

  1. Adjust your style sheet but bear in mind everything will look too big in the RoboHelp WYSIWYG viewer. You can overcome that to some extent by viewing at 90% magnification instead of 100% but your graphics will not appear correctly while you are working.
  2. Create two versions of the style sheet. Attach one to topics while you work, then change to the other when you publish.

Bullet Points

The only way I can see of getting decent bullet points is to create a table with no borders and a narrow first column with a graphic in each row. This is what I have done below and it will appear the same in the Sun javahelp viewer. That's the good news. The bad news is that it causes problems if you define your cell borders in the style sheet as described in the next section.

This is sample text. This is sample text. This is sample text. This is sample text. This is sample text. This is sample text.
This is sample text. This is sample text. This is sample text. This is sample text. This is sample text. This is sample text.

Tables

These will not be displayed as they appear in the RoboHelp editor. You can however define table and cell borders in your style sheet and they will display. The results I got were acceptable albeit different to the original design but you may be able to do better with a bit more effort.

Find or create a Table and a TD definition in your style sheet and enter your requirements. It may be something like this.

table {
border: solid; border-width: 1px; border-color: Blue;
}

td {
border: solid; border-width: 1px; border-color: Blue;
}

That will apply to ALL tables in your topics so you may want to create some classes such as the one below to have tables with red borders around the cells. The borders will display in the finished topic but you will not see them in the RoboHelp editor.

table.red {
border: solid; border-width: 1px; border-color: Red;
}

td.red {
border: solid; border-width: 1px; border-color: Red;
}

The Navigation Pane (TOC)

So how did I get the navigation pane to look better. You need to edit two files, every time you publish. If the TOC has not changed and you have not added any new topics, you might like to keep copies and substitute them after publishing.

your_projectname_map.xml

Open this file in a text editor such as Notepad and find the version tag near the beginning.

<map version="1.0">

  <mapID target="main_topic_one_htm" url="main/topic_one.htm" />

 

Add the lines in blue showing the names of your graphics. It is probably best that they are in the same folder as the XML file but if not the relative path will be required.

<map version="1.0">

<mapID target="categoryopenimage" url=open.gif />

<mapID target="categoryclosedimage" url=closed.gif />

<mapID target="topicimage" url=bullet.gif />

  <mapID target="main_topic_one_htm" url="main/topic_one.htm" />

 

your_projectname_toc.xml

Changing the images

Open this file in a text editor such as Notepad and find the version tag near the beginning.

<toc version="2.0">

 <tocitem text="Topic One" target="main_topic_one_htm" />

 

Add the text in blue to the <toc version="2.0"> tag so that it looks like this but on one line.

<toc version="2.0" categoryopenimage="categoryopenimage"  categoryclosedimage="categoryclosedimage" topicimage="topicimage">

 <tocitem text="Topic One" target="main_topic_one_htm" />

 

The images will then be those defined in the your_projectname_map.xml file.

The display of books

The file contains the details of the table of contents in the following form.

 <tocitem text="Book">

  <tocitem text="New Topic 1" target="folder_1_new_topic_1_htm" />

  <tocitem text="New Topic 2" target="folder_1_new_topic_2_htm" />

 

 The first line is the name of the book and each subsequent line is for the topics until the </tocitem> tag is reached.

For each book that you do not want open when the help is started, add expand="false" to the title tag so that it looks like this.

 <tocitem text="Book" expand="false">

  <tocitem text="New Topic 1" target="folder_1_new_topic_1_htm" />

  <tocitem text="New Topic 2" target="folder_1_new_topic_2_htm" />

 

If you want some open and some closed, try just entering the "false" values but if it does not work properly, simply add expand="true" to the other titles.

Back to the main topic

Take stock of the fact that these steps are only applicable if you are using the Sun viewer. Quite a bit of additional work.

Click here to return to the main topic.

Donations

If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.

Topic Revisions

Date

Changes to this page

06 Feb 2017

Topic reviewed. No changes made. Any screenshots may differ in your version of RoboHelp but the functionality is the same.

12 Apr 2005

Updated to cover editing compressed javahelp.

10 Apr 2005

This topic separated out from the main JavaHelp topic.