Index


RISC World

Impression to HTML

Dave Holden explains how to use our RISCWorld HTML converter

Appendix

This sections contains information on the various files used 'internally' by Imp-HTML and explains how you you can alter these to suit your own requirements. The ordinary user will probably never need to alter any of these files except, perhaps, the CharMap file.

Setup files

These can be found in the sub directory 'Setup' of the Imp-HTML application directory. In here you will find four files, they are;

    CharMap
    DefaultMap
    Preamble
    Styles

If you have selected 'Save Choices' from the iconbar menu at any time then there will also be a file 'Choices'.

CharMap

This is a list of ascii characters and the characters or strings of characters they will be converted to in HTML. Each line has the character and then a Tab character (ascii 9) followed by the HTML equivalent. If you load this file into a text editor it should look something like this.

The appearance of the Tab character, shown as a right pointing arrow here, will depend upon which text editor you use.

If you are familiar with HTML you will recognise these. For example, the 'sexed' double quotation marks are translated into &quot; the pound character into &pound:, the < and > characters into &lt; and &gt; and so on. You can modify or add to this list if you wish.

DefaultMap

This, as it's name implies, is the default map that will be loaded when you first start the program.

There may also be a file name 'DefaultMap' in the Mappings directory. This may or may not be identical. The file in the 'Setup' directory is the one that will be loaded at startup to provide a set of default settings in the Styles window. The one in the 'Mappings' directory is the one that would be loaded by the user from the menus. This would normally be a set of 'basic' settings applicable to simple files.

The layout of this file is the same as any other Mappings file and this is described later.

You can, of course, edit or add to this file to suit your own preferences. You can also, if you wish copy it to the Mappings directory to provide a basic mappings file.

Preamble

This will be used as the first part of any HTML created. It can contain anything you like, as long as it's valid HTML. The default Preamble file is shown below, and this is extremely basic.

Styles

This creates the Styles menu. On each line is, first, the name as it will appear on the menu (no more than 12 characters), a Tab character, then the 'on' code, another Tab character, then the 'off' code, then some special characters which describe the various other settings for that style.

The standard file, and the menu, are shown below.

You will see one obvious difference from the Effects file. Some of the first entries have another Tab character and field after the 'off' code. This is used to force the settings of the buttons that set the end of line mapping and whether the Style starts a new HTML chapter or appears in the Index. Five letters are recognised, and these can be on their own or paired. They must be in upper case, and are -

  • I - Include anything in this Style in the Index file
  • C - Start a new Chapter when you find this Style
  • N - Set the the end of line button to 'none'
  • B - Set the end of line button to 'br'
  • P - Set the end of line button to 'p'

The 'Colour Red' and 'Colour Blue' entries are really only included as an example of how you can use this menu to make your headings and sub headings coloured if you wish.

Mappings file layout

This information is supplied for those who like to 'tinker' since it is unlikely that normal users would need to alter any of these files.

Each line in the file consists of, first, the actual style (or effect) code as it appears in a Text Story file exported from Impression. These are always enclosed in curly brackets. Then there is a 'tab' character, then the HTML tag(s) that it will be converted to. After this there may be another tab character and then one or more letter codes. These are -

  • P- - Stop using <P>..</P> tags at end of paragraphs
  • P+   - Begin using <P>..</P> tags at end of paragraphs (the default, only needed for an 'off' tag when P- used in the 'on' tag)
  • B+   - Begin using <BR> tags at the end of lines instead of <P>...</P>
  • B-   - Stop using <BR> tags at end of lines. Would usually then revert to <P>...</P> tags
  • C   - Start a new chapter when this style is found
  • I   - Put any text in this style in the Index
  • U+   - Start an Unordered List.
  • U-   - End an Unordered List
  • O+   - Start an Ordered List
  • O-   - End an Ordered List

Dave Holden

 Index