home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / 6plus / helpbook.txt < prev    next >
Text File  |  1995-05-18  |  8KB  |  125 lines

  1.  
  2.     HELPBOOK.TXT
  3.     
  4.     To make a help file you need to have two necessary pieces, 
  5.     a *.hpj file that acts like a makefile for the help compiler, and
  6.     a *.rtf file that includes the text for the help file and its formatting.
  7.     RTF stands for rich text format file.  You may also include
  8.     bitmaps (*.bmp) and *.shg (segmented hyper graphics) files.
  9.     The help compiler basically uses help TOPICS which are
  10.     named by KEYWORDS, and contain CONTEXT STRINGS.
  11.     All measurements in the RTF file is made in twips 1\1440 of an inch.
  12.     
  13.     Genhelp.hpj looks like this...
  14.     
  15.     [OPTIONS]                        // This is the options section
  16.     CONTENTS=Contents            // This sets which topic page is the first page\screen
  17.     TITLE=TRASH Help            // This sets the text for the title bar of the help window
  18.     COMPRESS=true                // This tells the help compiler to make a compressed file
  19.     WARNING=3                        // This sets the warning level for the compiler
  20.     [FILES]                                // This section tells the help compiler what RTF files to use
  21.     downtug.rtf                            // This help file only uses one RTF file
  22.     [BITMAPS]                        // This section tell the help compiler what BMP and SHG to use
  23.     downtug.shg                        // The SHG file this help file uses
  24.     first.bmp                                // These are the bitmaps that should be included
  25.     second.bmp                            //
  26.     third.bmp                                //
  27.     fourth.bmp                            //
  28.     fifth.bmp                                //
  29.     [WINDOWS]                    // This section is optional, sets various window parameters, uses help units, not twips
  30.     Main = "DOWNTUG", (300, 80, 700, 900), 0, (255,255,255), (255,255,255)  
  31.     [MAP]                                // This section sets context aliases for context strings not used here
  32.     
  33.     Other sections that can be added are;
  34.     
  35.     [ALIAS]                            // Allows setting aliases for context strings
  36.     [BAGGAGE]                        // Allows listing multimedia files to be included
  37.     [BUILDTAGS]                    // Sets which topics to include in the help file
  38.     [CONFIG]                            // Allows you to do macros (Create Buttons, Register DLLs, etc.)
  39.     
  40.     Other commands that can be added to the [OPTIONS] section are;
  41.     
  42.     BMROOT                            // Sets the root directory for bitmap files
  43.     BUILD                                // Sets which topics in the [BUILDTAGS] section are to be used
  44.     COPYRIGHT                    // Sets a copyright message for the about box
  45.     ERRORLOG                    // Sets the name of the file that build errors are written to
  46.     FORCEFONT                    // Forces a font to replace all fonts in the help file
  47.     ICON                                // Sets the icon that will be shown when it minimizes
  48.     LANGUAGE                        // Sets the sorting order for keywords
  49.     MAPFONTSIZE                // Maps fonts in the help file to a specific size
  50.     OPTCDROM                    // Optimizes the mapping for CD-ROM
  51.     REPORT                            // Turn verbose compiler output on and off
  52.     ROOT                                // Sets the root directory for the compiler to look for files
  53.     
  54.     In the Genhelp.rtf the slash (\) preceeds all commands
  55.     The file looks like this;
  56.     
  57.     {\rtf\ansi                                                // { starts the file, \rtf means this is rtf file, \ansi means ansi character set
  58.     {\fonttbl                                                // { starts a special section, \fonttbls starts the font table
  59.     \f0\froman Times New Roman;            // \f0 means font zero, \froman tells font type, Times New Roman is the font
  60.     \f1\fswiss MS Sans Serif;                    // Sets font 1 to swiss font called MS Sans Serif
  61.     \f2\fswiss Arial;}                                    // Sets font 2 to swiss font called Arial, } ends the font table
  62.     {\colortbl                                                // { starts a special section, \colortbl starts the color table, unlike fonttbl not numbered
  63.     \red0\green0\blue0;                            // Color 0 is \red0 meaning no red, \green0 no green, \blue0 no blue, i.e. BLACK
  64.     \red255\green0\blue0;                        // Color 1 is \red255 meaning full red, \green0\blue0, i.e. BRIGHT RED
  65.     \red0\green28\blue0;                            // Color 2 is no red, 28 green, no blue, i.e. DARK GREEN
  66.     \red0\green0\blue128;}                        // Color 3 is no red, no green, 128 blue, i.e. MEDIUM BLUE, } ends color table
  67.     #{\footnote Contents}                            // This starts the TOPICS.  The first is the initial screen\page usually called CONTENTS
  68.                                                                 // A } bracket MUST end the file (after the topics) to match the { at the start of the file.
  69.  
  70. All topics must have the following format;
  71.  
  72.     #{\footnote downtug}
  73.     \par
  74.     \cf1D\cf0elphi \cf1O\cf0nline \cf1W\cf0indows \cf1NT U\cf0sers \cf1G\cf0roup      \line
  75.     \par
  76.     \page
  77.     
  78. They all start with the TOPIC KEYWORD.  In the previous example it was CONTENTS, in this topic it is DOWNTUG.
  79. They must all end with the \page command.  It includes the CONTEXT STRING, this one is a little complicated, it could
  80. be something as simple as this;
  81.  
  82.     #{\footnote Topic1}                    // # sets the TOPIC KEYWORD, here it is Topic1.
  83.     This is a test.                            // This is the CONTEXT STRING.  Only this will show in the help file.
  84.     \page                                        // This ends the TOPIC.
  85.     
  86. You can add other capabilities to the topic by adding other commands to the beginning i.e.;
  87.  
  88.     #{\footnote Topic1}                    // Again, this sets the TOPIC KEYWORD to Topic1 (you can make them anything)
  89.     K{\footnote You are Invited}    // This sets the text that will come up at the top of the SEARCH dialog in help for this topic
  90.     ${\footnote Come Join us}        // This sets the text that will come up in the bottom of the SEARCH dialog in help for this topic
  91.     +{\footnote jointopics}                // This adds this topic to a browse list in help of all topics marked jointopics
  92.  
  93. Here are the commands that you use inside the RTF file.  They are interlaced with the text and start with { or \
  94.  
  95.     \deff                                        // Sets the default font.  \deff1 sets font 1 as defined in the font table as the default.
  96.                                                 // You can set the default color to 0 by putting a semi-colon at the end of the colortbl statement.
  97.     \li                                            // Sets the left indent, is used like \li720 which sets the left indent to 720 twips (1/2 inch)
  98.     \ri                                            // Sets the right indent, works same as left indent
  99.     \fi                                            // Sets the indent of the first line of a paragraph in relation to the left indent
  100.     \tx                                        // Sets tab stops, is used like \tx720\tx720\tx720 which sets three 720 twip tabs
  101.     \sb                                        // Sets the space before a paragraph, is used like \sb720
  102.     \sa                                        // Sets the space after a paragraph, is used like \sa720
  103.     \tab                                        // Tabs the text over one tab stop
  104.     \line                                        // Starts a new line
  105.     \par                                        // Starts a new paragraph
  106.     \pard                                    // Resets all tabs and indents to their default values
  107.     \f                                            // Sets the next text to a given font, used like \f2 sets the text to font 2 as listed in the font table
  108.     \fs                                        // Sets the next text to a given font size, used like \fs24 to set the font to 24 point
  109.     \c                                            // Sets the next text to a given color, used like \c2 sets the text to color 2 sa defined in the colortbl
  110.     \{bml                                    // Is used to insert bitmaps into the text.  As an example \{bml mybitmap.bmp\}  left justified
  111.     \{bmc                                    // Same but centered
  112.     \{bmr                                    // Same but right justified
  113.     \ul                                        // Creates a pop-up from your text.  As an example THIS IS A {\ul TEST}{\v TOPIC1}  will
  114.                                                     // make TEST green dotted underlined text that will popup a box with the TOPIC1 text in it 
  115.                                                     // when a user clicks on the jump word TEST
  116.     \uldb                                    // Does the same, but JUMPS i.e. creates a new window, to display the the TOPIC1 text rather
  117.                                                     // than displaying the text in a popup box
  118.     \strike                                    // Is used to make a JUMP from a bitmap rather than from text.  As an example
  119.                                                     // Click on the picture {\strike \{bml mybitmap.bmp\}}{\v TOPIC1} to see a list.
  120.                                                     // Will make the bitmap active, and allow the user to JUMP to TOPIC1 by clicking on it.
  121.                                                     // You cannot create a POPUP from a bitmap, it can only be done from SHG files.
  122.                                                     // You also don'y need strike for SHG files, just use the bitmap statement, links are built in
  123.  
  124. Look at the Genhelp file to familiarize yourself with these commands and their use.
  125.