Lists - Upgrading to RoboHelp 8 or above

 

 

What's covered?

Fixing lists after converting a project from RoboHelp 7 or earlier to RoboHelp 8 or above.

Introduction

There are many forum posts covering problems with lists after upgrading to RoboHelp 8. These stem from lists having been created using paragraph styles in earlier versions instead of list styles. This topic explains what you need to do. There is also good information on Willam van Weelden's site.

Once you have upgraded from RoboHelp 7 or earlier and fixed your lists, it will not be necessary to repeat the exercise on future upgrades.

Background

First it is necessary to see how your lists may go wrong when you upgrade. Here's one example. Note that this may not be seen in the Design Editor, you need to check both Preview and compiled / generated help in whatever browsers you support.

So what changed? Before RoboHelp 8, RoboHelp wrote the margin definition in the CSS in the P classes, not the LI classes. Then it wrote the HTML as something like <li class="p-ListBullet"><p class="ListBullet">. That was OK then and the list displayed with the required margin between the edge of the page and the bullet or number. That no longer works.

Unless you select the Convert HTML Edited Topics to HTML option in Tools > Options, the output will be XHTML and that applies much stricter rules. The correct way to create lists is via the LI tag or an LI class where all your style properties are defined. In particular the type of bullet or numbering needs to be described in the LI tag or an LI class. Some properties can be in the the LI or P tag or their classes so you will need to experiment a little but that's another matter that is covered belos in "Cleaning up old CSS files produced by RoboHelp". Right now we are focussed on getting your old CSS styles working.

Internet Explorer

If you only support IE, the quick and dirty way to fix things is to tick the Convert HTML Edited Topics to HTML option. In most cases that will correct things in IE.

If you do need to generate XHTML output, then you should still be OK provided the case of the list style in the topic matches the case of the style in the CSS.

This is an example of the CSS from an earlier version of RoboHelp.

P.ListBullet {
list-style: square;
margin-left: -10pt;
}
LI.p-ListBullet {
list-style: square;
}

If the LI class in your CSS is written as P-ListBullet (note the case P) then you will likely have problems such as bullets within a numbered list becoming numbered items. Correcting the case with a multi-file find and replace tool should fix that. Do back up first.

If you find the "p-" part in uppercase in some or all topics, a script is available to amend all instances to lowercase. The case then needs to be matched in the CSS by editing it in a text editor.

Firefox

Things are rather different in Firefox.

Whether or not you tick the Convert HTML Edited Topics to HTML option, if the case in the topic does not match the case in the CSS, your display will likely be incorrect. See the IE section above to match the case.

If you do tick the Convert HTML Edited Topics to HTML option, you may find things are OK provided you do not have a margin defined in the P tag or class. The margin must be defined in the LI tag or class.

Amending Your CSS

Most likely your problems are with indentation. In RoboHelp 8 you need to access the style pod.

  1. Click Format > Styles
  2. Select the paragraph class for the list you want to edit by selecting Paragraph and Character Styles from the dropdown.



  3. Right click the style and select Edit to see the definition of the style. Note the indent is set to -10pt. Initially set that to 0pt.



  4. See what that looks like when you compile / generate your help. Don't judge it from the Design Editor or the Preview.
  5. If the indent is not what you want, return to Step 2 and then set the margin you want.

That should get things looking OK again. If you are nervous about using a multi-file find and replace tool as mentioned earlier, you can also use the style pod to correct that. You need to open each topic with lists and change selection in the dropdown from Paragraph and Character Style to List Styles, then select the list and double click the required style in the pod. RoboHelp will update the style to the correct case.

The Indent Buttons

When working with lists, be careful using the indent buttons on the Formatting Toolbar. They may work OK but with some style definitions you can get undesirable results. The result may be OK in the Design Editor but not so good in the browser. Check.

Anything Else?

You could leave it at that but this is a good opportunity to review your CSS file.

Cleaning up old CSS files produced by RoboHelp

Whilst the above shows how to correct the appearance of your topics, you will likely notice the style pod is very cluttered with list styles and maybe even the dreaded kadov tags if you were using X5 or an earlier version. This is a good chance to clean things up.

