Appendix B.   Customizing KEYpak Conversions

You can customize certain aspects of a text/word processor conversion by creating or modifying the standard configuration file XXSTD.CFG.   XX is the two or three character mnemonic for the target format.  See Appendix A for a list of KEYpak supported formats and their mnemonics. 

In general, a configuration file may contain one, two, or three types of configurations:

Source configurations                           for source conversions

Target configurations                            for target conversions

Character set configurations               for representing characters in the target document.  These are applied only to target conversion formats.

For detailed information on all three types of configurations, see chapter 5 of the KEYpak Conversion Reference Guide. 

This appendix describes how to create or modify a standard configuration file. 

                      Notes        •       Currently, you can customize only the text/word processor conversions.  No configurations are available to customize the image/graphic conversions.

                                        •       This release of KEYpak NT does not support source configurations.  Therefore, you can only customize the target conversions.

Standard Configuration File

For most of the target conversions, a standard configuration file (XXSTD.CFG, where XX is the two or three character mnemonic for the target format) is provided with your installation.  A standard configuration file generally contains only the character set configurations.  This file defines how the characters are to be translated to the target document. 

                        Note        No standard configuration file is provided for the following formats.  For these formats, KEYpak will automatically load and map the character set files (kw*.stb/kw*.ttb) as required.

•       DEC WPS-PLUS (WPL)

•       HTML Hypertext Markup Language (HTM)

•       Lotus AMI Pro (AMI)

•       Microsoft Rich Text Format (RTF)

•       Microsoft Word for Mac (MWM)

•       Microsoft Word for Windows (MWW)

•       WordPerfect 5.x for DOS/Windows (WO)

During a conversion, KEYpak searches for the standard configuration file for the target format.  If the standard configuration file is not found, the internal defaults will be used to create the target document. 

Therefore, to customize a target conversion you can create or modify the standard configuration file.

 

•       You may modify character set configurations and/or add available target configurations with values other than the defaults.  

•       If there is no configuration file available for the format, create a new standard configuration file to include  available target configurations with values other than the defaults.

For a list of available configurations and their range of values, see the target reference file XXTRG.DOC provided with your installation. 

                      Notes        •       Before modifying an existing standard configuration file, make a backup copy of the standard configuration file included in your package.

                                        •       If you are creating a new standard configuration file, you must name it XXSTD.CFG, where XX is the two or three character mnemonic for the target format.  See Appendix A for a list of KEYpak supported formats and their mnemonics.

There may be additional character set configuration files associated with each target conversion.  To use any of the additional files, you can save the standard configuration file and rename the file you want to use as XXSTD.CFG. 

To create or modify a configuration file, see the following examples.  For detailed information, refer to chapter 5 of the KEYpak Conversion Reference Guide.

Examples

1.   Creating a new standard configuration file

Assume that you want to customize the HTML (HTM) target conversion.  There is no configuration file available for HTM.  Therefore, create a  new configuration file HTMSTD.CFG with a text editor.  The file may look similar to the following:

;This is a sample configuration file which defines new values for ;configurations related to the HTML target conversion.
;
;Notice that configuration files can have comments which begin ;with a semicolon.  Blank lines can also be included to increase ;the readability of the document.

;Two of the HTML target configurations are listed in the ;HTMTRG.DOC file as follows:

;     Minimum list items
;           TYPE:               Integer
;           RANGE:            1 to 4
;           DEFAULT:         2

;     Support heading
;           TYPE:               Toggle
;           RANGE:            “NO”
;                                   “YES”
;           DEFAULT:         “YES”

;To modify the HTML configurations, first use the type code to ;indicate target.

$TARGET

;Now define new values for the HTML target configurations:

Minimum list items = 3
Support heading = “NO”

                        Note        Character, string, and toggle values for configurations must be enclosed within double quotes.

2.   Modifying an existing configuration file

Assume that you want to customize the Microsoft Word for PC (MW) target conversion.  There is a standard configuration file MWSTD.CFG available with your installation.  This file contains the character set configurations and looks similar to the following:

$CHRSET
     1 = 32, NM, “NO” , , , , C1, N    ;SPACE “ “
     2 = 33, NM, “NO” , , , , C1, N    ;exclamation “!”
     .
     .
     .
423 = 63, NM, “NO” , , , , MK, Y    ;summation, bottom right

Now refer to the target reference file MWTRG.DOC to determine the configurations available for MW target.  There is a configuration Right margin to modify the right margin for the target document.  By default, KEYpak will create a right margin of 1.25 inch.  If you want to create a right margin of 2.0 inch, you can include the configuration Right margin with new value in the MWSTD.CFG file as follows:

;First, use the type code to indicate target

$TARGET

;Now define new value for the configuration Right margin

Right margin = “2.0”