You need to view your style sheet in a dedicated CSS editor such as Top Style (a free version can be found on the internet) or in a text editor such as Notepad.

In style sheets with "kadov" still referenced, there will be three definitions for each style. Otherwise just the first two will appear.

Non list styles

P {
font-family: Verdana, Arial;
color: #000000;
margin-top: 8pt;
margin-bottom: 8pt;
font-size: 8pt;
}

 

LI.P {
font-family: Verdana, Arial;
color: #000000;
font-size: 8pt;
}

Delete all the definitions starting LI.stylename where the style is NOT used as a list.

LI.kadov-P {
font-family: Verdana, Arial;
color: #000000;
font-size: 10pt;
font-family: Verdana, Arial;
font-size: 8.0pt;
color: #000000;
}

Delete all the definitions starting LI.kadov.

 

For non-list styles, that's all you need to do.

List styles

Now move to the styles that are used as for lists, for example P.ListBullet below.

With LI.kadov removed your list styles will now look like this (apart from the colouring)

P.ListBullet {
font-family: Verdana, Arial;
font-size: 8.0pt;
/* list-style-type: square;
list-style-position: outside; */

color: #000000;
font-weight: normal;
font-style: normal;
margin-top: 8pt;
margin-bottom: 8pt;
/* margin-left: -10pt; */
}

P.ListBullet is defining the paragraph

LI.P-ListBullet {
font-family: Verdana, Arial;
font-size: 8.0pt;
list-style-type: square;
list-style-position: outside;
color: #000000;
font-weight: normal;
font-style: normal;

}

LI.P-ListBullet is defining the list

 

Now you have the two styles that are controlling your list in RH8 and the code in a topic will look something like this.

<li class="p-ListBullet"><p class="ListBullet">Title bar</p></li>

XHTML will not use paragraph styles as lists so as a minimum, you must remove any list properties such as those higlighted green above. Comment them out so that they will be ignored but you can see still see what was included. Precede the definitions with /* and suffix them with */ to comment them out. You can delete these definitions later when you have everything working correctly.

At this point, if you compile / generate your help, it may look OK or you may still have some problems. In the example above, it was also necessary to comment out the left margin to stop the text running into the bullet, as explained earlier.

Another option is to comment out the whole P.ListBullet selector in the CSS file. Topics will still show <p class="ListBullet"> but because the class has been commented out of the CSS, the ordinary <p> definitions will apply and in many cases that will give the desired appearance. If that has worked, then use a multi file find and replace tool to find <p class="ListBullet"> and replace with <p> to give you clean code.

Finally, you could remove the whole <p class="ListBullet"> tag and amend the LI.P-ListBullet selector to include any additional definitions.

The advantage of that is that as soon as you apply a list style in RoboHelp 8, its appearance will be what you have defined for the LI.P-ListBullet selector.

The disadvantage is that if you generate printed documentation using a Word template rather than using a CSS file, lists cannot be mapped so their appearance will be wrong. This is described in more detail in this download.

Creating new lists in RoboHelp 8 and above

To create a new list in RoboHelp 8 and above, the first step is to apply the list style as shown in the style pod.

What you do then, depends on which of the above options you chose.

CSS

HTML

Action

P.ListBullet style left in CSS
The style names here are examples.

<p class="ListBullet"> tag left in topics

Apply from the ListBullet class from the paragraph styles.
Note: this is a paragraph class so it can only be applied from the styles pod, not the styles dropdown.

P.ListBullet style commented out of CSS or deleted

<p class="ListBullet"> tag left in topics

Apply the Normal style.
Old topics will effectively be applying the Normal style so this will give the same appearance.

P.ListBullet style commented out of CSS or deleted

<p class="ListBullet"> amended to <p>

Apply the Normal style.
Old topics will effectively be applying the Normal style so this will give the same appearance.

P.ListBullet style commented out of CSS or deleted

<p class="ListBullet"> removed

Nothing.
The appearance of old and new lists is being defined by the list style applied so no further action is required.

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

07 Feb 2017

New topic to replace previous PDF instructions.